Skip to content

fix(maintainer): restore cold PR worktree provisioning - #157394

Merged
vincentkoc merged 1 commit into
mainfrom
fix/pr-wrapper-plugin-state-contract-20260924
Sep 24, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/pr-wrapper-plugin-state-contract-20260924

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

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.ts in 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

  • Blacksmith Testbox, Node 24.21.0 and pnpm 12.4.2: ran the complete test/scripts/eager-import-closure.test.ts and test/scripts/pr-worktree-provision.test.ts files against the frozen baseline and the candidate.
  • Baseline: 13 passed, 18 failed, 1 skipped. The lease bootstrap and cold provisioning paths failed with the missing contract module; the runtime closure check reported the same unresolved import.
  • Candidate: 31 passed, 0 failed, 1 skipped. Includes real lease acquisition/release and native Git provisioning, hook behavior, command-scoped configuration, and lock custody.
  • The Darwin-only accelerated checkout case is skipped on this Linux runner; no APFS proof is claimed.
  • All 18 source bindings and final restoration checks passed. The command exited 0 and the Testbox lease stopped successfully. Hosted PR CI remains a separate gate.
  • 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).

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 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
vincentkoc marked this pull request as ready for review September 24, 2026 16:21
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Sep 24, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 12:30 PM ET / 16:30 UTC.

ClawSweeper review

What this changes

Adds 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
Reviewed head: f35f73386e88c5d101283b116f748d9708b62f1c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused archive repair matches the source-level failure and has detailed reported boundary validation.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its body reports before-and-after Testbox execution of the extracted worker and native provisioning paths; the linked workflow logs were unavailable to this reviewer. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its body reports before-and-after Testbox execution of the extracted worker and native provisioning paths; the linked workflow logs were unavailable to this reviewer. No stored-data contract changes.
Evidence reviewed 10 items Current-main missing archive member: The current-main inventory includes the SQLite state worker but omits its plugin-state worker contract.
Eager worker import: The archived state worker imports runtime values from the missing contract before its plugin-state implementation is loaded lazily.
Introduced change and merge result: The pinned PR introduction and verified test merge each add only the missing contract to the wrapper inventory.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Other +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 1 1 0 +1

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P2: Cold maintainer worktree provisioning is broken, but the impact is limited to the internal PR workflow.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its body reports before-and-after Testbox execution of the extracted worker and native provisioning paths; the linked workflow logs were unavailable to this reviewer. No stored-data contract changes.

Label justifications:

  • P2: Cold maintainer worktree provisioning is broken, but the impact is limited to the internal PR workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from the contributor proof gate. Its body reports before-and-after Testbox execution of the extracted worker and native provisioning paths; the linked workflow logs were unavailable to this reviewer. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • vincentkoc: 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.

@vincentkoc
vincentkoc merged commit 9a1a6f7 into main Sep 24, 2026
146 of 147 checks passed
@vincentkoc
vincentkoc deleted the fix/pr-wrapper-plugin-state-contract-20260924 branch September 24, 2026 16:53
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 24, 2026
* 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)
  ...
steipete added a commit that referenced this pull request Sep 24, 2026
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.
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
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: XS 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