Repository navigation
fix(runtime): route confined results and batches through kernel - #925
Draft
Haoming9527 wants to merge 1 commit into
Draft
Haoming9527 wants to merge 1 commit into
Haoming9527 wants to merge 1 commit into
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.
Refs #872. Stacked on #924.
What was wrong
Result put/page/release and batch plan/run/resume still started a public one-shot OPS worker after the file/fresh/cleanup migration. The initial real routing regression failed all three checks on that path. Removing the existing OS confinement was not an equivalent fix: a selected root can change after host preparation.
The change
Windows restricted calls now send the exact public confinement argv, working directory and scrubbed environment through the existing resident request lifetime. The native atomic Job range owns the runner before bounded stdin delivery; cancellation joins stdin, both output readers and descendants. Full-access calls reuse the fixed worker leaf on supported platforms.
confined-worker-v1fails closed on older kernels; admission failure never falls back or replays.The native deadline covers launch/physical-start acknowledgement/input before worker decoding. Known early nonzero runner exits retain stderr even when stdin delivery ends in BrokenPipe, preserving existing fatal-runner and denial classifications. Current authority, private result grants, no-follow checks, audit IDs and unknown-effect semantics remain in place.
Restricted POSIX batch/result and explicit WSL reads retain their named platform transport. This draft does not close #872, change runtime pins, or claim a performance improvement. Bilingual docs and Unreleased entries describe the boundary. No dependencies, version, model-facing schemas or prompts changed. The diff has 594 source additions counting inline tests, excluding separate tests/docs.
Validation
Final Windows worker SHA-256:
024d5e80b9befe77dce3b3ad4bf6c2d4d40e236047054acc79dd9f7196192b2c.Real routing checks cover public confinement, root-junction replacement after preparation, Native/PTC reference ownership and paging/release, batch plan/run/resume, targeted cancellation, native stdin deadline without a caller timeout, both early-runner refusal signatures, and zero public one-shot OPS spawns through disposal. Raw red evidence is retained: the original route failed 3/3 initial checks; an intermediate kernel failed the stdin deadline; the next kernel passed six checks but failed both early-refusal checks. The final worker passes all eight. Earlier setup attempts (missing stage/legacy fixture and a worker-override conflict with package-resolution assertions) were corrected explicitly, not counted as passes.
Pull-request CI: Cross-platform validation / CI required passed for exact head
80dbcc8535271f7da460fe913d68783fdd6f163e. All 10 jobs are green, including Windows, Linux, both macOS architectures, the Node floor, tool trials, lint/size checks and the required aggregate. Windows completed 262 suites with 4 allowed skips; Linux completed 260 suites with 6 allowed skips. Windows native ownership, backpressure, spill, stock-driver and UNC checks also passed. This cross-platform result does not remove the documented POSIX ownership limitation or claim completion of #872.Environment
Windows x64, Node v26.12.1, locked
npm ci --ignore-scripts, actual public DSH policy/sandbox/subprocess services. Base943c5bc966ab81a221eadd0e7d0ff01596833f75(PR #924); local debug worker officially staged with the repository staging script. No model API calls.