Repository navigation
fix(update): shorten plugin rehearsal copying - #157199
Conversation
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 8:34 AM ET / 12:34 UTC (Revision 5). ClawSweeper reviewWhat this changesUpdate rehearsal copies up to four plugin files concurrently, while CI keeps hosted core typechecks in five stripes; the branch also updates tests and documentation. Merge readiness✅ Ready for maintainer review Keep open: current main still has the serial-copy bottleneck. Earlier merged performance work addressed disk syncing and path indexing, leaving this measured improvement distinct. I found no actionable defect in the introduced patch. Priority: P2 Review scores
Verification
How this fits togetherDuring an update, OpenClaw inventories installed plugins and copies their dependencies into a private candidate snapshot before publishing links and verifying the result. The CI planner uses changed paths and runner profiles to schedule compiler checks for proposed changes. flowchart LR
A[Installed plugins] --> B[Inventory and source checks]
B --> C[Prepare private directories]
C --> D[Copy up to four files]
D --> E{All copies succeeded?}
E -- Yes --> F[Publish links and verify snapshot]
E -- No --> G[Drain active copies and clean up]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +8, Tests +92, Docs +2, Config +1. Total +103 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the bounded copy phase in the existing updater owner, with source checks and a drain barrier before link publication, and retain full hosted compiler stripes. Do we have a high-confidence way to reproduce the issue? Yes. Current main serializes file copies, and the PR records a paired benchmark of that phase on a large dependency tree; this read-only review did not execute it. Is this the best way to solve the issue? Yes. The patch reuses the existing bounded worker runner inside the current copier and retains the source checks and publication barrier. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ead3b2ee776c. 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 (4 earlier review cycles)
|
|
@clawsweeper re-review The published 2026.9.6 updater-to-candidate cell passed in run 35985430665 for unchanged head 6a14735. The PR body now records native updater success, state/configuration survival, plugin convergence, subsequent Doctor and Gateway checks, and the manual-restart/rollback limitations. The isolated 5,010-file benchmark remains 29.3% lower copy wall time with all correctness checks passing. CI is pending the native exact-head fallback in run 35994423238. The earlier run had a runner shutdown and a central typecheck placement timeout; the fallback uses the existing distributed layout with unchanged coverage and limits. |
|
🦞👀 Re-review progress:
|
|
Merged via squash auto-merge.
|
* perf(update): copy rehearsal plugin files concurrently * fix(ci): preserve hosted core typecheck stripes
What Problem This Solves
Updates spend unnecessary time copying plugin dependency trees one file at a time during rehearsal preparation.
User Impact
Plugin rehearsal preparation can copy up to four independent files concurrently. Source checks, create-only publication, private link validation, and file permissions remain enforced. A failure stops new work and waits for admitted copies before returning to caller cleanup. No configuration or dependency change is required.
The change applies to the installed updater's preparation and to candidate-side missing-dependency repair under existing rehearsal markers. An older installed updater retains its initial copying behavior until upgraded.
Why This Change Was Made
The file phase uses the existing bounded concurrency runner with stop-and-drain behavior. Directory preparation stays ahead of copying; symbolic links, relocation, verification, and final permissions stay behind its completion barrier. The unused copy-only progress callback is removed; inventory progress remains active. Per-file parent-directory creation still supports partial repair plans.
CI also exposed a scheduling defect while validating this change: eligible changed paths can consume every core compiler graph, but their presence suppressed all hosted stripes. The second commit keeps GitHub/hybrid core type checks in their five existing stripes while retaining Blacksmith targeting. Coverage, runner labels, compiler concurrency, deadlines, and the existing worst-case admission bound stay unchanged.
Evidence
Isolated Blacksmith Testbox benchmark: Linux x64, 4 vCPUs, Node 24.19.0; a pnpm-style dependency tree with 5,010 files (22,581,690 bytes), 167 directories, and three dependency links. Two warmups were excluded, followed by three alternating baseline/candidate pairs. Baseline
6e008165e1e8; candidate6a1473519e07.Every paired copy comparison improved (21.7%, 22.3%, and 30.3%). Full content hashes, modes, independent inodes, source fingerprints, dependency links, and runtime imports passed in every trial. These measurements cover plugin preparation, not whole-update latency. The collector initially matched a fixture directory with an overly broad glob; collection alone was repaired without rerunning measurements. All downloaded evidence checksums passed and the Testbox was stopped.
pnpm test src/infra/update-candidate-plugin-tree.test.ts --maxWorkers=1passed all seven tests in 3.27 s command wall. Hosted CI job 107598457905 passed all seven cases: 117 ms summed case execution, including 18 ms for the new drain regression. These are test execution times; CI did not report per-file import/setup wall time. The containing group took 130.36 s and the complete multi-group job took 923 s.2026.9.6driver upgrade cell: passed against exact candidate6a1473519e07, using the installed updater and the base scenario. Native outcome wassuccess; automatic migration, preserved state/configuration, plugin convergence, Doctor, and post-upgrade Gateway probes passed. The test starts the candidate Gateway manually; it does not prove managed-service restart or forced rollback. Baseline startup emitted a 91 s / 90 s advisory; candidate startup took 70 s. The existing Doctor inspection-budget warning deferred inspection until after activation; the subsequent Doctor and survival checks passed.2cc3d292f992dba6c4fa1ccf30621e715ce8725e. Compared with the benchmarked and upgrade-tested6a1473519e07, this commit changes only the workflow, CI documentation, and its planning test. Product source, build/dependency inputs, and updater behavior are byte-identical, so the completed performance and published-driver proofs are retained.The full fallback exposed an unrelated Windows failure in
schtasks-state-probe.windows.test.ts(job 107622316506): a real PowerShell/Task Scheduler query took 5,021 ms against its unchanged 5,000 ms budget and correctly returnedunknown. The same probe implementation is present on current main; the log does not distinguish startup from COM latency. An isolated original-row reproduction dispatch returned HTTP 500, with no matching run found after reconciliation. No rerun success, source fix, timeout increase, or weakened assertion is claimed.