Repository navigation
fix: preserve skill proposals across apply crashes and workspace moves - #114535
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 7:20 AM ET / 11:20 UTC. ClawSweeper reviewWhat this changesThe PR moves Skill Workshop proposal records and rollback claims from legacy JSON metadata into additive shared SQLite tables so pending proposals survive interrupted applies and agent workspace moves. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 6 items remain Keep this PR open for maintainer review rather than cleanup: it changes persistent Skill Workshop state, crash recovery, and upgrade migration, and it carries the protected Priority: P2 Review scores
Verification
How this fits togetherSkill Workshop stores proposed skill changes, lets users inspect or apply them, and writes the approved skill into an agent workspace. This PR moves the proposal lifecycle and rollback metadata into OpenClaw’s shared SQLite state database while retaining flowchart LR
Proposal[Skill proposal and support files] --> Metadata[Proposal metadata]
Metadata --> SQLite[Shared SQLite state]
Proposal --> Review[Inspect and list]
SQLite --> Recovery[Apply recovery and rollback claims]
Recovery --> Workspace[Agent workspace skill]
Legacy[Legacy JSON metadata] --> Doctor[Doctor migration]
Doctor --> SQLite
Decision needed
Why: The code changes durable proposal ownership and recovery semantics across existing installations; the protected label and missing real upgrade evidence require a maintainer to decide whether the demonstrated migration boundary is sufficient. Before merge
Agent review detailsSecurityNone. PR surfaceSource +934, Tests +458, Docs +2, Generated +82. Total +1476 across 26 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep SQLite as the canonical proposal store, retain Doctor as the sole legacy-metadata migration owner, and merge only after a redacted before/after proof demonstrates legacy-state migration plus interrupted-apply recovery on an existing state directory. Do we have a high-confidence way to reproduce the issue? Yes, from source with medium confidence: current main writes live skill files before persisting Is this the best way to solve the issue? Unclear. Moving canonical persistent proposal state to shared SQLite and using Doctor for legacy JSON migration matches the repository storage policy, but the best implementation still needs real upgrade and interrupted-apply proof before it can be called the safest merge path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ed4ff90f8478. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
a60d11b to
c936091
Compare
|
ClawSweeper rank-up moves reviewed for the rebased head c936091. Both optional transcript-publication moves are skipped for this landing. The maintainer work order explicitly confirms that the migration and interrupted-apply behavior were integration-live-tested and approves the persistent-state design; repeating destructive legacy-state setup solely to publish a transcript is not required for owner acceptance. The rebased branch additionally passed 104 Workshop tests, 6 Gateway proposal tests, 3 Workshop CLI tests, and the Doctor migration test on Blacksmith Testbox. The rebase-exposed fs-safe cleanup incompatibility was fixed through the shared root-confined removal helper and received a clean fresh Codex autoreview. |
|
Merged via squash.
|
* origin/main: fix: preserve skill proposals across apply crashes and workspace moves (#114535) fix(qa): run maturity Docker scenarios through the aggregate scheduler (#114447) refactor(cli): unify configured model rows onto the shared row pipeline (#115239) fix(ui): stop modal autofocus steal after the open animation (#115168) fix(process): preserve long supervisor timeout deadlines (#115230) fix(slack): preserve pasted inbound tables (#115163) fix(codex): restore trajectory capture for canonical session targets (#115220) refactor(qa): make scenario selection taxonomy-owned (#114055) feat(plugins): match shared models across vendor-namespaced catalog ids (#115210)
* origin/main: (150 commits) fix: preserve skill proposals across apply crashes and workspace moves (openclaw#114535) fix(qa): run maturity Docker scenarios through the aggregate scheduler (openclaw#114447) refactor(cli): unify configured model rows onto the shared row pipeline (openclaw#115239) fix(ui): stop modal autofocus steal after the open animation (openclaw#115168) fix(process): preserve long supervisor timeout deadlines (openclaw#115230) fix(slack): preserve pasted inbound tables (openclaw#115163) fix(codex): restore trajectory capture for canonical session targets (openclaw#115220) refactor(qa): make scenario selection taxonomy-owned (openclaw#114055) feat(plugins): match shared models across vendor-namespaced catalog ids (openclaw#115210) fix(ios): forgetting a paired gateway does nothing (openclaw#114083) test(ui): share pauseVirtualClock e2e helper and de-flake marquee hover-delay asserts (openclaw#115203) fix(docs): preserve pure fenced translation chunks (openclaw#115204) fix: keep shared web and TUI chats synchronized under load (openclaw#115191) fix(auto-reply): require a directed turn for the no-visible-reply fallback fix(auto-reply): attest source-routed message-tool sends via the dedupe route matcher fix(auto-reply): attest message-tool source replies in every delivery mode and gate eligibility on resolved settlement fix(auto-reply): bound turn-ledger settlement and treat started sends as conservatively visible fix(auto-reply): abort-aware fallback settlement and straggler drain in turn ledger fix(auto-reply): keep turn-ledger types module-local test(auto-reply): fix type-check errors in turn-ledger corner tests ...
openclaw#114535) * fix: move skill workshop proposals to sqlite * fix(doctor): make workshop manifest cleanup idempotent * fix(skills): resolve post-rebase static checks * ci: retrigger exact-head checks
* origin/main: fix: preserve skill proposals across apply crashes and workspace moves (openclaw#114535) fix(qa): run maturity Docker scenarios through the aggregate scheduler (openclaw#114447) refactor(cli): unify configured model rows onto the shared row pipeline (openclaw#115239) fix(ui): stop modal autofocus steal after the open animation (openclaw#115168) fix(process): preserve long supervisor timeout deadlines (openclaw#115230) fix(slack): preserve pasted inbound tables (openclaw#115163) fix(codex): restore trajectory capture for canonical session targets (openclaw#115220) refactor(qa): make scenario selection taxonomy-owned (openclaw#114055) feat(plugins): match shared models across vendor-namespaced catalog ids (openclaw#115210)
What Problem This Solves
Fixes two Skill Workshop proposal lifecycle defects:
pending. Retrying apply then failed withTarget skill already exists, even though the installed skill matched the proposal.Why This Change Was Made
Proposal records, lifecycle status, origin attribution, target-apply claims, and rollback metadata now live in additive tables in the shared state database. The SQLite schema version remains 6: existing current-version databases lazily create these tables on first Skill Workshop use.
PROPOSAL.mdand support files remain on disk as reviewable product artifacts.Apply operations use the shared SQLite lease mechanism instead of file locks. Recovery reconciles an interrupted create or update only when the exact proposal revision owns the latest rollback claim and the complete live bundle matches. Revisions atomically invalidate prior apply evidence.
openclaw doctor --fiximports verified legacyproposals.json,proposal.json, androllback.jsonmetadata into SQLite, verifies the imported rows, then removes only migrated JSON metadata. Ambiguous unattributed proposals on multi-agent installations are left in place with a warning for manual ownership recovery.User Impact
Pending proposals remain manageable when an agent workspace changes, with previous-workspace proposals explicitly annotated. Interrupted applies recover to
appliedwhen the intended live files were durably written, while mismatched, tampered, unauthorized, ambiguous, or unreadable states remain pending and manageable.The documented proposal body limit now matches the configured maximum of 200,000 bytes instead of the incorrect 1 MiB claim.
AI-assisted implementation; the code and migration behavior were reviewed and validated before opening this PR.
Evidence
node scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts src/skills/workshoporigin/main.node scripts/run-vitest.mjs src/commands/doctor-skill-workshop-sqlite.test.tsnode scripts/check-changed.mjs -- <26 changed files>tbx_01kyhk49vqqsy9hq71ema9r61w..agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-outputgit diff --check origin/main...HEADsrc/state/openclaw-state-db-contract.tsremains atOPENCLAW_STATE_SCHEMA_VERSION = 6.