Skip to content

fix(process): preserve output and cleanup after command exit - #140927

Merged
steipete merged 1 commit into
mainfrom
steipete/process-output-lifetime-split-132180
Sep 7, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/process-output-lifetime-split-132180

Conversation

@steipete

@steipete steipete commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Related: #132180 (node-session completion delays and execution outcomes). This replaces only its process-output lifetime slice; the original remains open while the other slices are handled.

What Problem This Solves

Fixes an issue where command users could lose quiet descendant output before the configured command deadline, or keep waiting on descendants after the command had already failed. A later deadline could also replace the command's original failure with a timeout result.

Why This Change Was Made

Make the command owner retain successful, tree-owned POSIX output until its existing deadline, while failed or terminated commands enter bounded diagnostic drainage and owned descendant cleanup immediately. Keep a selected process group as the signal target throughout cleanup rather than falling back to its reusable positive PID, preserving current main's force-and-observe and PID-incarnation checks.

User Impact

Commands retain expected output and report their original failure while cleaning up owned descendants. Existing deadlines, output limits, explicit restrictions, and Windows retired-root behavior remain unchanged. Cleanup still reports uncertainty when termination cannot be proved; this does not promise containment of escaped descendants.

No configuration, schema, dependency, or public API change. Production is +69/-69 (net zero); tests are +341/-107 (net +234). The obsolete group-to-PID fallback and duplicate child-exited flag are removed.

Evidence

Tests-only reproduction on unchanged production at 3de516d21fc4bb05e4c9166c3be9a985b53f5a92: 9 intended failures, 6 passes, 90 unselected. The failing cases cover late drain attachment, failed-root cleanup, quiet inherited pipes, and selected-group targeting.

Post-fix proof: 161 tests passed, four platform skips, including real POSIX child/descendant/escaped-pipe cases, no-output deadlines, and local-provider lifecycle coverage. Readiness handshakes precede policy-clock advancement; no timeout or grace budget was increased.

node scripts/run-vitest.mjs src/process/child-process.test.ts src/process/exec-termination.test.ts src/process/exec.test.ts src/process/kill-tree.test.ts src/process/exec.windows.test.ts src/process/exec.windows.integration.test.ts src/process/exec.no-output-timer.test.ts src/agents/provider-local-service.test.ts
pnpm build
node scripts/check-changed.mjs --staged

The packaged build passed in 257.647 seconds; all changed checks passed in 517.334 seconds. Both receipts bind the same unchanged candidate tree, 4e92d18397babbae8ca1e483e6e60275a11f186c. Two earlier build attempts were stopped by CPU admission before executing, not build failures.

Independent isolated Codex review returned scoped-clean at P0, with no accepted/actionable findings. Exact-head CI 34091063703 and the required gate passed. The native Windows job passed both default and explicit tree modes for success/failure, plus the real nested Node timeout integration case in 60.502 seconds. ClawSweeper's review reports no findings or before-merge requirements.

Current main added a separate command-cleanup scope after this branch's base. An additional 37 tests passed on GitHub's merge tree cab1a08cca3ab402d3ddc852be6e9614fdadaa67 (main parent d8af304112659dda862df8bde111cae2ba1b1dc6 plus exact PR head 2aa7aa7f0922c263919a5ec1cdb5d1e8592ede7b). The inspected new scope and caller match main ce174871076b4a5db8524ef8eb8ea17a3abe97fa byte-for-byte; all eleven PR files match the reviewed candidate. This proof used its own checkout and dependencies, without rebasing or modifying the PR.

node scripts/run-vitest.mjs src/process/exec-spawn.test.ts src/process/kill-tree.test.ts

Dependency inspection covered Execa's separate exit/stream settlement and Codex's exact-group signaling contract. The Windows fixture's Node/libuv job behavior does not establish general descendant containment or Bun equivalence.

Keep successful owned descendant output under the existing command deadline.
Clean up failed command trees without replacing their exit result with a later
timeout, and retain the selected group target throughout signaling.

Remove the group-to-positive-PID fallback and duplicate child-exited state.
Preserve force-and-observe cleanup, explicit deadlines, and Windows ownership.

Process lifetime replacement for #132180; the other slices remain separate.
@steipete steipete self-assigned this Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 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 size: L maintainer Maintainer-authored PR labels Sep 7, 2026
@steipete
steipete marked this pull request as ready for review September 7, 2026 06:29
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 2:37 AM ET / 06:37 UTC.

ClawSweeper review

What this changes

The PR preserves descendant output until the command deadline, cleans up failed command trees without replacing their exit result, and keeps termination signals targeted to the selected process group.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair absent from fetched main. No actionable introduced defect was found; the broader related PR retains separate work, and the maintainer-authored PR is protected from cleanup closure.

Priority: P2
Reviewed head: 2aa7aa7f0922c263919a5ec1cdb5d1e8592ede7b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression coverage and no blocking correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Supplied evidence reports real subprocess coverage through the command runner for failed-root cleanup and inherited pipes; native Windows execution remains pending CI, and no runtime proof was independently executed here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Supplied evidence reports real subprocess coverage through the command runner for failed-root cleanup and inherited pipes; native Windows execution remains pending CI, and no runtime proof was independently executed here.
Evidence reviewed 10 items Introduced patch and candidate identity: Reviewed the pinned merge-base-to-head changes, including the locally retrieved test hunks omitted from the supplied patch. HEAD tree 4e92d18397babbae8ca1e483e6e60275a11f186c matches the candidate tree named in the captured build/check evidence. The host-verified test merge contains the pinned base followed by the exact PR head.
Command outcome and output ownership: Successful POSIX tree-owned commands retain inherited output under an existing deadline; failed roots begin bounded drainage and cleanup. Later ordinary deadlines cannot replace a failed root’s result, while output-limit enforcement remains active.
Current-main necessity: Fetched main still attaches the diagnostic drain unconditionally and lacks failed-root cleanup initiation and failure-result preservation. Its selected-group helper also retains the positive-PID fallback. This comparison establishes continuing relevance, not PR introduction ownership.
Findings None None.
Security None None.

How this fits together

OpenClaw’s command runner launches subprocesses and returns their output, exit status, and cleanup outcome to callers. Its process-lifetime helpers coordinate inherited output pipes, deadlines, and descendant termination.

flowchart TD
  A[Command and execution options] --> B[Spawn subprocess]
  B --> C[Collect output and root exit]
  C --> D{Root outcome}
  D -->|Successful owned tree| E[Wait within command deadline]
  D -->|Failed or terminated| F[Bound diagnostic drain and clean tree]
  E --> G[Return output and execution outcome]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +234. Total +234 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 5 69 69 0
Tests 6 341 107 +234
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 410 176 +234

Review metrics

Metric Value Why it matters
Production versus test growth Production +69/-69; tests +341/-107 Runtime size stays unchanged while additional coverage targets process-lifetime and platform boundaries.

Technical review

Best possible solution:

Keep output lifetime and descendant cleanup under the existing command owner, preserving original failure results and exact process-group targeting.

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

Yes, from source: a successful root can exit while a quiet descendant holds its pipes beyond the diagnostic cutoff, and a failed root can retain descendants until a later deadline. The supplied regression cases exercise these paths; this review did not execute them.

Is this the best way to solve the issue?

Yes. The patch repairs the existing lifetime owners, reuses bounded drainage and cleanup observation, and avoids adding competing configuration or execution paths.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes bounded command-output loss and cleanup/result errors without evidence of an urgent widespread outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Supplied evidence reports real subprocess coverage through the command runner for failed-root cleanup and inherited pipes; native Windows execution remains pending CI, and no runtime proof was independently executed here.

Label justifications:

  • P2: This fixes bounded command-output loss and cleanup/result errors without evidence of an urgent widespread outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Supplied evidence reports real subprocess coverage through the command runner for failed-root cleanup and inherited pipes; native Windows execution remains pending CI, and no runtime proof was independently executed here.

Evidence

What I checked:

  • Introduced patch and candidate identity: Reviewed the pinned merge-base-to-head changes, including the locally retrieved test hunks omitted from the supplied patch. HEAD tree 4e92d18397babbae8ca1e483e6e60275a11f186c matches the candidate tree named in the captured build/check evidence. The host-verified test merge contains the pinned base followed by the exact PR head. (2aa7aa7f0922)
  • Command outcome and output ownership: Successful POSIX tree-owned commands retain inherited output under an existing deadline; failed roots begin bounded drainage and cleanup. Later ordinary deadlines cannot replace a failed root’s result, while output-limit enforcement remains active. (src/process/exec-runner.ts:185, 2aa7aa7f0922)
  • Current-main necessity: Fetched main still attaches the diagnostic drain unconditionally and lacks failed-root cleanup initiation and failure-result preservation. Its selected-group helper also retains the positive-PID fallback. This comparison establishes continuing relevance, not PR introduction ownership. (src/process/exec-runner.ts:186, a2770e4592fe)
  • Regression coverage and reported validation: Inspected real subprocess cases for failed-root cleanup, successful-root deadlines, and escaped inherited-pipe holders, plus late drain attachment and absent/live/permission-denied group cases. The captured PR body reports nine intended pre-fix failures and 161 passing post-fix tests with four platform skips; these were not rerun during this read-only review. Native Windows coverage is selected by the existing Windows CI command and remains pending in the supplied evidence. (src/process/exec.test.ts:594, 2aa7aa7f0922)
  • Direct execution dependency contract: OpenClaw’s exec-spawn.ts imports Execa, pinned to 10.0.1 in package.json. Execa separately awaits process exit and stdio settlement, including collecting streams after a failed exit, supporting the need for explicit inherited-pipe lifetime ownership. Repository identity was verified from the dependency package manifest. Inspected Execa 10.0.1 settlement source. (lib/resolve/wait-subprocess.js:80)
  • Explicitly claimed signaling contract: The captured PR body explicitly cites Codex’s exact-group signaling contract, establishing the dependency-inspection signal. Personally inspected the pinned sibling source: signal_process_group_id uses killpg and treats ESRCH as absence. The cache repository remote verifies openai/codex ownership; this is supporting contract evidence, not execution proof. (codex-rs/utils/pty/src/process_group.rs:126, 3d2ee51ca2d5)

Likely related people:

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

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.

@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready for exact head 2aa7aa7f0922c263919a5ec1cdb5d1e8592ede7b.

This repairs the process owner rather than adding command retries or larger timeouts: successful owned output retains its deadline, failed roots start cleanup without losing their original exit result, and selected-group signaling cannot retarget the old positive PID. Production is net zero; regression tests are net +234.

The updated PR body contains the exact local commands: the tests-only reproduction produced nine intended failures, the repaired owner/sibling suite passed 161 tests, and the packaged build plus all changed checks passed on the unchanged candidate tree. Independent isolated Codex review is scoped-clean at P0. ClawSweeper's current review has no findings or before-merge requirements.

Exact-head CI 34091063703 and the required gate are green. Native Windows proof explicitly passed the default/tree root-exit cases and the nested Node timeout case in 60.502 seconds.

An additional 37 tests passed on GitHub merge tree cab1a08cca3ab402d3ddc852be6e9614fdadaa67, testing the new main command-cleanup scope against this PR's helper. Scope/caller bytes match inspected main and all eleven PR files match the reviewed head. No PR rebase was needed.

This completes proof for the process slice only. The remaining native/session work stays with the split series, and the original #132180 remains open.

@steipete
steipete merged commit 70dc991 into main Sep 7, 2026
252 checks passed
@steipete
steipete deleted the steipete/process-output-lifetime-split-132180 branch September 7, 2026 06:57
@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 8, 2026
…w#140927)

Keep successful owned descendant output under the existing command deadline.
Clean up failed command trees without replacing their exit result with a later
timeout, and retain the selected group target throughout signaling.

Remove the group-to-positive-PID fallback and duplicate child-exited state.
Preserve force-and-observe cleanup, explicit deadlines, and Windows ownership.

Process lifetime replacement for openclaw#132180; the other slices remain separate.
steipete added a commit that referenced this pull request Sep 27, 2026
Restore the successful owned-tree output contract from #140927: retain descendant output until the command deadline and preserve timeout classification for held pipes. Remove early output release and group termination after a successful root exit.

At the deadline, give an already-successful root one fixed 100ms EOF grace using the existing stdio grace constant. Both streams reaching EOF preserve the exit result; a held stream enters the existing timeout and cleanup path. Keep runExec and non-tree post-exit handling, the broker execution-only backstop, and broker timeout propagation.

Validation: 314 process tests passed with one platform skip, including all requested process ownership suites. The 12-case deadline regression file passed in 5.72s wall; wrapper inventory and both provisioning cases passed. Core and services test tsgo, changed-file lint/format, and full-branch P2 autoreview with the macOS private temporary directory passed.
steipete added a commit that referenced this pull request Sep 27, 2026
Restore the successful owned-tree output contract from #140927: retain descendant output until the command deadline and preserve timeout classification for held pipes. Remove early output release and group termination after a successful root exit.

At the deadline, give an already-successful root one fixed 100ms EOF grace using the existing stdio grace constant. Both streams reaching EOF preserve the exit result; a held stream enters the existing timeout and cleanup path. Keep runExec and non-tree post-exit handling, the broker execution-only backstop, and broker timeout propagation.

Validation: 314 process tests passed with one platform skip, including all requested process ownership suites. The 12-case deadline regression file passed in 5.72s wall; wrapper inventory and both provisioning cases passed. Core and services test tsgo, changed-file lint/format, and full-branch P2 autoreview with the macOS private temporary directory passed.
steipete added a commit that referenced this pull request Sep 28, 2026
…ent loop lags (#159578)

* fix(process): preserve exits across delayed deadlines

Let pending child notifications run before accepting process deadlines, and preserve exited commands whose drained output precedes broker result delivery. Keep inherited-pipe deadlines and existing cancellation, output limits, and process-tree cleanup.

Use one watchdog for native and brokered runExec calls. Remove supervisor timeout inference based on delayed result observation. This prevents successful Gateway subprocesses from becoming spurious timeout failures during event-loop stalls.

Validation: deterministic regressions fail before their fixes; 126 focused tests pass with one platform skip; related supervisor and idle-timeout tests pass. Core and all 25 selected test typecheck graphs, changed-file lint, and independent review pass. The full changed-check command was stopped under the host time limit during import-cycle scanning after its preceding gates passed.

* build(pr): add the shared process deadline to the PR wrapper inventory

* test(process): isolate deadline regression spawn fixtures

Mock the spawn boundary for deterministic deadline tests so their fake children do not load the unrelated spawn and worker runtime closure. Keep all nine behavior assertions; standalone wall time falls from 30.84 seconds to 3.15 seconds.

Validation: 208 process tests passed with one platform skip; PR wrapper inventory and both requested provisioning cases passed. Scoped services tsgo, changed-file lint, formatting, and independent review passed. This commit does not change runtime timeout behavior; the independent backstop finding remains unresolved.

* fix(process): separate broker execution deadlines from output drain

Give brokered command wrappers an execution-only deadline with one second of scheduling grace. The broker checks the native root state, retains configured kill escalation, clears the backstop on exit or earlier host cancellation, and reports accepted timeouts even after a cooperative zero exit. Native commands retain their local primary watchdog.

Preserve observed root exits while EOF or broker results are pending. Apply the existing 100ms idle and 1000ms hard output drain bounds to successful tree roots, and join owned descendants without rewriting the root exit status. Raw Execa timeout contracts remain unchanged.

Validation: 250 process tests passed with one platform skip, including live broker execution with frozen Gateway timers; wrapper inventory and both provisioning cases passed. Core and services test tsgo, changed-file lint and format, and independent review passed. Deterministic deadline regressions take 3.77s standalone. The live broker proof takes 40.06s wall with 2.47s test execution; its real process and IPC are required to prove an independently running deadline, while shared worker artifact setup accounts for most of the overhead.

* fix(process): preserve descendant deadlines with bounded EOF grace

Restore the successful owned-tree output contract from #140927: retain descendant output until the command deadline and preserve timeout classification for held pipes. Remove early output release and group termination after a successful root exit.

At the deadline, give an already-successful root one fixed 100ms EOF grace using the existing stdio grace constant. Both streams reaching EOF preserve the exit result; a held stream enters the existing timeout and cleanup path. Keep runExec and non-tree post-exit handling, the broker execution-only backstop, and broker timeout propagation.

Validation: 314 process tests passed with one platform skip, including all requested process ownership suites. The 12-case deadline regression file passed in 5.72s wall; wrapper inventory and both provisioning cases passed. Core and services test tsgo, changed-file lint/format, and full-branch P2 autoreview with the macOS private temporary directory passed.

* test(daemon): let systemd deadline decisions settle after expiry

Command deadlines now take their timeout decision one timer turn after the deadline fires. The systemd availability test advanced fake time by exactly the deadline, leaving that decision pending until the real child exited and CI's 10 s test timeout expired. Advance to the next timer after the deadline. Failed 5/5 before, passes 5/5 after; process deadline suites pass (76).

* test(process): settle deferred deadlines in consumer tests

Advance fake clocks through the queued deadline decision before asserting cancellation or awaiting construction and process settlement. Preserve MCP authority, exec liveness, and native process-group cleanup assertions.

Keep the production timer: setImmediate preserves native exit handling but still requires another fake-clock tick. No new real waits or child processes are introduced.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…ent loop lags (openclaw#159578)

* fix(process): preserve exits across delayed deadlines

Let pending child notifications run before accepting process deadlines, and preserve exited commands whose drained output precedes broker result delivery. Keep inherited-pipe deadlines and existing cancellation, output limits, and process-tree cleanup.

Use one watchdog for native and brokered runExec calls. Remove supervisor timeout inference based on delayed result observation. This prevents successful Gateway subprocesses from becoming spurious timeout failures during event-loop stalls.

Validation: deterministic regressions fail before their fixes; 126 focused tests pass with one platform skip; related supervisor and idle-timeout tests pass. Core and all 25 selected test typecheck graphs, changed-file lint, and independent review pass. The full changed-check command was stopped under the host time limit during import-cycle scanning after its preceding gates passed.

* build(pr): add the shared process deadline to the PR wrapper inventory

* test(process): isolate deadline regression spawn fixtures

Mock the spawn boundary for deterministic deadline tests so their fake children do not load the unrelated spawn and worker runtime closure. Keep all nine behavior assertions; standalone wall time falls from 30.84 seconds to 3.15 seconds.

Validation: 208 process tests passed with one platform skip; PR wrapper inventory and both requested provisioning cases passed. Scoped services tsgo, changed-file lint, formatting, and independent review passed. This commit does not change runtime timeout behavior; the independent backstop finding remains unresolved.

* fix(process): separate broker execution deadlines from output drain

Give brokered command wrappers an execution-only deadline with one second of scheduling grace. The broker checks the native root state, retains configured kill escalation, clears the backstop on exit or earlier host cancellation, and reports accepted timeouts even after a cooperative zero exit. Native commands retain their local primary watchdog.

Preserve observed root exits while EOF or broker results are pending. Apply the existing 100ms idle and 1000ms hard output drain bounds to successful tree roots, and join owned descendants without rewriting the root exit status. Raw Execa timeout contracts remain unchanged.

Validation: 250 process tests passed with one platform skip, including live broker execution with frozen Gateway timers; wrapper inventory and both provisioning cases passed. Core and services test tsgo, changed-file lint and format, and independent review passed. Deterministic deadline regressions take 3.77s standalone. The live broker proof takes 40.06s wall with 2.47s test execution; its real process and IPC are required to prove an independently running deadline, while shared worker artifact setup accounts for most of the overhead.

* fix(process): preserve descendant deadlines with bounded EOF grace

Restore the successful owned-tree output contract from openclaw#140927: retain descendant output until the command deadline and preserve timeout classification for held pipes. Remove early output release and group termination after a successful root exit.

At the deadline, give an already-successful root one fixed 100ms EOF grace using the existing stdio grace constant. Both streams reaching EOF preserve the exit result; a held stream enters the existing timeout and cleanup path. Keep runExec and non-tree post-exit handling, the broker execution-only backstop, and broker timeout propagation.

Validation: 314 process tests passed with one platform skip, including all requested process ownership suites. The 12-case deadline regression file passed in 5.72s wall; wrapper inventory and both provisioning cases passed. Core and services test tsgo, changed-file lint/format, and full-branch P2 autoreview with the macOS private temporary directory passed.

* test(daemon): let systemd deadline decisions settle after expiry

Command deadlines now take their timeout decision one timer turn after the deadline fires. The systemd availability test advanced fake time by exactly the deadline, leaving that decision pending until the real child exited and CI's 10 s test timeout expired. Advance to the next timer after the deadline. Failed 5/5 before, passes 5/5 after; process deadline suites pass (76).

* test(process): settle deferred deadlines in consumer tests

Advance fake clocks through the queued deadline decision before asserting cancellation or awaiting construction and process settlement. Preserve MCP authority, exec liveness, and native process-group cleanup assertions.

Keep the production timer: setImmediate preserves native exit handling but still requires another fake-clock tick. No new real waits or child processes are introduced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant