Skip to content

Verify Codex child recovery boundaries after compaction (T17) - #233

Merged
erickb336 merged 2 commits into
mainfrom
codex/t17-compaction-closeout
Oct 15, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t17-compaction-closeout

Conversation

@erickb336

@erickb336 erickb336 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Closes #138
Sage task T17

This closes the remaining verification gaps for child recovery after Codex compaction. The recovery implementation already exists on main. This PR adds four direct boundary tests; it changes no production code.

The tests check interrupted turns before parent reconciliation, two valid active bindings for the same child across owner sessions, stable owner activation, and the prepared-message limit at exactly one MiB and one extra byte. Every test includes a successful control and unchanged admission state. The ambiguity case verifies valid admission records, not two fully prepared native assignments. The size fixture changes only an isolated role template and bypasses dispatch sizing to test the reader independently.

Verification

Head: d6f5a734e38f4e26de66cf913230424b735b46aa, based on main 70b78e4.

  • npm run build: built 302 files.
  • npm run check: all checks pass.
  • Focused tests: 9 tests, 9 pass, 0 fail.
  • All four new tests pass on detached main 70b78e4. They close coverage gaps, not production defects.
  • Four isolated negative controls each fail at the expected refusal assertion: ignore interrupted-turn status, accept multiple matching candidates, permit a different owner activation, or remove the prepared-message byte limit.
  • Three exact-head native probes pass: --sage-child-recovery, --sage-child-repeat-recovery, and --sage-followup-recovery. They restore exact saved assignments, require fresh recovery after each compaction, preserve admission during reads, complete each assignment once, and remove temporary profiles. Follow-up recovery retains the same child across two completed assignments. Two independent code/security/QA cycles are clean on this unchanged head. npm test -- --test-concurrency=1 passed: 1,349 tests, 1,349 pass, 0 fail, exit 0. Exact-head CI run 38553864385 also passed all 1,349 tests. All owned local processes finished. All tests use fake process commands first on PATH.

Acceptance scope

Existing tests cover stale, completed and foreign assignments, changed run/review targets, recovery before tool use, blocked Stops, durable report proof, parent reconciliation and later-assignment isolation. The final native checks exercised single compaction, repeated compaction and recovery in a follow-up assignment. They preserved exact messages, required fresh recovery, completed each assignment once and cleaned up temporary profiles.

Not verified: real-model understanding, installed automatic Sage, the full chief workflow or repository-wide lead ownership. Native model responses are simulated. Those broader obligations remain in #88. Claude's active #140 is unchanged.

@erickb336
erickb336 marked this pull request as ready for review October 15, 2026 16:26
@erickb336
erickb336 merged commit 03c616d into main Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore Codex child instructions and completion after compaction (T17)

1 participant