Skip to content

refactor(skills): run Workshop storage operations in the shared worker - #156110

Merged
steipete merged 14 commits into
mainfrom
codex/workshop-main-integration-20260922
Sep 24, 2026
Merged

steipete merged 14 commits into
mainfrom
codex/workshop-main-integration-20260922

Conversation

@steipete

@steipete steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Skill Workshop exposes asynchronous services but still performs proposal, evaluation, rollback, and reconciliation database work on the caller thread. Moving those operations to the shared-state worker prevents Workshop storage from blocking that thread while preserving its existing approval and recovery behavior.

User Impact

Proposal creation, review, apply, rejection, rollback, and collection restoration retain their current contracts. No configuration change, schema migration, retention change, or operator action is required. Environment capture preserves Windows case-insensitive state-path lookup and configuration provenance.

Why This Change Was Made

The existing shared-state worker becomes the execution owner for Workshop proposal reads and writes, evaluation, rollback metadata, transitions, collection history, and experience-review outcomes. Record and event writes remain one synchronous transaction with revision comparisons and pending-proposal limits. The host retains filesystem staging and collection/target leases through settlement; worker transactions check every held lease before effects and commit. Failed replies are reconciled before staged generations are discarded or live files restored.

Doctor awaits legacy imports before deleting source sidecars. Transaction-bound relocation kernels and read-only migration readers retain their supplied connections. Table DDL, schema versions, and retention are unchanged.

Rehearsal cleanup now drains the copied database through the existing asynchronous lifecycle owner before removing its directory. The copied path is captured independently of mutable environment data, directory custody is checked again after drainage, and a failed drain preserves the copy.

Evidence

Current source and behavior

All current product evidence below binds to 2ad60f84801f3b48dcc580163fcc4b298b3c21c0. Exact-head CI succeeded with all 171 jobs completed. The Doctor job executed all four producer cases, including applied-history recovery and the new cleanup regression, in its generated merge with main 82a518c90ca4.

The original CI failure was a worker-identity collision during Doctor rehearsal. A real-file regression reproduces the same guard failure on the original cleanup: Doctor inventory leaves a cached actor after its native reader closes, and a retained hardlink exposes that physical copy to a subsequent worker admission. Draining the copied path repairs this lifecycle defect. The regression uses actual files and worker owners, without mocked identities or timers. It does not establish that inode reuse caused the original CI event; that event was not directly observed.

The repaired regression, three original producer cases, and two cleanup-policy cases pass locally and on Linux. Independent P0–P2 review is clean. The normal changed-file gate passed production types, all 25 core-test type graphs, unused-export checks, scoped lint, formatting, and selected structural guards. Earlier full-core local lint encountered unchanged baseline line limits; that historical failure remains in the receipts, with no local environment or severity override.

Package and published-updater proof

The canonical Linux run passed six real mock-provider E2E cases and the normal package-owner build. The hydration run identifies its lease; joined wrapper results and collected receipts establish the command outcomes. The build took 412.29 seconds and produced a 98,431,266-byte tarball:

  • SHA-256: 174e6da68438530fbd5bd3dc57a0efafe96396de5938e4c08ebaffd038b69b56
  • Maintained carrier/build commit: 69c2cad8fbb8f2b7c0b81681ec8b2eeff17ec78d, verified against the exact reviewed 2ad60f tree and raw source hashes.

That package passed all 25 phases of published 2026.9.4 → candidate workshop-doctor-recovery. Original process witnesses show the published updater launching candidate Doctor with the update marker. Legacy sidecars and empty Workshop tables were present at entry; proposal, rollback, and event payload [1, {"recovered": true}, null] were present at exit. Corrupt-state refusal, explicit repair, installed-package identity, retained artifacts/warnings, and repeated Doctor assertions passed.

Four compiled Linux Node 24.19.0/Bun 1.4.0 write/reopen flows exited successfully and closed through the canonical owner. Each write flow made 18 registered tool calls and five actual pending embedded-TUI allow-once approvals, persisting four proposals and 12 events; each reopen made six calls. All eight SQLite observers and blocking waits were positively calibrated. Imports and write flows recorded zero caller SQL/waits, and every Workshop stage after reopening added zero.

Factory construction debt remains: reopening recorded 4 opens, 4 closes, 12 prepares, 4 execs, 9 gets, and 3 iterations during tool construction. The whole-entry zero-SQL measurement remains false. This PR completes the Workshop operation cut; synchronous config-machine and installed-plugin construction reads require the separate Factory work.

Relevant built exports/workers matched the tarball, and source, artifacts, runtimes, and install metadata remained unchanged during proof. Worker SQL is outside the caller-thread measurement; transitive dependency payload bytes were not exhaustively hashed, and Bun's computed dynamic-import limit remains. No external live-provider, compiled macOS, remote process-tree RSS, or Docker incremental-disk proof is claimed. The lease is stopped and capsule cleanup verified.

Test costs

Seconds below sum reported test-case durations; setup, transformation, and wrapper overhead are separate. Distinct parameterized cases sharing a rendered name are counted separately. CI costs are from the exact-head run above. Earlier one-worker measurements are labeled explicitly; their source/dependency context is not presented as current-head execution.

Test file Cases One-worker seconds Current CI seconds One-worker binding
src/state/openclaw-state-lease-worker-group.test.ts 32 0.174 0.062 Earlier; current test bytes match
src/state/openclaw-state-lease-worker.transaction-group.test.ts 5 0.013 0.006 Earlier; current test bytes match
src/skills/workshop/store.test.ts 14 13.904 6.299 Earlier; current test bytes match
src/skills/workshop/collection-restore.test.ts 12 24.884 4.572 Current head
src/skills/workshop/experience-review.live-contract.test.ts 44 0.008 0.002 Retained run; file/helper unchanged
src/commands/doctor-update-rehearsal-producer.test.ts 4 101.424 30.589 Final repair source
test/scripts/upgrade-survivor-migration-order.test.ts 36 5.129 2.263 Current head
src/agents/tools/skill-workshop-tool.list.test.ts 7 12.346 1.857 Current head
src/skills/workshop/service.test.ts 50 18.825 12.807 Earlier; predates clock-fixture fix
src/skills/workshop/experience-review.e2e.test.ts 6 50.511 Not in ordinary CI Current isolated Linux proof

The new cleanup regression contributes 4.734 seconds locally and 3.742 seconds in CI; the original three producer/inventory cases account for the remaining 96.690/26.847 seconds. They require real copied SQLite state, durable pending/applied records, Doctor inventory, and native actor admission. A mocked close call would miss the retained-owner collision. The six-case E2E protects discovery, registered tools, approvals, and idle-review completion across distinct outcomes; mocking the Workshop service would miss that caller/producer contract. These explain the files exceeding 30 seconds. No timeout, assertion, worker cap, routing, or CI budget was relaxed.

Current-source product proof and exact-head CI are complete. Normal native preparation, merge gates, and landed-source parity remain required. Detailed prior attempts and superseded qualification records remain in retained task receipts rather than being treated as current evidence.

Move proposal, evaluation, transition, rollback, reconciliation, and collection review persistence into the existing shared-state worker. Retain filesystem staging and target-lock lifetimes on the host, with grouped live lease admission through transaction and commit settlement.
Use the canonical environment clone before resolving Workshop state and worker routing. Preserve Windows logical key lookup, config-owned provenance, and an independent snapshot across asynchronous proposal work.
@clawsweeper

clawsweeper Bot commented Sep 23, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 23, 2026, 11:29 PM ET / September 24, 2026, 03:29 UTC (Revision 12).

ClawSweeper review

What this changes

Moves Skill Workshop proposal, review, rollback, and recovery database operations into the shared SQLite worker while retaining host-side file staging and adding update and lifecycle coverage.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/skills/workshop/store-sqlite-schema.ts. Prefer a design that avoids changing persisted SQLite tables. Migration or upgrade compatibility proof is recorded, but maintainers should still confirm that the schema change is necessary.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: current main still runs Workshop proposal persistence on the caller thread, and this branch provides a coherent worker cutover with substantial runtime and upgrade evidence. The prior request for single-worker test wall times remains unmet.

Priority: P2
Reviewed head: 2ad60f84801f3b48dcc580163fcc4b298b3c21c0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong runtime and upgrade evidence supports a substantial refactor, with whole-command test-cost accounting still needed.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR reports compiled Linux Node and Bun registered-tool flows through the new Workshop worker owner, with persisted proposals and events after reopen and no caller SQL during Workshop operations; a published-updater run reports recovery of legacy sidecars. Table definitions remain unchanged, and that upgrade scenario supports existing-state compatibility.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR reports compiled Linux Node and Bun registered-tool flows through the new Workshop worker owner, with persisted proposals and events after reopen and no caller SQL during Workshop operations; a published-updater run reports recovery of legacy sidecars. Table definitions remain unchanged, and that upgrade scenario supports existing-state compatibility.
Evidence reviewed 8 items Current main still uses caller-thread storage: Current main directly calls synchronous state write transactions for proposal creation and updates; its Workshop worker handles only event listing.
Introduced worker owner: The pinned PR diff adds proposal, transition, rollback, collection, and review operations to the shared worker; write operations check admission before the transaction effects and commit.
Live lease checks: Grouped lease admission compares each worker-supplied identity with its retained owner and checks expiry; the worker transaction rereads lease ownership on both transaction and commit checks. Focused tests cover wrong-owner facts and revocation before commit.
Findings None None.
Security None None.

How this fits together

Skill Workshop receives proposed skill changes and review decisions from agent tools. It stores proposal records and events in shared SQLite state, then uses the result to manage skill files and notifications.

flowchart LR
A[Agent tools and reviews] --> B[Workshop service]
B --> C[File staging and leases]
C --> D[Shared SQLite worker]
E[Doctor legacy imports] --> D
D --> F[Proposal records and events]
D --> G[Commit outcome]
G --> H[Skill files and hooks]
Loading

Before merge

  • Resolve merge risk (P1) - The PR reports summed test-case durations rather than whole-command single-worker wall times, leaving setup and wrapper cost for the new and expanded suites unmeasured.
  • Complete next step (P2) - Record whole-command single-worker wall times for the new and materially expanded Workshop test suites in the PR body before merge.
Agent review details

Security

None.

PR surface

Source +857, Tests +1594, Docs +14, Other +420. Total +2885 across 74 files.

View PR surface stats
Area Files Added Removed Net
Source 37 1948 1091 +857
Tests 33 1778 184 +1594
Docs 1 14 0 +14
Config 0 0 0 0
Generated 0 0 0 0
Other 3 425 5 +420
Total 74 4165 1280 +2885

Review metrics

Metric Value Why it matters
Production and proof growth production +857 net lines; tests/proof +2014 net lines The production growth has a stated worker-ownership purpose and is accompanied by lifecycle and upgrade coverage.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/run.sh, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/workshop-doctor-recovery.mjs, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/workshop-legacy-proposals.mjs, migration/backfill/repair: src/commands/doctor-skill-workshop-collection-backups.ts, migration/backfill/repair: src/commands/doctor-skill-workshop-sqlite.ts, serialized state: scripts/e2e/lib/upgrade-survivor/workshop-legacy-proposals.mjs, and 5 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Measure whole-command test cost (recommended)
    Add single-worker wall times for the new and materially expanded suites beside the observed CI seconds already in the PR body.

Technical review

Best possible solution:

Use the shared worker as Workshop's storage owner while preserving existing lease, rollback, and Doctor recovery contracts; keep factory-construction SQL as separately scoped work.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a storage-ownership refactor. Current-main source establishes the synchronous before state, and the PR reports compiled after-state flows.

Is this the best way to solve the issue?

Yes: the change uses the existing shared worker, retains host-side file and lease ownership, and leaves legacy import with Doctor.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 45920b3853c2.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR reports compiled Linux Node and Bun registered-tool flows through the new Workshop worker owner, with persisted proposals and events after reopen and no caller SQL during Workshop operations; a published-updater run reports recovery of legacy sidecars. Table definitions remain unchanged, and that upgrade scenario supports existing-state compatibility.

Label justifications:

  • P2: This is a bounded performance and storage-ownership improvement with normal maintainer priority.
  • merge-risk: 🚨 compatibility: The cutover changes how existing proposal state and Doctor legacy imports are accessed; the published-updater proof covers the tested upgrade path.
  • merge-risk: 🚨 automation: The diff expands database-worker test routing and rehearsal cleanup, while whole-command cost for the expanded suites remains unmeasured.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR reports compiled Linux Node and Bun registered-tool flows through the new Workshop worker owner, with persisted proposals and events after reopen and no caller SQL during Workshop operations; a published-updater run reports recovery of legacy sidecars. Table definitions remain unchanged, and that upgrade scenario supports existing-state compatibility.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR reports compiled Linux Node and Bun registered-tool flows through the new Workshop worker owner, with persisted proposals and events after reopen and no caller SQL during Workshop operations; a published-updater run reports recovery of legacy sidecars. Table definitions remain unchanged, and that upgrade scenario supports existing-state compatibility.

Evidence

What I checked:

  • Current main still uses caller-thread storage: Current main directly calls synchronous state write transactions for proposal creation and updates; its Workshop worker handles only event listing. (src/skills/workshop/store.ts:265, 45920b3853c2)
  • Introduced worker owner: The pinned PR diff adds proposal, transition, rollback, collection, and review operations to the shared worker; write operations check admission before the transaction effects and commit. (src/skills/workshop/store.worker.ts:95, 2ad60f84801f)
  • Live lease checks: Grouped lease admission compares each worker-supplied identity with its retained owner and checks expiry; the worker transaction rereads lease ownership on both transaction and commit checks. Focused tests cover wrong-owner facts and revocation before commit. (src/state/openclaw-state-lease-worker-owner.ts:176, 2ad60f84801f)
  • Stored-state compatibility: The Workshop table definitions are unchanged in the introduced diff. Doctor now awaits legacy proposal import before removing source sidecars. (src/skills/workshop/store-sqlite-schema.ts:36, 2ad60f84801f)
  • Reported production-path proof: The captured PR body reports compiled Linux Node and Bun registered-tool write and reopen flows, with zero caller SQL or waits during Workshop operations. It also reports a published 2026.9.4 updater to candidate run retaining imported proposals, rollback data, and events. Factory construction still performs synchronous SQL. (2ad60f84801f)
  • Exact-head CI: The linked pull-request run completed successfully for the pinned head; its Doctor job also completed successfully. (2ad60f84801f)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Post actual single-worker wall times beside the existing CI measurements for the new and materially expanded tests.

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.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-23T12:21:22.524Z sha d2f69ac :: blocked before merge. :: none
  • reviewed 2026-09-23T14:31:18.966Z sha 0b9ea06 :: blocked before merge. :: none
  • reviewed 2026-09-23T16:49:17.482Z sha db59a35 :: blocked before merge. :: [P2] Await the Workshop fixture import before preparing rehearsal
  • reviewed 2026-09-23T18:00:38.627Z sha 9efeb79 :: blocked before merge. :: none
  • reviewed 2026-09-23T18:57:11.566Z sha 51927dc :: needs changes before merge. :: none
  • reviewed 2026-09-23T23:34:54.493Z sha 10773fa :: blocked before merge. :: none
  • reviewed 2026-09-24T02:09:05.205Z sha 2ad60f8 :: blocked before merge. :: none
  • reviewed 2026-09-24T02:54:46.857Z sha 2ad60f8 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 23, 2026
@steipete
steipete marked this pull request as ready for review September 23, 2026 04:23
Keep captured maintenance assertions receiver-free without weakening identity or currentness checks. Bind legacy proposal import, rollback preservation, complete rows, and recoverable warnings to the candidate Doctor in the published-updater scenario.
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 23, 2026
Preserve main's incognito review exclusion and lease verification that
releases its read snapshot before host admission. Retain Workshop's grouped
transaction authority, awaited outcomes, and current Tool Search receipts.

Validation: 180 focused tests; core/root types and all 25 core-test type
graphs; scoped P0-P2 review. Full core lint has two unchanged main max-lines
failures. Final fixture lint passed; stronger published-updater/compiled-flow
proof remains pending; this is a private integration checkpoint.
Preserve Tool Search argument and result ownership alongside exact paired
Workshop receipts. Supply the inherited Placement lifecycle fixture with
its required policyConfig using the same config object.

Validation: 44 Workshop contract cases, three Placement lifecycle cases,
all 25 core-test type graphs, selected static checks, and scoped P0-P2 review.
Current six-case mock-provider E2E, published-updater recovery, and compiled
Node/Bun proof remain pending the canonical remote continuation. Earlier
0b9 package and flow evidence remains separately bound.
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 23, 2026
Preserve canonical durable file creation and its fault-injection coverage
alongside awaited Workshop worker assertions. Adopt the upstream Placement
fixture and retire the superseded private config variant.

Validation: the maintained runner reported 12 focused cases passing; core
and selected test types, scoped lint/format, and P0-P2 review passed. The
outer allocation monitor hit cache-retirement telemetry loss; its record
and a conservative full-phase charge remain preserved. Current remote E2E,
published-updater, compiled-flow and exact-head CI proof remain pending.
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 23, 2026
Settle legacy proposal import before closing the database and copying the
rehearsal snapshot. The three owning cases, scoped lint/format checks, and
independent P0-P2 review passed.
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 23, 2026
Merge fixed bc5a318 into the retained Workshop feature branch before the
separate calendar-fixture repair. Feature changes compose without conflict.

Private recovery checkpoint only. The normal frozen dependency reconciliation
completed; current selected type/static/runtime checks and fresh package,
published-driver, and compiled-cell proof remain pending. Historical9efeb
package evidence is not qualification of this changed runtime graph.

Preserve the installer-overlap accounting incident and all earlier failures,
including the outer-monitor exit gap. Fresh source review is recorded in the
private proof packet; this commit does not assert publication readiness.
The proposal transition fixture froze Date at August 30 while SQLite lease
acquisition used real time in its worker. On September 23 the computed expiry
delay exceeded Node's signed 32-bit timer limit, which became a one-millisecond
timer and incorrectly aborted the otherwise-owned lease.

The manifest assertion already sorts by skill key, and proposal IDs carry
random UUID suffixes. Remove the obsolete clock setup while preserving every
assertion and all production lease behavior.

Reproduced the failure in the original Linux child, then passed 20 full-file
runs, three original 37-file child replays, workshop owner siblings, changed
checks, formatting, and P2 review. The single-worker file cost was 26.28 seconds
wall time.
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 24, 2026
Join the copied shared-state worker lifecycle before removing rehearsal state,
and revalidate directory custody after drainage. Preserve cleanup failure
as a refusal to delete the copy.

A real-file regression reproduces the retained-owner collision after cleanup
on the original implementation and passes after the lifecycle fix.
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 24, 2026
@steipete
steipete merged commit cd2330c into main Sep 24, 2026
252 checks passed
@steipete
steipete deleted the codex/workshop-main-integration-20260922 branch September 24, 2026 03:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
openclaw#156110)

* refactor(workshop): run proposal storage in the shared worker

Move proposal, evaluation, transition, rollback, reconciliation, and collection review persistence into the existing shared-state worker. Retain filesystem staging and target-lock lifetimes on the host, with grouped live lease admission through transaction and commit settlement.

* fix(workshop): preserve captured environment semantics

Use the canonical environment clone before resolving Workshop state and worker routing. Preserve Windows logical key lookup, config-owned provenance, and an independent snapshot across asynchronous proposal work.

* fix(workshop): validate lease guards and updater recovery

Keep captured maintenance assertions receiver-free without weakening identity or currentness checks. Bind legacy proposal import, rollback preservation, complete rows, and recoverable warnings to the candidate Doctor in the published-updater scenario.

* test(workshop): match persisted event envelope in upgrade proof

* test(workshop): await rehearsal proposal import

Settle legacy proposal import before closing the database and copying the
rehearsal snapshot. The three owning cases, scoped lint/format checks, and
independent P0-P2 review passed.

* fix(test): remove obsolete workshop fixture clock

The proposal transition fixture froze Date at August 30 while SQLite lease
acquisition used real time in its worker. On September 23 the computed expiry
delay exceeded Node's signed 32-bit timer limit, which became a one-millisecond
timer and incorrectly aborted the otherwise-owned lease.

The manifest assertion already sorts by skill key, and proposal IDs carry
random UUID suffixes. Remove the obsolete clock setup while preserving every
assertion and all production lease behavior.

Reproduced the failure in the original Linux child, then passed 20 full-file
runs, three original 37-file child replays, workshop owner siblings, changed
checks, formatting, and P2 review. The single-worker file cost was 26.28 seconds
wall time.

* fix(update): drain rehearsal workers before deleting copies

Join the copied shared-state worker lifecycle before removing rehearsal state,
and revalidate directory custody after drainage. Preserve cleanup failure
as a refusal to delete the copy.

A real-file regression reproduces the retained-owner collision after cleanup
on the original implementation and passes after the lifecycle fix.
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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