Repository navigation
feat(shell): run production fresh commands through the resident task owner - #920
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 #919 (
work/872-private-channel-spill, base55d04951d479ff584ddee96c38f2fce05b0aa134). This connects production fresh execution; persistent publication, remaining cleanup transport and final acceptance remain open.What was wrong
Fresh Bash still launched through a per-call public subprocess even when the owning kernel supported complete native task output. Moving just process creation would leave approval, environment, confinement, Jobs handoff and the Native/PTC result contracts disconnected from current session authority.
The change
The common root mounts the fresh task provider only when the actual kernel advertises both
task-v1andtask-spill-v1. Each native queue head rechecks the exact current Agent/Session, publication, standing authority, environment, selected runtime and public confinement. A widened one-call grant cannot survive changed standing authority; active authority changes cancel only admitted work. Initial approval still precedes explicit background registration.Use the existing argument validation, directory resolution, script operand, JSON digest, renderer, public Jobs and retention contracts. Scripts remain file operands opened by the confined Bash. Background publication and timeout promotion retain the same physical task and public Job ID. Preserve environment precedence, tombstones and Electron runner adaptation. Native error/effect facts remain authoritative during diagnostic classification.
The actual-process probe now mounts the ordinary package root, with no internal task-factory injection or capability override. Explicit authority fixtures were added where schema/publication tests previously supplied incomplete Agent-shaped objects. Bilingual docs and changelog included; no new dependency, runtime pin or model-facing schema change.
Validation
git diff --check: passed. Source-size gate: 925 files, all at or below 1,000 lines.51ec139dc8e7dbb9fe7881ee71aa25c691e070bfeb122f50e7520a6bfe7383e6; stock fresh Bash7ec3ec04ce91bae64c23d7150e6b16574e9d91df8fcf0df997006e2b37bf2f1e; report SHA-2565a529dbc9032fd422c65c69ff8c9d74ec057e7e49355b9b6f1d1b3edd4634993.completedfor an intentionally pagedpartialread. Correcting those fixtures did not change production TypeScript or budgets. The original internal-seam proof remains documented separately.5a93fc2e: 42/42 checks across 6 suites passed, 0 skipped on Windows against this PR's own release worker. Command:node test/run.mjs modes.test.mjs bundle-startup native-guidance permissions.test resident-fresh-publicationwithDSH_OPS_TEST_JOBS=1,DSH_OPS_SUITE_TIMEOUT_MS=300000, explicit release-worker path and verified legacy Bash fixture. Includes all 15 permission checks, 12 modes checks, 4 bundle checks, 2 Native guidance checks, 5 missing-authority/provider-withdrawal checks and 4 release archive checks. Size gate still passes all 925 files;git diff --checkpasses.b3a0e13e71a4b06deac63dba41c352319e93494fac46b37aae0e9f205777a380(built from the exact PR920 native source).5a93fc2eexposed a separate Windows Rust fixture collision before reaching JavaScript suites: simultaneousFixture::new()calls used the same PID and wall-clock timestamp (AlreadyExists, OS183). Linux and Node-floor jobs passed. Follow-upf10c54d5adds a per-process atomic suffix and a deterministic same-clock concurrent uniqueness test. Sibling native process/session fixtures were inspected; no production change was needed.cargo test --workspace --locked --manifest-path native/Cargo.toml: 731 passed, 0 failed, 6 explicit ignores (five child-fixture entry points and the UNC prerequisite). The previously failing raw-tail/stdin-EOF/exit259 lifecycle case passes.cargo fmt --checkandgit diff --checkpass. This is a source correction followed by a new run, not a retry of the failed job.pull_request/ aggregateCI required: Cross-platform validation #1048 passed all 10 jobs at exact headf10c54d521d8f084bc94d605d0b4b9e574a2e02a: Windows x64, Linux x64, macOS x64/ARM64, Node-floor, Rust/workflow lint, source-size, tools trial and aggregate. Windows full suite: 255 passed, 4 explicit skips; permission 15/15, bundle 4/4, modes 12/12 and Native guidance 2/2 all passed. macOS ARM64 full suite: 253 passed, 6 explicit skips, including Native guidance 2/2. Prior failed runs remain recorded above.Environment
Windows x64, Node26.12.1, Rust1.99.0 locally; locked public DSH0.2.2-rc.1 services and official Jobs/shell-environment plugins. Stack starts at main
e724444416fed01eb1f75916ec556c0a286e73f9. Stock Bash is used only for fresh execution; this does not qualify its persistent async-output behavior. No merge, release or deployment.