Repository navigation
fix(cli): doctor outside a project names the issues of an integration installed for the computer - #13002
fix(cli): doctor outside a project names the issues of an integration installed for the computer#13002josephfarina 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.
|
383cc30 to
746633c
Compare
3e02ac4 to
f16269d
Compare
There was a problem hiding this comment.
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
doctornames 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
doctorfor in the contributions of one it uses, except …".
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Changeset: outside a project,
doctornow warns about and names an integration's issues: verified (doctor.mjs:3074-3125, row G35). - Changeset: before,
searchanddiscoverpointed todoctorwhile 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-99and 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 validatelooks 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: cleardocs/specs/AST-081-global-mode/spec.md: awaits engineering-owner approval; non-blocking wording notepackages/cli/api/doctor/_adapter.mjs: clearpackages/cli/api/doctor/doctor.doc.mjs: clearpackages/cli/api/doctor/doctor.mjs: clear; the fix's advice awaits the owner decisionpackages/cli/api/doctor/doctor.test.mjs: clearpackages/cli/assets/docs/tree/computer-integrations.doc.mjs: non-blocking notepackages/cli/clients/cli/commands/doctor.doc.mjs: clearpackages/cli/foundation/integrations/integration-warnings.mjs: clearpackages/cli/foundation/release/notices.mjs: clearpackages/cli/foundation/release/notices.test.mjs: clearpackages/cli/test/global-local.rows-16-39.test.mjs: clear
| 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 |
There was a problem hiding this comment.
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)."
f16269d to
a3a7573
Compare
… 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]
a3a7573 to
02df385
Compare
There was a problem hiding this comment.
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
doctorfor in the contributions of one it uses, except …".
Claims and files checked
Review mode: full; reason: history
Claims:
- Changeset: outside a project,
doctornow warns about and names an integration's issues: verified (doctor.mjs:3074-3125, row G35, before/after run). - Changeset: before,
searchanddiscoverpointed todoctorwhile 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-99and its callers incomponent,template,search,discoverandtheme). - The integrations guide says doctor lists every issue: verified (
use-integrations.doc.mjs:110). doctor integration validatecannot 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: cleardocs/specs/AST-081-global-mode/spec.md: awaits engineering-owner approval; non-blocking wording notepackages/cli/api/doctor/_adapter.mjs: clearpackages/cli/api/doctor/doctor.doc.mjs: clearpackages/cli/api/doctor/doctor.mjs: clear; the fix's advice awaits the owner decisionpackages/cli/api/doctor/doctor.test.mjs: clearpackages/cli/assets/docs/tree/computer-integrations.doc.mjs: clearpackages/cli/clients/cli/commands/doctor.doc.mjs: clearpackages/cli/foundation/discovery/component-replacement.mjs: clearpackages/cli/foundation/integrations/integration-warnings.mjs: clearpackages/cli/foundation/release/notices.mjs: clearpackages/cli/foundation/release/notices.test.mjs: clearpackages/cli/test/global-local.rows-16-39.test.mjs: clear
|
/approve-spec 02df385 |
- #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
|
Landed in #13045. |
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:astryx doctorin the same folder then passed and named nothing: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.A
doctor --jsonreader sees that check's status change frompasstowarnin 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
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.docs use-integrations) says "Runastryx doctorto see integration issues … The doctor check is the one place every issue for every package is listed." Inside a project, doctor'sintegration-issuescheck does show them.doctor integration validate <package>looks only in thenode_modulesat or above the folder, so it cannot find a package installed for the computer.Expected behavior and authority
spec:AST-081FR12: 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 todoctorfor, 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-081FR3:doctorjudges a project and must not read the carried Core. Outside a project it reads none, so it cannot tell whether a component'sreplacesnames 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-surfaceINV38: a command the CLI prints runs as printed. The nudge'sastryx doctornow 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 namesdoctor integration validate, which cannot find a package installed for the computer; the next layer of this stack fixes that.spec:AST-051FR11: Astryx's canary-only packages are offered only as prereleases at the CLI's own version. On the registry, npm'slatesttag of such a package is a placeholder release (0.0.0-bootstrap.0for lab and charts). So the fix names no@latestcommand for one of Astryx's own packages.Smallest restoration
api/doctor/_adapter.mjs:computerIntegrationsOutsidealready loads the folder's integrations. It now also readsproject.issues()in its owntry(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, throughpointsToDoctor, now exported besidewarnOnIntegrationIssuesso both read one rule, and without the component findings it cannot judge without a Core (CORE_COMPARISON_CODES, now exported fromfoundation/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:checkComputerIntegrationsgroups 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-081FR12 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 privateglobalInstallCommand(cliRoot, spec)is the body thatglobalUpgradeCommandhad, with the package as a parameter;globalUpgradeCommandcalls it with@astryxdesign/cli@latest, so its output does not change. The newglobalUpdateBesideCli(cliRoot, name)names<package>@latestwith 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.mjsand 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:
astryx discoverprintsWarning: @astryxdesign/lab has 1 integration issue(s). Run: astryx doctor;astryx doctorshows[ok] computer-integrationswith no issue, summarypass: 4, warn: 0; JSON statuspass, no fix.astryx doctorshows[warn] computer-integrationswith the LoadingMessage issue and the fix above, summarypass: 3, warn: 1; JSON statuswarn, with the fix. Lab is one of Astryx's own packages, so the fix names no update command.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)
Writing rubric results
Testing
0bfa86c6c73plus this stack (this change and the layer above it):pnpm typecheckpasses (after building Core and@astryxdesign/theme-neutral);vitest run --project nodeoverapi/doctor,api/docs,api/search,api/integration,foundation/release,foundation/agent-docs,foundation/integrations,foundation/discovery,clients/cli/commands/doctor*anddocs*,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.mjsandtest/packed-search-catalog.test.mjs: 199 files, 4125 tests pass.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 (discoverprints the nudge;doctor --jsonwarns and names the issue with the@latestupdate command), and one whose template replaces a template that Core does not have (doctor --jsonwarns and names it).globalUpgradeCommandoutput is unchanged (its tests infoundation/releasepass as before).