Repository navigation
feat(shell): expose gated persistent sessions through Native and PTC - #923
Draft
Haoming9527 wants to merge 7 commits into
Draft
Haoming9527 wants to merge 7 commits into
Haoming9527 wants to merge 7 commits into
Conversation
…on-public-integration
…on-public-integration
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 #921; this is the public session integration slice.
What was wrong
The resident session kernel and spill transport were not reachable through the ordinary Bash tool definition. Native and PTC need the same explicit session selector while preserving the existing fresh command and Jobs path. A retained tool definition must also refuse a different Agent before it can enqueue work.
The change
The composition layer selects built-in/custom runtimes and supplies that selection to the generic session admission owner. The package root owns this provider alongside the existing fresh provider. Eligible runtimes expose optional
execution: "fresh" | "session"; omitted execution preserves fresh behavior. Session calls preserve cwd, exports, functions and options, use the existing native FIFO and current authority checks, and return explicit shell state, state loss and cleanup results. Background Jobs and script files remain fresh execution, with actionable refusal for incompatible session arguments.Publication requires both native session capabilities and an accepted complete runtime inventory. The accepted set remains empty for the currently shipped stock runtime, whose asynchronous output ownership defect is reproduced and documented. There is no user override or injected production admission path. This slice does not enable the unqualified runtime or complete #872.
Native and PTC share typed output settlement. Only a sealed
spillPathreaches the public result; native ownership metadata stays internal. Truncated streams lacking recovery paths are identified explicitly. The publishing Agent must match at submission and queued admission. Agent/provider disposal joins the existing owner cleanup without replay or fallback. English/Chinese docs and changelog describe the contracts and remaining runtime qualification.Validation
npm run build, probe syntax andgit diff --check: passed. Source-size gate: 933 files, all at or below the unchanged 1,000-line limit.task.capabilities; correcting that fixture preserved the production capability gate. Its failed log is retained.resident-probe-temp/session-agent-negative-MjKeCe/report.json.resident-probe-temp/session-public-schema-bytes.json.d0aa842conly in its complete candidate manifest and accepted inventory digest; it uses normal root publication without an internal admission override. All three sandbox modes recovered complete waited-background stdout/stderr. Worker9b25fcea…, candidate archived446bf83…, report SHA-2564fc90c521b1850aa88c800b5e006ea10cf1bae8b828372f6e8f924a6f245b063; the exact source/payload receipt is retained. The candidate remains unpublished and this PR keeps the shipped pin/empty accepted set unchanged. Historical internal-seam proof is labeled separately; no performance claim.c7488c1ddecb4849e5ff8d5df740ae4afdbe4e6f43935614b8a0546e26aa4041. The first failed fixture expected the inner cancellation value; the corrected check uses DSH's actualABORTEDenvelope, verifies child exit and checksstateLost: "shell-reset"on the next call. The host envelope's lack of immediate typed shell state is documented. This short run does not repeat the separate five-minute fresh-task proof.pull_request/ aggregateCI required: Cross-platform validation 43500151511 passed all 10 jobs at3fd7253d10ee3fba919c726e55ce30a01552753c. Windows x64, Linux x64, macOS x64/ARM64, Node-floor, Rust/workflow lint, source-size and tools trial are green. Windows full suite: 258 passed, 4 explicit skips; macOS x64: 256 passed, 6 explicit skips. Both logs confirm the unchanged publication-boundary checks pass.Environment
Windows x64, Node26.12.1, Rust1.99.0 locally, locked DSH0.2.2-rc.1 public services. Base #921
6649c02d6bad923834f0f4cc35ece8696db9687a; original stack maine724444416fed01eb1f75916ec556c0a286e73f9. No new dependency, package-version change, release, merge or deployment. Full feature acceptance still requires runtime adoption, transport cleanup and final cross-platform measurements.