Repository navigation
fix(maintainer): restore cold PR worktree provisioning - #157394
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, 12:30 PM ET / 16:30 UTC. ClawSweeper reviewWhat this changesAdds the plugin-state worker contract to the source archive used by native PR worktree commands so cold provisioning can load its SQLite worker. Merge readiness✅ Ready for maintainer review Current main still omits a module eagerly loaded by the archived state worker. This remains a relevant, narrow fix, with no introduced defect found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s maintainer PR command extracts a curated set of source files before creating an isolated worktree. Its state worker loads those files to manage the command’s lease and provisioning state. flowchart LR
A[PR command] --> B[Source inventory]
B --> C[Verified wrapper archive]
C --> D[SQLite state worker]
D --> E[Lease setup]
E --> F[PR worktree]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceOther +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the canonical wrapper archive closed over the state worker’s eager imports, with the existing archive-closure and cold-provisioning checks guarding future drift. Do we have a high-confidence way to reproduce the issue? Yes. Current main omits a runtime import required by its archived state worker, and an existing extracted-wrapper test exercises that boundary; this review did not run the failing path. Is this the best way to solve the issue? Yes. The inventory is the existing owner of archived source membership, and the one-entry repair preserves the worker’s lazy runtime boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c9b0324d7211. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '9a1a6f7db9783d0b8abaf918bfe12978ea745b57': (26 commits) fix(maintainer): restore cold PR worktree provisioning (#157394) feat(ios): establish native Cloudflare Access sign-in sessions (#146996) fix: restore the Gateway after interrupted Doctor maintenance (#156854) refactor(line): retire the Express webhook adapter (#157369) refactor(cron): consolidate unavailable delivery targets (#157393) ci: apply Go memory defaults to architecture checks fix(cli): preserve the first PowerShell completion test failure (#157267) refactor(agents): consolidate transcript-tail model selection (#157382) fix(release): honor frozen validation contracts (#157034) fix(perf): use settled Kova terminal CPU accounting (#157029) chore(windows): verify packaged repair worker lifecycle (#157047) refactor(logging): share memory pressure threshold selection (#157164) fix(release): verify bundled fs-safe native bindings (#157027) perf(skills): skip warm prompt search when minimum cannot fit (#157343) fix(ui): avoid retaining detached tooltip anchors (#157226) perf(ci): reuse compiler state and shorten guard and UI tests (#157265) perf(ui): preserve model caches on unrelated metadata updates (#157254) chore: remove the tracked PR-body artifact and ignore .artifacts (#157296) refactor: consolidate duplicate MCP lifecycle tests (#157360) test(qa): consolidate CLI runtime fixtures (#118496) ...
The extracted PR wrapper reaches openclaw-state.worker, whose eager plugin state contract import was absent from the closed source inventory. Native main-refresh checks then exited with a missing-module error before their intended boundary. Carry Vincent Koc's one-entry fix from 9a1a6f7 (#157394). The eager closure, native provisioning and main-refresh owner tests pass 106 cases with one platform skip; changed checks and P2 review pass.
Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Cold native PR worktree creation fails when the extracted maintainer wrapper starts its SQLite worker, because its source archive omits an eagerly imported module.
User Impact
Restores native maintainer worktree provisioning. No product behavior, public API, schema, or configuration changes.
Why This Change Was Made
Include
src/plugin-state/plugin-state-worker-contract.tsin the existing wrapper inventory. Its imports are type-only; the application worker runtime remains lazy and excluded from the archive. The change is one inventory entry, with no runtime or test code changes.Evidence
test/scripts/eager-import-closure.test.tsandtest/scripts/pr-worktree-provision.test.tsfiles against the frozen baseline and the candidate.git diff --check, exact one-entry review, insertion order, and privacy checks passed. Production runtime delta: 0; inventory: +1; tests: 0.Testbox session: https://github.com/openclaw/openclaw/actions/runs/36025706404 (one-shot lifecycle; the native command completed successfully before stopping the lease).