Skip to content

fix(nodes): reduce completion delays and clarify execution outcomes - #132180

Closed
steipete wants to merge 34 commits into
mainfrom
steipete/node-session-speed-followups-20260828
Closed

steipete wants to merge 34 commits into
mainfrom
steipete/node-session-speed-followups-20260828

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #131912: Mac companion execution-submission provenance.
Closes #131913: unnecessary node-session finalization round trips.
Closes #131970: concurrent node results colliding on shared Git refs.

What Problem This Solves

Node sessions spend unnecessary RPCs finishing work, can describe a lost Mac companion reply as a policy denial, and can collide when result retention and managed-worktree cleanup mutate shared Git refs. Approving an expanded native-node command surface can retire hosting inventory without prompting the promoted connection to republish consent.

This follows the already-landed native Mac hosting and Full-access parity, native IPC cancellation, and elapsed-time attribution. Those changes are not included again. Connected verification repairs cover device-policy guidance, failed-command cleanup, native packaging, pricing estimates, and test/CI expectations that contradicted their owners.

Why This Change Was Made

Record submission at the socket owner and distinguish not-submitted, outcome-unknown, and cancellation. Required native execution never replays locally. Main already enforced that route; deleting dormant contradictory fallback machinery is not evidence of a historical replay. Cancellation does not prove rollback, and SYSTEM_RUN_NOT_STARTED refers to companion submission rather than the outer Gateway dispatch.

Compose capture/renew/capture and renew/capture into two node commands instead of five RPCs. Retain every capture, renewal, authenticated-byte check, current placement/claim/generation check, local verification, and publication fence. Preserve patch line endings under inherited Git settings and serialize result-ref/worktree mutations at the common-Git-directory owner. External Git contention keeps its native failure; no foreign lock is removed. Required Git output uses the shared validator after queued execution: interrupted code-zero results and truncated successful stdout are rejected, while complete stdout remains valid when only diagnostic stderr was truncated.

Successful POSIX tree output remains owned by its command deadline; failed, terminated, and unowned output uses the existing bounded diagnostic drain. Current main's cooperative termination and cleanup receipts are retained. The termination owner preserves normal completion for a naturally exited failing command when its process group is provably absent, while retaining cleanup for live or unproven groups. The original failing assertion was not weakened.

Deliver command-approval resolution to the exact promoted connection and republish hosting consent. Native process, route, and Gateway generations fence callbacks. Preserve main's removal-time invalidation and guaranteed disconnect on reconciliation failure. Device errors distinguish pending approval, missing device commands/plugins, and Gateway allow/deny policy. Main's shared deadline and temporary-directory owners remain canonical.

The cleanup removes duplicate child-exit tracking and a single-use native exec adapter without changing callback gating or forwarded fields. Tests retain transport/process/restart/cancellation/authority boundaries. Catalog refresh uses a fake clock separately from scrolling and paint assertions, while preserving current host-targeted pagination and exhausted-host rows. Main's current Vitest API/cache policy and native compiler fixture replace superseded adaptations.

Native packaging retains the normal isolated source install. Pricing estimates retain version-specific manifests, alias/snapshot normalization, discovery, and operator overrides, using the previously recorded Anthropic pricing and AWS pricing-feed evidence. CI consolidates the isolated local scanner setup while retaining trusted policy selection, file selection, pinned tools, failure propagation, and Python isolation.

User Impact

Fewer completion RPCs; truthful companion outcomes; reliable shared-ref cleanup and complete Git data; hosting refresh after approval; actionable device guidance; complete deadline-owned output; and accurate cleanup status for completed commands. Native packaging does not require a source-layout migration. Sonnet 5 estimated pricing is corrected; historical usage and invoices are not rewritten.

No new product configuration, dependency pin, SQLite schema, public protocol version, or second production node identity relative to integrated main. The approval-only socket SDK retains decision-or-null. Product deadlines and security/ownership fences remain unchanged. No overall measured node-session speedup or production rollout is claimed.

Evidence

Published candidate: 035178aa67c9946dbd2e6fc14e536bf2b82da132, tree 4b63014cfa41bcdf951f60000522dfa01ae56740, integrates main 8b37368a4e3fc7a7549f7a42dd50494f3be6ff2f.

  • Git output red/green: a test-only overlay against unchanged 6badc96e7a42929be8263fac177a8e7ea979ccdc reproduced silent incomplete output from a real 17 MiB Git blob. The repaired wrapper and owner/sibling selection passed 125 cases with one platform skip. Command: node scripts/run-vitest.mjs src/infra/git-exec.test.ts src/agents/worktrees/git.test.ts src/gateway/worker-environments/workspace-result-ref-mutation.test.ts src/gateway/worker-environments/node-worker-tunnel.finalization.test.ts src/process/exec.test.ts src/process/exec-termination.test.ts.
  • ClawSweeper cache finding resolved: all four reported cases failed specifically because expectations required .artifacts/vitest while the canonical owner returned .cache/vitest. Changed seven expected path components only. The same four named cases then passed; 792 other cases were filtered out, not run. Files: test/scripts/test-projects-routing.test.ts, test/scripts/test-extension.test.ts, test/scripts/test-group-report.test.ts, and test/scripts/test-projects.test.ts. Production cache placement and concurrency assertions are unchanged.
  • Changed checks passed: node scripts/check-changed.mjs -- src/infra/git-exec.ts src/agents/worktrees/git.ts src/agents/worktrees/git.test.ts; then node scripts/check-changed.mjs -- test/scripts/test-projects-routing.test.ts test/scripts/test-extension.test.ts test/scripts/test-group-report.test.ts test/scripts/test-projects.test.ts. The core checks preceded only the seven test-literal corrections; the tooling checks cover the final tree.
  • Fresh independent review: the final complete candidate passed six isolated Codex review parts with no accepted/actionable P0 findings. This is scoped to that threshold, not a certificate of live behavior or merge readiness.
  • Current exact-source build and signed package passed: canonical scripts/package-mac-app.sh completed for arm64 debug in 663 seconds. App, core, and embedded worker match commit 035178aa67c9946dbd2e6fc14e536bf2b82da132 and build timestamp 2026-09-06T09:14:48.867Z. Foundation Developer ID signatures, required MLX helper/shaders, package integrity, and packaged-worker initialization were verified. Signature and worker proof passed again after relocation; source remained clean and final resource admission passed. No GUI launch, paired turn, or live authority-chain pass is implied.
  • Historical signed proof: the retained Foundation-signed arm64 debug app/core/embedded Node 24.19.0 worker belongs only to 51c7271303939bf04663933aabc3fc3b53f8b25e. Matching build identities, MLX helper/shaders, package integrity, and worker-first/native-first initialization were verified, including after relocation. Compilation/signing succeeded; its first wrapper success receipt was blocked by a later CPU-headroom check. A separate verification receipt preserved that distinction. This artifact has not been relabeled as the current candidate.
  • Earlier source-bound proof: the previous complete selected suite passed 2,645 cases with 48 skips, and the staged check graph passed. The nine-line deslop pass passed 233 focused cases with one skip and scoped checks. The earlier cleanup-status integration was reproduced and repaired with 96 process cases passing and one platform skip. These are historical supporting results, not current-head full-suite passes.

The integrated product dependency is Codex 0.153.4, inherited from main. The parent personally inspected pinned stdio transport and process ownership contracts. Source inspection does not substitute for live execution.

Current LOC against integrated main: runtime +699/−405 (net +294); tests/support +5,212/−2,372 (net +2,840); tooling/workflows +106/−55 (net +51); docs +18/−3; metadata +2/−2. Total: 139 files. Test-only support under src/ is classified separately from runtime. Production growth implements compound finalization fences, connection-owned publication, common-Git-directory mutation ownership, and typed outcome/diagnostic behavior. Pure moves and shared-fixture relocation do not create additional runtime owners.

Review follow-through and remaining gates

The concrete cache-path finding in the latest durable review is fixed with failing/passing proof. Its package.json data-model signal is not a schema change: the manifest delta only adds four Windows test-selection paths. The environment-name budget is an exact shrink to the measured count; it does not add configuration.

Exact-head required CI and final signed paired-node/browser acceptance remain pending. Acceptance includes valid delivery plus revoked/stale/reassigned authority rejection at the private-worker boundary, real Full-access turns, cancellation/reconciliation, independently verified execution and workspace bytes, and timings. No prepare, merge, production deployment, or current-head paired model turn is claimed.

The operator explicitly waived further standalone npm/scanner acceptance investigation. Earlier runs reached passing real scanner controls but intermittently stalled in policy bootstrap; no root cause was established, and those runs are not reported as complete passes. Normal required CI and reviewer credential scanning remain enabled.

Historical paired-node evidence remains attached to its original source: twelve Full-access turns at an older head required no run approvals and verified both-host bytes. It does not prove this head. Its uncontrolled timing comparison did not establish an overall speedup; the structural saving here is three finalization RPCs.

Documentation: https://docs.openclaw.ai/nodes · https://docs.openclaw.ai/tools/exec-approvals · https://docs.openclaw.ai/platforms/mac/xpc · https://docs.openclaw.ai/providers/anthropic

@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling plugin: file-transfer size: XL maintainer Maintainer-authored PR labels Aug 28, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 6, 2026, 6:01 AM ET / 10:01 UTC.

ClawSweeper review

What this changes

The branch batches node completion checks, distinguishes companion execution outcomes, coordinates shared Git mutations, refreshes hosting after approval, and repairs related process handling, packaging, pricing, UI recovery, and tests.

Merge readiness

⛔ Blocked before merge - 6 items remain

This remains useful, maintainer-owned work that current main does not fully implement. The prior cache-path finding is resolved; no additional blocking code defect was established in the inspected paths.

Priority: P2
Reviewed head: 035178aa67c9946dbd2e6fc14e536bf2b82da132

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful owner-level repairs and resolved prior findings support the patch, while the material authority proof gap limits readiness.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Authority-chain proof required: the captured body records matching signed packaging and useful historical turns, but explicitly leaves approval-triggered hosting delivery and revoked/stale/reassigned rejection before private-worker I/O pending. Component tests do not complete that composed boundary proof; unrelated maintainer-author proof exemptions remain intact. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: the captured body records matching signed packaging and useful historical turns, but explicitly leaves approval-triggered hosting delivery and revoked/stale/reassigned rejection before private-worker I/O pending. Component tests do not complete that composed boundary proof; unrelated maintainer-author proof exemptions remain intact. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 11 items Pinned introduction boundary: The checkout matches the supplied head and tree. Raw commit records identify parents 6badc96 and 8b37368; introduced changes were inspected against the latter pinned merge base. No verified test merge was available.
Central repair remains absent on main: Current main still returns the same nullable socket result for connection failure and lost replies. Its staged finalization still performs separate capture, renewal, and capture calls. The merged native-hosting and cancellation PRs address adjacent behavior rather than these remaining changes.
Latest release check: The supplied latest release, v2026.9.2, also retains the nullable socket outcome, so this central repair is not already shipped there.
Findings None None.
Security None None.

How this fits together

OpenClaw delegates session execution to paired devices through the Gateway and a private node worker. Completion returns execution outcomes and workspace changes for verification and publication on the Gateway.

flowchart TD
  A[Session work] --> B[Gateway authorization]
  B --> C[Paired device worker]
  D[Command approval] --> E[Connection-bound hosting refresh]
  E --> C
  C --> F[Execution outcome and workspace checks]
  F --> G[Verified result publication]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: the captured body records matching signed packaging and useful historical turns, but explicitly leaves approval-triggered hosting delivery and revoked/stale/reassigned rejection before private-worker I/O pending. Component tests do not complete that composed boundary proof; unrelated maintainer-author proof exemptions remain intact. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Approval-triggered hosting republication crosses connection and worker lifetimes; candidate-bound rejection of revoked, stale, or reassigned authority before final worker I/O remains unproven.
  • Resolve merge risk (P1) - The supplied GitHub snapshot reports merge conflicts, and no pinned three-way merge result is available to assess the integrated result.
  • Complete next step (P2) - Resolve the reported branch conflicts and provide candidate-bound allowed and revoked/stale/reassigned authority proof at final private-worker I/O before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Finalization round trips 5 sequential RPCs become 2 The branch retains ordered captures and renewals; this structural saving does not establish an overall session speedup.
Production versus test growth Production +684/−399; tests/support +5,227/−2,378; tooling +106/−55 The pinned diff’s production growth supplies compound fences, connection-owned publication, shared Git scheduling, and typed outcomes.

Stored data model

Persistent data-model change detected: migration/backfill/repair: package.json, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete the authority-boundary proof (recommended)
    Provide candidate-bound allowed and forbidden final-effect traces through approval, hosting republication, and the private worker before landing.

Technical review

Best possible solution:

Preserve the single execution and publication owners, with composed proof that authorized hosting refresh succeeds while revoked or replaced authority cannot reach worker effects.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main collapses pre-submission socket failure and post-submission reply loss into null, and the linked report supplies deterministic socket scenarios. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes for the inspected core repairs: submission facts belong at the socket owner, shared Git mutations need common-directory coordination, and batching preserves the existing fence order. Complete authority proof is still needed before merge.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e07ebcb5af89.

Labels

Label justifications:

  • P2: The PR repairs bounded node completion and execution-outcome problems without evidence of an emergency regression.
  • merge-risk: 🚨 security-boundary: Hosting refresh transfers approval consequences across native connection and worker lifetimes whose final-effect rejection proof remains pending.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: the captured body records matching signed packaging and useful historical turns, but explicitly leaves approval-triggered hosting delivery and revoked/stale/reassigned rejection before private-worker I/O pending. Component tests do not complete that composed boundary proof; unrelated maintainer-author proof exemptions remain intact. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Pinned introduction boundary: The checkout matches the supplied head and tree. Raw commit records identify parents 6badc96 and 8b37368; introduced changes were inspected against the latter pinned merge base. No verified test merge was available. (035178aa67c9)
  • Central repair remains absent on main: Current main still returns the same nullable socket result for connection failure and lost replies. Its staged finalization still performs separate capture, renewal, and capture calls. The merged native-hosting and cancellation PRs address adjacent behavior rather than these remaining changes. (src/infra/jsonl-socket.ts:20, e07ebcb5af89)
  • Latest release check: The supplied latest release, v2026.9.2, also retains the nullable socket outcome, so this central repair is not already shipped there. (src/infra/jsonl-socket.ts:20, 3928bad9badf)
  • Prior finding disposition: All seven inspected cache-path expectations now use the canonical .cache/vitest location across the four previously named tests. The captured body reports those four cases failing before correction and passing afterward. Direct comparison with the earlier head failed because required historical blobs were unavailable; current expectations and their owner were inspected independently. (test/vitest/vitest.performance-config.ts:35, 035178aa67c9)
  • Approval-to-worker authority boundary: The introduced approval notification targets the promoted connection through sendEventForPairingIdentity. The existing sender validates its current pairing lease; the native bridge checks process, route, and Gateway generations, and the worker rejects disconnected or mismatched-generation events before refreshing hosting publication. (src/gateway/server-methods/nodes.pairing.ts:327, 035178aa67c9)
  • Authority coverage and its limits: Native pipe tests cover suspended snapshots, route revocation, and worker replacement; publication tests cover late acknowledgements, failures, and retained hosting opt-out. These provide useful component coverage, but do not establish the complete allowed-versus-forbidden final worker effect. (apps/macos/Tests/OpenClawIPCTests/MacNodeHostWorkerPipeTests.swift:111, 035178aa67c9)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Colton Harris: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Lehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach candidate-bound terminal traces or diagnostic recordings showing authorized hosting refresh and rejection of revoked, stale, or reassigned authority before private-worker I/O. Redact keys, IP addresses, private endpoints, and personal data; update the PR body to trigger re-review, or ask a maintainer to comment @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (35 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-02T17:34:20.879Z sha 8100a63 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T19:08:09.867Z sha 0bbc2c9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T19:54:10.359Z sha 28a4a89 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T20:39:18.747Z sha 2fe0f46 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-02T22:34:10.890Z sha 3d2801d :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-02T22:53:13.543Z sha 3d2801d :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T07:45:52.087Z sha 51c7271 :: needs real behavior proof before merge. :: [P2] [P2] Restore cache assertions to the canonical .cache directory
  • reviewed 2026-09-06T09:13:06.099Z sha 6badc96 :: needs real behavior proof before merge. :: [P2] Restore cache assertions to the canonical .cache directory

@steipete
steipete force-pushed the steipete/node-session-speed-followups-20260828 branch from 1d355fe to ada88bb Compare August 29, 2026 00:20
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. and removed P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 29, 2026
@steipete
steipete force-pushed the steipete/node-session-speed-followups-20260828 branch from ada88bb to 6b58012 Compare August 29, 2026 16:00
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 29, 2026
@steipete
steipete force-pushed the steipete/node-session-speed-followups-20260828 branch from 6b58012 to 7fe0471 Compare August 29, 2026 17:20
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 29, 2026
@steipete
steipete force-pushed the steipete/node-session-speed-followups-20260828 branch from 7fe0471 to c45bb98 Compare August 29, 2026 22:23
@steipete
steipete marked this pull request as ready for review August 29, 2026 22:25
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review current head c45bb9825e1a75e19cc49df7e232186e4e56e787. The updated PR body separates completed local proof from pending exact-head CI and Studio proof. This is a review request only; landing remains pending.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the steipete/node-session-speed-followups-20260828 branch 2 times, most recently from 358b2da to 5ef50e5 Compare August 30, 2026 03:33
Keep command deadlines active until stdio closes. Inspect the OpenAI artifact exercised by the SQLite lifecycle instead of parsing a truncated unrelated registry inventory; retain exact provider-source and lifecycle assertions.
Preserve exact Android admission publication, both Gateway fixture regression groups, and the canonical UI dialog cleanup while integrating current main. No node-session authority or execution-outcome assertions are removed.
Project each selected hook from the existing trusted configuration without changing pins, file filters, detector behavior, or failure propagation. Run the trusted harness in a dedicated isolated Python environment so user-site installs and candidate module shadowing cannot break the scan.

Repairs repeated security-fast bootstrap failures on unrelated ShellCheck and zizmor repositories observed while validating the node-session follow-up PR #132180.
Integrate frozen main af53152. Preserve focused OpenAI artifact inspection, all SQLite lifecycle checkpoints, and reader-intent scrolling with real frame waits.

Proof: six CLI deadline cases and eight bundled Chromium catalog cases pass on the resolved tree. Fresh complete-candidate P0 autoreview is scoped-clean. Exact-head static checks, signed native acceptance and hosted CI remain pre-landing gates.
Fix the inherited max-lines CI failure by moving the unchanged launcher into the existing Gateway process fixture owner and reusing the shared result type. Preserve all case bodies, tables, ordering, cleanup and environment precedence.

Proof: focused lint fails at1040lines before and passes at1000 after;46 process cases pass with one Linux-only skip, formatting and changed checks pass, fresh P0 autoreview is scoped-clean. Production delta0; test/support net0. Paired-node live acceptance and exact-head hosted CI remain required before landing.
Integrate frozen main558b17c26e79118752a3e474772954cfd37f45cf and retain its canonical CLI process split. Remove the redundant local launcher extraction; all original case bodies, tables, environment ordering and cleanup contracts are preserved. CLI files now match main exactly.

Proof:57 focused planner/workflow/child-lifecycle cases pass, format and focused lint pass,237-path source/mode preservation passes, and fresh complete-candidate P0 review is scoped-clean. Exact-head CI, final artifact and signed paired-node acceptance remain pre-landing gates.
Integrate main e721414 while retaining
companion submission provenance and its single-buffer JSONL optimization.

Adopt the canonical CLI output runner and keep successful POSIX tree output
under its existing command deadline. Start the unchanged bounded diagnostic
drain after termination, including when an escaped writer retains a pipe.
Preserve failed-root status, cleanup ownership, and Windows PID safety.

Replace generic pre-commit hook projection with shared isolated local-scanner
setup. Preserve exact policy selection, scan targets, and failure propagation;
remove obsolete projection tests and use real deadline/output regressions.

Validated process and Git siblings, scanner and routing suites, real pinned
scanner fixtures, the full changed-check plan, browser regressions, both
Android flavors, and fresh P0 review. Final paired-node live acceptance and
exact-head hosted CI remain required before landing PR #132180.
Integrate the pinned main baseline while retaining native submission provenance, deadline-owned output, and finalization authority fences. Remove duplicate child-exit tracking and the single-use native exec adapter.

Validation: 233 focused tests passed with one platform skip; scoped checks passed; fresh isolated Codex P0 review passed all seven parts. The earlier complete staged checks and broader tests remain recorded. Extra standalone scanner proof deferred at operator request. Exact-head CI and signed paired-node acceptance remain pre-merge gates.

Context: #132180
Preserve current main's cleanup receipts, role-removal finally paths, shared deadlines, temporary-directory ownership, and current Vitest/cache contracts. Keep the node finalization, typed execution outcomes, and native promotion fixes.

A real integration regression showed an already-exited nonzero command with no group being labeled cooperative. Reuse the canonical group probe in the termination owner, leave completed work normal, and retain live/unknown group cleanup. The original normal-outcome assertion remains intact.

Validation: 345 non-process integration tests passed. After reproducing the cleanup mismatch, all 96 process tests passed with one platform skip. Fresh isolated Codex P0 review passed all seven parts. Build, exact-head CI, and signed native acceptance remain pre-merge work.

Context: #132180
Preserve both Windows test additions and the measured environment-name shrink while retaining current main dependency and runtime changes. Provider strict acquisition and credential-scoped cache ownership remain intact alongside pricing normalization.

Validation: 178 focused integration tests passed; environment-name counter 495/495; fresh complete-candidate P0 review passed all six parts. The earlier signed app remains bound to its original source and is not relabeled.

Context: #132180
Route the worktree wrapper through the shared required-output owner after its queued Git execution. Preserve interruption failures and reject truncated successful stdout without duplicating validation or bypassing the common-directory mutation queue.

The real 17 MiB Git-blob regression failed on the previous production tree because the wrapper returned incomplete data. The repaired candidate passed 125 focused Git, finalization, and process tests with one platform skip. Fresh independent P0 review completed all six parts without accepted findings.

Restore seven stale cache-path expectations across four tooling tests to the existing .cache/vitest contract. All four failed for the reported mismatch before correction and passed afterward, without changing production cache policy. This addresses the concrete ClawSweeper P2 finding. Fresh review covers the complete corrected candidate.

Retain current main runtime changes. Earlier signed native artifacts remain bound to their original commits; this integration does not relabel them or claim current-head live acceptance.

Context: #132180
@steipete

steipete commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Splitting this PR into focused replacements as requested. The original head remains preserved at 035178aa67c9946dbd2e6fc14e536bf2b82da132; this PR stays open until all useful changes are landed or explicitly accounted for.

Landed: Workspace patch-byte preservation #140683, commit eebd2b03313503d76bc148cae181423e0c9062a0. The shared Git application owner now disables inherited newline conversion for both forward reconciliation and recovery. Real-Git red/green proof, all 10 publication/recovery tests, changed checks, independent review, and exact-head CI passed.

Also landed: Windows retired-PID cleanup #140753, commit 2eae7eb46e92c630aaed344215789c326b4808da. The shared tooling terminator no longer targets a known-exited Windows child's numeric PID and retains unverified descendant cleanup. Four pre-fix regressions, 147 passing local tests, real native Windows retained-output/drain/large-output cases, changed checks, independent review, and exact-head CI passed. A pre-dispatch API-quota failure was recovered through the exact task-owned native lock; no gate was bypassed.

Also landed: Direct Anthropic Sonnet 5 pricing #140810, commit 2b6d3bcb597e1fe9562798613bc7778b93922c62. Removed the canceled September price increase and reused the already-correct manifest rates. Two pre-fix regressions, all 60 provider tests, changed checks, independent review, and exact-head CI passed. The published direct-Anthropic catalog already has the correct prices. No Bedrock tariff, provider billing, or historical usage changes are claimed.

Also landed: Process output lifetime and cleanup #140927, commit 70dc991d850d0df7ec6c90bd060c80fad0770042. Successful owned output retains its command deadline; failed roots start cleanup without losing their original exit result; group signaling no longer falls back to a reusable positive PID. Nine intended pre-fix failures, 161 passing owner/sibling tests, packaged build, changed checks, independent review, and exact-head CI passed. Native Windows verified the nested Node timeout, and 37 additional merged-tree tests covered the newer main cleanup scope. Production stayed net zero; tests are net +234.

Also landed: Shared Git-ref mutation ownership #141095, commit 92d8b786093b0952bc2c6ed835a106e49ad3cd76. Managed-worktree cleanup, worker-result writes, and pruning fetch now share one common-directory queue; captured environments and required-output validation prevent redirection and false success. Baseline regressions, real Git/SQLite owner proof, native Windows, independent review, and refreshed exact-head CI passed. The Windows path fixture and inherited planner timeout were resolved without weakening the guards. All 12 landed files match the reviewed candidate. Shared-ref collision issue #131970 is closed.

Also landed: Native CLI fixture completion and Windows coverage #141423, commit fb57c742b41487b018c289c2e4e4439c324cf5cf. Expected stdout no longer lets an unsuccessful native-auth child pass. Windows fixtures use a real native executable, and timeout assertions preserve the actual supervisor exit code rather than assuming 124. The exit-17 false-positive control, 64 local cases, required checks, independent review, and exact-head CI passed; Windows passed all 34 applicable CLI cases with one existing POSIX-only skip. Both landed test files match the reviewed bytes, and only the intended Windows test registration changed relative to the landed parent's package values. All seven original fixture hunks are accounted for. Production is unchanged; tests are net +47.

Also landed: Consolidated Gateway fixture publication coverage #141580, commit 2a0601f530c912284f08b586987dfc3a0ed8469f. Existing atomic-writer and connected RPC tests now cover immediate publication, exact workspace/non-main rosters, default precedence, edits/removal, file refresh, and preservation of authored config without duplicate health-server setup. Nine fault controls, 16 tests, required checks, independent review, and exact-head CI passed. Both landed files match the reviewed candidate. The native merge safely stopped before dispatch when main moved; the exact task-owned lock was recovered and the next guarded attempt completed. Production is unchanged; tests are net +73 instead of the original +129.

Also landed: Cancellation-owned native Codex test waits #141579, commit 33918cdb7470e3d404b072c52e75800b454114b5. Real delayed-HTTP, reordered-native-frame and unchanged-deadline timeout controls protect valid response waits and joined cleanup before shared fixture restoration. Exact assertions and all deadlines remain. The 82 owner/sibling tests, required checks, independent review, and exact-head CI passed. The landed file matches the reviewed candidate. Production is unchanged; tests are net +27.

Across these eight original replacements: production/tooling net +32, tests/support net +946, docs net +1. Including the separate Startup prerequisite below, landed tests/support are net +980, for net +1013 overall.

Supporting validation repair also landed: Windows Startup fixture child ownership #141360, commit 54a6075328c4d586600cf51e045cdce2265c3088. The real fixture now joins its launched child before reading the report or deleting inputs, and cleanup no longer replaces assertion failures. Local proof passed 94 cases with one Windows-only skip; required checks, independent review, both native Windows cases in their original sibling order, and exact-head CI passed. The landed file matches the reviewed candidate. This adds 34 net test lines and no production lines; it is a separate prerequisite, not another original-hunk slice. The historical EBUSY lock holder remains unidentified, and no universal directory-lock fix is claimed.

Open replacement: Node finalization batching #141217 reduces the observed command count from five to two while retaining ordering and child deadlines. Current head bd2700a4d11e8146f871dd0a0ebb78def56ff11c carries the exact already-landed credential scenario repair #141555, without another broad main refresh. Exact-head CI 34163546289 passed. The earlier 384-case/static/build proof retains its source identity; the unchanged finalization files plus canonical metadata carry-forward have 78 passing QA tests and a fresh complete P0 review. Historical Windows concurrency-two evidence is not relabeled as refreshed-main serial-Windows evidence or a controlled speedup.

Native acceptance: the earlier package reached native-module/private-worker checks but stalled in Bash's post-sign audit input. Its task-owned process was stopped and diagnostic evidence preserved; no app was launched. The already-landed system-Bash tooling repair #141884, commit 299ea7c393b840cc57782c848f80a24d9d03067a, fixes the supported packaging and elevation caller chains. Our unpublished streaming prototype is therefore omitted rather than duplicated. Finalization is being refreshed to inherit that canonical repair and current caller contracts, while dropping 115 obsolete diagnostic test/support lines and retaining main's consolidated artifact tests. Historical timings and proofs keep their original identities. A fresh coherent package plus real Gateway completion/Stop/native acceptance and measured latency remain outstanding; finalization is not counted as landed.

Native execution outcomes remain needed: current-main transport still conflates submission outcomes and can emit a denial after a lost native reply. The candidate has been ported to main 646707ce4e08cdefa86cd9758774f2c18a478e42; current-base controls reproduce two false-denial failures while cancellation passes. Candidate checks, independent review, native CI, and isolated app/Gateway proof must finish before landing. Earlier candidate proof retains its original identity.

Hosting refresh is superseded: Mac desktop/session fixes #144226, commit cc0d3ca78ecf3b9f0933bea84e19cb26f89a9870, already added exact promoted-node notification, publication acknowledgment retirement, and generation-bound native runner-inventory-refresh. Current main contains the CLI and native paths plus regression coverage. The original H patch is omitted rather than replayed over that canonical flow. This independently landed work is not added to this session's eight-slice LOC total.

Explicit disposition, stop-fixture cleanup (group R): omitted; no new PR. The original +9/-6 change replaces a fake-clock jump with bounded waitUntil, but no failure requiring that change was reproduced. All seven unchanged cases passed in their original order. Current process cleanup avoids grace for an absent group, and the original aggregate already contained that check, so this is not being labeled an already-landed race fix. The proposed wrapper also skips the operation join if marker publication or waiting fails; restoring timers alone does not establish cleanup. All existing tests remain. Current main separately has the child-side marker-notification repair from warm-runtime reliability #141375; that is preserved, not replaced by this unproven residual.

All 136 original paths now have explicit assignments across the source-partition ledgers. Assignment is not landing proof; held evidence and preserved coverage remain tracked until each replacement is verified.

Remaining: node finalization, native execution outcomes, command recovery guidance, and the ancillary provider, packaging, and test/tooling changes. Source comparison is separating already-landed behavior from genuine residual work; replacements will preserve newer main changes rather than replay whole original files.

Native/live acceptance remains attached to the replacements that change those flows, not to unrelated Git, provider, or test-only slices. This comment will track the landed replacements and explicit dispositions before the original is closed.

@steipete

Copy link
Copy Markdown
Contributor Author

Closing the umbrella now that its independent fixes have been split into focused work, including #140683, #141095, #140927, and #144226. Remaining node batching is tracked in #141217; any other still-reproducible defect should continue as a scoped repair rather than reviving this combined branch.

Closed in a sweep of stale maintainer PRs (no activity for 7+ days). Reopen with a current reproduction if this still matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation extensions: amazon-bedrock-mantle extensions: anthropic extensions: codex extensions: crabbox gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

1 participant