I3962 — The codex advisor's final message is held to the answer schema and read from its file alone
Pass the answer's JSON Schema to codex exec with --output-schema, built in contract.mjs from the stances and confidences normalise accepts, and treat an exit 0 that wrote no -o file as empty instead of parsing stdout.
PŘIPRAVENO vlna 0 · p2 · implementační profil · bezpečné paralelně
Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I3962 bude přijato.
Cíl
Pass the answer's JSON Schema to codex exec with --output-schema, built in contract.mjs from the stances and confidences normalise accepts, and treat an exit 0 that wrote no -o file as empty instead of parsing stdout.
Proč
The codex-exec adapter asked for the answer shape only in the prompt, and when -o wrote nothing it parsed stdout, which carries Codex's progress and events, by cutting from its first { to its last }. Codex 0.163 supports --output-schema. Found by the native-acceleration pack's P03 discovery in session 54f32bb3; no paid call was made.
Aktuální stav
scripts/lib/advisors/codex-exec.mjs runs codex exec without --output-schema and falls back to run.stdout when the -o file is absent.
Cílový stav
codex exec is handed the answer's schema; only the -o file is an answer; a missing file is empty, a refusal is malformed by normalise, and a client too old for --output-schema fails as an error that names it.
Rozsah
- scripts/lib/advisors/codex-exec.mjs
- scripts/lib/advisors/contract.mjs
- scripts/lib/advisors/process.mjs
- scripts/lib/advisors/contract.test.mjs
Mimo rozsah
- The gemini-cli adapter, whose JSON envelope does not enforce a schema on the response
- A live model call, which needs an authorised budget
Závislosti
Žádné. Tento úkol je kořenem grafu.
Kritéria přijetí
- codex exec is invoked with --output-schema naming a file whose content is ANSWER_SCHEMA: every property required, none added, the enums those normalise accepts
- An exit 0 that wrote no -o file is empty, even when stdout holds an answer-shaped JSON object
- A final message that is not the answer is judged by normalise and is malformed
- A client that refuses --output-schema is an error whose diagnostic names it: a failed run's diagnostic is the client's own error: line, not the usage and try '--help' lines an argument parser ends with (stderr captured from codex-cli 0.163.0)
Validace
- node --test scripts/lib/advisors/contract.test.mjs
- bash test/run.sh 731_advisor_transport_contract
- bin/majordomus plan validate
Požadované důkazy
- advisor_transport_contract
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3962.yaml. Read it back with majordomus plan show I3962.