Skip to content

refactor(skills): share pending proposal creation - #139617

Merged
steipete merged 2 commits into
mainfrom
steipete/cleanup-workshop-proposals
Sep 6, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/cleanup-workshop-proposals

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • The identity suite protects canonical names that differ from metadata keys, including the behavior fixed by fix(skills): preserve canonical names through discovery and workshop #136495. The review suite changes the live skill during budget reservation and verifies stale rejection with a refunded budget.
  • 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.
  • No build required: no runtime import, lazy boundary, package output or public SDK surface changed.

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.

@clawsweeper

clawsweeper Bot commented Sep 6, 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 size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 01:58
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 10:16 PM ET / September 6, 2026, 02:16 UTC.

ClawSweeper review

What this changes

Shares 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
Reviewed head: 197ca473694d175aec30f94a6a46f465e999b65b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused consolidation with preserved contracts, useful existing coverage, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored private refactor is exempt from external-contributor runtime proof, and it introduces no material authority change; reported tests supplement the inspected proposal-service equivalence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored private refactor is exempt from external-contributor runtime proof, and it introduces no material authority change; reported tests supplement the inspected proposal-service equivalence.
Evidence reviewed 8 items Introduced change and preserved distinctions: The complete pinned-base diff changes only the proposal service. Create retains normalized draft naming and name scanning; update retains canonical naming, frontmatter fallback, current-content hashing, and support-file baselines.
Still distinct from main: Fetched main retains both original construction blocks. Its proposal service is unchanged from the pinned PR base, so the consolidation is not already implemented there.
Publication and authority boundaries preserved: The shared helper passes the same owner agent, store environment, pending limit, record, and event to the existing store, then dispatches hooks after the write resolves. The store still stages the generation and commits the proposal and event together; no persisted schema or authorization semantics change.
Findings None None.
Security None None.

How this fits together

Skill 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -48. Total -48 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 61 109 -48
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 61 109 -48

Review metrics

None.

Technical review

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

Labels

Label justifications:

  • P3: This is a private maintenance refactor with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored private refactor is exempt from external-contributor runtime proof, and it introduces no material authority change; reported tests supplement the inspected proposal-service equivalence.

Evidence

What I checked:

  • Introduced change and preserved distinctions: The complete pinned-base diff changes only the proposal service. Create retains normalized draft naming and name scanning; update retains canonical naming, frontmatter fallback, current-content hashing, and support-file baselines. (src/skills/workshop/service-propose.ts:96, 197ca473694d)
  • Still distinct from main: Fetched main retains both original construction blocks. Its proposal service is unchanged from the pinned PR base, so the consolidation is not already implemented there. (src/skills/workshop/service-propose.ts:103, 64a038540a0e)
  • Publication and authority boundaries preserved: The shared helper passes the same owner agent, store environment, pending limit, record, and event to the existing store, then dispatches hooks after the write resolves. The store still stages the generation and commits the proposal and event together; no persisted schema or authorization semantics change. (src/skills/workshop/store.ts:247, 197ca473694d)
  • Existing behavioral coverage: Inspected unchanged tests cover pending creation and apply, agent isolation, stale skill and support-file rejection, rollback metadata, size and pending limits, and literal-credential rejection. The captured PR body reports 86 unchanged tests and the changed-code gate passing; this read-only review did not execute them. (src/skills/workshop/service.test.ts:724, 197ca473694d)
  • Documented lifecycle: The documented contract separates pending proposals from live application and specifies agent-directory ownership, stale-target hashes, scanning, atomic generation publication, and shared service entry points. Public docs: docs/tools/skill-workshop.md. (docs/tools/skill-workshop.md:67, 197ca473694d)
  • Related work and review continuity: The captured discussion identifies feat(triage): start installation-owned recovery after update and startup failures #135868 as a separate recovery companion and fix(skills): preserve canonical names through discovery and workshop #136495 as the merged canonical-name repair whose distinctions are retained. The previous completed review contains no findings. Its earlier SHA could not be loaded locally, so the body’s source-identical rebase claim was not independently verified.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T02:03:36.036Z sha 625ed41d1bcc8dbb036df116316a8356cefff1ed :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/cleanup-workshop-proposals branch from 625ed41 to 197ca47 Compare September 6, 2026 02:09
@steipete
steipete merged commit 95a4efb into main Sep 6, 2026
185 checks passed
@steipete
steipete deleted the steipete/cleanup-workshop-proposals branch September 6, 2026 02:26
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
* refactor(skills): share pending proposal creation

* refactor(skills): inline proposal store options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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