Repository navigation
refactor(skills): share pending proposal creation - #139617
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 5, 2026, 10:16 PM ET / September 6, 2026, 02:16 UTC. ClawSweeper reviewWhat this changesShares Skill Workshop’s pending-draft preparation and publication between create and update operations while preserving their distinct target validation. Merge readiness✅ Ready for maintainer review This remains a useful, bounded consolidation absent from fetched main. No introduced correctness or security defect was found, and the prior review has no outstanding findings. Priority: P3 Review scores
Verification
How this fits togetherSkill Workshop accepts skill drafts from chat, CLI, and Gateway operations and stores pending proposals for review. Applying a proposal is a separate operation that changes the live skill. flowchart TD
A[Chat CLI or Gateway] --> B[Create or update request]
B --> C[Validate target and current content]
C --> D[Prepare and scan pending draft]
D --> E[Publish proposal and event]
E --> F[Notify proposal hooks]
E --> G[Separate review and apply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -48. Total -48 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep target-specific validation explicit while maintaining one private owner for pending-proposal preparation, persistence, and notification. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing behavior rather than reporting a runtime defect; both duplicated paths are visible on fetched main. Is this the best way to solve the issue? Yes. The private helper removes repeated publication logic while retaining create/update distinctions and existing service contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 64a038540a0e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
625ed41 to
197ca47
Compare
|
Merged via squash.
|
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits) test(ui): scope dashboard settings setup to the top frame (openclaw#139618) refactor(skills): share pending proposal creation (openclaw#139617) fix(release): accept frozen targets before worker bundles (openclaw#136699) fix(gateway): preserve percent sequences in media filenames (openclaw#139508) fix: preserve current update availability alongside update history (openclaw#139501) feat(diagnostics): expose garbage collection duration metrics (openclaw#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539) fix(ui): keep Swarm outcomes visible after completion (openclaw#139490) test: check file accessibility without runtime-specific return values (openclaw#139590) refactor(sdk): keep helper types private (openclaw#139601) fix(cron): preserve current-session delivery intent (openclaw#139491) fix: prevent browser profile permission hangs in Doctor (openclaw#139612) fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531) fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512) fix(agents): keep isolated completion context on its admitted generation (openclaw#139607) fix: avoid declaration builds during source-server updates (openclaw#139392) fix(models): keep discovered models after catalog refresh failures (openclaw#139357) fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439) refactor(ios): reuse shared integer conversion (openclaw#139581) fix(sessions): prevent database lock failures during reclamation (openclaw#139469) ...
* commit 'refs/openclaw/tasks/pr-135167-main-latest': test(ui): scope dashboard settings setup to the top frame (#139618) refactor(skills): share pending proposal creation (#139617) fix(release): accept frozen targets before worker bundles (#136699) fix(gateway): preserve percent sequences in media filenames (#139508) fix: preserve current update availability alongside update history (#139501) feat(diagnostics): expose garbage collection duration metrics (#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (#139539) fix(ui): keep Swarm outcomes visible after completion (#139490) test: check file accessibility without runtime-specific return values (#139590) refactor(sdk): keep helper types private (#139601) fix(cron): preserve current-session delivery intent (#139491) fix: prevent browser profile permission hangs in Doctor (#139612) fix(agents): repair storage-failure test fixture after failover owner move (#139531) fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439)
* refactor(skills): share pending proposal creation * refactor(skills): inline proposal store options
Related: #135868
What Problem This Solves
Skill Workshop's create and update paths repeat pending-proposal construction and publication, requiring changes to draft handling, provenance or event delivery to be made in two places.
This is an independent clean-broad companion to the #135868 split. It extracts no recovery-stage content.
Why This Change Was Made
Share one private pending-proposal operation after each entry point has validated and resolved its target. Keep the create/update differences explicit: draft names and ID seeds, create-only name scanning, update frontmatter and content hashes, and support-file baselines. The existing store still owns generation publication and the SQLite transaction; hook dispatch still follows the committed write.
Remove the now-single-use store-options wrapper and the redundant workspace-options type intersection. The existing update input already declares the same configuration and agent fields.
Production LOC: +61 / -109 (net -48), one file, 170 changed lines; 371 → 323 lines. Tests, tooling and docs are unchanged.
User Impact
No intended behavior change. Create and update continue returning pending proposals, preserving canonical skill identity, agent ownership, provenance and stale-target protection. Live skills still change only through apply.
Evidence
node scripts/run-vitest.mjs src/skills/workshop/service.test.ts src/skills/workshop/service-evaluation.test.ts src/skills/workshop/service-lifecycle-hooks.test.ts src/agents/tools/skill-workshop-tool.skill-identity.test.ts src/agents/tools/skill-workshop-tool.review.test.ts: all 86 unchanged tests passed on the completed patch.node scripts/check-changed.mjs: complete core/coreTests plan passed, including the selected UI-page type graph, all export scans, lint and architecture guards. Independent Codex local and branch reviews through P2 are scoped-clean.Deletion evidence: both original public entry points built the same pending record, merged run provenance, wrote through the same store and dispatched the same created event. Both now use that one private operation. The removed type repeats fields already present on SkillProposalUpdateInput; the removed store-options wrapper had only one remaining caller. No compatibility contract, migration, schema, test or baseline is removed.
ClawSweeper reviewed the published consolidation and found no actionable correctness/security findings, before-merge requests or rank-up moves. Exact-head CI run 34005259092 passed at 625ed41d1bcc8dbb036df116316a8356cefff1ed. The required final freshness rebase preserved the source and lockfile; exact-head CI run 34005740375 also passed for 197ca47. ClawSweeper reviewed that final head without findings or rank-up requests.