Repository navigation
Verify native owner mode switches across resumed turns (T18) - #261
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #260
Sage task T18
Sage needs direct evidence that its activation instructions reach Codex across resumed owner turns. This adds an isolated native diagnostic for ordinary prompt → on → off → on, using the current packaged policy and fixed simulated model responses. Production policy and installed defaults stay unchanged.
The diagnostic verifies one session, a stable owner epoch, three distinct mode turns, no child reservations, and an unchanged seeded logbook. Both chief instruction parts appear with cumulative counts 0, 1, 1, 2. The off turn retains history without a new injection. Process and server cleanup must complete; failures preserve temporary evidence.
Verification on 8cde2f0
npm run build:built 317 files.npm run check:all checks pass.node --test scripts/fixtures/codex-native/owner-turns.test.mjs scripts/fixtures/codex-native/restart-cleanup.test.mjs:tests 18; pass 18; fail 0.tests 20; pass 20; fail 0.tests 18; pass 18; fail 0.node scripts/probe-codex-owner-turns.mjs: passed in implementation and independently in QA, using actual CLI 0.160.0. Four requests and completions, exact instruction counts, unchanged logbook. Final cleanup: complete true, ownedHandlesClosed true, temporaryRootRemoved true.git diff --check: passed.tests 1628; pass 1628; fail 0; cancelled 0; skipped 0.npm test:tests 1628; pass 1628; fail 0; cancelled 0; skipped 0(346.70 seconds).Tests used fake ps, pgrep and kill first on PATH. The 15 new assertion/cleanup tests are included in npm test. Existing test entries and assertions are unchanged. One independent code/QA review cycle is clean on this diagnostic-only change.
Baseline and limits
On detached main 66fe812, copying only the two new diagnostic helper/test files gives
tests 15; pass 15; fail 0. This adds verification of existing production behavior. It is not a failing-main regression repair. Negative fixture cases verify that the diagnostic rejects incorrect evidence.Responses are simulated. This proves native delivery and mode bookkeeping in the fixture, not agent application, real-model quality, complete tool enforcement, other Codex versions, or installed automatic Sage. Issue #88 remains open. Claude-owned work is untouched.