Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR keeps module-resolution hooks local, batches capture validation cooperatively, and repairs Windows recovery links. Example: A Windows Gateway loads an external plugin with 100 dependency packages and 1,000 imported leaves.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR provides a useful repair for the plugin-loading regression still present on main; no actionable correctness or security findings remain. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway startup and reload send external plugin sources through preparation workers, then bind captured modules to plugin instances; recovery snapshots preserve working code when replacement fails. flowchart TD
A[Gateway startup or reload] --> B[Preparation worker]
B --> C[Retained source custody]
C --> D[Local module binding]
D --> E[Plugin registration]
D --> F[Recovery snapshot]
F --> D
A --> G[HTTP and WebSocket service]
Technical reviewBest possible solution: Retain worker-owned capture custody while existing plugin instances own local module hooks, cooperative validation, and independent recovery snapshots. Do we have a high-confidence way to reproduce the issue? Current main exposes synchronous worker proxies to module loading, matching the mechanism documented in #174681; this read-only review did not execute target code. Is this the best way to solve the issue? The patch addresses the blocking RPC boundary through existing capture and instance owners, removes the replaced callback protocol, and preserves synchronous CLI and recovery contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d6e3a30c0bfc. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +159, Tests +490, Other +1. Total +650 across 20 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (8 earlier review cycles)
Reviewed October 20, 2026, 8:01 PM ET / October 21, 2026, 00:01 UTC (Revision 9). |
|
@clawsweeper re-review The PR body now includes verified full-build/package evidence, the published v2026.10.4 updater result, preservation checks, and post-upgrade reload/recovery results. It also explicitly records the remaining startup/restart deadline misses and coverage limits. Please reassess against this updated evidence; the code head remains 075f3b0. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please reassess the availability risk on head 042015f. The updated PR body includes the installed-package harness, artifact provenance, recovery results, and limitations. The fix moves capture custody into the retained worker and cooperatively batches host receipt admission while preserving the existing digest, path, native-admission, ownership, retirement, and cleanup checks. Regression coverage now exercises actual binding, event-loop progress, tampering between batches, and retirement before publication. The corrected isolated installed-package run passed startup, reload, and retained-state restart with zero 15-second HTTP/WebSocket deadline misses. HTTP success counts were 298/298, 139/139, and 290/290; maximum HTTP latency was 3.407 seconds. Syntax and registration failure recovery passed, and shutdown joined. Startup still took roughly 80 seconds; this is not a claim of stall-free or fast startup. The fixture's Codex peer junction was repaired through the existing peer-link owner to reference the newly installed host; security checks were not bypassed. The earlier failed runs and separate updater activation timeout remain explicitly documented and are not reclassified as passing. Packaging passed; independent local P0/P1 review found no actionable findings. Please evaluate whether the current evidence resolves the previous availability concern. Do not merge. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review 9168e9f against the refreshed four-section PR evidence. Both prior P2 findings are addressed: recovery injection targets preparePluginGenerationSource; the unused remote-artifact mode is removed while native-load tracking and custody ownership remain intact. Main's selected-root/native-admission scoping is preserved. The exact committed tree passed 81 tests, formatting, typed lint, core types, full build, canonical packaging, fresh isolated installation, and independent local review through P2. Installed startup/reload/restart HTTP counts: 410/410, 140/140, 287/287; WS: 12/12, 139/139, 12/12; zero 15-second probe deadline misses. Both failed-replacement recovery cases and joined shutdown passed. Startup still took 120.539 seconds; the separate earlier updater activation timeout remains a documented coverage gap. Please reassess the availability advisory using these verified results. Newer main has since changed loader.async-preparation.test.ts and GitHub reports a conflict; this is not represented as merge-ready. The tested integration base is de42210. Do not merge. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Updated evidence is appended without removing the earlier revision-specific results. Head 3a79375 has passing CI and build-artifact workflows. The isolated ACPX lifecycle passed; the 10,000-module stress workload completed startup and reload with zero 15-second deadline misses, with the remaining HTTP resets and strict-probe failure explicitly recorded. The helper dependency cycle and wrapper inventory omissions are corrected. |
|
🦞👀 Re-review progress:
|
Preserve cooperative capture and Windows recovery links while adopting main's typed inventory retirement errors, canonical containment, and callback-release checks. Validation: 27 targeted tests, plugin-platform types, and focused lint passed on Node 24.21.0.
|
@clawsweeper re-review Please review current head Exact-head CI passed: 81 successful checks, 53 skipped, 1 neutral; CI, dependency-review, and security-sensitive-review gates are green. Local Windows validation on Node 24.21.0 passed all 27 targeted source-lookup, asynchronous-preparation, and worker tests, plus plugin-platform types, focused lint, and formatting. The conflict resolution preserves cooperative capture and Windows recovery links while incorporating main’s typed retirement errors, canonical containment, restrictive recovery-directory permissions, and callback-release tests. Please assess the integration against those ownership, security, and recovery contracts. The new results are appended to the PR body. All previous revision-specific evidence and limitations remain intact; the earlier installed startup/reload and stress measurements are not presented as new measurements for this head. |
|
🦞👀 Re-review progress:
|
Related: #172750, #174681, #175761.
What Problem This Solves
Dependency-heavy external plugins could block Gateway HTTP requests during startup and reload. Failed replacement could also leave Windows recovery captures pointing into a retired directory.
User Impact
Gateway health requests remain responsive within the existing 15-second probe deadline in the tested installed workload. Syntax-invalid and registration-failing replacements are rejected while the last working plugin remains callable, and subsequent healthy replacements succeed.
Startup is still slow: 120.539 seconds in this run, with multi-second response delays. This fixes the measured availability regression; it is not a fast-startup or universal latency claim. No configuration changes are required.
Why This Change Was Made
Capture runs in the existing retained preparation worker, with source custody transferred to the plugin instance and module-resolution hooks kept local. Host receipt validation processes 32 ordered events per batch and yields between batches; the synchronous CLI drains the same validation steps synchronously. Windows recovery links relocate into the new capture.
Existing instance/registry ownership, retirement checks, byte hashes, containment checks, native admission, publisher context, and joined shutdown remain intact. Root handles close before yielding. Main's selected-root ownership and receipt scoping (#176280, b81e502) are preserved.
This revision also addresses ClawSweeper's two P2 findings: the recovery test now injects failure at the actual source-preparation owner, and the unused remote-artifact mode/callback protocol is removed. Native-load tracking remains connected to its existing owner. No plugin-specific production directories are hardcoded.
Evidence
CI test-type correction — 91a4d78
CI caught four TS2532 errors in our registration-gate test: a mapped array did not guarantee elements 0 and 1 under the test project's strict indexed-access checking. This was a test typing defect in this PR, missed by the earlier scoped lint/runtime checks. The gates are now constructed as a fixed two-element tuple; all registration, timing, failure, and cleanup assertions remain unchanged. Production code is unchanged.
Reproduced all four errors locally with
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.plugins-platform.json --noEmit(exit 2); the identical command passes after the correction (exit 0).node scripts/run-vitest.mjs run src/plugins/loader.async-preparation.test.ts --maxWorkers=1passed 5/5 tests, wrapper 109.32 s. Formatting and diff checks passed. No package rebuild or installed-probe rerun for this test-only correction. New-head CI is pending.Conflict resolution — 4926f18
Integrated main at 00575be. The sole manual resolution is in
loader.async-preparation.test.ts: retain per-plugin registration gates and main's injected preparation delay plus both timing assertions (modulePreparationMs >= 1000andmodulePreparationMs <= loadMs). Main's runtime timing implementation is unchanged.Affected-file validation: 5/5 tests passed (131.35 s through the repository runner), formatting and whitespace checks passed. Direct
node node_modules/oxlint/bin/oxlint --type-aware src/plugins/loader.async-preparation.test.tsexited 0. The wrapper's declaration-preparation stage stalled and was stopped; it is not claimed as a passing wrapper run.Only affected-file checks were rerun as requested; no package rebuild or installed-probe rerun. The full build and installed results below belong specifically to 9168e9f, not this newer integration head. ClawSweeper's completed review of that head found no actionable correctness findings and identified this conflict as its sole merge blocker; its receipt-digest suggestion was explicitly optional.
Verified candidate: 9168e9fa3b61620429b14dc1c01cadc1df9e8ce1, integrating main at de42210. Final validation completed 2026-10-18 23:48 UTC.
Windows 11 x64, Node 24.21.0; installed package entry point; synthetic retained config/workspace/data; 100 dependency packages with 1,000 actually imported leaves. Codex and dependency-proof loaded. Separate-process HTTP/authenticated WebSocket probes ran every 250 ms, unchanged 15-second deadlines, up to 64 concurrent requests per kind.
HTTP p95: startup 2.079 s, reload 1.627 s, restart 1.556 s. Reload WS p95: 1.658 s. Pre-listener connection failures are excluded from post-success HTTP counts. Startup WS authentication becomes available near readiness; HTTP provides startup availability evidence. Readiness polling has its own shorter timeout and is not the 15-second availability metric.
Syntax rejection preserved revision 2 / total 1000, then healthy revision 3 succeeded. Registration rejection preserved revision 3 / total 1000, then healthy revision 4 succeeded. Retained synthetic settings/workspace/data assertions passed, allowing the documented Codex enablement migration. Final wrapper exit 0,
ok=true,lifecycleOk=true,responsivenessOk=true, shutdown joined.Resolution: this exact source tree passes the requested local gates and the installed startup/reload/restart/recovery workload without availability deadline misses. Before cooperative validation, an installed candidate exceeded that deadline; its diagnostic profile attributed 14.638 s to binding/receipt validation, including 11.742 s in native file opening. These sequential observations establish the tested regression outcome, not a controlled statistical speedup. Fresh CI/review and mergeability remain separate gates; no merge clearance or label removal is claimed.
Artifact provenance, commands, and coverage limits
Tested Git tree and committed tree are identical:
14f3f2e9beb14bb4cc08f45d44d65537d569fab9.Main-to-candidate patch SHA-256:
02C9B63424544790DE9AB259923FF06203B9E7F61A256E49647C6211242C6F42.Artifact:
openclaw-cutover-v5.tgz.SHA-256:
90023EF13A43A534702F1731027EA8483763C178F31C9E80C02EE5662EAAAC91.Installed build ID:
2026.10.4-042015f8c38b-2026-10-18T23-12-24.982Z.The build preceded the commit and embeds parent 042015f; the tested tree identity above binds the artifact to the published source. Committing did not change source or require rebuilding.
Commands (Node 24.21.0 first in PATH; isolated paths represented by placeholders):
The synthetic Codex peer junction initially targeted an older temporary host. The fixture repair invokes the existing linkOpenClawPeerDependencies owner, checks the known synthetic junction/old target, and verifies its new canonical target: repaired 1, skipped 0. Those explicit directories belong only to the external test fixture. Host SDK peer linking and retained worker source custody have different responsibilities. No admission bypass was used.
npm 12.0.2 still reported blocked lifecycle scripts despite the allow-scripts option; the OpenClaw hook was explicitly executed successfully. Other dependency hooks were not validated. The full build emitted a nonfatal UI gzip-size warning (1456.3 KiB against 1455.1 KiB); build exit was 0.
This is one host observation without OS cache flushing. No Linux/Bun, native-service activation, updater-backup rollback, or every-plugin coverage is claimed. The earlier updater attempt installed the package but exceeded its 600-second activation budget after 398 seconds retaining the old runtime; that remains a failed updater result. Fresh-prefix installed Gateway validation and manual synthetic peer repair do not prove stock updater activation/peer repair. No live Gateway, real user state or provider credentials were used.
Installed-package probe source
Save as
post-merge-probe.mjsoutside the checkout. The retained-result JSON suppliesupgrade.configPath,upgrade.stateDir, andupgrade.before.{plugins,workspace,dataSha256}from the synthetic pre-update fixture; the hash coversupgrade-survivor.txt. Use synthetic credentials, loopback settings, the repaired synthetic peer link described above, and a new output directory. This script launches the installed entry point with repository test helpers.Additional installed-package validation: ACPX passes; larger stress workload completes
The installed Windows package passes our isolated ACPX lifecycle workload. The additional owner-index correction also allows the larger 1,000-package / 10,000-module workload to complete startup and changed-source reload without exceeding the existing 15-second HTTP/WebSocket probe deadline.
Previously, that larger workload stopped before readiness after repeated HTTP deadline misses. The candidate now completes both operations, verifies all 10,000 imported values and the replacement revision, and joins shutdown successfully.
ACPX lifecycle — CI artifact
1cddad979Config validation passed. Independent probes recorded zero HTTP failures, zero authenticated WebSocket failures and zero timeouts.
HTTP p95: startup 0.834 s, sentinel reload 0.226 s, ACPX reload 2.452 s, restart 1.150 s. ACPX reload WS p95: 2.524 s.
This uses real ACPX in isolated synthetic state; the reporter's own configuration remains separately unverified.
Larger dependency stress — owner-index correction
5455a2309HTTP p95: startup 3.669 s, reload 4.946 s. Reload WS p95: 5.224 s.
Remaining limitation: three HTTP connection resets (
ECONNRESET) mean the strict zero-failure responsiveness assertion failed. A diagnostic replay also reproduced reload failures. Their baseline attribution remains unverified. Profiling identifies remaining synchronous dependency reconstruction before cooperative receipt validation; it does not independently establish the reset mechanism.The tests retained 250 ms probe cadence, 15-second deadlines, separate Gateway/probe processes and isolated state. Pre-listener refusals are excluded from post-success HTTP counts.
Head
3a79375b5f79519b15274c0f998eaa9fce7eb496corrects the helper's type-import cycle and tooling inventory entry. Emitted runtime JavaScript is unchanged. Focused lookup tests, tooling tests, affected types, typed lint and the import-cycle guard pass locally. CI run 39310916846 and build-artifact run 39310916858 completed successfully for this head.Result: the ACPX workload passes, and the larger workload's observed deadline failures are eliminated in these runs. Complete HTTP reliability under the larger stress workload remains unresolved. Earlier evidence remains applicable to its explicitly recorded revisions.
Main integration and passing CI —
a36e7e15605b8007369056d3b9cc64d85363139fIntegrated main at
097a2f70d0c4ea0751346d5b50dd7d677744fa74. The conflict resolution retains cooperative capture and Windows recovery-link relocation while adopting main's typed inventory-retirement errors, canonical path containment, restrictive recovery-directory permissions, and callback-release regression coverage.Exact-head CI passed: 81 successful checks, 53 skipped, and 1 neutral; no failed or pending check runs at verification. The
openclaw/ci-gate, dependency-review, and security-sensitive-review statuses all pass. CI gate results · Revision checks.Local validation on Windows with Node 24.21.0:
plugin-generation-source-lookup.test.ts,loader.async-preparation.test.ts, andplugin-generation-worker.test.ts, usingnode scripts/run-vitest.mjs src/plugins/plugin-generation-source-lookup.test.ts src/plugins/loader.async-preparation.test.ts src/plugins/plugin-generation-worker.test.ts --maxWorkers=1.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.plugins-platform.json --pretty false.The latest completed ClawSweeper review reports no findings, sufficient proof, and readiness for maintainer review. It reviewed
3a79375b5, not this integration head. Its receipt-digest self-comparison suggestion remains an optional test-quality improvement.No new installed-package startup/reload measurements are claimed for this integration. All earlier package, lifecycle, stress metrics, and limitations above remain attributed to their original tested revisions.