Skip to content

fix: keep daily skill maintenance running when a learned skill has Markdown files outside its support folders - #204881

Merged
RomneyDa merged 1 commit into
openclaw:mainfrom
shu-chen-dot-ca:fix-204737-skill-diet-root-support-files
Nov 26, 2026
Merged

RomneyDa merged 1 commit into
openclaw:mainfrom
shu-chen-dot-ca:fix-204737-skill-diet-root-support-files

Conversation

@shu-chen-dot-ca

@shu-chen-dot-ca shu-chen-dot-ca commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #204737

What Problem This Solves

In auto mode, the daily Skill Workshop maintenance pass shrinks one oversized learned skill (the skill diet). If that skill has a Markdown file outside assets/, examples/, references/, scripts/ or templates/, for example a notes.md next to SKILL.md, the whole pass fails with workshop maintenance failed: Support file paths must be under one of: assets, examples, references, scripts, templates. The warning names neither the skill nor the file, and it comes back every time the rotation picks such a skill.

User Impact

User impact: maintenance finishes, and the affected skill is skipped like any other skill that cannot be dieted, with an info line that names the skill and the file:

skill diet skipped: skill=deploy notes.md: Support file paths must be under one of: assets, examples, references, scripts, templates.

The skill and its files are left untouched, no model call is made for it, and other oversized skills still get their turn in the rotation.

Not covered here: restoring or undoing versions that contain such files, and view/patch/remove_file on them, still refuse those paths as before.

Why This Change Was Made

The diet reads every listed Markdown support file before its skip handler starts, and the file listing includes files that the read refuses. The read now happens inside the skip boundary, and a refused path becomes a normal diet rejection that carries the file name. Moving the files into references/ was not chosen because it would need relinking, including links from other skills; silently ignoring them would weaken the diet's link checks. The path rules themselves are unchanged. The Skill diet docs name this case among skills that are left unchanged.

Evidence

Live Gateway, scheduled maintenance after a real agent turn. An isolated Gateway (pnpm openclaw gateway, own state directory, loopback, channels skipped) on Linux, with Skill Workshop in its default auto mode. The agent main has one learned skill deploy: a 15.2 KB SKILL.md that links a root-level notes.md, both two days old. One turn was sent with pnpm openclaw agent --agent main --message "Say done."; the turn completed and the plugin's maintenance ran right after it. Lines from the Gateway's log file, skill-workshop plugin:

Before, main at 6400a15695d:

2026-11-24T21:05:28.475Z WARN skill-workshop: workshop maintenance failed: Support file paths must be under one of: assets, examples, references, scripts, templates.

After, this PR at 622252eb2e1:

2026-11-24T21:07:52.959Z INFO skill-workshop: skill diet skipped: skill=deploy notes.md: Support file paths must be under one of: assets, examples, references, scripts, templates.

In both runs the model endpoint received exactly one request, the agent turn itself, so no diet model request was made. After the run on this PR, the skill directory still holds only SKILL.md and notes.md, with the same SHA-256 as before the run.

The model in these runs is a local OpenAI-compatible stub that answers every request with fixed text (configured as a custom openai-completions provider), not a hosted model. The failing path and the skip both happen before any diet model call.

Tests and checks

  • New regression test through runWorkshopSkillDiet, for notes.md at the skill root and docs/guide.md in an unsupported folder: no model call, the log line above, SKILL.md and the file list unchanged, no change record.
  • On the base (6400a15695d) the notes.md case fails with SkillAuthoringError: Support file paths must be under one of: assets, examples, references, scripts, templates., raised from the support read in dietWorkshopSkill. With the fix, all 21 tests in skill-diet.test.ts pass.
  • pnpm test:extension skill-workshop: 16 files, 132 tests passed (includes library.test.ts and review-service.test.ts).
  • pnpm tsgo:extensions, pnpm tsgo:extensions:test, oxfmt --check and oxlint on the touched files, and both extension import-boundary lints passed.

Gaps: the live runs used a stub model, not a hosted provider. No local autoreview or ClawSweeper run.

…side support directories

The diet read every listed Markdown file before its skip handler, so a
learned skill with a file such as notes.md at its root failed the whole
daily maintenance pass with an error naming neither skill nor file.
Such a skill is now skipped like any other that cannot be dieted, and
the log line names the skill and the file.

Closes openclaw#204737
@clawsweeper

clawsweeper Bot commented Nov 24, 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 docs Improvements or additions to documentation plugin: skill-workshop size: S labels Nov 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Skip learned-skill dieting when an existing Markdown file violates support-path rules, naming the skill and file in the log.

Example: The deploy skill has a settled 15.2 KB SKILL.md and root-level notes.md.

  • Before: Scheduled maintenance emits a generic support-path warning.
  • After: Maintenance logs that deploy was skipped because of notes.md, without changing files or making a diet model request.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair with production-entry-point evidence and meaningful regression coverage; required hosted CI has not executed.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): The updated body resolves the previous proof gap with base/head Gateway logs after real CLI agent turns, exercising scheduled Workshop maintenance on deploy with root notes.md and recording the named skip, unchanged hashes, and no diet request; the fixed-response provider is outside the changed pre-inference refusal path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Daily learned-skill maintenance repeatedly emits a generic failure when its selected skill contains Markdown outside supported folders.
Reason: The change fulfills the reporter's expected safe-skip behavior and the documented treatment of undietable skills; broader restore and editing restrictions are explicitly excluded.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR fixes a current maintenance bug with a focused change and no actionable correctness or security findings; required CI awaits maintainer approval.

Reviewed head: 622252eb2e1a8ef439d711a54050d4f6efc0c675

Before merge

  • Await maintainer action - Approve the waiting GitHub Actions runs for head 622252e, including CI, so required checks can execute.

Findings

None.

Agent review details

How this fits together

After completed agent turns, the Skill Workshop plugin schedules daily maintenance, selects an oversized learned skill, and reads its files through the host authoring API before attempting a versioned rewrite.

flowchart TD
  A[Completed agent turn] --> B[Daily Workshop maintenance]
  B --> C[Select oversized skill]
  C --> D[Read skill Markdown]
  D --> E[Host path validation]
  E --> F[Named safe skip]
  E --> G[Model review and versioned publish]
Loading

Technical review

Best possible solution:

Keep unsupported-file handling within the existing diet rejection boundary while preserving complete link checks, authoring restrictions, and skill bytes.

Do we have a high-confidence way to reproduce the issue?

A settled learned skill with valid frontmatter, a body exceeding 12,000 bytes, and root notes.md deterministically reaches the unsupported read on current main; contributor Gateway logs corroborate this, and no target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete maintenance repair: it adapts the known authoring refusal to the existing skip owner without moving files, excluding Markdown from integrity checks, or relaxing restore validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9a6e83004974.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit c4f34cb adds src/skills/workshop/skill-diet.ts:385 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c4f34cb7bb71; files: src/skills/workshop/skill-diet.ts)

PR surface

Source +9, Tests +27, Docs +1. Total +37 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 27 18 +9
Tests 1 29 2 +27
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 59 22 +37

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-24T20:54:01.368Z sha 622252e :: needs real behavior proof before merge. :: none

Reviewed November 24, 2026, 4:14 PM ET / 21:14 UTC (Revision 2).

@shu-chen-dot-ca

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 24, 2026
@RomneyDa
RomneyDa merged commit 57f1733 into openclaw:main Nov 26, 2026
135 of 137 checks passed
@shu-chen-dot-ca
shu-chen-dot-ca deleted the fix-204737-skill-diet-root-support-files branch November 26, 2026 01:48
vincentkoc added a commit that referenced this pull request Nov 26, 2026
…irement-rule

* origin/main: (172 commits)
  test(gateway): expect a revoked person's Goal retry to be hidden as not found (#205698)
  fix: keep browser disabled when only hardening relay authentication (#203137)
  fix: recover Linux stream automations after command-anchor crashes (#203149)
  fix(whatsapp): identify voice-note captions as text in delivery receipts (#205381)
  fix(test): unblock restart-auth plugin and worker publication qualification (#205679)
  chore(ui): refresh control ui locales (#205691)
  fix: reduce memory during SQLite usage refresh (#201064)
  fix(plugins): readmit native captures with a dangling host link
  chore(i18n): refresh native locales (#205680)
  fix(update): hash SQLite lock bytes as zeros so Windows exclusion cannot fail verification (#205668)
  fix(skill-workshop): skip the skill diet for skills with Markdown outside support directories (#204881)
  fix(plugins): clarify dated SDK migration notices (#200932)
  fix: keep the resident launcher when reinstalling Gateway (#205655)
  fix: show the whole reply when you reopen a TUI session (#200455)
  test(ui): wait for restored speech player authorization (#199502)
  feat: let agents post approved GitHub comments (#204301)
  fix(agents): honor imageMaxDimensionPx at the provider and CLI image handoffs (#205663)
  chore(ui): refresh control ui locales (#205664)
  fix(google): preserve playback when Google Live splits audio into parts (#205364)
  fix: show named characters in exported session messages (#205362)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 26, 2026
…side support directories (openclaw#204881)

The diet read every listed Markdown file before its skip handler, so a
learned skill with a file such as notes.md at its root failed the whole
daily maintenance pass with an error naming neither skill nor file.
Such a skill is now skipped like any other that cannot be dieted, and
the log line names the skill and the file.

Closes openclaw#204737
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
…side support directories (#204881)

The diet read every listed Markdown file before its skip handler, so a
learned skill with a file such as notes.md at its root failed the whole
daily maintenance pass with an error naming neither skill nor file.
Such a skill is now skipped like any other that cannot be dieted, and
the log line names the skill and the file.

Closes #204737

(cherry picked from commit 57f1733)
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
…side support directories (#204881)

The diet read every listed Markdown file before its skip handler, so a
learned skill with a file such as notes.md at its root failed the whole
daily maintenance pass with an error naming neither skill nor file.
Such a skill is now skipped like any other that cannot be dieted, and
the log line names the skill and the file.

Closes #204737

(cherry picked from commit 57f1733)
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. plugin: skill-workshop proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Skill Workshop daily maintenance aborts before its skip handler on learned skills with root-level support files (diet, undo and restore all fail)

2 participants