Carry recorded complete Opus repair direction into same-task workers
This commit is contained in:
@@ -14,6 +14,12 @@ original_llm = Runner.llm
|
||||
def owner_model_llm(self, task_id, role, service, prompt, cwd, schema):
|
||||
prompt = ("Latest owner review-material policy: fixed 500000-byte limits are removed. Do not omit required sources or evidence or perform compression/re-submission merely to satisfy the obsolete cap. Claude commander/reviewer can inspect their source checkout with Read,Grep,Glob; reviewer validation materials are mirrored into .review-material within the frozen checkout. Other services keep their own tool sets. Preserve scope, acceptance, exact-version evidence and independent review. Read relevant dependencies directly and report required context gaps.\n" + prompt)
|
||||
if service == 'claude' and role == 'commander':
|
||||
if self.config['project'] == 'the-tree-p08-03-code' and task_id == 'P08-03':
|
||||
for entry in self.db.execute("SELECT data FROM events WHERE task_id=? AND event='commander_proposal' ORDER BY id DESC", (task_id,)):
|
||||
recorded = json.loads(entry[0])['decision']
|
||||
if recorded.get('action') == 'request-repair':
|
||||
prompt = "Complete previous recorded repair direction available for your continuation judgment:\n" + json.dumps(recorded, ensure_ascii=False) + "\n" + prompt
|
||||
break
|
||||
schema = json.loads(json.dumps(schema))
|
||||
state = self.task(task_id)["state"]
|
||||
actions = {"ready": ["run", "wait"], "repair_ready": ["run", "wait"],
|
||||
@@ -40,6 +46,15 @@ def owner_model_llm(self, task_id, role, service, prompt, cwd, schema):
|
||||
chosen = decision.get('codex_model')
|
||||
if decision.get('task_id') != task_id or decision.get('action') != 'run' or chosen not in ALLOWED_CODEX_MODELS or not str(decision.get('codex_model_reason', '')).strip():
|
||||
raise ValueError('A recorded Claude run decision with explicit model and reason is required')
|
||||
if self.config['project'] == 'the-tree-p08-03-code' and task_id == 'P08-03':
|
||||
repair = None
|
||||
for entry in self.db.execute("SELECT data FROM events WHERE task_id=? AND event='commander_proposal' ORDER BY id DESC", (task_id,)):
|
||||
value = json.loads(entry[0])['decision']
|
||||
if value.get('action') == 'request-repair':
|
||||
repair = value
|
||||
break
|
||||
if repair:
|
||||
prompt = "Complete recorded Claude repair direction for this same task (not merely a reference):\n" + json.dumps(repair, ensure_ascii=False) + "\n" + prompt
|
||||
prompt = ("Recorded Claude commander run direction for this exact fixed task. Apply within the immutable spec, scope and acceptance; do not widen them.\n" + json.dumps(decision, ensure_ascii=False) + "\n" + prompt)
|
||||
self._owner_codex_model = chosen
|
||||
try:
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"task": "P08-03",
|
||||
"candidate": "7dde98ccb749cbd1c1b82e066b59350e73191400",
|
||||
"failed_worker": "34f6ef5c0d554aa4aebab8d5159b688c",
|
||||
"result": "No changes or tests; full request-repair direction absent from actual worker prompt",
|
||||
"correction": "Provide recorded complete request-repair JSON from same task commander_proposal events to commander and implementer prompts; retain separate actual run decision/model guard",
|
||||
"source_changes": false,
|
||||
"acceptance_changed": false
|
||||
}
|
||||
Reference in New Issue
Block a user