Skip to content

Record native Codex task requests once (T56) - #223

Merged
erickb336 merged 3 commits into
mainfrom
codex/t56-native-task-create
Oct 14, 2026
Merged

erickb336 merged 3 commits into
mainfrom
codex/t56-native-task-create

Conversation

@erickb336

@erickb336 erickb336 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Closes #221
Sage task T56

The Codex chief can record a task through sage_create_task. An identical request returns the original task, including after reconnect. A changed request is refused. Task creation grants no run, dispatch, review or merge permission.

The provider supplies the authenticated owner and fixed logbook. Core saves the task, route decision and request receipt under one recoverable publication. Readers reject partial writes and detect publication between table reads. CLI and native creation share the task-frame rules. Claude #140's active functions are unchanged.

Validation

Final head 7935364 passes build/check and 31 focused tests. Its exact-commit native task-creation probe passes: one task, one decision, exact retry, zero runs/reservations/children and temporary-profile cleanup. Two clean independent code/security/QA cycles are complete on this unchanged head. All 1,267 local tests pass. Exact-head CI run 38515416318 passes all 1,267 tests.

Commands ran with fake ps, pgrep and kill first on PATH and NODE_TEST_CONTEXT unset:

  • npm run build: 299 files.
  • npm run check: all checks pass.
  • node --test --test-name-pattern='native task creation|T56:' scripts/codex-server.test.mjs: 31 pass, 0 fail.
  • SAGE_TEST_MACHINE_ID=native-fixture node scripts/probe-codex-lifecycle.mjs --sage-create-task: verified true, exit 0, temporaryRootRemoved true.
  • npm test -- --test-concurrency=1: 1,267 pass, 0 fail, 0 cancelled, 0 skipped.

Regression evidence:

  • All 31 tests (14 top-level groups and 17 nested cases) fail on detached main 47146fe because the task-creation module is absent. This demonstrates missing API coverage, not 31 behavioral regression failures.

  • Two scratch mutations remove only snapshot-version comparison. Both tests fail: a concurrent publication incorrectly permits a merge, and the logbook reader no longer refuses the mixed snapshot.

  • On cb4abeb, checksum-valid receipts containing null, false, zero or an empty string create an extra task before refusal. The new regression checks unchanged tables, receipt bytes and pending state. Four truthy malformed controls already refused.

  • On 426feb4, the pattern malformed saved task results reports 0 pass / 6 fail, and recovery preflights reports 0 pass / 5 fail. The failures show publication before refusal or missing refusal. Final recovery preflight validates the complete update before any table publication. These are format-integrity controls; a hostile writer with direct logbook access is outside this boundary.

  • Snapshot mutation reproduction: in an isolated copy, remove only the receipt-version comparison while retaining taskWrites.readVersion(dir). Run the pattern T56: (merge|logbook) refuses: 0 pass / 2 fail.

  • Detached-main reproduction: copy only the final test file into a detached main checkout, link test dependencies, and run the same focused command. No production code is copied.

The earlier full run on 426feb4 was interrupted after review found another defect. It is not passing evidence.

Not verified: real-model choices, installed automatic Sage, all lifecycle routes, or old installations without the pending-write guard. Native fixtures use simulated model responses. Full support remains tracked in #88 and #138. All owned local test and probe processes finished; temporary proof checkouts and native profiles were removed.

@erickb336
erickb336 marked this pull request as ready for review October 14, 2026 05:22
@erickb336
erickb336 merged commit 17bf2e2 into main Oct 14, 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.

Create recorded tasks through the Codex chief tool (T56)

1 participant