Skip to content

Bind native requests before effect admission (T31) - #297

Merged
erickb336 merged 2 commits into
mainfrom
codex/t31-native-binding
Oct 21, 2026
Merged

erickb336 merged 2 commits into
mainfrom
codex/t31-native-binding

Conversation

@erickb336

@erickb336 erickb336 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #296

Sage task T31

The prepared terminal controller needs to reject foreign, stale or malformed native requests before an evaluator can consider effects. This adds a provider-local binding for one trusted assignment, native connection generation and active turn. It validates the actual native dynamic-call envelope, requires strict action-argument validation, snapshots the data and refuses duplicate, reentrant or closed requests.

The result is staged data, with no effect callback or authorization flag. Constructor identity is trusted caller data. The validator must return synchronous plain JSON or throw, and owns any async work it creates. Review found that attempting to observe arbitrary returned Promises could invoke constructor/species hooks. The repair removes that observer and its overbroad containment claim; regression checks verify refusal without those hook reads. This is not a sandbox for trusted JavaScript.

Validation at fe74131:

  • npm run build: built 331 files.
  • npm run check: all checks pass.
  • Focused suite: tests 14, pass 14, fail 0, cancelled 0, skipped 0.
  • Exact final test bytes on detached main 113edff: tests 14, pass 0, fail 14 because the exported API is absent. These are missing-capability failures, not fourteen existing defects.
  • Exact final tests on detached pre-repair feature head b72f113: tests 14, pass 12, fail 2. The two added regressions expose constructor/species hook execution. Final head passes all 14. Test-owned rejected fixtures do not claim module rejection containment.
  • Retained actual native event replay stages valid arguments and refuses the recorded extra-field arguments. This is replay, not a fresh native launch or authenticated assignment.
  • Two fresh code/security/QA cycles are clean on the final head. Each review ran the 14-test suite and independent boundary controls.
  • Final full npm test: tests 1970, pass 1970, fail 0, cancelled 0, skipped 0.
  • Exact-head CI run 39693894369 passed check and the full suite: tests 1970, pass 1970, fail 0.

Every local test uses fake ps, pgrep and kill first on PATH and unsets NODE_TEST_CONTEXT. Generated plugin files come from the build. Both detached proof worktrees were removed after their logs were saved.

Not verified: live production host integration, actual effect authorization, complete startup isolation, owner/cloud permission binding, shared ownership, task/approval gates or durable recovery. Those remain separate dependencies under #88, #295, #243, #239, #246 and #266. Installed behavior and Claude-active files are unchanged. This PR alone does not deliver automatic Sage or gated autopilot.

@erickb336
erickb336 marked this pull request as ready for review October 21, 2026 23:55
@erickb336
erickb336 merged commit bf7cecb 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: bind native requests before effect admission (T31)

1 participant