Skip to content

fix(cli): a skill whose integration has a doc that did not load is unread, not left out - #12953

Closed
josephfarina wants to merge 1 commit into
mainfrom
skills-fu1
Closed

josephfarina wants to merge 1 commit into
mainfrom
skills-fu1

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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, doctor and init reported each of them as left out because "another doc holds that name; use replaces", which is false. Worse, when that doc loads but fails the catalog's checks (a flat topic with aliases, a repeated name), the run still counted every package as read, so init and upgrade --apply removed the copies already written as leftovers. A doc that throws on import was already treated as unread.

Fix

projectIntegrationSkills treats 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)

  • Runtime change limited to the left-out reason and the sweep guard.
  • Public text and artifacts contain no internal Meta context.

Testing

  • New tests in api/docs/skills/skills.test.mjs: a sibling doc the catalog withdraws (a flat topic with aliases) keeps the skill's copies through init, with exactly one note that names the load, not replaces (this test fails on main); 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-docs with CI=1.

preflight: pass e8b36bb

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 7:27pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2026
@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 7:35 PM UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.mjs uses a doc that throws on import, which main already treated as unread (copies kept, complete false), so it still passes with the new unread loop in _adapter.mjs removed; use a sibling doc that loads but fails the docs checks (a flat topic with aliases, or a second doc with the same topic name), where main deletes both copies, and say in the description that this is the case that deleted copies.
  • For a doc that throws on import, docs skills and init now 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; seed noted with the packages already in unread before 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 replaces advice: 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, doctor and init advised replaces: verified.
  • On main, init and upgrade --apply removed 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, complete is false): passes on this branch; the copies and complete already held on main.
  • 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.

Automated review (maintainer link)

Comment thread packages/cli/api/docs/_adapter.mjs Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 init and upgrade --apply used to remove skill copies when a doc does not load, but main already 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 sets aliases).

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: init and upgrade --apply keep 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, doctor and init advised replaces: verified.
  • On main, a doc that loads but fails the docs checks made init and upgrade --apply remove the copies: verified for aliases and 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 at complete).
  • 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).

Automated review (maintainer link)

Comment thread .changeset/skills-doc-load-unread.md Resolved
…read, not left out; its copies stay

[skip ci]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .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: when the docs catalog withdraws a package's docs because a doc fails its checks (such as a flat topic with aliases), init and upgrade --apply keep the skill copies instead of removing them: verified for aliases and a repeated doc name (removed on main, kept here).
  • Changeset: when any doc of the package does not load, its skills get one note instead of a replaces fix: verified for aliases, 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, doctor and init advised replaces for these skills: verified.
  • Description: on main, a doc that loads but fails the catalog's checks made init and upgrade --apply remove the copies: verified for aliases and 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 aliases test fails on main (at skills.test.mjs:320) and the import test gets one note (fails on main at :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).

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 19, 2026 20:01
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #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
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12993.

@github-actions
github-actions Bot deleted the skills-fu1 branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — f7f08f68 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant