Skip to content

fix(tooling): enforce Linux process-tree memory limits - #160024

Merged
vincentkoc merged 7 commits into
mainfrom
fix/semantic-process-memory-limit
Sep 28, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
fix/semantic-process-memory-limit

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Related: #160010

What Problem This Solves

Go heap targets do not cap aggregate lint/compiler memory. The shared process owner also needs to join detached descendants before it releases resource ownership.

User Impact

Adds an internal, opt-in Linux process-tree memory limit. Existing uncapped callers retain their behavior; semantic-check callers adopt containment in subsequent small PRs.

Capped launches require a cgroup-v2 systemd user manager. Unsupported platforms fail with an actionable bounded-Linux-worker instruction. Native Windows containment is deferred to a separately qualified change; this PR leaves the existing Windows runner unchanged.

Why This Change Was Made

The managed-process owner verifies the aggregate kernel limit before workload startup and verifies descendant cleanup before releasing its resource claim. Generated scope names belong to that invocation. Default capped launches start cleanup at launcher exit even when detached children hold output pipes open. Signal ownership survives cgroup cleanup and claim release, with the leaf retaining the sole grace timer.

The standalone packaged launcher uses the same verified limit. CI provisioning is separate: #160014.

Production/tooling: +380/-20; tests: +739/-5. Production growth implements the missing kernel containment and cleanup ownership contract.

Evidence

Linux Testbox proof, with changed-source and frozen-input hashes verified:

  • All 8 real Linux integration cases passed: aggregate OOM, detached children, default pipe-holder cleanup without a deadline, shell/stdin, exit codes, signals, and a cancellation drain longer than five seconds.
  • 191 focused/regression tests passed; 4 existing Windows-only tests were skipped on Linux.
  • Script typecheck, typed lint of all six changed tooling modules, formatting, and whitespace passed.
  • Built the configured standalone launcher and a compiled consumer. Plain Node returned workload exit 7 inside a verified 256 MiB scope.
  • Independent full-source review and review of the final cleanup repair found no remaining P0–P2 defect.

Review follow-through: both reported lifecycle defects are repaired. The hosted fixture bundling failure is repaired by including the new memory-owner import closure. Windows aggregate containment was removed from this PR pending native qualification. The 34 new unit cases took 261 ms; the 8 real integration cases took 11.356 s (11.72 s Vitest wall time). The complete two-shard focused/regression command took 90.73 s including compiler preparation.

This PR does not activate the caps or complete the lint-memory repair.

Current-head follow-through: adopt landed baseline repairs at 57f1abecc191ea0a54a9af93a6ccb97e6eb87700. The new ownership tests use the repository's typed deferred helper instead of unavailable Promise.withResolvers typing. Run 36372683237 verified seven source/input hashes; all 34 cases, strict root test types, formatting, and whitespace passed (266 ms tests; 1.77 s wrapper). Kernel implementation bytes are unchanged.

Shared CI baseline repairs restore the static-step helper to checkout/planning fixtures and the diagnostic helper to the lint fixture. The Vitest preload now initializes only its four packaged worker entrypoints, preserving package-local resolution and ordinary child-process flags; the package-worker workaround was removed.

Run 36374450491 passed all 57 affected preload, package-worker, and database-verifier cases, plus all 8 jsdom cases under each configured forks/threads pool. Run 36374680281 verified five source hashes, passed all 40 lint-status cases, strict root test types, formatting, and whitespace. Its subsequent Bun command could not start because that Testbox had no Bun. Run 36375089688 then installed the checksum-pinned CI runtime and passed all 11 preload/jsdom tests (exit zero, with a Bun directory-mismatch diagnostic recorded). Independent P0–P2 autoreview found no actionable issue in this repair.

Follow-up: release shared test setup before VM realm disposal. An extra vmForks probe passed all 8 assertions, then failed in unchanged process-exit cleanup after realm globals were disposed. VM pools are outside the configured forks/threads matrix; no passing VM qualification is claimed. Hosted CI validates this PR's final context.

@vincentkoc vincentkoc self-assigned this Sep 28, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 28, 2026 01:45
@clawsweeper

clawsweeper Bot commented Sep 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.

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 11:52 PM ET / September 28, 2026, 03:52 UTC (Revision 4).

ClawSweeper review

What this changes

The branch adds optional Linux process-tree memory limits to OpenClaw's managed tooling runner, packages a bounded launcher, and updates process, CI fixture, and Vitest preload tests.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. Current main lacks aggregate limits in the managed tooling runner, and this branch provides a distinct, opt-in Linux implementation. The earlier lifecycle findings are addressed, and this review found no new blocking defect. Activating limits for lint remains part of the linked issue.

Priority: P2
Reviewed head: ac811094a242d4414030477524bf9566cdb4cab8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused implementation and relevant real-kernel evidence support a good PR, with broader lint activation intentionally left to linked work.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The changed production owner launches and cleans up bounded Linux process trees; the PR body reports real Testbox OOM, descendant, signal, and packaged-launcher results plus focused preload runs. The MEMBER author is exempt from the external-contributor proof gate, and the linked internal traces could not be inspected through this review proxy. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed production owner launches and cleans up bounded Linux process trees; the PR body reports real Testbox OOM, descendant, signal, and packaged-launcher results plus focused preload runs. The MEMBER author is exempt from the external-contributor proof gate, and the linked internal traces could not be inspected through this review proxy. No stored-data contract changes.
Evidence reviewed 12 items Current-main behavior: The current-main managed runner has no memory-limit option or Linux scope branch.
Introduced owner boundary: The new option snapshots command inputs, enters the Linux containment owner, and retains the resource claim through scope cleanup; uncapped calls still use the existing inner runner.
Scope lifecycle: The branch generates an invocation-specific scope, launches the bounded workload, and checks scope removal or kernel emptiness before returning.
Findings None None.
Security None None.

How this fits together

The managed tooling runner starts commands used by OpenClaw's development checks and reports their exit status after handling signals and child processes. A capped launch enters a verified Linux systemd scope, then the runner cleans up its descendants before releasing its resource claim.

flowchart LR
  A[Tooling caller] --> B[Managed process runner]
  B --> C{Memory limit requested?}
  C -->|No| D[Ordinary child process]
  C -->|Yes| E[Verified Linux scope]
  E --> F[Workload process tree]
  F --> G[Descendant cleanup]
  D --> H[Exit result]
  G --> H
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +734, Other +360. Total +1094 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 10 739 5 +734
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 6 380 20 +360
Total 16 1119 25 +1094

Review metrics

Metric Value Why it matters
Production and test growth production +380/-20; tests +739/-5 The stated production growth implements opt-in kernel containment and cleanup ownership, while most added lines exercise its boundary.
Capped caller adoption 0 non-test callers This slice supplies the runner capability; it does not yet bound lint or compiler commands.
Measured new-test cost 34 unit cases in 0.261 s; 8 Linux cases in 11.356 s The PR body records the cost of the added ownership and real-kernel coverage.

Root-cause cluster

Relationship: partial_overlap
Canonical: #160010
Summary: This PR supplies the Linux process-owner slice of the broader lint-memory repair; CI provisioning and caller activation are separate work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one managed-runner owner for Linux scope creation and cleanup, then enable it in semantic-check callers after the linked CI provisioning and platform qualification are ready.

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

No high-confidence live current-main reproduction was run in this read-only review. Current source confirms the managed runner has no aggregate kernel cap, and the linked issue records an observed lint memory spike.

Is this the best way to solve the issue?

Yes for this implementation slice: an opt-in limit at the existing process owner can contain descendants without changing uncapped callers. The broader lint repair still needs caller activation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 86376d56b287.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded tooling reliability improvement whose lint-memory benefit requires later caller activation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 changed production owner launches and cleans up bounded Linux process trees; the PR body reports real Testbox OOM, descendant, signal, and packaged-launcher results plus focused preload runs. The MEMBER author is exempt from the external-contributor proof gate, and the linked internal traces could not be inspected through this review proxy. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-28T01:59:07.979Z sha 3bb46ae :: blocked before merge. :: [P2] Start tree cleanup for default capped Linux calls | [P2] Stop only the scope created by this invocation
  • reviewed 2026-09-28T03:04:15.338Z sha 4ac02e0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T03:32:05.800Z sha 7ce765d :: needs maintainer review before merge. :: none

@vincentkoc vincentkoc changed the title fix(tooling): enforce memory limits across child processes fix(tooling): enforce Linux process-tree memory limits Sep 28, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
steipete added a commit that referenced this pull request Sep 28, 2026
Carry the preload-owner fix and regression coverage from b9cd492
(#160024). The failing CI merge inherited a newer preload that tried to
resolve vitest/runtime relative to temporary JavaScript fixture entrypoints.
It crashed before those children could register their IPC handlers.

Apply the adapter only to recognized Vitest workers, preserving their
package-local runtime while leaving ordinary forks, threads, and evals
alone. Keep the accepted canonical-home repair unchanged.

Validated the four original failures and the preload regressions before
repair, three focused passes, the original CI shard, changed checks, and
fresh P1 review on a Linux Testbox.

Co-authored-by: Vincent Koc <[email protected]>
steipete added a commit that referenced this pull request Sep 28, 2026
Refresh the PR merge ref after #160024 repaired the trusted harness inventory and ordinary child-process jsdom preload. Package source and the reviewed tree are unchanged.
steipete added a commit that referenced this pull request Sep 28, 2026
Refresh the PR merge ref after #160024 repaired the trusted harness inventory and ordinary child-process jsdom preload. Package source and the reviewed tree are unchanged.
steipete added a commit that referenced this pull request Sep 28, 2026
Refresh the PR merge ref after #160024 repaired the trusted harness inventory and ordinary child-process jsdom preload. Package source and the reviewed tree are unchanged.
steipete added a commit that referenced this pull request Sep 28, 2026
Refresh the PR merge ref after #160024 repaired the trusted harness inventory and ordinary child-process jsdom preload. Package source and the reviewed tree are unchanged.
steipete added a commit that referenced this pull request Sep 28, 2026
* refactor(packages): deslop shared packages second pass

Consolidate remaining stream, parser, schema projection and normalization paths while preserving public exports, wire shapes and runtime semantics. Retain the prior package cleanup owners and shrink assertion ratchets for removed casts.

* refactor(packages): preserve schema declarations and finish type cleanup

* refactor(packages): preserve explicit guards and import ordering

* refactor(packages): retain distinct plugin result declarations

* fix(sdk): bundle private session URL dependency

The private session URL contract exports TypeScript source and has no standalone package build. Keep it as a build-time dependency so the existing package builder bundles it into the SDK. The unchanged external-consumer E2E reproduced the missing build-script failure before this repair.

* ci: refresh packages proof after inherited fixture repairs

Refresh the PR merge ref after #160024 repaired the trusted harness inventory and ordinary child-process jsdom preload. Package source and the reviewed tree are unchanged.

* ci: refresh packages proof after placement fixture repair

Refresh the PR merge ref after #160124 repaired the inherited placement fence synchronization and cleanup race. The reviewed and Testbox-proven package tree remains unchanged.

* ci: refresh packages after compiler scheduling repair

Refresh the PR merge ref after #160290 separated per-group scheduling from shared compiler inputs. The package tree and active Testbox source hashes are unchanged.

* ci: refresh packages after lazy import guard repair
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…aw#160085)

Refresh OpenAI 7.20.0, Pi TUI 0.86.1, tsx 4.23.15, native TypeScript 7.1.0-dev.20260920.1, Tauri 2.11.6, single-instance 2.4.5, rand 0.10.3, and SimSlim 0.10.0 under the fixed 2026-09-20T18:25:54Z cutoff. Align companion manifests, native locks, Docker tooling, and SimSlim qualification. Preserve existing patches, overrides, the updater fork, and compatibility holds.

Validation includes 303 npm consumer cases, 148 Rust core cases, 63 desktop cases, 86 SimSlim cases, actual Linux container and SDK transport proof, four typecheck lanes, 102 npm lock mirrors, and cutoff/integrity audits. Synthetic terminal comparisons are attached to the PR and verified rendered. Independent reviews are clean through P2.

Land under explicit maintainer approval for proven pre-existing CI failures. Run 36376168824 exposed three unchanged Windows checkout-fixture inventory failures already repaired on main by openclaw#160024 (fe5c642). The dependency delta does not touch that workflow/helper/test closure. No green full-CI result is claimed. No third-party PR, release, or deployment.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…law#160094)

Related: openclaw#160010

## What Problem This Solves

Independent lint and compiler processes can each fit their own heap target while collectively exhausting the host.

## User Impact

This adds the shared admission owner for subsequent compiler and lint activation; no existing command uses it yet. Callers receive one host/account slot, a kernel process-tree limit based on current memory headroom, and a 15-minute queue-plus-execution deadline.

The owner requires verified Linux containment. Unsupported platforms or insufficient/unknown memory headroom return an actionable refusal instead of starting an unbounded process. Compiler/lint command activation and platform routing are separate PRs.

## Why This Change Was Made

The kernel limit from openclaw#160024 bounds one process tree; this owner prevents simultaneous checks across worktrees from independently consuming the same budget. It uses the existing fs-safe lock contract and process-memory reader, with the OS account identity rather than task-specific HOME.

Admission follows artifact ownership, measures headroom after waiting, caps the aggregate tree at the smaller of 8 GiB or half of usable capacity/headroom, and refuses below 512 MiB. It records the kernel scope identity before launch and retains ownership when cleanup cannot prove tree extinction. Cancellation remains owned through asynchronous release; soft Go overrides remain intact.

## Evidence

- [Blacksmith Testbox proof](https://github.com/openclaw/openclaw/actions/runs/36373081283) exercised real filesystem lock contention, canceled/expired admission, late acquisition, command snapshotting, capacity/headroom refusal, non-Linux refusal, receipt ordering, and retention after uncertain cleanup. Kernel launches are mocked in this focused owner suite; actual kernel enforcement was qualified in the merged parent.
- Strict script/root test types, targeted typed lint, formatting, and whitespace passed for the helper and profiler candidate. An independent P0–P2 review found no actionable finding.
- This PR cherry-picks the tested helper unchanged onto the merged kernel/cancellation parents. The three dependency-owner modules are byte-identical to the proof base. Hosted CI will validate this exact head.
- Production/tooling: +166/-0; tests: +321/-0. The growth supplies the missing cross-worktree admission/lifecycle owner. There is no runtime/config migration or new dependency.

CI correction: exact-head check-lint identified nine missing control-flow braces in the new test file. Commit `e590faf299ddb75e36b1a8e503121807785bb1ba` adds those braces; conditions and async sequencing are unchanged. Targeted formatting, whitespace, and independent P0–P2 review pass. Fresh CI provides the updated lint proof.

Measured test cost at `e590faf299ddb75e36b1a8e503121807785bb1ba`: the exact helper and test bytes were run on [Testbox](https://github.com/openclaw/openclaw/actions/runs/36376377264) from the profiler child revision, with `--maxWorkers=1`. All 26 cases passed; file test time 1.331s, Vitest wall 1.84s, complete test command 2.69s. Dedicated test execution adds 2.69 CI wall seconds, excluding shared checkout/install/setup. This addresses the review's test-cost finding and Rank-up move; no source change or repeat review is needed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
* refactor(packages): deslop shared packages second pass

Consolidate remaining stream, parser, schema projection and normalization paths while preserving public exports, wire shapes and runtime semantics. Retain the prior package cleanup owners and shrink assertion ratchets for removed casts.

* refactor(packages): preserve schema declarations and finish type cleanup

* refactor(packages): preserve explicit guards and import ordering

* refactor(packages): retain distinct plugin result declarations

* fix(sdk): bundle private session URL dependency

The private session URL contract exports TypeScript source and has no standalone package build. Keep it as a build-time dependency so the existing package builder bundles it into the SDK. The unchanged external-consumer E2E reproduced the missing build-script failure before this repair.

* ci: refresh packages proof after inherited fixture repairs

Refresh the PR merge ref after openclaw#160024 repaired the trusted harness inventory and ordinary child-process jsdom preload. Package source and the reviewed tree are unchanged.

* ci: refresh packages proof after placement fixture repair

Refresh the PR merge ref after openclaw#160124 repaired the inherited placement fence synchronization and cleanup race. The reviewed and Testbox-proven package tree remains unchanged.

* ci: refresh packages after compiler scheduling repair

Refresh the PR merge ref after openclaw#160290 separated per-group scheduling from shared compiler inputs. The package tree and active Testbox source hashes are unchanged.

* ci: refresh packages after lazy import guard repair
steipete added a commit that referenced this pull request Sep 29, 2026
* fix: allow Doctor repair with canonical service home overrides

Compare process and runtime homes independently with the OS account home so a canonical OPENCLAW_HOME in service metadata does not block Doctor credential migration. Preserve relocated-home isolation, active-writer checks, and the existing migration owner.

* test: keep inherited Vitest preloads out of verifier children

Carry the preload-owner fix and regression coverage from b9cd492
(#160024). The failing CI merge inherited a newer preload that tried to
resolve vitest/runtime relative to temporary JavaScript fixture entrypoints.
It crashed before those children could register their IPC handlers.

Apply the adapter only to recognized Vitest workers, preserving their
package-local runtime while leaving ordinary forks, threads, and evals
alone. Keep the accepted canonical-home repair unchanged.

Validated the four original failures and the preload regressions before
repair, three focused passes, the original CI shard, changed checks, and
fresh P1 review on a Linux Testbox.

Co-authored-by: Vincent Koc <[email protected]>

* test(update): align canonical home recovery guidance

---------

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 30, 2026
…law#160056)

* fix: allow Doctor repair with canonical service home overrides

Compare process and runtime homes independently with the OS account home so a canonical OPENCLAW_HOME in service metadata does not block Doctor credential migration. Preserve relocated-home isolation, active-writer checks, and the existing migration owner.

* test: keep inherited Vitest preloads out of verifier children

Carry the preload-owner fix and regression coverage from fe5c642
(openclaw#160024). The failing CI merge inherited a newer preload that tried to
resolve vitest/runtime relative to temporary JavaScript fixture entrypoints.
It crashed before those children could register their IPC handlers.

Apply the adapter only to recognized Vitest workers, preserving their
package-local runtime while leaving ordinary forks, threads, and evals
alone. Keep the accepted canonical-home repair unchanged.

Validated the four original failures and the preload regressions before
repair, three focused passes, the original CI shard, changed checks, and
fresh P1 review on a Linux Testbox.

Co-authored-by: Vincent Koc <[email protected]>

* test(update): align canonical home recovery guidance

---------

Co-authored-by: Vincent Koc <[email protected]>
steipete added a commit that referenced this pull request Sep 30, 2026
Keep the moved CLI command fixture in its runtime prerequisite group and
preserve complete agent coverage across the core and CLI process owners.

Carry the test-only trusted-harness fixture fix from #160024.

Co-authored-by: Vincent Koc <[email protected]>
steipete added a commit that referenced this pull request Sep 30, 2026
* fix(cli): release plugin resources when help finishes

Uncached CLI metadata loads now use the existing inspection acquisition when an executable invocation owns them. The source-plugin regression verifies that invocation release joins module disposal. Caller-owned programs retain their existing lifetime.

* fix(plugins): release retired registry preparation scope

Create the aggregate retirement observer outside the registry preparation
scope so it retains only child waiters. Preserve per-observation options,
cleanup ordering, failure identity, and deferred consumer results.

The unchanged cold registry-retention regression failed on the CI Bun
runtime before this change and passes after it. The original seven-file
shard passes all 172 cases, and Node retirement coverage passes 20 cases.

* fix(ci): carry the chat attachment lint repair

Carry the exact two-file fix from 2e95cdb
(#160159). Move the unchanged image decoder into its existing helper
to restore the 700-line limit without changing attachment behavior.

Targeted lint and all 21 attachment tests pass on this candidate.
Independent review found no actionable defects.

* test: retain complete lifecycle helpers in lease fixtures

* test: isolate local command fixtures and join recovery cleanup

* test(ci): preserve CLI runtime ownership and harness staging

Keep the moved CLI command fixture in its runtime prerequisite group and
preserve complete agent coverage across the core and CLI process owners.

Carry the test-only trusted-harness fixture fix from #160024.

Co-authored-by: Vincent Koc <[email protected]>

* fix(tests): scope Vitest preload to test workers

Apply the jsdom adapter only at Vitest worker entry points while preserving
package-local runtime resolution. Ordinary Workers may inherit the preload
without having a Vitest dependency. Exercise default native inheritance and
await worker termination.

Copy the static-check evidence helper into lint fixtures so the real oxlint
entry point can load its current import closure.

Validation: reproduced both original failure causes before repair; all 76
affected tests pass (351.44 seconds in Vitest), as do canonical changed-file
checks and independent review.

* test: isolate public runtime surface planning fixtures

Verify public runtime entries and packaged assets with a synthetic publishable plugin after the Diffs forwarding APIs were retired. Preserve the existing planner assertions without depending on one bundled plugin layout.

* fix(ci): carry shared lint repairs into CLI preparation

* test(tooling): repair extracted PR and npm fixtures

* test: retain gateway cleanup and isolate Windows temp paths

Close the prewarm gateway when client connection fails and retain cleanup
errors during orphaned recovery. Keep Windows-under-Bun coverage on
host-owned temporary directories, matching the fixture fix in #160985.

Validation: 13 focused fixture tests and canonical changed-file checks.

* fix(ci): keep extracted manifest within script contracts

Resolve inherited manifest lint errors without changing job selection. Move its closed true/1 flag parsing to the dependency-free argument owner and include that helper in trusted fixture copies. Validation passed 718 tests with eight existing skips, canonical changed checks, fixture lint, and independent review. The 74-case argument helper file took 1.79 seconds at one worker with warm inputs.

* test(state): apply upstream snapshot custody fixture isolation

Reuse the fixture repair from #161598 (af16b80). Keep the real exit callback and every custody assertion while isolating the synthetic cleanup owner from preceding files.

* test(pr): drain fake GitHub streams before exit

---------

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
* fix(cli): release plugin resources when help finishes

Uncached CLI metadata loads now use the existing inspection acquisition when an executable invocation owns them. The source-plugin regression verifies that invocation release joins module disposal. Caller-owned programs retain their existing lifetime.

* fix(plugins): release retired registry preparation scope

Create the aggregate retirement observer outside the registry preparation
scope so it retains only child waiters. Preserve per-observation options,
cleanup ordering, failure identity, and deferred consumer results.

The unchanged cold registry-retention regression failed on the CI Bun
runtime before this change and passes after it. The original seven-file
shard passes all 172 cases, and Node retirement coverage passes 20 cases.

* fix(ci): carry the chat attachment lint repair

Carry the exact two-file fix from 87b7350
(openclaw#160159). Move the unchanged image decoder into its existing helper
to restore the 700-line limit without changing attachment behavior.

Targeted lint and all 21 attachment tests pass on this candidate.
Independent review found no actionable defects.

* test: retain complete lifecycle helpers in lease fixtures

* test: isolate local command fixtures and join recovery cleanup

* test(ci): preserve CLI runtime ownership and harness staging

Keep the moved CLI command fixture in its runtime prerequisite group and
preserve complete agent coverage across the core and CLI process owners.

Carry the test-only trusted-harness fixture fix from openclaw#160024.

Co-authored-by: Vincent Koc <[email protected]>

* fix(tests): scope Vitest preload to test workers

Apply the jsdom adapter only at Vitest worker entry points while preserving
package-local runtime resolution. Ordinary Workers may inherit the preload
without having a Vitest dependency. Exercise default native inheritance and
await worker termination.

Copy the static-check evidence helper into lint fixtures so the real oxlint
entry point can load its current import closure.

Validation: reproduced both original failure causes before repair; all 76
affected tests pass (351.44 seconds in Vitest), as do canonical changed-file
checks and independent review.

* test: isolate public runtime surface planning fixtures

Verify public runtime entries and packaged assets with a synthetic publishable plugin after the Diffs forwarding APIs were retired. Preserve the existing planner assertions without depending on one bundled plugin layout.

* fix(ci): carry shared lint repairs into CLI preparation

* test(tooling): repair extracted PR and npm fixtures

* test: retain gateway cleanup and isolate Windows temp paths

Close the prewarm gateway when client connection fails and retain cleanup
errors during orphaned recovery. Keep Windows-under-Bun coverage on
host-owned temporary directories, matching the fixture fix in openclaw#160985.

Validation: 13 focused fixture tests and canonical changed-file checks.

* fix(ci): keep extracted manifest within script contracts

Resolve inherited manifest lint errors without changing job selection. Move its closed true/1 flag parsing to the dependency-free argument owner and include that helper in trusted fixture copies. Validation passed 718 tests with eight existing skips, canonical changed checks, fixture lint, and independent review. The 74-case argument helper file took 1.79 seconds at one worker with warm inputs.

* test(state): apply upstream snapshot custody fixture isolation

Reuse the fixture repair from openclaw#161598 (0cadcec). Keep the real exit callback and every custody assertion while isolating the synthetic cleanup owner from preceding files.

* test(pr): drain fake GitHub streams before exit

---------

Co-authored-by: Vincent Koc <[email protected]>
roboclaw-bot added a commit that referenced this pull request Oct 6, 2026
Integrate main at cc7e664 to include the fixture provisioning repair from b9cd492 (#160024), which fixes the inherited failure in CI run 36373839884. The nine-file Lobsterdex feature delta remains patch-identical (979c951b512eb74d048acccac9aafcdc7729d047). Verified 95 focused tests, six Chromium checks, 22 matching CI fixture cases, and UI typecheck.

Co-authored-by: hannesrudolph <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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