Repository navigation
fix(skills): keep workshop revisions atomic - #126485
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 9:53 PM ET / August 20, 2026, 01:53 UTC. ClawSweeper reviewWhat this changesThis PR stages each Skill Workshop revision as a flushed immutable generation, commits its SQLite pointer and lifecycle event together, and keeps tools and Gateway responses on logical proposal paths. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessNo blocking patch defect found. The immutable-generation design repairs the in-place write/SQLite mismatch at the persistence owner and preserves public logical paths, but exact-head CI is still incomplete and local dependency source was unavailable for independent fs-safe contract confirmation. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherSkill Workshop persists pending skill proposals in SQLite with their draft bundle on disk. CLI, agent tools, and Gateway handlers inspect, evaluate, or apply the committed bundle while exposing stable proposal artifacts to users and clients. flowchart LR
A[Revision request] --> B[Stage immutable bundle]
B --> C[Flush files and publish generation]
C --> D[Commit SQLite record and event]
D --> E[Read committed generation]
E --> F[Tool and Gateway responses]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +202, Tests +374, Docs +20. Total +596 across 28 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one generation-publication owner and stable logical PROPOSAL.md projections, then require exact-head CI plus a direct fs-safe contract check before merge. Do we have a high-confidence way to reproduce the issue? Yes. Current main writes the proposal bundle in place before committing SQLite, and the PR’s fault-boundary suite targets each interruption point in that sequence. Is this the best way to solve the issue? Yes, subject to final dependency and CI confirmation. Publishing a complete generation before the CAS record update fixes the state mismatch at its producer rather than masking it in readers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53fb8220cee8. LabelsLabel 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
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review The head moved to address exact-head CI findings and preserve the shipped model-facing |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Final head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready proof for
Proof gaps: directory-sync-unsupported platforms retain atomic rename/process-interruption safety but do not claim power-loss durability for the directory entry. The authenticated Gateway evaluation used zero installed evaluators; evaluator behavior itself is unchanged and covered by existing suites. |
|
@clawsweeper re-review Final head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(skills): keep workshop revisions atomic * fix(skills): keep proposal artifact paths stable * fix(gateway): preserve proposal inspect schema * fix(gateway): hide proposal generation paths * fix(skills): sync proposal generation files
What Problem This Solves
Fixes an issue where revising a pending Skill Workshop proposal could leave SQLite describing the previous revision while
PROPOSAL.mdor support files were partially replaced by the new revision after a process interruption. The torn bundle caused inspect/evaluate/apply to reject the proposal until it was recreated.Why This Change Was Made
Skill Workshop now stages each complete revision as an immutable filesystem generation, exclusively creates and synchronizes every file, atomically publishes the directory, then CAS-commits the proposal record and lifecycle event together before retiring the prior generation. Reads follow the committed generation pointer under the proposal target lease. Existing root-level proposal bundles migrate on their next successful revision; no SQLite schema or protocol version changes are required. One centralized Gateway projection keeps internal generation paths and prepared support metadata behind the existing public proposal schemas.
User Impact
Pending proposal revisions now recover as a complete old or complete new bundle rather than a mixed state. Evaluation and apply no longer wedge after an interrupted revision, existing proposals upgrade without operator action, and tool/Gateway consumers keep their shipped
PROPOSAL.mdartifact and response contracts.Evidence
Proposal draft changed without updating proposal metadata.node scripts/run-vitest.mjs src/agents/tools/skill-workshop-tool.list.test.ts src/agents/tools/skill-workshop-tool.projection.test.ts src/agents/tools/skill-workshop-tool.test.ts src/skills/workshop/collection-reconcile.test.ts— 51/51 passed across the affected tool projection and lease tests.node scripts/run-vitest.mjs src/gateway/server-methods/skills.proposals.test.ts packages/gateway-protocol/src/schema/agents-models-skills.test.ts src/skills/workshop/revision-atomicity.test.ts src/skills/workshop/service.test.ts— 101/101 passed across every Gateway lifecycle response, the closed protocol schema, and the revision owner.node scripts/run-vitest.mjs src/skills/workshop/revision-atomicity.test.ts src/skills/workshop/service.test.ts— 55/55 passed after adding explicit file synchronization.pnpm check:docs— passed formatting, Markdown lint, MDX, glossary, 6,526 links, and 1,179 config examples.pnpm build— passed.Root.create, guarded same-root directory move requiringoverwrite: true, and repository-owned unsupported-directory-sync policy. It also identified the native-off create fallback's missing file sync; the final generation owner now callsFileHandle.sync()before rename, covered by a new fault boundary.openclaw/ci-gatepassed in run https://github.com/openclaw/openclaw/actions/runs/32322373341.OPENCLAW_TESTBOX=1 scripts/pr prepare-run 126485passed with gate modehosted_exact_or_recent_parent, reusing exact-head hosted CI; no standalone Testbox lease/run URL was allocated.