Skip to content

fix(cli): doctor integration validate finds an integration installed for the computer - #13010

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

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

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Outside a project, when an integration installed for the computer cannot load, astryx doctor says to run astryx doctor integration validate <package> to see why. That command looked only in the node_modules at or above the folder, so outside a project it answered:

code:     package_not_found
message:  Could not find installed integration package "@astryxdesign/lab" at /…/empty/node_modules/@astryxdesign/lab/package.json. Install it first.
Summary: 1 error, 0 warnings

Now, outside a project, it checks the copy of the package that the folder uses, the copy doctor reports: the folder's own source or a package it declares, else the integration installed for the computer:

Validating integration: @astryxdesign/[email protected]
code:     source_without_component_doc
Summary: 0 errors, 1 warning
[skip] Docs not type-checked: TypeScript is not installed here, so docs were not checked against the authoring types.

Outside any package no project install step applies, so the docs line there names none, whether TypeScript is missing, installed without a compiler API (TypeScript 7), or too old to check a doc. Inside a project or package it keeps its install steps.

Problem and solution fit

  1. Why does it happen? validateInstalledIntegration resolves the package from the node_modules chain at or above the folder, as a project does. Outside a project, the integrations in use are the ones installed for the computer, beside the CLI, not in that chain.
  2. Why is that wrong? Doctor's computer-integrations check prints this command as the next step for an integration installed for the computer that it cannot load, so the printed step failed every time.
  3. Why this fix? Outside a project, Project.load already decides which copy of each integration the folder uses, and doctor reports from that decision. Validate now reads the same decision: the copy the folder loads, else a computer copy that fails to load (doctor lists it, but it loads nothing). A computer copy that doctor skips for its peer range is checked too, with doctor's reason and fix as its note. Only when the folder uses no copy of that name, and the computer holds none, does the node_modules lookup apply, as before. Inside a project nothing changes.

Expected behavior and authority

  • architecture:cli-surface INV38: a command the CLI prints runs as printed. Doctor's fix for a computer integration that cannot load names this command.
  • spec:AST-081 FR12: outside a project, the integrations installed for the computer load with the same validation as a project's own, and doctor warns about each it cannot load, naming why. A folder that loads an integration itself, such as that integration's own source, uses its own copy (row G41).
  • spec:AST-081 FR3: output outside a project gives no advice that works only inside one. So outside any package the TypeScript line names no npm install -D step.
  • spec:AST-081 FR4: doctor integration validate declares own outside a project, and its command doc states what it does there.

Smallest restoration

  • api/integration/validate-integration.mjs: validateInstalledIntegration takes a computer option, which only validateIntegration (doctor integration validate) passes. With it, outside a project, loadedCopy(spec, cwd) (in the integration API's adapter, which reads the project) returns {dir, own} for the copy named spec in Project.load(cwd, {core: 'project'}).loadedIntegrations (the folder's own source, with own from its __local mark, so its shipped-import check reads the files npm packs and its peer advice is the own-folder one; or a package it lists or declares; or a computer copy that loads), else the folder's own claim on that name in the provider ledger Project.load resolved, loaded or not (a declared copy whose manifest throws: Project.load keeps the computer copy out for it, so validate checks the declared copy and prints its error), else {dir} for the computer-level candidate with that name whose peer ranges admit this CLI (one that fails to load), else {skipped} for a computer copy outside those ranges, else null. A skipped copy is checked too. When its @astryxdesign/cli range is among the reasons, its cli_peer_version note gives doctor's reason and fix ("Outside a project, the other commands skip @: . Install a release of that supports this CLI.") instead of the project steps, which outside a project would set up a project the folder does not have; like every cli_peer_version note, it fails nothing (INV35). A copy skipped only for its @astryxdesign/core range gets the same text under its own note code, core_peer_version, which also fails nothing (a copy that both ranges exclude gets cli_peer_version): cli_peer_version means the CLI range, and a code never changes meaning (INV3). The validate API doc and the JSON response-types doc list the new code, and the CLI README's response-type table is regenerated from the latter. foundation/integrations/computer-integrations.mjs: the skip reason (peerProblem, shared by doctor's skip warning and this note) names every release peer range that excludes the release ("it needs @astryxdesign/core >=10.0.0 and @astryxdesign/cli >=10.0.0, and this computer's CLI is 9.0.0"), not only the first. A stray copy in a node_modules above the folder that nothing declares is not loaded there, so it no longer wins. doctor integration components, docs and templates with a package name are unchanged here: they still look only in the node_modules at or above the folder, an older gap against FR3 that doctor sends no one to.
  • foundation/discovery/doc-types.mjs: checkDocTypes takes outsideAnyPackage; with it, a missing TypeScript gives DOC_TYPES_TYPESCRIPT_MISSING_HERE (it shares its text with the in-project line), an unusable one unusableTypeScriptReason(…, {here: true}) (project-typescript.mjs gains the here option), and one too old to check a doc the same line without its install step. api/docs/_adapter.mjs passes isOutsideAnyPackage(cwd).
  • api/integration/validateIntegration.doc.mjs: the API description says that outside a project the copy the folder loads is checked, in the same order.
  • clients/cli/commands/doctor-integration-validate.doc.mjs (declared own outside a project): the description and the global-mode note say where a package name is looked up: in the project's packages, or, outside a project, as the folder loads it: its own source or a package it declares, else the copy installed for the computer, else the node_modules at or above the folder.

Evidence

Global copy from packs of the newest approved-PR integration branch (Core, CLI and lab), installed for the computer; an empty folder; a fresh home; astryx doctor integration validate @astryxdesign/lab:

  • Before: exit 1, package_not_found.
  • After, the same copy with this change applied: exit 0, lab 0.1.9 checked, its one warning named, and the docs line without an install step.

Scope

Components: CLI (doctor integration validate 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.

Testing

  • With CI=1 on main c1eeb636b0b, which includes the doctor change this builds on, and this change: pnpm typecheck, node scripts/check-cli-structure.mjs and generate-cli-readme.mjs --check pass; vitest run --project node over api/integration, api/doctor, foundation/integrations, foundation/runtime/package-set.test.mjs, foundation/response, foundation/config/project.test.mjs, test/global-local.rows-16-39.test.mjs, test/global-local.rows-40-59.test.mjs, test/doc-loads.test.mjs, test/readme-gen.test.mjs, clients/cli/commands/integration-check.test.mjs and scripts/check-cli-structure.test.mjs: 69 files, 1623 tests pass. The CLI README's response-type table is regenerated for the new note code.
  • New tests: global-local row G35 runs doctor integration validate @acme/broken outside a project, beside the global copy that installs it: it checks that copy, names its issue, prints the docs line "TypeScript is not installed here, so docs were not checked", and prints no npm install step. G35 also installs one whose CLI peer range excludes the CLI (validate checks it, exits 0, and its note gives doctor's skip reason and fix, with no upgrade --from step), one whose Core peer range alone excludes the CLI's release (doctor names it as skipped; validate exits 0 with a core_peer_version note carrying the same reason and fix), one both of whose ranges exclude it (a cli_peer_version note naming both ranges), one whose manifest throws (doctor names validate for it, and validate checks it and prints the error), a folder that declares one whose own copy's manifest throws beside a healthy computer copy (validate checks the declared copy and prints its error), and a stray undeclared copy in a node_modules above the folder (validate checks the computer copy the folder uses). Row G41: in the package's own source folder, and in a folder inside it, validate checks the folder's own copy (2.0.0), not the computer's (1.0.0). doc-types.test.mjs: outside any package, a missing, an unusable and a too-old TypeScript give lines with no install step.

preflight: pass 01d1ec0

@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 20, 2026 5:22am 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 20, 2026, 5:42 AM UTC

@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from 97a96d6 to 0aa2660 Compare November 19, 2026 21:31
@josephfarina
josephfarina force-pushed the josephfarina/doctor-computer-integration-issues branch from 746633c to 3e02ac4 Compare November 19, 2026 21:41
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from 0aa2660 to f11f198 Compare November 19, 2026 21:41
@josephfarina
josephfarina force-pushed the josephfarina/doctor-computer-integration-issues branch from 3e02ac4 to f16269d Compare November 19, 2026 21:49
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from f11f198 to 2994abd Compare November 19, 2026 21:49
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from 2994abd to f405f91 Compare November 19, 2026 22:01

@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. Outside a project, doctor integration validate now finds a compatible integration installed for the computer, and the step doctor prints for one that cannot load now runs. Two points need fixing first.

  • For a computer-level copy whose peer range excludes this CLI, validate still answers package_not_found … Install it first (validate-integration.mjs:862-864, and G35 asserts it), while astryx doctor in the same folder says that package is installed and skipped; report it as skipped, with doctor's reason and fix, instead.
  • Three description claims are false at this head: a folder inside the package's own source did not "still" point to integration check (on the base it answered package_not_found), the same message change also reaches folders inside a project, and the global-mode spec does not say that doctor's fix names this command (the code does, which the printed-command rule then governs).
Claims and files checked

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

  • Claims:
    • The changeset says validate now finds an integration installed for the computer, where before it reported not-found though doctor names it: verified for a compatible copy (G35, and a run with a manifest that throws); not for one whose peer range excludes the CLI (first finding).
    • Doctor tells you to run validate for a computer-level integration it cannot load: verified (doctor.mjs:3101-3104).
    • Before, validate looked only in the folder's node_modules chain, so that step failed: verified (G35 fails on the base, and so does that run).
    • With no copy in the chain, validate now checks the computer-level copy: verified (validate-integration.mjs:856-866, G35).
    • A copy in the chain still wins: verified (validate-integration.mjs:857).
    • The package's own source folder keeps its own copy and points to integration check: verified (G41, base and head).
    • A folder inside that source "still" points to integration check: false (the base answered package_not_found, and the G41 subfolder assertion fails there).
    • Inside a project nothing changes: false (the not-installed message in a folder below a package of that name changes, validate-integration.mjs:875, :893).
    • An incompatible copy is skipped as doctor skips it, and doctor names a supporting release for it: verified (doctor.mjs:3099-3100, G35).
    • The global-mode spec says doctor's fix names this command: false as a citation (the code does it, not the spec).
    • The cited rules (printed commands run as printed; no inside-only advice outside a project; the command doc states what the command does outside a project; outside a project, computer-level integrations load with the same validation): verified against the current records.
    • Outside any package, the TypeScript line names no install step when TypeScript is missing, has no compiler API, or is too old, and it keeps them inside a project or package: verified (doc-types.mjs:951-960, :977, three new tests).
    • Only validateIntegration passes the new option: verified (validate-integration.mjs:1002).
    • The other doctor integration subcommands with a package name are unchanged: verified (not in the diff).
    • The API and command docs describe the new lookup: verified (validateIntegration.doc.mjs:22-23, doctor-integration-validate.doc.mjs:27-28, :61).
    • No new public API: verified (exports and command options unchanged).
    • The new tests cover the described cases: verified (G35, G41, doc-types.test.mjs; all fail on the base and pass on the head).
    • The typecheck and the full test run: not reproduced in full; the CLI's strict typecheck reports nothing in a changed file, and the tests in the touched areas pass.
    • The manual check with a packed lab integration: not reproduced; consistent with G35.
  • Files:
    • .changeset/validate-computer-integration.md: clear, apart from the first finding's wording note.
    • packages/cli/api/docs/_adapter.mjs: clear.
    • packages/cli/api/integration/validate-integration.mjs: first and second findings.
    • packages/cli/api/integration/validateIntegration.doc.mjs: clear.
    • packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.mjs: clear (non-blocking: a duplicated sentence).
    • packages/cli/foundation/discovery/doc-types.test.mjs: clear.
    • packages/cli/foundation/discovery/project-typescript.mjs: clear (non-blocking: a duplicated sentence).
    • packages/cli/test/global-local.rows-16-39.test.mjs: first finding (it asserts the not-found text).
    • packages/cli/test/global-local.rows-40-59.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/doctor-computer-integration-issues branch from f16269d to a3a7573 Compare November 19, 2026 22:26
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from f405f91 to abe4f46 Compare November 19, 2026 22:26
@josephfarina
josephfarina force-pushed the josephfarina/doctor-computer-integration-issues branch from a3a7573 to 02df385 Compare November 19, 2026 22:44
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from abe4f46 to af97840 Compare November 19, 2026 22:44

@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. Outside a project, doctor integration validate now checks the copy of an integration that the folder loads, one installed for the computer included, so the step astryx doctor prints for one it cannot load now runs, and both points from the earlier review are fixed. One point needs fixing first:

  • For a computer copy skipped for its peer range, validate returns cli_peer_version as a failing error (exit 1), also when the Core range is the cause, though the CLI's rules (cli-surface INV35 and INV3) and its docs define cli_peer_version as a note that fails nothing; report the skip under an error code of its own and assert that code in G35 (validate-integration.mjs:822-825).
Claims and files checked

Review mode: full; reason: history

  • Claims:
    • The changeset says that outside a project validate now checks the copy the folder uses, a computer integration included, where before it looked only in the node_modules chain and reported not-found though doctor names the command: verified (G35 fails on the base and passes on the head).
    • Doctor names validate as the fix for a computer integration it cannot load: verified (doctor.mjs:3101-3104, G35).
    • Validate now checks the copy the folder loads (its own source or a package it declares), else the computer copy: verified (validate-integration.mjs:875-892, G35, G41).
    • A computer copy whose manifest throws is checked and its error printed: verified (G35).
    • A computer copy skipped for its peer range is named with doctor's reason and fix, not checked: verified as described, but reported as a failing cli_peer_version error (the finding above).
    • Only with no folder copy and no computer copy does the node_modules lookup apply, and an undeclared copy above the folder no longer wins: verified (validate-integration.mjs:829, G35).
    • Inside a project, which copy is checked does not change: verified (validate-integration.mjs:812).
    • The not-installed message names integration check in any folder inside a package of that name: verified (validate-integration.mjs:900-921).
    • The other doctor integration subcommands with a package name are unchanged: verified (not in the diff).
    • Outside any package, the TypeScript line names no install step when TypeScript is missing, has no compiler API, or is too old, and keeps its steps inside a project or package: verified (doc-types.mjs:950-963, :976, three new tests that fail on the base).
    • The missing-TypeScript line shares its text with the in-project line: verified (doc-types.mjs:98-107).
    • The cited rules (a printed command runs as printed; computer integrations load with the same validation and a folder's own copy wins; no inside-only advice outside a project; the command doc states what it does outside a project): verified against the current records.
    • The API and command docs describe the new lookup: verified (validateIntegration.doc.mjs:22-25, doctor-integration-validate.doc.mjs:27-30, :63); the API doc's cli_peer_version wording belongs to the finding above.
    • The new tests cover the described cases: verified (G35, G41 and the doc-type tests fail on the base and pass on the head).
    • The typecheck and the wide test run: partly reproduced (the CLI's strict typecheck reports nothing in a changed file; 123 test files in the touched areas pass).
    • The manual check with a packed integration from another branch: not reproduced; consistent with G35.
  • Files:
    • .changeset/validate-computer-integration.md: clear.
    • packages/cli/api/docs/_adapter.mjs: clear.
    • packages/cli/api/integration/validate-integration.mjs: the finding above (non-blocking: the skip sentence repeats doctor's text).
    • packages/cli/api/integration/validateIntegration.doc.mjs: describes the skip as cli_peer_version (the finding above).
    • packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.test.mjs: clear.
    • packages/cli/foundation/discovery/project-typescript.mjs: clear.
    • packages/cli/test/global-local.rows-16-39.test.mjs: G35 asserts the skip message but not its code or exit status (the finding above).
    • packages/cli/test/global-local.rows-40-59.test.mjs: clear.

Automated review (maintainer link)

@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, because its commit skips CI. Outside a project, doctor integration validate now checks the copy of an integration that the folder uses, so the step astryx doctor prints for one it cannot load now runs. The earlier point is fixed: a computer copy skipped for its CLI range now gets a cli_peer_version note that fails nothing. This pull request targets #13002's branch, so it lands after #13002.

Non-blocking:

  • For a computer copy outside both peer ranges, the cli_peer_version note's reason names only the Core range, because peerProblem reports the first range that fails; naming the CLI range there would match the code (validate-integration.mjs:536).
Claims and files checked

Review mode: full; reason: history

  • Claims:
    • The changeset says that outside a project validate now checks the copy the folder uses, a computer integration included, where before it looked only in the node_modules chain and reported not-found though doctor names the command: verified (G35 fails on the base and passes on the head).
    • Doctor names validate as the fix for a computer integration it cannot load, so the printed step failed every time: verified (doctor.mjs:3101-3104, G35 on the base).
    • Validate now checks the copy the folder loads (its own source, or a package it lists or declares), else a computer copy that fails to load: verified (validate-integration.mjs:880-896, G35, G41).
    • A computer copy whose manifest throws is checked and its error printed: verified (G35).
    • A computer copy skipped for its peer range is checked too, and when its CLI range is a cause its cli_peer_version note gives doctor's reason and fix and fails nothing: verified (validate-integration.mjs:534-539, G35 exit 0, probe with empty issues).
    • A copy skipped only for its Core range gets no such note: verified (probe).
    • Only when the folder uses no copy of that name and the computer holds none does the node_modules lookup apply, and an undeclared copy above the folder no longer wins: verified (validate-integration.mjs:824-833, G35).
    • Inside a project nothing changes: verified (the lookup is gated on being outside a project at validate-integration.mjs:824; the not-installed message matches the base).
    • The folder's own source is checked as the package being made, against what npm packs: verified (own selects npm's packed file list at validate-integration.mjs:592).
    • The other doctor integration subcommands with a package name are unchanged: verified (their callers pass no new option).
    • Outside any package, the TypeScript line names no install step when TypeScript is missing, has no compiler API, or is too old, and keeps its steps inside a project or package: verified (doc-types.mjs:951-962, :976, three new tests that fail on the base).
    • The missing-TypeScript line shares its text with the in-project line: verified (doc-types.mjs:98-107).
    • The cited rules (a printed command runs as printed; computer integrations load with the same validation and a folder's own copy wins; no inside-only advice outside a project; the command doc states what it does outside a project): verified against the current records.
    • The API and command docs describe the new lookup in the same order: verified (validateIntegration.doc.mjs:22-24, doctor-integration-validate.doc.mjs:27-29, :62).
    • The new tests cover the described cases: verified (G35, G41 and the doc-type tests fail on the base and pass on the head).
    • The typecheck and the wide test run: partly reproduced (141 test files in the touched areas pass; the CLI's strict typecheck reports nothing in a changed file).
    • The manual check with a packed integration installed for the computer: not reproduced; consistent with G35.
  • Files:
    • .changeset/validate-computer-integration.md: clear.
    • packages/cli/api/docs/_adapter.mjs: clear.
    • packages/cli/api/integration/validate-integration.mjs: clear (non-blocking: the skip note's wording).
    • packages/cli/api/integration/validateIntegration.doc.mjs: clear.
    • packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.test.mjs: clear.
    • packages/cli/foundation/discovery/project-typescript.mjs: clear.
    • packages/cli/test/global-local.rows-16-39.test.mjs: clear.
    • packages/cli/test/global-local.rows-40-59.test.mjs: clear.

Automated review (maintainer link)

@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, because its commit skips CI. Outside a project, doctor integration validate checks the copy of an integration that the folder uses, so the step astryx doctor prints for one it cannot load now runs. Since the last review, the copy lookup moved unchanged into the integration adapter, where the CLI's rules keep project loading. This pull request targets #13002's branch, so it lands after #13002.

Non-blocking:

  • For a computer copy outside both peer ranges, the cli_peer_version note's reason names only the Core range, because peerProblem reports the first range that fails; naming the CLI range there would match the code (validate-integration.mjs:533).
Claims and files checked

Review mode: full; reason: history

  • Claims:
    • The changeset says that outside a project validate now checks the copy the folder uses, a computer integration included, where before it looked only in the node_modules chain and reported not-found though doctor names the command: verified (G35 fails on the base and passes on the head).
    • Doctor names validate as the fix for a computer integration it cannot load, so the printed step failed every time: verified (doctor.mjs:3103, G35 on the base).
    • Validate now checks the copy the folder loads (its own source, or a package it lists or declares), else a computer copy that fails to load: verified (_adapter.mjs:269-288, G35, G41).
    • The copy lookup lives in the integration API's adapter, which reads the project: verified (_adapter.mjs:269-288; validate-integration.mjs no longer imports the project loader).
    • A computer copy whose manifest throws is checked and its error printed: verified (G35).
    • A computer copy skipped for its peer range is checked too, and when its CLI range is a cause its cli_peer_version note gives doctor's reason and fix and fails nothing: verified (validate-integration.mjs:528-537, G35 exit 0, probe with empty issues).
    • A copy skipped only for its Core range gets no such note: verified (probe).
    • Only when the folder uses no copy of that name and the computer holds none does the node_modules lookup apply, and an undeclared copy above the folder no longer wins: verified (validate-integration.mjs:821-830, G35).
    • Inside a project nothing changes: verified (the lookup is gated on being outside a project at validate-integration.mjs:821).
    • The folder's own source is checked as the package being made, against what npm packs: verified (own selects npm's packed file list at validate-integration.mjs:589).
    • Only doctor integration validate passes the new option, and the other doctor integration subcommands with a package name are unchanged: verified (the other callers pass no new option).
    • Outside any package, the TypeScript line names no install step when TypeScript is missing, has no compiler API, or is too old, and keeps its steps inside a project or package: verified (doc-types.mjs:951-962, :976, three new tests that fail on the base).
    • The missing-TypeScript line shares its text with the in-project line: verified (doc-types.mjs:98-107).
    • The cited rules (a printed command runs as printed; computer integrations load with the same validation and a folder's own copy wins; no inside-only advice outside a project; the command doc states what it does outside a project): verified against the current records.
    • The API and command docs describe the new lookup in the same order: verified (validateIntegration.doc.mjs:22-24, doctor-integration-validate.doc.mjs:27-29, :62).
    • The new tests cover the described cases: verified (G35, G41 and the doc-type tests fail on the base and pass on the head).
    • One defect is restored, with no new public API, default or interaction model under the fix label: verified (no command, option, export or signature changes; behavior changes only outside a project).
    • Public text carries no internal context: verified (added lines, title, description, branch and commit message checked).
    • The typecheck and the wide test run: partly reproduced (141 test files in the touched areas pass; the CLI's strict typecheck reports nothing in a changed file).
    • The manual check with a packed integration installed for the computer: not reproduced; consistent with G35.
  • Files:
    • .changeset/validate-computer-integration.md: clear.
    • packages/cli/api/docs/_adapter.mjs: clear.
    • packages/cli/api/integration/_adapter.mjs: clear.
    • packages/cli/api/integration/validate-integration.mjs: clear (non-blocking: the skip note's wording).
    • packages/cli/api/integration/validateIntegration.doc.mjs: clear.
    • packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.mjs: clear.
    • packages/cli/foundation/discovery/doc-types.test.mjs: clear.
    • packages/cli/foundation/discovery/project-typescript.mjs: clear.
    • packages/cli/test/global-local.rows-16-39.test.mjs: clear.
    • packages/cli/test/global-local.rows-40-59.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina changed the base branch from josephfarina/doctor-computer-integration-issues to main November 20, 2026 02:39
@josephfarina
josephfarina marked this pull request as ready for review November 20, 2026 02:39
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
josephfarina added a commit that referenced this pull request Nov 20, 2026
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from de89f95 to 66c129d Compare November 20, 2026 03:22

@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 finished on this head.

#13002

Approve, with no blocking findings: outside a project, astryx doctor now names the issues of an integration installed for the computer, and its record change is approved for its head.

#13010

Approve, with no blocking findings: outside a project, astryx doctor integration validate <package> now checks the copy the folder uses, so the step doctor prints for an integration it cannot load runs.

Whole stack

Passes; a pull request in this stack lands only when it and every pull request below it are approved.

  • Before merge, the repository's spec gate on this head still waits for an engineering owner's /approve-spec, because the stack's diff from main carries the global-mode record change.
  • Non-blocking: a computer copy outside both peer ranges gets cli_peer_version with a reason that names only the Core range, while the new docs say core_peer_version covers a Core-range skip (inline comment).
Claims and files checked

Review mode: full; reason: history

  • Claims, #13002 (changeset and description):
    • Outside a project, the everyday commands print one line that sends people to doctor when an integration installed for the computer has issues: verified (the call sites in search, discover, component, template and theme; G35).
    • Before, doctor passed and named no issue: verified (base run; G35 fails on the base with pass for warn).
    • doctor now warns and names each issue, except comparisons with Core components it cannot judge without a Core: verified (doctor/_adapter.mjs:1484-1503; G35's valid Core replacement still passes).
    • A provider conflict is left out because the one-line warning prints it itself: verified (the shared pointsToDoctor).
    • The fix says the maintainer fixes it, otherwise a newer release; beside a global CLI it names the update command, in a tool's package set it says the tool updates it, and it names none for Astryx's own packages or under Volta: verified (doctor.mjs:3108-3118; unit and update-command tests).
    • A passing check prints what it printed before, and the JSON keeps its shape: verified (the no-issue unit case passes on both trees).
    • The CLI upgrade command's output is unchanged: verified (same branches and strings as the base).
    • Command help, API doc, docs page and the record's doctor bullet and verification row describe the new warning and its exception: verified.
    • npm's latest tag of a canary-only package is a placeholder: supported by the repository's release guide; the registry was not checked.
    • The packed global-install evidence and the full test count: not reproduced as stated; the same before and after was reproduced on a fixture, and 52 related test files (1288 tests) pass.
  • Claims, #13010 (changeset and description):
    • doctor names this command for an integration installed for the computer that it cannot load, and outside a project the command answered "not found": verified (doctor.mjs:3101-3104; base run).
    • Outside a project it checks the folder's own source or a declared package, else the computer copy, else the node_modules chain: verified (integration/_adapter.mjs:269-288, validate-integration.mjs:826-835; G35, G41).
    • A copy skipped for its CLI range gets the CLI-range note with doctor's reason and fix, and one skipped only for its Core range gets the same text under a new Core-range note; neither fails anything: verified (G35).
    • The API doc and the JSON response-types doc list the new code: verified.
    • An undeclared copy above the folder no longer wins: verified (G35).
    • Outside any package, the docs line names no install step for a missing, compiler-less or too-old TypeScript, and keeps it inside a project or package: verified (three doc-types tests fail on the base and pass on the head).
    • The other doctor integration subcommands are unchanged, and inside a project nothing changes: verified (only validate passes the new option; outside-project gate).
  • Files, #13002: .changeset/doctor-computer-integration-issues.md, docs/specs/AST-081-global-mode/spec.md, packages/cli/api/doctor/_adapter.mjs, doctor.doc.mjs, doctor.mjs, doctor.test.mjs, packages/cli/assets/docs/tree/computer-integrations.doc.mjs, packages/cli/clients/cli/commands/doctor.doc.mjs, packages/cli/foundation/discovery/component-replacement.mjs, packages/cli/foundation/integrations/integration-warnings.mjs, packages/cli/foundation/release/notices.mjs, notices.test.mjs, packages/cli/test/global-local.rows-16-39.test.mjs: clear.
  • Files, #13010: .changeset/validate-computer-integration.md, packages/cli/api/docs/_adapter.mjs, packages/cli/api/integration/_adapter.mjs, packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs, packages/cli/foundation/discovery/doc-types.mjs, doc-types.test.mjs, project-typescript.mjs, packages/cli/test/global-local.rows-16-39.test.mjs, global-local.rows-40-59.test.mjs: clear. packages/cli/api/integration/validate-integration.mjs: non-blocking (the two-range note). validate-integration.type.mjs, validateIntegration.doc.mjs, packages/cli/foundation/response/response-types.doc.mjs: non-blocking (they omit "only" for the Core-range code).

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from 66c129d to 9e4cff7 Compare November 20, 2026 04:09
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026

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

Changes requested: one blocking finding; the rest of the change follows the global-mode spec, and its new tests fail on main and pass here.

  • Miss: in a folder outside a project whose package.json declares its own copy of an integration that fails to load, beside a working copy installed for the computer, astryx doctor integration validate <package> now checks the computer copy and prints [ok] No integration issues found, where main reported the declared copy's invalid_manifest, so in loadedCopy look the name up in providerLedgerOf(project) (load-failed entries included) before the computer candidates and add a test row for this case.

Non-blocking: a copy outside both peer ranges gets cli_peer_version with a Core-range reason while the new docs describe core_peer_version for that range (open inline thread). CI has not run on this head yet.

Claims and files checked

Review mode: full; reason: rebase

  • Claims:
    • Doctor names this command for an integration installed for the computer that it cannot load, and outside a project the command answered "not found": verified (doctor's fix builder; a run on main).
    • Outside a project it checks the folder's own source, else a package the folder declares, else the computer copy, else the node_modules chain: verified for the own source, a declared copy that loads and computer copies (G35, G41); false for a declared copy that fails to load (the finding above).
    • A computer copy that fails to load is checked and its error printed: verified (G35).
    • A copy skipped for its CLI range gets cli_peer_version, one skipped only for its Core range gets core_peer_version, both with doctor's reason and fix, and neither fails anything: verified (G35).
    • The API doc and the JSON response-types doc list the new code: verified.
    • An undeclared copy in a node_modules above the folder no longer wins: verified (G35).
    • Outside any package the docs line names no install step for a missing, compiler-less or too-old TypeScript, and keeps it inside a package: verified (three new unit tests fail on main; a run in a package folder).
    • Only this command passes the new option, the other doctor integration subcommands are unchanged, and nothing changes inside a project: verified (the two other callers; the outside-project gate).
    • The changeset's before and after: verified, apart from the declared-copy case above.
    • The packed-release evidence and the full test tallies: not reproduced as stated; the same before and after was reproduced on fixtures, and 66 related test files pass.
  • Files:
    • packages/cli/api/integration/_adapter.mjs: blocking finding (a declared copy that fails to load).
    • packages/cli/api/integration/validate-integration.mjs: non-blocking (the two-range note; the skip advice).
    • packages/cli/api/integration/validate-integration.type.mjs, packages/cli/api/integration/validateIntegration.doc.mjs, packages/cli/foundation/response/response-types.doc.mjs: non-blocking (no "only" for the Core-range code).
    • .changeset/validate-computer-integration.md, packages/cli/api/docs/_adapter.mjs, packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs, packages/cli/foundation/discovery/doc-types.mjs, packages/cli/foundation/discovery/doc-types.test.mjs, packages/cli/foundation/discovery/project-typescript.mjs, packages/cli/test/global-local.rows-16-39.test.mjs, packages/cli/test/global-local.rows-40-59.test.mjs: clear.

Automated review (maintainer link)

…for the computer

Outside a project, doctor's computer-integrations check names
`doctor integration validate <package>` for an integration installed for
the computer that it cannot load. That command looked only in the
node_modules at or above the folder, so it reported package_not_found.
Outside a project it now checks the copy the folder uses, as Project.load
decides it: the folder's own source or a package it declares, else the
copy installed for the computer. Outside any package, its docs line about
TypeScript names no install step.

[skip ci]
@josephfarina
josephfarina force-pushed the josephfarina/validate-computer-integration branch from 9e4cff7 to 01d1ec0 Compare November 20, 2026 05:10
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 01d1ec0
Covers three outside-a-project behaviors the owner decided for this fix: (a) doctor integration validate checks a computer copy that the other commands skip for its peer ranges; (b) the note code core_peer_version appears when the Core range alone excludes the release, and cli_peer_version when both ranges do; (c) the note's advice for a skipped copy is doctor's "Install a release of that supports this CLI.", not the in-project upgrade steps, since output outside a project gives no project-only advice.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 01d1ec0

@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, because its commit skips CI.

Outside a project, astryx doctor integration validate <package> now checks the copy of the package the folder uses, and the earlier blocking case is fixed: a folder that declares its own copy whose manifest fails now gets that copy's error, guarded by a new test. The skip notes, their reasons and the docs now agree, and the new tests fail on main and pass here. Nothing else is needed from you.

Claims and files checked

Review mode: full; reason: history

  • Claim (changeset): outside a project, validate checks the copy the folder uses, a computer copy included. Verified: api/integration/_adapter.mjs:270-298, validate-integration.mjs:826-835, rows G35 and G41.
  • Claim (changeset): before, it looked only in the node_modules chain and answered package_not_found, though doctor names the command. Verified: G35 fails on main at that answer; api/doctor/doctor.mjs:3103-3106.
  • Claim (changeset): a copy skipped for its peer ranges is checked with a note, cli_peer_version, or core_peer_version when only the Core range excludes the release. Verified: validate-integration.mjs:532-539; the G35 old, old-core and old-both rows.
  • Claim: only doctor integration validate passes the new option, and inside a project nothing changes. Verified: validate-integration.mjs:826 and :999; the other callers pass no such option.
  • Claim: the lookup order is the loaded copy, then the folder's own claim loaded or not, then a computer copy that admits this CLI, then a skipped copy, then the node_modules chain. Verified: _adapter.mjs:270-298; the G35 declared-copy row.
  • Claim: the skip notes fail nothing. Verified: G35 exits 0 for each skipped copy.
  • Claim: the skip reason names every excluding range, in doctor's warning and in the note. Verified: foundation/integrations/computer-integrations.mjs:207-227 and its new unit test.
  • Claim: an undeclared copy in a node_modules above the folder no longer wins. Verified: the G35 inner-folder row.
  • Claim: outside any package the docs line names no install step for a missing, unusable or too-old TypeScript, and keeps it inside a package. Verified: foundation/discovery/doc-types.mjs:950-978, project-typescript.mjs:89-95, three new doc-types tests.
  • Claim: the API doc, the response-type doc and the regenerated README table list the new code. Verified: the README generator check is in sync.
  • Claim: the command doc states the lookup and declares own outside a project. Verified: doctor-integration-validate.doc.mjs:27-29, :50 and :62.
  • Claim: doctor integration components, docs and templates are unchanged. Verified: none of their files changes.
  • Claim: with installed lab packages, validate answered package_not_found before and checks the copy with one warning and no install step after. Verified for the repository's part: G35 exercises the same paths with fixtures; the lab packages are outside the repository.
  • Claim: the typecheck, the structure and README checks and the listed suites pass. Verified: the structure and README checks pass, the related suites pass (68 files), and the CLI typecheck reports no error in a changed file.
  • Claim: the new tests (G35 rows, G41, doc-types cases, the peer-range unit test) cover the cases described. Verified: each is present and fails on main or with the previous lookup.
  • File .changeset/validate-computer-integration.md: clear.
  • File packages/cli/README.md: clear (regenerated table, in sync).
  • File packages/cli/api/docs/_adapter.mjs: clear.
  • File packages/cli/api/integration/_adapter.mjs: clear.
  • File packages/cli/api/integration/validate-integration.mjs: clear.
  • File packages/cli/api/integration/validate-integration.type.mjs: clear.
  • File packages/cli/api/integration/validateIntegration.doc.mjs: clear.
  • File packages/cli/clients/cli/commands/doctor-integration-validate.doc.mjs: clear.
  • File packages/cli/foundation/config/project.mjs: clear.
  • File packages/cli/foundation/discovery/doc-types.mjs: clear.
  • File packages/cli/foundation/discovery/doc-types.test.mjs: clear.
  • File packages/cli/foundation/discovery/project-typescript.mjs: clear.
  • File packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • File packages/cli/foundation/integrations/computer-integrations.test.mjs: clear.
  • File packages/cli/foundation/response/response-types.doc.mjs: clear.
  • File packages/cli/test/global-local.rows-16-39.test.mjs: clear.
  • File packages/cli/test/global-local.rows-40-59.test.mjs: clear.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 20, 2026
- #13010 fix(cli): doctor integration validate finds an integration installed for the computer
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #13063.

@github-actions
github-actions Bot deleted the josephfarina/validate-computer-integration branch November 21, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 01d1ec0b Deployed Nov 20, 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