Repository navigation
Description
Missing behavior
The admission journal retains every reservation indefinitely. Codex needs a verified terminal transition before completed or interrupted work can release capacity.
Sage task T21. This is a shared admission component for #88 and #138. It does not change Claude's active state-tool or hook work.
Scope
Add exact, idempotent completion and interruption transitions for an existing child binding. Retain history and free only that assignment's slot. Count unfinished work for total, project, lead and team limits. Refuse new work from completed issuers. Refuse renewed Codex start instructions for a completed assignment.
The trusted provider adapter remains responsible for authenticating the caller and proving native completion or interruption. No native lifecycle event is newly wired in this component.
Acceptance
- Every completion field matches a saved binding and current owner epoch.
- Exact retries do not duplicate writes or release another assignment's slot.
- Conflicting outcomes and interruption evidence are refused.
- A lead's terminal event retains its children's occupied slots.
- Completed issuers cannot reserve or prepare new work.
- Valid terminal evidence is accepted while Sage is off without changing mode.
- Concurrent completion and fresh reservations keep atomic capacity limits.
- Both provider bundles work in isolation; tests fail on detached main.
- Build, check, full tests and two clean code/security/QA cycles pass before merge.
Limits
This component does not verify native evidence, accept reports or verdicts, finish logbook runs, recover failed starts or reuse children for later turns. Those adapters remain separate integration work. Automatic Sage remains incomplete; see #88.
Current status
Draft PR #158 is at f93e82231217332f8964107ef990abdb47fb0b72, based on main 5d1345b. Security review found a terminal-binding race; the atomic journal guard fixes it. Its regression fails on detached pre-repair 58ae322 and passes after repair. All nine new checks fail on detached main because the APIs are missing. Two code, security and QA cycles are clean on the repaired head. Build, check and nine focused checks pass. The pre-integration, pre-repair full suite passed 1,026 tests; final-head CI is pending.
Activity