Skip to content

fix(cli): doctor outside a project names the issues of an integration installed for the computer - #13002

Closed
josephfarina wants to merge 1 commit into
mainfrom
josephfarina/doctor-computer-integration-issues
Closed

josephfarina wants to merge 1 commit into
mainfrom
josephfarina/doctor-computer-integration-issues

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #13002 → #13010

User impact

Outside a project, the everyday commands (component, template, search, discover, theme) print one line when an integration installed for the computer has issues in its contributions:

Warning: @astryxdesign/lab has 1 integration issue(s). Run: astryx doctor

astryx doctor in the same folder then passed and named nothing:

[ok]    computer-integrations - Integrations installed for this computer - Used outside a project:
        @astryxdesign/[email protected], @astryxdesign/[email protected], @astryxdesign/[email protected], @astryxdesign/[email protected].

So the line on every command sent the reader to a check that gave no reason for it. Now that check warns and names each issue in the package's own files. Its fix says that the package's maintainer fixes them, and that anyone else needs a newer release of the package. Beside a CLI installed for the computer, it adds the command that updates a third-party package; in a tool's package set, it says that the tool updates the package. Astryx's own packages follow the CLI's releases, and Volta cannot install a package beside its CLI, so for those it names no step. The maintainer case matters: the guide on trying an integration globally tells package authors to install their packed package for the computer and run doctor, and an update command alone would replace the package they are testing.

[warn]  computer-integrations - Integrations installed for this computer - Used outside a project:
        @astryxdesign/[email protected], @astryxdesign/[email protected], @astryxdesign/[email protected], @astryxdesign/[email protected].
        @astryxdesign/[email protected] has 1 integration issue: Component source "LoadingMessage.tsx" has no same-stem metadata
        file LoadingMessage.doc.mjs, so Astryx ignores it. Fix: add LoadingMessage.doc.mjs beside it with type:
        'component'; `astryx docs authoring component-doc` lists its fields. - fix: If you maintain @astryxdesign/lab,
        the fix in the issue is yours. Otherwise, a newer release of @astryxdesign/lab needs to fix it.

A doctor --json reader sees that check's status change from pass to warn in this case. The JSON shape does not change. The extra text appears only when such an integration has issues; a check that passes prints the same bytes as before.

Problem and solution fit

  1. Why does it happen? The one-line nudge counts Project.issues(), the issues in the contributions of every integration the folder loads. Outside a project those are the integrations installed for the computer. Doctor outside a project reports those integrations from their load status alone: used, skipped for a peer range, or failed to load. It never read their issues.
  2. Why is that wrong? The nudge names doctor as the place to read them, and the integrations guide (docs use-integrations) says "Run astryx doctor to see integration issues … The doctor check is the one place every issue for every package is listed." Inside a project, doctor's integration-issues check does show them.
  3. Why fix doctor, not the nudge? Doctor is the place the design names for these issues. Pointing the nudge elsewhere would leave doctor silent, and doctor integration validate <package> looks only in the node_modules at or above the folder, so it cannot find a package installed for the computer.

Expected behavior and authority

  • spec:AST-081 FR12: outside a project, the computer-level integrations load "with the same validation" as a project's own. Its doctor bullet now also says: "It also warns about each issue in the contributions of one it uses that the everyday commands point to doctor for, except issues that need a comparison with Core components: it reads no Core there (FR3)." With its verification row, this is the one record change.
  • spec:AST-081 FR3: doctor judges a project and must not read the carried Core. Outside a project it reads none, so it cannot tell whether a component's replaces names a real Core component. It leaves those findings (missing_component_replacement_target, ambiguous_component_replacement, shadowed_component_name) to the commands that carry a Core, instead of reporting them against an empty Core. Template findings stay: Core's templates come with the CLI, so they need no Core. A provider conflict (duplicate_provider) is left out too: the everyday commands print it themselves instead of counting it.
  • architecture:cli-surface INV38: a command the CLI prints runs as printed. The nudge's astryx doctor now leads to the issues it counts for an integration that loads, except one that compares a component with Core components, which doctor cannot check outside a project. For one that cannot load, doctor's fix names doctor integration validate, which cannot find a package installed for the computer; the next layer of this stack fixes that.
  • spec:AST-051 FR11: Astryx's canary-only packages are offered only as prereleases at the CLI's own version. On the registry, npm's latest tag of such a package is a placeholder release (0.0.0-bootstrap.0 for lab and charts). So the fix names no @latest command for one of Astryx's own packages.

Smallest restoration

  • api/doctor/_adapter.mjs: computerIntegrationsOutside already loads the folder's integrations. It now also reads project.issues() in its own try (a failure there leaves the load result as it is) and keeps those of the integrations it uses (computerIntegrationIssues) that the nudge points to doctor for, through pointsToDoctor, now exported beside warnOnIntegrationIssues so both read one rule, and without the component findings it cannot judge without a Core (CORE_COMPARISON_CODES, now exported from foundation/discovery/component-replacement.mjs, which owns those codes). Beside a CLI installed for the computer, it also gives the command that updates such a package in place (integrationUpdate); in a run that a host started from a tool's package set, it says the tool updates them (integrationsUpdateWithTool).
  • api/doctor/doctor.mjs: checkComputerIntegrations groups the issues by package once, warns for an integration it uses that has issues, names them ("has 1 integration issue: …" or "has 2 integration issues: …"), and adds the advice to its fix. The check's other fixes, for skipped and failed packages, keep their wording.
  • clients/cli/commands/doctor.doc.mjs: the command help now says the check warns about an integration it skips, cannot load, or finds issues in.
  • spec:AST-081 FR12 verification row: adds the state (a used integration whose contributions have issues) and the failure (doctor passes while the everyday commands point at it for an issue that needs no Core).
  • foundation/release/notices.mjs: a private globalInstallCommand(cliRoot, spec) is the body that globalUpgradeCommand had, with the package as a parameter; globalUpgradeCommand calls it with @astryxdesign/cli@latest, so its output does not change. The new globalUpdateBesideCli(cliRoot, name) names <package>@latest with the package manager and prefix that hold the CLI. It names nothing for one of Astryx's own packages (in the official list the CLI carries) and nothing under Volta, which keeps each package in a folder of its own.
  • api/doctor/doctor.doc.mjs and the docs tree page about integrations installed for the computer: they name the new warning; the command description adds that outside a project doctor reads no Core, so it does not compare the components of a package with Core components, and the docs tree page names the same exception.

Evidence

Global copy from packs of the newest approved-PR integration branch (Core, CLI and the packages released with them, lab included), installed for the computer; an empty folder; a fresh home:

  • Before: astryx discover prints Warning: @astryxdesign/lab has 1 integration issue(s). Run: astryx doctor; astryx doctor shows [ok] computer-integrations with no issue, summary pass: 4, warn: 0; JSON status pass, no fix.
  • After, the same copy with this change applied: the same nudge; astryx doctor shows [warn] computer-integrations with the LoadingMessage issue and the fix above, summary pass: 3, warn: 1; JSON status warn, with the fix. Lab is one of Astryx's own packages, so the fix names no update command.
  • Unchanged: an integration with no issues still passes with "Used outside a project: …" (G35, and the new unit case). An integration that validly replaces a Core component also passes (G35 now installs one): doctor does not report it against the empty Core it reads. A template that replaces a template Core does not have is named (G35).

The lab issue itself (a helper component source with no doc) is in the lab package, not in the CLI, and is reported to its owners separately.

Scope

Components: CLI (doctor outside a project)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

  • R1 narration: the FR12 doctor bullet and its verification row state what doctor does, in the present tense.
  • R2 research: none in the record; the evidence stays in this description.
  • R3 references in evidence cells: none added.
  • R4 rejected alternatives: none added.
  • R5 pull request or issue links: none added.
  • R6 open questions with recorded answers: none.
  • R7 project status: none added.

Testing

  • With CI=1 on main 0bfa86c6c73 plus this stack (this change and the layer above it): pnpm typecheck passes (after building Core and @astryxdesign/theme-neutral); vitest run --project node over api/doctor, api/docs, api/search, api/integration, foundation/release, foundation/agent-docs, foundation/integrations, foundation/discovery, clients/cli/commands/doctor* and docs*, clients/cli/commands/integration-check.test.mjs, test/global-local.rows-16-39.test.mjs, test/global-local.rows-40-59.test.mjs, test/install-guidance-surfaces.test.mjs, test/doc-loads.test.mjs, test/experimental-isolation.test.mjs, test/golden-reads.test.mjs, test/core-doc-quality.test.mjs and test/packed-search-catalog.test.mjs: 199 files, 4125 tests pass.
  • New tests: doctor.test.mjs "checkComputerIntegrations outside a project" (no issues passes; one issue warns, names it and gives the update command; two issues read in the plural, and a tool's package set gets "It updates with the tool that runs this CLI."; no update step where none can be named); notices.test.mjs "globalUpdateBesideCli" (npm prefix; none for one of Astryx's own packages; none under Volta); global-local row G35 now also installs, beside the global copy, an integration that validly replaces a Core component (doctor still passes and names no issue for it), one whose component source has no doc (discover prints the nudge; doctor --json warns and names the issue with the @latest update command), and one whose template replaces a template that Core does not have (doctor --json warns and names it).
  • globalUpgradeCommand output is unchanged (its tests in foundation/release pass as before).

@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 10:58pm 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
❓ Needs maintainer input (for maintainers only) Nov 20, 2026, 2:39 AM UTC

@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.

Approval waits on an engineering owner's decision on the spec change; no code changes are requested.

This pull request adds behavior to spec:AST-081 FR12 that the current record does not state (outside a project, doctor warns about and names an integration's issues, with a matching verification row), and the check's fix adds maintainer advice and an update step that neither the current nor the proposed FR12 text states. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; the decision should also say whether it covers the fix's advice and update step, or whether FR12 should state them first.

Non-blocking:

  • The docs-tree page on integrations installed for the computer says doctor names the issues of each one it uses; add the exception for issues that compare a component with Core components, as the API doc does.
  • The new FR12 sentence can be read two ways; consider "It also warns about each issue that the everyday commands point to doctor for in the contributions of one it uses, except …".
Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • Changeset: outside a project, doctor now warns about and names an integration's issues: verified (doctor.mjs:3074-3125, row G35).
  • Changeset: before, search and discover pointed to doctor while it passed: verified (row G35 fails on the base after its nudge assertion passes).
  • Changeset: issues that compare components with Core are still not named: verified (_adapter.mjs:1450-1454, :1502-1511).
  • The everyday commands print the nudge from the project's issues: verified (integration-warnings.mjs:57-99 and its five callers).
  • The fix gives maintainer and newer-release advice, an update command beside a global CLI, the tool sentence in a package set, and nothing for Astryx packages or Volta: verified (doctor.mjs:3108-3117, notices.mjs:273-277, unit tests).
  • The JSON shape is unchanged and a passing check prints the same text: verified (doctor.mjs:3118-3127, unit test).
  • A failure reading issues leaves the load result: verified (_adapter.mjs:1501-1516).
  • Provider conflicts stay with the nudge and template findings are named: verified (integration-warnings.mjs:33-35, row G35).
  • The CLI's own upgrade command is unchanged: verified (notices.mjs:258, same output on base and head).
  • doctor integration validate looks only in the folder's dependencies: verified (validate-integration.mjs:794).
  • The integrations guide and the global-trial guide say what the description quotes: verified (use-integrations.doc.mjs:110, global-integrations.doc.mjs:96).
  • Astryx's canary-only packages are offered only as prereleases: verified (the discover record's official-list requirement).
  • The quoted FR12 sentence matches the record: verified (spec.md:783-787).
  • The listed test run passes: partly verified (the doctor, notices, integrations and G35 tests pass on the head; the wider run was not repeated).
  • The packed-integration before and after: not reproduced; row G35's fixture shows the same before and after.

Files:

  • .changeset/doctor-computer-integration-issues.md: clear
  • docs/specs/AST-081-global-mode/spec.md: awaits engineering-owner approval; non-blocking wording note
  • packages/cli/api/doctor/_adapter.mjs: clear
  • packages/cli/api/doctor/doctor.doc.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear; the fix's advice awaits the owner decision
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/assets/docs/tree/computer-integrations.doc.mjs: non-blocking note
  • packages/cli/clients/cli/commands/doctor.doc.mjs: clear
  • packages/cli/foundation/integrations/integration-warnings.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/test/global-local.rows-16-39.test.mjs: clear

Automated review (maintainer link)

Comment on lines +783 to +786
cannot load, naming why. It also warns about each issue in the
contributions of one it uses that the everyday commands point to `doctor`
for, except issues that need a comparison with Core components: it reads no
Core there (FR3). Inside a project, it lists the ones `discover` lists as

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.

Non-blocking wording: "each issue in the contributions of one it uses that the everyday commands point to doctor for" can attach the clause to "one it uses". Suggested: "It also warns about each issue that the everyday commands point to doctor for in the contributions of one it uses, except issues that need a comparison with Core components: it reads no Core there (FR3)."

… installed for the computer

Outside a project, component, template, search, discover and theme print
one line when an integration installed for the computer has issues in its
contributions, and send the reader to doctor. Doctor's computer-integrations
check passed and named nothing, so the pointer led nowhere. It now warns and
names each issue. Its fix says that a newer release of the package must fix
it, with the command that updates a third-party package beside a CLI
installed for the computer, or that a tool's package set updates it. Doctor
reads no Core outside a project, so it leaves out the issues that compare
components with Core components.

[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.

Approval waits on an engineering owner's decision on the spec change; no code changes are requested.

This pull request adds a requirement to spec:AST-081 FR12 that the current record does not state (outside a project, doctor warns about and names the issues of an integration installed for the computer, with a matching verification row), and the check's fix adds maintainer advice and an update step that neither the current nor the proposed FR12 text states. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; the decision should also say whether it covers the fix's advice and update step, or whether FR12 should state them first.

Non-blocking:

  • The new FR12 sentence can be read two ways; consider "It also warns about each issue that the everyday commands point to doctor for in the contributions of one it uses, except …".
Claims and files checked

Review mode: full; reason: history

Claims:

  • Changeset: outside a project, doctor now warns about and names an integration's issues: verified (doctor.mjs:3074-3125, row G35, before/after run).
  • Changeset: before, search and discover pointed to doctor while it passed and named nothing: verified (the same fixture on the base prints the nudge and "All checks passed"; row G35 fails on the base).
  • Changeset: issues that compare components with Core are still not named: verified (_adapter.mjs:1489-1498, row G35).
  • The everyday commands print the nudge from the project's issues: verified (integration-warnings.mjs:59-99 and its callers in component, template, search, discover and theme).
  • The integrations guide says doctor lists every issue: verified (use-integrations.doc.mjs:110).
  • doctor integration validate cannot find a package installed for the computer: verified (validate-integration.mjs:15).
  • The fix gives maintainer and newer-release advice, an update command beside a global CLI, the tool sentence in a package set, and nothing for Astryx packages or Volta: verified (doctor.mjs:3108-3117, notices.mjs:273-277, unit tests).
  • The global-trial guide tells authors to install a packed package for the computer and run doctor: verified (global-integrations.doc.mjs:91-104).
  • The JSON shape and exit status are unchanged and a passing check prints the same text: verified (doctor.mjs:3118-3127, unit test, before/after run).
  • Doctor reads no Core outside a project, leaves out the Core-comparison findings and provider conflicts, and keeps template findings: verified (_adapter.mjs:1475, integration-warnings.mjs:33-35, row G35).
  • A printed command runs as printed, and a failed load still names doctor integration validate: verified (the CLI-surface record's printed-command rule; doctor.mjs:3101-3104).
  • Astryx's canary-only packages are offered only as prereleases: verified (the discover record's official-list requirement); the registry placeholder release was not checked.
  • A failure reading issues leaves the load result: verified (_adapter.mjs:1492-1507).
  • The CLI's own upgrade command is unchanged: verified (notices.mjs:257-258, existing tests).
  • The docs name the new warning and the Core exception: verified (api/doctor/doctor.doc.mjs:27, computer-integrations.doc.mjs:76, commands/doctor.doc.mjs:26).
  • The FR12 verification row adds the new state and failure: verified (spec.md:985).
  • The packed-integration before and after: not reproduced; the same fixture on base and head shows the same before and after.
  • The listed test run passes: partly verified (the doctor, notices, integration-warnings, component-replacement and global-local tests pass on the head; the wider run was not repeated).

Files:

  • .changeset/doctor-computer-integration-issues.md: clear
  • docs/specs/AST-081-global-mode/spec.md: awaits engineering-owner approval; non-blocking wording note
  • packages/cli/api/doctor/_adapter.mjs: clear
  • packages/cli/api/doctor/doctor.doc.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear; the fix's advice awaits the owner decision
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/assets/docs/tree/computer-integrations.doc.mjs: clear
  • packages/cli/clients/cli/commands/doctor.doc.mjs: clear
  • packages/cli/foundation/discovery/component-replacement.mjs: clear
  • packages/cli/foundation/integrations/integration-warnings.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/test/global-local.rows-16-39.test.mjs: clear

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 02df385

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@josephfarina
josephfarina marked this pull request as ready for review November 20, 2026 02:39
josephfarina added a commit that referenced this pull request Nov 20, 2026
josephfarina added a commit that referenced this pull request Nov 20, 2026
josephfarina added a commit that referenced this pull request Nov 20, 2026
- #12710 feat(cli): template's outside-the-project refusal names the command that writes the path from its own folder
  Author: @josephfarina
- #13002 fix(cli): doctor outside a project names the issues of an integration installed for the computer
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #13045.

@github-actions
github-actions Bot deleted the josephfarina/doctor-computer-integration-issues branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — 02df385d 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