Repository navigation
fix(cli): a skill whose integration has a doc that did not load is unread, not left out - #12953
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Requesting changes: the fix restores the documented rule (AST-046 FR15) that no skill copy is removed while an integration's docs cannot be read, but the new test does not guard it and one case now prints a duplicate note.
- The new test in
skills.test.mjsuses a doc that throws on import, whichmainalready treated as unread (copies kept,completefalse), so it still passes with the new unread loop in_adapter.mjsremoved; use a sibling doc that loads but fails the docs checks (a flat topic withaliases, or a second doc with the same topic name), wheremaindeletes both copies, and say in the description that this is the case that deleted copies. - For a doc that throws on import,
docs skillsandinitnow print two notes for the package (the per-file "did not load" note and the new "a doc did not load" note) instead of the one the description promises; seednotedwith the packages already inunreadbefore the new loop and assert exactly one note.
Non-blocking: the JSDoc of projectIntegrationSkills still says complete is false only for an unreadable docs folder, and most of the diff is an 80-column re-wrap of .mjs files that the formatting check does not cover.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset: skills of a package with a doc that does not load are reported as not loaded, copies kept, no
replacesadvice: verified for three kinds of failing doc. - One failing doc withdraws all of the package's docs: verified in the docs catalog.
- On
main,docs skills,doctorandinitadvisedreplaces: verified. - On
main,initandupgrade --applyremoved the copies: verified for docs that load but fail the docs checks; false for a doc that throws on import, the case the test uses. - Skills are unread and no copy is removed until the doc loads: verified.
- One note says a doc did not load: false for a doc that throws on import (two notes).
- Runtime change is limited to the left-out reason and the sweep guard: verified.
- Public text has no internal context: verified.
- Components are docs skills, init, upgrade and doctor: verified.
- New test (a throwing sibling doc keeps the copies, the note names the load,
completeis false): passes on this branch; the copies andcompletealready held onmain. - The named node test run passes on this branch.
.changeset/skills-doc-load-unread.md: clear.packages/cli/api/docs/_adapter.mjs: duplicate note; stale JSDoc; formatting re-wrap.packages/cli/api/docs/skills/skills.test.mjs: test does not reproduce the deletion; formatting re-wrap.
4eba6d4 to
c431e8b
Compare
There was a problem hiding this comment.
Requesting changes: the code now keeps skill copies and gives one load note whenever the docs catalog withdraws an integration's docs, as AST-046 FR15 requires, and both earlier findings are fixed; one release-note sentence overstates what changed.
- The changeset says
initandupgrade --applyused to remove skill copies when a doc does not load, butmainalready kept them for a doc that throws on import, so reword it to name the removal only for a doc that loads but fails the docs checks (such as a flat topic that setsaliases).
Non-blocking: most of the diff is an 80-column re-wrap of .mjs files that the formatting check does not cover; consider moving it to its own change.
Claims and files checked
Review mode: full; reason: history
- Changeset: the skills are reported once as not loaded: verified for a doc that throws on import, a flat topic with
aliases, and a repeated name. - Changeset:
initandupgrade --applykeep the copies until the doc loads: verified for all three. - Changeset: before, they removed the copies: false for a doc that throws on import (kept on
main); verified for docs that load but fail the docs checks. - One failing doc withdraws all of the package's docs: verified in the docs catalog.
- On
main,docs skills,doctorandinitadvisedreplaces: verified. - On
main, a doc that loads but fails the docs checks madeinitandupgrade --applyremove the copies: verified foraliasesand a repeated name. - A doc that throws on import was already unread: verified.
- The fix marks such a package unread with one note and removes no copy: verified.
- The runtime change is limited to the left-out reason and the sweep guard: verified.
- Public text has no internal context: verified.
- The components are docs skills, init, upgrade and doctor: verified.
- The new test with a withdrawn sibling doc fails on
main: verified (it fails atcomplete). - The new test for a doc that throws on import expects one note: verified (two notes on
main, one here). - The named node test run passes: verified.
.changeset/skills-doc-load-unread.md: the release note overstates the old behavior.packages/cli/api/docs/_adapter.mjs: clear (formatting re-wrap noted).packages/cli/api/docs/skills/skills.mjs: clear (formatting and a JSDoc line only).packages/cli/api/docs/skills/skills.test.mjs: clear (formatting re-wrap noted).
…read, not left out; its copies stay [skip ci]
c431e8b to
f7f08f6
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The fix keeps skill copies and gives one load note whenever the docs catalog withdraws an integration's docs, as AST-046 FR15 requires, and the three earlier findings are fixed.
Next: CI runs once the pull request is ready for review, but the head commit's message carries [skip ci], which makes GitHub skip pull-request CI for that commit, so push a head commit without it.
- Non-blocking: about 350 of the 434 changed lines are an 80-column Prettier re-wrap of
.mjsfiles that the formatting check does not cover; consider moving it to its own change.
Claims and files checked
Review mode: full; reason: history
- Changeset: when the docs catalog withdraws a package's docs because a doc fails its checks (such as a flat topic with
aliases),initandupgrade --applykeep the skill copies instead of removing them: verified foraliasesand a repeated doc name (removed onmain, kept here). - Changeset: when any doc of the package does not load, its skills get one note instead of a
replacesfix: verified foraliases, a repeated name and a doc that throws on import. - Description: one failing doc withdraws all of the package's docs: verified in the docs catalog.
- Description: on
main,docs skills,doctorandinitadvisedreplacesfor these skills: verified. - Description: on
main, a doc that loads but fails the catalog's checks madeinitandupgrade --applyremove the copies: verified foraliasesand a repeated name. - Description: a doc that throws on import was already treated as unread: verified in the skill reader.
- Description: the fix treats a package with a withdrawn doc like an unreadable docs folder, with one note and no removal: verified (
_adapter.mjs:2718-2759). - Description: the runtime change is limited to the left-out reason and the sweep guard: verified.
- Description: public text contains no internal context: verified.
- Description: the new
aliasestest fails onmain(atskills.test.mjs:320) and the import test gets one note (fails onmainat:344): verified. - Description: the named node test set passes: verified (51 files, 1,196 passed, 2 expected failures).
- File
.changeset/skills-doc-load-unread.md: clear. - File
packages/cli/api/docs/_adapter.mjs: clear. - File
packages/cli/api/docs/skills/skills.mjs: clear (formatting and a JSDoc edit only; non-blocking note). - File
packages/cli/api/docs/skills/skills.test.mjs: clear (non-blocking formatting note).
- #12953 fix(cli): a skill whose integration has a doc that did not load is unread, not left out Author: @josephfarina - #12954 docs(cli): astryx docs --help names docs skills Author: @josephfarina - #12955 test(cli): a skill on a placed guide reads that guide and init writes it Author: @josephfarina - #12956 refactor(cli): one renderer for the SKILL.md files Astryx manages Author: @josephfarina - #13001 test(cli): the swizzle proof renders Lab's MediaPlayer with its required label Author: @josephfarina
|
Landed in #12993. |
Based on
main. The bottom of a four-part stack of small follow-ups to the integration skills; the layers above it land with it.Problem
When one doc of an integration fails to load, the docs catalog withdraws all of that package's docs. Its skills then had no doc to read, and
docs skills,doctorandinitreported each of them as left out because "another doc holds that name; usereplaces", which is false. Worse, when that doc loads but fails the catalog's checks (a flat topic withaliases, a repeated name), the run still counted every package as read, soinitandupgrade --applyremoved the copies already written as leftovers. A doc that throws on import was already treated as unread.Fix
projectIntegrationSkillstreats a package with a doc that did not load (catalog.issues) like a package whose docs folder cannot be read: its skills are unread, one note says a doc did not load, and no copy is removed until it loads.Scope
Components: cli (docs skills, init, upgrade, doctor)
Testing
api/docs/skills/skills.test.mjs: a sibling doc the catalog withdraws (a flat topic withaliases) keeps the skill's copies throughinit, with exactly one note that names the load, notreplaces(this test fails onmain); a doc that throws on import gets one note, not two.vitest run --project node packages/cli/api/docs packages/cli/api/init packages/cli/api/upgrade packages/cli/api/doctor packages/cli/foundation/agent-docswithCI=1.preflight: pass e8b36bb