Repository navigation
fix(skills): explain malformed skills missing from CLI inventory - #159702
chopin-op60 wants to merge 25 commits into
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 real behavior proof before merge. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherSkill 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +155, Tests +185, Docs +8. Total +348 across 15 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (20 earlier review cycles; latest 8 shown)
Reviewed October 13, 2026, 10:37 PM ET / October 14, 2026, 02:37 UTC (Revision 21). |
…x-skill-load-diagnostics # Conflicts: # src/skills/loading/workspace-skill-loader.ts
…x-skill-load-diagnostics
cebf83f added a runGatewayStartupObservers call without the required resolveGatewayContext and loadSubagentRegistryActivation params, failing check-test-types-core-5 (TS2739) for every PR. Use the same no-op stubs as the sibling plugin-reload test.
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,infoandcheckreport 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
d1ae5093de65e3e0e615139f08686db0891790e1integrates official main054c4ba7f663e78b95972d8e557fd1c102a5aa69to repair a confirmed conflict in skills CLI output. Warnings now use main'sdisplayPathandterminalText; 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
1c7858e96d27de7367c2673524509f777942c9b8and published as11073 with identical tree0c42504d7a5d8f8daf42aebbbcb4524808a60dc6(no actionable P0–P2, confidence0.86). The final test-only follow-up was independently reviewed ascbdd555774a6831f41c9efbc6a24232b8bcfece1(P0–P2 clean, confidence0.99); its tree matches the current normal commit.git diff11073..currentcontains onlysrc/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.39af8eedab28637c8ad69f958af8c81ef8623cc6(main7eaa06f0e7c196b190ac4c9210282a9fcbeb52a1+11073); that failure is retained, and the specific expectation is now corrected.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.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 canonical89dbe8fbthree-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.84b30aceCI 38873992234 had 44 successful/29 skipped/2 failed jobs because later main6ea0cbc9aliased imports but left three old fixture calls. The tested merge854aaf15was bound to maina64e6cbdplus that head. Official89dbe8fbfixes the exact calls and is included here; the old failure is not a current result.7ac5d439CI38501028070 passed 47/28 skipped after the60c64838formatting 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.fc30172d141771446fa2c4f98a757188528e03c8passed 77 cases and an authenticated Gateway/CLI probe in 98.75 s, before the current worker owner and Curator retirement. Original real before/afterb1935b05e8814792587d26e5f1a770f38737ab9f→ccebc32b02d886f863c6b4f51975952be317af18showed 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
d1c800bf95186bff669458310ba3f92e02efb8a6is 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 remainsd1ae5093de65e3e0e615139f08686db0891790e1; 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.