Repository navigation
fix(plugins): Doctor fails after native capture directories disappear - #160291
Conversation
Persisted admission facts can outlive their native capture directories. Fresh admission already rejects these namespaces for reuse, but hardlink identity reconciliation reopened their missing companions and failed Doctor with README.md ENOENT. Skip absent namespaces without promoting old facts; all checks for existing captures and installed bytes remain intact. Update behavior: candidate-side plugin loading recaptures installed bytes for post-update Doctor. Shipped updater protocols, package swap ordering, configuration, and schemas are unchanged. Regression reproduced on current main through the capture API. All 11 admission tests pass, including equal-size edits with restored mtime. Update compatibility inventory passes for 2026.9.1 through 2026.9.6. Independent Codex review found no actionable P0-P2 findings.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 2:11 PM ET / 18:11 UTC (Revision 15). ClawSweeper reviewWhat this changesNative plugin admission recaptures installed files when a saved capture directory is missing, with a persisted-receipt regression test and updated plugin documentation. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Current main still cannot recover an already-missing persisted native capture. A merged Doctor fix addresses one cause of disappearing captures, but existing stale receipts remain a distinct problem. The reviewed branch has focused regression and upgrade evidence, with no actionable finding. Priority: P0 Review scores
Verification
How this fits togetherOpenClaw uses an SQLite installed-plugin index to reuse verified native plugin captures across runs. Doctor and Gateway plugin loading consume those captures when preparing installed plugins. flowchart LR
A[Installed plugin index] --> C[Native admission]
B[Installed package files] --> C
C --> D{Saved capture exists?}
D -->|Yes| E[Verify capture]
D -->|No| F[Capture installed files]
E --> G[Doctor and plugin loading]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +4, Tests +78, Docs +3. Total +85 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep stale-receipt recovery in native admission alongside the separate Doctor capture-lifetime repair, while continuing to reject changed installed or captured bytes. Do we have a high-confidence way to reproduce the issue? Yes. Persist a native admission receipt, remove its capture directory, then invoke the capture API: current main reaches the missing companion hash. The PR records a failing pre-fix regression; this read-only review did not execute it. Is this the best way to solve the issue? Yes. The repair sits in the existing native admission owner and preserves verification for captures that still exist. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d0be0545c44e. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
An unrelated inaccessible receipt must not prevent another plugin's native admission. Probe the capture directory only after finding a member whose identity this admission affected; skip a missing namespace without promotion. Extend the persisted-receipt regression to inject an unrelated EACCES. It fails on the previous patch and passes with the narrower guard. All 12 admission cases pass; existing equal-size restored-mtime edits still fail. Focused types, lint, formatting, compatibility, and independent review pass.
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
…n-capture-companion-enoent
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…n-capture-companion-enoent
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…n-capture-companion-enoent
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…n-capture-companion-enoent
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…n-capture-companion-enoent
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…n-capture-companion-enoent
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…openclaw#160291) * fix(plugins): reload native plugins after capture directories disappear Persisted admission facts can outlive their native capture directories. Fresh admission already rejects these namespaces for reuse, but hardlink identity reconciliation reopened their missing companions and failed Doctor with README.md ENOENT. Skip absent namespaces without promoting old facts; all checks for existing captures and installed bytes remain intact. Update behavior: candidate-side plugin loading recaptures installed bytes for post-update Doctor. Shipped updater protocols, package swap ordering, configuration, and schemas are unchanged. Regression reproduced on current main through the capture API. All 11 admission tests pass, including equal-size edits with restored mtime. Update compatibility inventory passes for 2026.9.1 through 2026.9.6. Independent Codex review found no actionable P0-P2 findings. * fix(plugins): limit capture probes to affected native namespaces An unrelated inaccessible receipt must not prevent another plugin's native admission. Probe the capture directory only after finding a member whose identity this admission affected; skip a missing namespace without promotion. Extend the persisted-receipt regression to inject an unrelated EACCES. It fails on the previous patch and passes with the narrower guard. All 12 admission cases pass; existing equal-size restored-mtime edits still fail. Focused types, lint, formatting, compatibility, and independent review pass.
What Problem This Solves
Fixes post-update Doctor and channel setup failing with
Cannot capture plugin source .../README.md/ENOENTwhen a persisted native-plugin receipt points to a capture directory that no longer exists.User Impact
Plugins can load again by admitting the installed package into a fresh capture. This is a candidate-side repair: published 9.x updaters keep their existing protocol, package-swap ordering, and configuration. No schema, dependency, environment variable, or migration changes are required.
Why This Change Was Made
Native admission already rejects a missing namespace for reuse. The hardlink reconciliation introduced in #159650 then revisited every persisted namespace, including the rejected one, and tried to hash its missing companions. The reported missing README was the first member encountered; the whole admission directory was absent.
Only probe namespaces containing a member affected by the current admission, then skip a disappeared namespace before reading or promoting any of its identities. An unrelated inaccessible receipt therefore cannot block another plugin. Existing namespaces still require installed-byte and captured-digest agreement. The ordinary-companion verification from commit 68442a8 remains intact, including rejection of equal-size edits with restored mtime. Production delta: +4 lines; no owner, export, or shipped-driver contract was removed.
Evidence
createNamespace, then passes with this fix.pnpm test src/plugins/plugin-generation-artifact.admission.test.ts --maxWorkers=1: 12 passed, 185.00 s wall after the sixth main integration on the loaded macOS host, including cold compiler preparation. The existing file also tests persistent admission, private inspection custody, SDK host replacement, immutable captures, and integrity checks; its test time was about 74 s on this heavily loaded host run.pnpm update:compat:check: passed; pinned lazy-import inventories for published 2026.9.1–2026.9.6 are unchanged.b9afb939247e; the final revision retains the same four-line production delta.git diff --check: passed.b9afb939247e(unchanged admission-test and fix bytes): 12 passed, 44.52 s test-runner wall (42.71 s Vitest); verified sourceb9afb939247e. The complete remote command took 245.302 s. Leasetbx_01m3kszag8x63qthhzr5y6925cstopped successfully. Run.node scripts/check-changed.mjs --dry-runand its runnable checks: passed (core, all 25 test type graphs, formatting, lint, dead-export scans, and all selected guards). After the review correction, repeated the affected core/plugin test type graphs, lint, formatting, line-cap ratchet, and compatibility inventory successfully.b9afb939247ecompleted: Doctor and Gateway startup, health, readiness, and status probes passed. The coordinator authorized retaining all three green cells after the clean main merge because none of the specified plugin-owner paths changed. The initial two upgrade cells were intentionally stopped after the review correction superseded their head, and are not passing proof.492f665864fafixes the planner; it is included in the integration below. Fresh CI is required on the pushed merge head; the old run was not rerun.tbx_01m3kqs26m46bvhtkvc00vdkn8stopped (run)tbx_01m3kvrbwg7esyt68xr3brz040stopped (run)tbx_01m3kx5tq2z8n8byda63stb4bvstopped (run)The first final-head 2026.9.5 warmup received HTTP 429 while fetching the Blacksmith workflow; no test command ran. Its single authorized fresh retry passed. No unambiguous creation receipt was returned for that failed warmup, so its pending recovery key is preserved and no unrelated inventory entry was stopped. All identified task leases are stopped.
ClawSweeper completed its exact-head review of
5861328f60cb524a6b077bcfdfe77276967c8c1dat 2026-09-28T17:22:02.637Z: ready, no findings, no before-merge items. The plugin production and admission-test bytes remain unchanged. Both prior red checks now pass: check-source-contracts and Select Critical Quality shards. No infrastructure rerun was needed.Release-note context: Fix post-update Doctor and plugin setup failures when recorded native capture directories have disappeared, while preserving source-integrity validation.
Main integration rounds
Merged main
dfd4cc8a5d5cd2c398d380e55c6427aa5c250e91cleanly into the existing branch, producing179db97c72cad5915936ff6f65a8f84aaec822c7. This includes planner fix492f665864fa. No conflicts or custom code edits. The fix and admission test file are byte-identical tob9afb939247e, and the merge changed none ofsrc/plugins/plugin-native-*,plugin-source-file.ts, orplugin-generation-*; the three green cells above stand under the coordinator's order. Revalidation: 12 admission tests passed in 76.91 s wall, compatibility inventory passed, andgit diff --checkpassed.Standing re-merge round 1: CI run 36420783635 failed only in
ui/src/e2e/session-progress-widget.e2e.test.ts, case “keeps target liveness when the selected agent scope changes” (expected spinner count 1, observed 0); 17 sibling jobs were cancelled. This mocked UI path and its fixture are outside this PR. Main CI at the exact merge base succeeded; its push coverage is security-fast only, not a full test baseline. Under the coordinator's standing re-merge authority, merged maind9ba38955764f04f1149d7c01e2ed5f6acc3da6ecleanly, producing327bae55b821c2a7a9bef1e5b4fc14a167550bf9. No custom code edits; no specified plugin-owner paths changed, and retained upgrade proof still applies. Admission: 12 passed in 135.93 s wall; compatibility and diff checks passed. The failed UI test was not changed, so a passing fresh run would not establish a fix for that failure.The second run, 36423726050, UI shard 4/9, repeated the same spinner assertion (353 tests passed, one failed; 24 sibling jobs cancelled). Landing stopped pending an owning repair. The coordinator subsequently reproduced it on unfixed main: a late key-only mocked
sessions.describereply overwrote the running session row. This fixture path cannot reach the native admission change.Merged the owning main repair from fix(test): seed canonical progress-widget session liveness #160463 (
741c9cb56bde) and follow-up1a94ee9ed7e2, which seeds consistent canonical session liveness and waits for the target descriptor before releasing held replies. Main9b730f0cfb47281b51a01bdd3415e7c645e61b3amerged cleanly, producing09260b5b332550eb959b20378323edfc091231e0. No custom code edits or conflicts. No specified plugin-owner paths changed, so all three green upgrade cells stand under the coordinator's renewed order. Revalidation: 12 admission tests passed in 104.90 s wall; compatibility and diff checks passed. Fresh exact-head CI will validate the integrated fixture repair. No new Testbox leases were needed.The coordinator authorized the named inventory repair
02a95db98aa1(fix(tests): remove retired voice-call runtime API guard #160526), removing the retired voice-call runtime API guard while preserving the remaining inventory checks. Merged main9e7bb186dc1f670bbb45da53197a69fc74a4007ccleanly, producing4d7e17cdd6d70f2b342dabef830245071ca0f1c8. A concurrent fetch had already advanced the shared main ref to the exact downloaded commit; that identity and repair ancestry were verified before merging. No custom code edits, conflicts, or specified plugin-owner path changes. Revalidation: 12 admission tests passed in 68.23 s wall; compatibility and diff checks passed. All three upgrade cells stand. No new Testbox leases were needed.First additional round under the renewed order: CI 36448891945, UI shard 1/9 failed the untouched
ui/src/e2e/session-owner-filter-keyboard.e2e.test.ts:59case “navigates session filters and display controls with Tab, arrows, Space, and Escape”: Owners was inactive instead of focused. Both previously failing shards passed; this new shard had 357 passing tests and one failure. Main already contained owning fix94cbd1335dfb, which waits for the initial owner roster before opening the menu. Merged maind9569745764fa53d540dbfe3a0b536975bc69a7dcleanly, producingb887b58ec975b6da2ef6b24db7afb135f0fe075b. No custom code edits, conflicts, or specified plugin-owner path changes. Revalidation: 12 admission tests passed in 148.36 s wall; compatibility and diff checks passed. All three upgrade cells remain valid. No new Testbox leases were needed.The coordinator identified the remaining source-contract failure on
b887b58ec975: nine daemon CLI lazy-forwarder export collisions introduced by main5de949fc4620. Owning fix385ac2893544restores named zero-argument loaders; the coordinator independently ran the guard successfully on mainf010fc0b5790. Merged main46a227c518675291a38d001d7e83ce5978a94e4b, which includes that verified baseline, cleanly into the branch, producing5861328f60cb524a6b077bcfdfe77276967c8c1d. No custom code edits, conflicts, or specified plugin-owner path changes. Revalidation: 12 admission tests passed in 185.00 s wall; compatibility and diff checks passed. The prior CodeQL selector HTTP 403 is a named infrastructure error; the coordinator authorized fresh planning through this push and one failed-job rerun if it recurs. All three upgrade cells remain valid; no new Testbox leases were needed.Resolved inherited inventory failure
CI run 36445839661, checks-node-changed-5 failed
src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts, case “keeps runtime api surfaces classified and guarded exports pinned”: the expected 40-file inventory still includesextensions/voice-call/runtime-api.ts, while the actual inventory has 39 files. Main commitbfcec878635d(#160362) removed that file without updating the guard. Neither path is changed by this PR, and this filesystem inventory assertion does not execute plugin native admission. The aggregate gate failed; 105 sibling jobs were cancelled.The earlier stop preserved the failed CI result because no qualifying hourly main job was available. The coordinator subsequently authorized integration on the named owning fix
02a95db98aa1, without requiring an hourly main baseline. Fresh CI is required on the new head; no failed run was rerun or waived.Prior infrastructure failure
CodeQL Critical Quality run 36452089309, selector job 109029098971 failed on head
b887b58ec975b6da2ef6b24db7afb135f0fe075bbefore selecting analysis shards:This was GitHub installation quota exhaustion before analysis. The earlier watcher stopped on it; the coordinator subsequently authorized replanning on the newly integrated head and one failed-job rerun for a repeated named infrastructure failure. The failure is retained here and is not counted as passing proof.
Main CI run
36452090030subsequently failedcheck-source-contractson the daemon export collisions described in round 6. That owning fix is now included. No merge request has been submitted.Bounded reproduction result
CI run 36457089856, real-Gateway UI shard 2/2 failed the untouched
ui/src/e2e/chat-thinking-metadata.real-gateway.e2e.test.ts:332case “offers only harness Ultra without advertising a default or changing the session”:The failure follows filling
/think, pressing Tab, and confirming the composer contains/think. The shard had 41 passing tests and one failure. No owning main repair was found in the failing test or the inspected slash-menu/composer paths. The initial stop preserved this unowned test failure. The coordinator then authorized and performed one bounded reproduction attempt on the unchanged head; no source fix was made. All scoped checks and retained upgrade cells above remain valid.The coordinator's single bounded reproduction attempt, real-Gateway shard job 109057680699, run 36457089856 attempt 2, passed at 2026-09-28T17:59:23Z. This is a non-reproduction, not a fix; the untouched
/thinkslash-menu timeout remains documented above. The coordinator also confirmed main's latest real-Gateway shards passed and decided to land the reviewed production change. No further reruns were requested. The attempt-2 CI gate job passed at 2026-09-28T18:01:32Z; native preparation is being refreshed for the unchanged pinned head.