Repository navigation
Bind native requests before effect admission (T31) - #297
Merged
Merged
Conversation
erickb336
marked this pull request as ready for review
October 21, 2026 23:55
This was referenced Oct 21, 2026
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 #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.npm test: tests 1970, pass 1970, fail 0, cancelled 0, skipped 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.