Repository navigation
refactor(skill-workshop): move Workshop settings into the plugin config - #190365
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
e967798 to
f397c0b
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…didate reads them
3425ded to
2b14abb
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in 710b58d. Skill Workshop settings now live in Proof: real |
…ig (openclaw#190365) ## Problem Skill Workshop is moving from core into the bundled `skill-workshop` plugin. Its settings still live in the core config key `skills.workshop` (core zod schema, labels, help and tiers), so the plugin cannot own them, and the house pattern for plugin settings (`plugins.entries.<id>.config` validated by the manifest `configSchema`) does not apply. ## Fix - **Plugin owns its settings:** `extensions/skill-workshop/openclaw.plugin.json` gains a `configSchema` (`autonomous.mode`, `autonomous.channelNotices`, `maxSkillBytes`) and the labels and help as `uiHints`. - **Core Doctor moves existing settings** (`moveSkillWorkshopSettings` in `src/config/skill-workshop-plugin-migration.ts`, registered last in the core Workshop rules): - A core legacy rule flags `skills.workshop`, so the refusal names `openclaw doctor --fix`. - The move runs after the existing core Workshop rules in the same pass (older `autonomous.enabled` shapes, retired proposal settings, and the repair of `skill-workshop` policy written while Workshop was built in), moves the three settings into `plugins.entries.skill-workshop.config`, lets settings already in the plugin config win, drops anything else under the retired key, and records `meta.migrations.skillWorkshopPlugin`. - **Why core, not a plugin Doctor contract:** `openclaw update` candidate admission previews only core Doctor migrations (`projectHeartbeatConfigForUpdateAdmission` runs with `pluginContracts: false`). A plugin-owned move made admission refuse every config that still had `skills.workshop`, so users could not update. Core already owned every other `skills.workshop` rule, and core-owned moves into plugin config have precedent (web search, TTS). - **Core cutover:** `skills.workshop` leaves the root schema, types, labels, help and tiers. `resolveSkillWorkshopConfig`, the one reader, reads the plugin config. The Control UI mode toggle reads and writes the plugin path. The update failure report names the retired `workshop` key instead of hiding it. - **Docs:** Skill Workshop, self-learning, skills config and the Doctor migration table. No database schema, protocol or stored-row change. ## Update behavior - `openclaw update` runs Doctor in a fresh process, which moves the settings with the normal config backup. - A config that still has `skills.workshop` is refused at startup with the Doctor hint until Doctor runs (the same behavior as the earlier `canvasHost` move). A foreground `gateway run` offers the repair. ## Evidence | Check | Result | | --- | --- | | Published upgrade: the default `published-upgrade-survivor` Docker lane now seeds `skills.workshop` (`mode: off`, `maxSkillBytes: 8000`) with the `[email protected]` CLI and updates that real install to this candidate with `openclaw update`. Admission accepts the config, Doctor moves it, the Gateway starts, and `assert-config` finds both settings under the plugin config after the update and in the final survival check | pass; before the core move, admission refused the update with `skills: unrecognized key workshop` | | Update admission (`update-command-admit.workshop.test.ts`): a config with `skills.workshop`, alone and with the retired heartbeat key a 2026.10.9 base config carries, is admitted for candidate Doctor without rewriting files | pass; both refuse without the core move | | Published config cell: the `[email protected]` CLI writes `skills.workshop.autonomous.mode: off` and `maxSkillBytes: 8000`; this build refuses the config with the Doctor hint; `openclaw doctor --fix` moves both into the plugin config with the marker; the config validates; `config get` reads `off`; a second Doctor run changes nothing; the new path accepts `config set` and the old path is refused | pass | | Real Doctor flow (`doctor-config-flow.skill-workshop-migration.test.ts`): current settings, the retired `enabled` switch, retired proposal settings, and a stale pre-2026.10 plugin entry all land in plugin config; the runtime resolver reads the moved values; a second run is a no-op | pass | | Core rule unit tests: move, existing plugin settings win, a stale pre-2026.10 entry is replaced (the earlier repair drops it), the retired `enabled` switch maps then moves | pass | | Config contract suites: the plugin path validates through the manifest schema and refuses invalid values; the retired key is refused; the full Doctor chain lands in plugin config; labels and help come from the manifest | pass | | All Workshop suites, Gateway review and learning e2e, Control UI Workshop e2e, after moving ~40 call sites to the plugin path | pass | | `pnpm check:changed` | pass, except the production dead-export scan, which flags `assertSafeSqliteRuntime` in a file this PR does not touch | The upgrade-survivor base recipe seeds Workshop settings for baselines from 2026.10.5 on (`upgrade-survivor-config-recipe.test.ts`). The `cron-owner-doctor` upgrade lane also asserts that the configured Workshop mode survives the update (either path, so frozen older candidates still pass). The `dreaming-cron-doctor` lane's post-Doctor runtime fixture now writes the Workshop mode where the installed candidate's manifest says it belongs (plugin config, or `skills.workshop` for older candidates). That lane fails on current main independently, before reaching this writer: its fixture predates the `heartbeatEnabled` receipt field from openclaw#181659, so the writer change is not yet exercised end to end. The published 2026.10.5 release-notes link to `#workshop-skills-workshop` is kept with an explicit anchor. Co-authored-by: Ayaan Zaidi <[email protected]>
Problem
Skill Workshop is moving from core into the bundled
skill-workshopplugin. Its settings still live in the core config keyskills.workshop(core zod schema, labels, help and tiers), so the plugin cannot own them, and the house pattern for plugin settings (plugins.entries.<id>.configvalidated by the manifestconfigSchema) does not apply.Fix
extensions/skill-workshop/openclaw.plugin.jsongains aconfigSchema(autonomous.mode,autonomous.channelNotices,maxSkillBytes) and the labels and help asuiHints.moveSkillWorkshopSettingsinsrc/config/skill-workshop-plugin-migration.ts, registered last in the core Workshop rules):skills.workshop, so the refusal namesopenclaw doctor --fix.autonomous.enabledshapes, retired proposal settings, and the repair ofskill-workshoppolicy written while Workshop was built in), moves the three settings intoplugins.entries.skill-workshop.config, lets settings already in the plugin config win, drops anything else under the retired key, and recordsmeta.migrations.skillWorkshopPlugin.openclaw updatecandidate admission previews only core Doctor migrations (projectHeartbeatConfigForUpdateAdmissionruns withpluginContracts: false). A plugin-owned move made admission refuse every config that still hadskills.workshop, so users could not update. Core already owned every otherskills.workshoprule, and core-owned moves into plugin config have precedent (web search, TTS).skills.workshopleaves the root schema, types, labels, help and tiers.resolveSkillWorkshopConfig, the one reader, reads the plugin config. The Control UI mode toggle reads and writes the plugin path. The update failure report names the retiredworkshopkey instead of hiding it.No database schema, protocol or stored-row change.
Update behavior
openclaw updateruns Doctor in a fresh process, which moves the settings with the normal config backup.skills.workshopis refused at startup with the Doctor hint until Doctor runs (the same behavior as the earliercanvasHostmove). A foregroundgateway runoffers the repair.Evidence
published-upgrade-survivorDocker lane now seedsskills.workshop(mode: off,maxSkillBytes: 8000) with the[email protected]CLI and updates that real install to this candidate withopenclaw update. Admission accepts the config, Doctor moves it, the Gateway starts, andassert-configfinds both settings under the plugin config after the update and in the final survival checkskills: unrecognized key workshopupdate-command-admit.workshop.test.ts): a config withskills.workshop, alone and with the retired heartbeat key a 2026.10.9 base config carries, is admitted for candidate Doctor without rewriting files[email protected]CLI writesskills.workshop.autonomous.mode: offandmaxSkillBytes: 8000; this build refuses the config with the Doctor hint;openclaw doctor --fixmoves both into the plugin config with the marker; the config validates;config getreadsoff; a second Doctor run changes nothing; the new path acceptsconfig setand the old path is refuseddoctor-config-flow.skill-workshop-migration.test.ts): current settings, the retiredenabledswitch, retired proposal settings, and a stale pre-2026.10 plugin entry all land in plugin config; the runtime resolver reads the moved values; a second run is a no-openabledswitch maps then movespnpm check:changedassertSafeSqliteRuntimein a file this PR does not touchThe upgrade-survivor base recipe seeds Workshop settings for baselines from 2026.10.5 on (
upgrade-survivor-config-recipe.test.ts). Thecron-owner-doctorupgrade lane also asserts that the configured Workshop mode survives the update (either path, so frozen older candidates still pass). Thedreaming-cron-doctorlane's post-Doctor runtime fixture now writes the Workshop mode where the installed candidate's manifest says it belongs (plugin config, orskills.workshopfor older candidates). That lane fails on current main independently, before reaching this writer: its fixture predates theheartbeatEnabledreceipt field from #181659, so the writer change is not yet exercised end to end. The published 2026.10.5 release-notes link to#workshop-skills-workshopis kept with an explicit anchor.