Repository navigation
Description
Missing behavior
Sage task T24. After #161, a Codex parent can inspect a verified child report. It cannot yet save that exact report as durable evidence for later recovery.
This component belongs to #88. Preserve the approved design already prepared on the Codex integration branch.
Scope
Add a provider-neutral admission receipt and a Codex sage_record_report operation. The caller supplies the child name and the hash returned by inspection. Verify the same current owner, assignment, completed binding, task, run, native transcript, and exact report text before saving.
Save recovery proof before the receipt. A partial recovery-proof write must not grant run or review authority. Repeating the same request returns the original receipt. A conflicting hash, report, owner, or assignment must fail.
A saved receipt can support inspection after its native transcript is unavailable, but only when its exact recovery proof remains valid. Sage off permits preservation and inspection of existing work.
Acceptance
- Strict report fields, text hash, completed binding, task, and run agree in the journal.
- The authenticated parent records only its own named child's report.
- Initial-delivery and terminal reconciliation stay scoped to the requested assignment.
- Exact replays do not append duplicate receipts; conflicting replays fail.
- Missing, changed, or foreign recovery proof refuses cached inspection.
- Receipt storage does not accept findings, create verdicts, finish runs, change task state, or enable installed automatic Sage.
- Cover the bundled core and packaged Codex tool with positive and rejection tests, including partial writes and missing native transcripts.
- Prove each new test fails on detached main and verify the native route with simulated responses.
- Build, check, full tests, and two clean code/security/QA review cycles pass on the final commit.
Boundaries
Edit provider sources and shared admission modules only. Do not edit Claude's active hook or shared state-tool work in #140. Later assignments, logbook integration, review acceptance, full policy composition, activation, and a real-project pilot remain separate work.
Activity