Repository navigation
feat(shell): retain session output in the shared native spill store - #921
Draft
Haoming9527 wants to merge 3 commits into
Draft
Haoming9527 wants to merge 3 commits into
Haoming9527 wants to merge 3 commits 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 #920 (
work/872-resident-fresh-bridge).What was wrong
Persistent sessions retained bounded memory output but did not connect their authenticated stdout/stderr channels to the resident task spill store or the settled-file retention ledger. A session output larger than 128 KiB therefore lacked the full-file recovery available to fresh tasks.
The change
shell-spill-v1only after this wiring.This slice adds 70 production lines; the complete diff is 18 files, +509/-11 including tests, fixtures and documentation. No dependency, version, runtime pin or model-facing schema changes. Public session activation still requires a qualified runtime in addition to
shell-v1andshell-spill-v1; stock asynchronous output remains unqualified. POSIX shell ownership remains unsupported.Validation
All local checks below completed on the reviewed implementation; the build and 50 host checks were repeated after stacking onto #920.
npm run buildnode test/run.mjs resident-shell-channel resident-shell-admission resident-shell-outputcargo test --locked --manifest-path native/Cargo.toml --bin dsh-ops-workercargo clippy --workspace --all-targets --locked --manifest-path native/Cargo.toml -- -D warningscargo fmt --check --manifest-path native/Cargo.toml --allandgit diff --checknode scripts/check-workflows.mjsnode scripts/check-file-size.mjsnode bench/probes/probe-872-session-spill.mjs <worker> <candidate> <stock-support> <report>--stock-foregroundnode bench/probes/probe-872-shell-started.mjs <example> <stock> <stock>The candidate proof uses local executable SHA-256
7c4332044ac5fd1b789f30b29c155a62f12f07f8dd3495244bda3ce4e0e84664. Its external background commands followed bywaitrecover exact 1 MiB binary stdout and stderr in all three sandbox modes. It also proves retained shell state, one directory shared with fresh tasks, exact Session ledger reload, file recovery/write refusal, cap withdrawal, retention and kernel loss with an unsealed live stream. Tested worker SHA-256:9b25fceacb73ab1abe53b64b291b89d8ee8896cb9d8df6cfa7a1983f993715c0.The first candidate probe stopped after five passing checks because its local
callvariable shadowed the fixture function. Its failed report is retained asresident-probe-temp/session-spill-candidate-fixture-failure.json; teardown confirmed zero survivors. The fixture was corrected, then the complete nine-check run passed. An initial Clippy run identified the path-included cancellation example's unused new configuration method; that example now initializes the same allocation-only store, and Clippy plus the actual three-case cancellation proof pass. These failures are not reported as production regressions or passing runs.Final local evidence:
resident-probe-temp/session-spill-{candidate,stock}.json, andsession-spill-{stacked-host,native,started,clippy,workflows}.log. The fullnpm run verifyrelease gate was not run locally for this slice; the latest PR-triggered full cross-platform gate passed as recorded below.Retained CI history: Cross-platform validation 43493997529 failed on the incomplete Windows permission/startup/mode authority fixtures inherited from #920. The base correction adds real fresh-provider ownership and readiness to those fixtures, fixes the Native-guidance gate's overwritten subscriber, and adds deterministic unique names for parallel native task fixtures after a separate Windows timestamp collision. These are source corrections, not blind reruns.
Latest exact-head validation: Cross-platform validation 43498759422 passed all 10 jobs, including aggregate
CI required, at6649c02d6bad923834f0f4cc35ece8696db9687a. Windows x64, Linux x64, macOS x64/ARM64, Node-floor, Rust/workflow lint, source-size and tools trial are green. Windows full suite: 256 passed, 4 explicit skips; all corrected permission (15), bundle (4), modes (12) and Native-guidance (2) checks passed.Environment
Windows x64, Node.js 26.12.1, Cargo/Rust 1.99.0. Locked dependencies installed with
npm ci --ignore-scripts. Current base: #920 commitf10c54d521d8f084bc94d605d0b4b9e574a2e02a; head6649c02d6bad923834f0f4cc35ece8696db9687a. The earlier local-probe hashes above retain their original meaning. Real permission/ownership probes used the normal host context and exact public sandbox confinement. The local backport archive remains unpublished and shipped runtime pins are unchanged.