Skip to content

fix(skills): explain malformed skills missing from CLI inventory - #159702

Open
chopin-op60 wants to merge 25 commits into
openclaw:mainfrom
chopin-op60:codex/fix-skill-load-diagnostics
Open

chopin-op60 wants to merge 25 commits into
openclaw:mainfrom
chopin-op60:codex/fix-skill-load-diagnostics

Conversation

@chopin-op60

@chopin-op60 chopin-op60 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #158816

What Problem This Solves

Malformed installed SKILL.md files disappear from inventories without explaining why. Operators need the rejected path and loading error, including when querying a running Gateway.

User Impact

skills list, info and check report rejected files and discovery failures in text and JSON. Valid siblings remain available, rejected files do not inflate loaded counts, and warnings update or clear with the published inventory. Output is bounded to 64 diagnostics plus an omitted count, with bounded paths/messages and safe terminal rendering. No configuration, persisted-data migration, dependency or permission change is added.

Why This Change Was Made

Rejection facts follow the canonical loader, shared per-pass root reads, source preparation, worker snapshots, skills.status and CLI formatters. Diagnostics participate in the existing fingerprint, so changing or removing an invalid file publishes a revision even if valid skills are unchanged. Main's native observations and safety reconciliation remain the refresh owner.

Current head d1ae5093de65e3e0e615139f08686db0891790e1 integrates official main 054c4ba7f663e78b95972d8e557fd1c102a5aa69 to repair a confirmed conflict in skills CLI output. Warnings now use main's displayPath and terminalText; its missing-skill message, Workshop output, worker changes and test refactors remain. Independent review also caught discovery-stage rejections bypassing the collector. The same bounded collector now retains those facts and forwards the existing owner callback, preserving logging, root precedence, link/hardlink admission, discovery limits and retired interfaces. The final follow-up only updates main's new worker fingerprint expectation to include independently specified empty diagnostic facts; winner selection and the no-canonicalization assertion remain exact. Runtime source is unchanged from11073.

Evidence

  • Source and review: the complete runtime correction was reviewed in 1c7858e96d27de7367c2673524509f777942c9b8 and published as11073 with identical tree 0c42504d7a5d8f8daf42aebbbcb4524808a60dc6 (no actionable P0–P2, confidence0.86). The final test-only follow-up was independently reviewed as cbdd555774a6831f41c9efbc6a24232b8bcfece1 (P0–P2 clean, confidence0.99); its tree matches the current normal commit. git diff11073..current contains only src/skills/runtime/discovery.worker.test.ts. Official pinned oxfmt0.74/configuration and whitespace checks passed; normal hooks and push were used. The normal hook reported its supported oxfmt fallback after a pinned-Bun staging failure; independent pinned0.74 checks had already passed. No local fork product/tests/builds were executed.
  • Current regression: the existing status/cache/CLI lifecycle case includes a malformed file, an actually rejected escaping directory (a junction on Windows), and a valid sibling. It requires exact rejection facts on synchronous and worker inventories, exposes both reasons on all three text/JSON CLI surfaces, keeps the outside skill unloaded and clears warnings after repair/removal. Existing worker cases retain native warning publication and generated-plugin child facts across cached reuse and passive refresh. No new sleeps, timeouts or production test seams are added.
  • Current CI: 40823511312 completed successfully on the exact current head:40 successful jobs,30 skipped,0 failed; dependency/security/ci-gate statuses passed. All latest check contexts are complete with no failure or pending result. Skipped checks do not establish a repair of historical platform failures. Previous-head CI40806314301 failed the new upstream worker expectation and dependent gate on tested merge 39af8eedab28637c8ad69f958af8c81ef8623cc6 (main 7eaa06f0e7c196b190ac4c9210282a9fcbeb52a1 +11073); that failure is retained, and the specific expectation is now corrected.
  • Exact-head affected file: secretless fork40823331054, reviewed carrier 8b234e3460b1ee6c24c67c22707477a2de7532c9 (P0–P2 clean, confidence0.90), ran the entire affected worker contract file on the actual current head:6 passed, exit0,84.992 s including wrapper preparation. The exact hash and no-path-resolution assertions remain; no timeout, assertion or gate was weakened.
  • Runtime proof retained at its actual SHA: secretless fork40806422577, reviewed carrier 1ac87e31120ef0901fe1cda97d368be76ade7644 (P0–P2 clean, confidence0.84), completed successfully on11073, using Node24.22.1/pnpm12.15.0. Current054 base received only regression patches: two worker cases and the status/cache/CLI rejection case failed for the intended missing facts (80.902/86.624 s,3 intended failed cases). Head passed27 focused cases/13 intentionally unselected worker cases: selected worker82.986 s, full status8 cases90.506 s, remote6 cases82.840 s, CLI11 cases86.093 s. Authenticated actual Gateway and normal list/info/check text+JSON, warning change/removal, stable valid sibling and stopped-target refusal of local fallback passed in431.027 s including preparation. This proof is reused because the final change is test-only; it is not relabeled as a live run of the current SHA. Broad current-head qualification belongs to the current PR CI.

The live observer retains its62 s window; this does not establish a production60 s poll or a native-watch latency bound. Product status budgets, assertions and CI gates remain unchanged. The previous real base e046 negative control retains its original SHA; this iteration uses current054 test controls without repeating that old live job.

Historical proof and failures retain their original revisions
  • d1ecfd058e72f9b3b13577a6fd85b95ac6c7552b: CI40070610814 passed 42 jobs/30 skipped; CodeQL and dependency/security/ci-gate passed. Secretless fork40071011240 passed 27 focused cases/13 unselected worker cases, with two intended base292 failures in61.536 s and actual-head Gateway/CLI in317.206 s. These results predate the current terminal-output and discovery-diagnostic repair and are not current-head results.
  • dab73b82fb28e4b530c01a2a8ae1fea31207b611: CI39922658023 passed 41 jobs/30 skipped and CodeQL/ci-gate passed. Source-qualified fork39923796578 used base e046 and Node 24.22.1/pnpm 12.15.0: intended missing-diagnostics worker failure 60.552 s; head 26 focused cases passed/14 unselected cases skipped; actual Gateway/CLI base/head 196.959/398.847 s passed. These results qualify the previous status-owner integration and retain that SHA; they are not a test result for the current generated-plugin owner integration.
  • 9173502aa874ab54661a0ea7da4d92557c474777: actual native Gateway/CLI proof 39525756123 passed in 294.700 s including preparation, against the comparable dcaf base negative control in 159.873 s. The diagnostic-change/removal native case passed in 1306 ms; full focused files recorded 39 passing/1 failing cases. The one-vs-five Windows-observation fixture also failed unchanged dcaf main under Node 24.21. Its CI 39356864131 had 44 successful/29 skipped/2 failed jobs: the Bun precedence-winner snapshot case timed out and ci-gate failed dependently. Exact tested main24af and merge05ad each passed all 7 consumer cases in single-file controls, which did not reproduce original shared-run load/order or establish a repair. These are historical917 results, not current-head acceptance.
  • f52bb29fdaaea8dd5d8561177fb377f6030fcf94: CI39008934366 passed 47 jobs/29 skipped; this followed the verified canonical 89dbe8fb three-alias repair. The new main refresh owner materially changed after that source, so these results are not relabeled as today's acceptance.
  • 84b30acee664db7c30b2cbcefa406ff886dcd858: proof 38874537191 recorded the intended baseline undefined-diagnostics failure (35.71 s) and 14 passing worker cases (44.50 s); its two key cases took 531/523 ms. real proof 38878385170 passed baseline/fixed Gateway/CLI observations in 122.895/373.271 s including preparation. The first live attempt's synthetic retired default-marker configuration failure was corrected, without a product change or relaxed assertion. These cover the prior periodic worker owner.
  • The same 84b30ace CI 38873992234 had 44 successful/29 skipped/2 failed jobs because later main 6ea0cbc9 aliased imports but left three old fixture calls. The tested merge 854aaf15 was bound to main a64e6cbd plus that head. Official 89dbe8fb fixes the exact calls and is included here; the old failure is not a current result.
  • Earlier 7ac5d439 CI38501028070 passed 47/28 skipped after the 60c64838 formatting failure. Earlier unused-helper/Configure–Doctor-export failures, source reviews and native/catalog failures keep their historical attribution. Native skipping never established a root-cause repair.
  • fc30172d141771446fa2c4f98a757188528e03c8 passed 77 cases and an authenticated Gateway/CLI probe in 98.75 s, before the current worker owner and Curator retirement. Original real before/after b1935b05e8814792587d26e5f1a770f38737ab9f → ccebc32b02d886f863c6b4f51975952be317af18 showed the missing/displayed warnings on the same fixture (160.14/175.41 s).

Maintenance status (2026-11-13): GitHub reports a new merge conflict with main. A local integration against official d1c800bf95186bff669458310ba3f92e02efb8a6 is prepared, preserving asynchronous source reads, sequential per-workspace processing and diagnostic fingerprints. Pinned formatting and whitespace checks passed. Independent source and validation-workflow reviews could not complete because their review-service connections failed; this is not a code-review verdict. The candidate has not been pushed or runtime-tested. The published head remains d1ae5093de65e3e0e615139f08686db0891790e1; CI40823511312 and previous runtime proofs retain their recorded revisions. Review and current-candidate validation remain outstanding before the branch update.

Implementation and review were AI-assisted.

@clawsweeper

clawsweeper Bot commented Sep 27, 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 app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes size: L labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 27, 2026
@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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR shows rejected skill-file paths and loading errors in CLI inventory text and JSON.

Example: repro-skip-test/SKILL.md contains a description continuation beginning at column zero.

  • Before: openclaw skills info repro-skip-test reports that the skill was not found.
  • After: The command also identifies the rejected SKILL.md and its frontmatter error while valid siblings remain available.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, focused source changes with no actionable findings; historical verification does not establish the materially changed worker integration.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An installed malformed skill disappears from inventory without identifying its rejected file or loading error.
Reason: This restores established diagnostic intent through current inventory surfaces using existing owners and optional diagnostic facts.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR addresses a concrete inventory diagnostic gap still present on current main, and no actionable introduced code defect was found.

Priority: P2
Reviewed head: 7ac5d439e8227183c885fabd9e4f5637c9110fee

Before merge

  • Add real behavior proof - Historical authenticated Gateway/CLI verification covers rejection paths, valid siblings, repair/removal and overflow at fc30172. The current implementation materially carries these facts through worker snapshots and fingerprints, and the complete PR body explicitly leaves that runtime verification pending. Supply redacted logs, live output or a terminal recording showing list/info/check warnings and warning change/removal after worker refresh with valid siblings unchanged; redact IPs, API keys, phone numbers and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: The current worker-to-Gateway-to-CLI warning refresh scenario has no supplied runtime result, and the new regression has no recorded base-fail/head-pass execution.
Agent review details

How this fits together

Skill discovery reads configured files on their owning host, publishes accepted entries and rejection facts, and supplies Gateway inventory responses rendered by the CLI.

flowchart TD
  A[Configured skill files] --> B[Canonical source reader]
  B --> C[Accepted entries]
  B --> D[Bounded rejection facts]
  C --> E[Discovery worker snapshots]
  D --> E
  E --> F[Gateway inventory]
  F --> G[CLI text and JSON]
Loading

Technical review

Best possible solution:

Keep bounded rejection facts with canonical discovery and expose them through the existing inventory commands.

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

The affected-release report supplies an exact malformed SKILL.md fixture, and current-main source rejects it without carrying its diagnostic into inventory; no target code was executed.

Is this the best way to solve the issue?

The patch repairs the existing discovery-to-inventory path while preserving parsing, precedence, host authority and accepted-skill counts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 976cc974fab1.

Provenance checked

  • Rejected-file handling keeps the original intent (fix(skills): canonical frontmatter parser + per-file diagnostics #108926: Canonical parsing rejects genuinely malformed frontmatter and reports the file and parse error through existing loggers.)
  • Worker discovery and refresh keeps the original intent (877301a: One background worker owns discovery, with coalesced passive scans and immediate explicit refresh.)
  • Canonical source-reader placement keeps the original intent (7840eae: Move filesystem reading into a leaf owner to narrow worker import graphs without retaining a compatibility alias.)
  • Remote workspace inventory keeps the original intent (e63393b: Read workspace-owned facts from the registered host while keeping Gateway sources local and refusing unavailable remote management.)
  • CLI formatting keeps the original intent (ed135da: Keep JSON machine-readable and preserve profile-aware command hints while simplifying formatting.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a545a85 adds src/skills/discovery/status.ts:239 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a545a850420c; files: src/skills/discovery/status.ts)
  • Kimi Yu: Raw commit e63393b adds src/skills/discovery/status.ts:242 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e63393bddc3a; files: src/skills/discovery/status.ts)

PR surface

Source +155, Tests +185, Docs +8. Total +348 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 9 199 44 +155
Tests 5 188 3 +185
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 395 47 +348

Review metrics

Metric Value Why it matters
Production versus test LOC Production +199/-44; tests +188/-3 Production growth carries bounded facts through existing owners; tests cover distinct formatting safety, host composition, inventory recovery and worker-publication contracts.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Missing diagnostics make malformed optional skills difficult to troubleshoot, with a limited inventory impact.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the current worker-path Gateway/CLI verification described in the proof assessment.

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 (20 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-04T10:51:49.237Z sha 6f59bfb :: needs maintainer review before merge. :: none
  • reviewed 2026-10-05T13:43:56.848Z sha 6f2d5cf :: needs changes before merge. :: none
  • reviewed 2026-10-05T15:14:18.394Z sha fc30172 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-07T04:35:38.266Z sha fc30172 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-09T07:44:32.048Z sha 2ee6c6e :: needs maintainer review before merge. :: none
  • reviewed 2026-10-10T01:17:20.407Z sha fbe5035 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-11T04:33:14.940Z sha 83be4d0 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-14T02:17:49.829Z sha 60c6483 :: needs real behavior proof before merge. :: none

Reviewed October 13, 2026, 10:37 PM ET / October 14, 2026, 02:37 UTC (Revision 21).

@chopin-op60
chopin-op60 marked this pull request as ready for review September 27, 2026 17:09
…x-skill-load-diagnostics

# Conflicts:
#	src/skills/loading/workspace-skill-loader.ts
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Oct 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed gateway Gateway runtime size: L labels Oct 14, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Oct 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SKILL.md with a multi-line plain-scalar description is silently skipped - no warning on any CLI surface

2 participants