Skip to content

Add restricted Codex controller transport (T29) - #292

Merged
erickb336 merged 2 commits into
mainfrom
codex/t29-controller-transport-repair
Oct 21, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t29-controller-transport-repair

Conversation

@erickb336

@erickb336 erickb336 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #291
Sage task T29

Adds the first transport component for the approved opt-in terminal controller under #88. It binds exact response IDs to one connection, reapplies environment restrictions on every turn, and preserves uncertainty after disconnect. It exposes no generic RPC or effect handler. Codex desktop and installed defaults stay unchanged.

The adapter preserves the selected model, approval policy and sandbox. Required process settings are explicit declarations; this component does not authenticate their application. Native notifications keep their optional timestamp. Initialization remains locked until its notification write succeeds, and disconnect settles that wait even if the writer does not finish.

Validation on 7337432697c7ea02ba8ad863d850785787446e29:

  • Focused tests: node --test packages/sage-codex/runtime/controller-transport.test.mjs — 23 pass, 0 fail, 0 cancelled, 0 skipped.
  • npm run build — built 326 files. Generated plugin copies are committed.
  • npm run check — all checks pass.
  • Detached main 97a02e25: identical final test file reports 0 pass / 23 fail because the API is absent. This proves missing functionality, not 23 behavioral defects on main.
  • The disconnect regression fails behaviorally on the preceding implementation fd6e603: 22 pass / 1 fail. After repair: 23 pass / 0 fail.
  • Actual CLI 0.160.0 transport control initializes and starts two threads. It preserves the expected refusal to resume an empty thread with no saved rollout.
  • Actual two-process restart control uses simulated loopback model replies: one thread, two distinct completed turns, explicit environments=[] both times, and catalogs containing only the owner-question tool. No tool effects or paid inference. Both owned processes exited 0; temporary profiles and listeners were removed.
  • All tests use fake ps, pgrep and kill first on PATH, with NODE_TEST_CONTEXT unset.

Review found and repaired a disconnect wait that could hang initialization. Two clean independent code/security/QA cycles completed on this exact head.

  • npm test -- --test-concurrency=1 — 1,940 tests, 1,940 pass, 0 fail, 0 cancelled, 0 skipped.
  • Exact-head CI run 39677026141 — success; 1,940 tests, 1,940 pass, 0 fail, 0 cancelled, 0 skipped. Sage merge check confirms two clean cycles on this SHA.

Not verified: real-model behavior, authenticated owner entry, controller-owned hierarchy, complete effect authorization, shared ownership, authoritative abrupt-loss recovery, publication isolation, installed operation or full autopilot. This PR does not waive those requirements. Claude-active board work is untouched.

@erickb336
erickb336 marked this pull request as ready for review October 21, 2026 21:36
@erickb336
erickb336 merged commit 2f351c4 into main Oct 21, 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.

Codex controller: transport and restricted turn adapter (T29)

1 participant