Skip to content

fix(cli): outside a project, template counts the integrations a host approves, as render serves them - #12370

Merged
josephfarina merged 5 commits into
mainfrom
josephfarina/template-counts-approved-integrations-v2
Nov 18, 2026
Merged

josephfarina merged 5 commits into
mainfrom
josephfarina/template-counts-approved-integrations-v2

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Outside a project, when a tool runs the CLI through its host entry, render serves a page each integration the host approves that the host's package set holds (beside Astryx, React and StyleX and the packages the set lists). template, build and theme eject counted only the set's listed packages, so a page that imports such an integration got "Install missing dependencies: npm install @acme/astryx-kit" (or, in a folder no package.json holds, "Missing dependencies: ...") although render gives the page that package and it renders as it is.

After this change, those commands count what render serves: an approved integration counts only when the set's own node_modules holds it, as architecture:cli-surface INV30 says, so an approved name the set does not hold is still named missing, as render would fail on it.

Also, render now takes an approved integration only from the package set itself, as architecture:cli-surface INV30 says ("An approved name that root does not hold is left out"). Before, an approved integration that only a folder above the set held still resolved, because served packages resolve from the set's Core folder upward; such a hosted render now fails with the missing-package error, as for a package the set neither holds nor lists.

Problem and solution fit

  1. Why does it happen? render's adapter built its served list (approved integrations plus the set's packages) privately, and template-needs read only the set's packages.
  2. Why does it harm the task? An agent follows the install line: it installs a package the page already has, in a folder that may have no project, or stops to ask.
  3. Why does that matter? Template, build and render are one flow outside a project; their answers must agree on what a page can use.

Expected behavior and authority

  • architecture:cli-surface INV30: outside a project, a page takes the packages the package set provides, which render serves; spec:AST-081 FR3: template, build and theme eject name an unprovided package as missing.

Smallest restoration

  • foundation/runtime/package-root.mjs: hostedPagePackages() returns the approved integrations the serving root's own node_modules holds, then the set's listed packages, the one list; ownPackageDir() is the held check, which the computer-integrations scan now shares.
  • api/render/_adapter.mjs and foundation/discovery/template-needs.mjs both read it.

Evidence

  • Regression tests: outside a project, a page importing @acme/astryx-kit is missing it with no hosted run, and is complete (no missing packages, no install command, no notes) when the host approves it and the set holds it; it fails before the change. An approved name the set does not hold is still named missing. hostedPagePackages() names the held approved integrations, then the set's declared packages.

Scope

Components: CLI (template, build, theme eject, render)

  • 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 after the host-set pull request merged: vitest run --project node over foundation/discovery/template-needs.test.mjs, foundation/runtime/package-set.test.mjs, api/render/hosted-packages.test.mjs, foundation/integrations/computer-integrations.test.mjs and api/render/render.test.mjs: 5 files, 254 passed. tsc --project tsconfig.strict.json: no error in the changed files.

@vercel

vercel Bot commented Nov 17, 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 18, 2026 6:00am UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 6:04 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.

Changes requested: counting approved integrations as installed is right when the host's package set holds the package, but the change also counts an approved name the set does not hold.

  • hostedPagePackages() (packages/cli/foundation/runtime/package-root.mjs:198) returns every approved name, so template, build and theme eject report a page complete that render then fails on with ERR_RENDER_MISSING_DEPENDENCY, although architecture:cli-surface INV30 leaves out an approved name the serving root does not hold; keep only approved names the root's own node_modules holds, as ownPackageDir in packages/cli/foundation/integrations/computer-integrations.mjs does.
  • The changeset's "render already gives the page that integration" and the description's "names only packages the page really lacks" hold only when the set holds the package, so they need the fix above or narrower wording such as "an integration the tool approves and installs".

Next: make the new test's set hold @acme/astryx-kit (today it is an empty package.json, template-needs.test.mjs:477) and add a case where an approved name the set does not hold is still named missing. The rest checks out: render's served list is unchanged, the three named test files pass, and the new test fails on the base.

Claims and files checked

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

Claims:

  • Changeset: outside a project, in a hosted run, the three commands no longer name an approved integration as missing. Verified: foundation/discovery/template-needs.mjs:375, read by api/template/copy/copy.mjs:167, api/build/_adapter.mjs:357 and api/theme/_adapter.mjs:918.
  • Changeset: render already gives the page that integration. False when the package set does not hold it: a hosted render fails with ERR_RENDER_MISSING_DEPENDENCY; true when the set holds it.
  • Description: render serves approved integrations beside Astryx, React, StyleX and the set's listed packages. Verified: foundation/render/served-packages.mjs:45-51, api/render/_adapter.mjs:449; the package must resolve from the set (served-packages.mjs:61-76).
  • Description: before, the commands named an approved integration as missing. Verified: base template-needs.mjs:375; the new test fails on the base.
  • Description: after, the line names only packages the page really lacks. False for an approved name the set does not hold.
  • Description: the cause was render's private list and template-needs reading only the listed packages. Verified: base api/render/_adapter.mjs:439-441.
  • Description: one function returns approved plus listed packages, and both callers read it. Verified: foundation/runtime/package-root.mjs:197-199, api/render/_adapter.mjs:449 and :478, template-needs.mjs:375.
  • Description: the regression test fails before the change. Verified: it fails on the base and passes on the head; its fixture set holds no packages.
  • Description: the governing rules are the outside-a-project package-set rules. Partly: the approved-integration rule is current and also leaves out a name the set does not hold; the quoted install-line wording comes from the unmerged record change in the pull request below.
  • Description: no new public API. Verified: no exports entry reaches foundation/runtime.
  • Description: the three named test files pass (62 tests) and the strict typecheck has no error in the changed files. Verified.
  • Description: public text has no internal context. Verified.

Files:

  • .changeset/template-counts-approved-integrations.md: finding (overstated render claim, line 5).
  • packages/cli/api/render/_adapter.mjs: clear (same served list as before).
  • packages/cli/foundation/discovery/template-needs.mjs: finding (counts an unheld approved name, line 375).
  • packages/cli/foundation/discovery/template-needs.test.mjs: finding (fixture set holds nothing, lines 477-492).
  • packages/cli/foundation/runtime/package-root.mjs: finding (returns every approved name, line 198).

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.

Changes requested: the code now counts only the approved integrations the host's package set holds, which fixes all three earlier findings; one description claim is stale.

  • The Testing section says the three named test files give "3 files, 62 passed", but at this head they give 64 passed because the two new tests are not counted, so please update that line.

Optional: the changeset could also say that render no longer takes an approved integration installed only in a folder above the tool's package set, since a hosted render of that layout now fails where it rendered before.

Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • Changeset: outside a project, in a hosted run, the three commands no longer name an approved and installed integration as missing. Verified: foundation/discovery/template-needs.mjs:375 with foundation/runtime/package-root.mjs:210-216; test template-needs.test.mjs:475-499 fails on the base and passes on the head.
  • Changeset: render already gives the page that integration. Verified for a package in the set's own node_modules: a hosted render on the head renders it.
  • Description: render serves each approved integration the set holds, beside Astryx, React, StyleX and the listed packages. Verified: foundation/render/served-packages.mjs:45-51, api/render/_adapter.mjs:449.
  • Description: before, the three commands counted only the listed packages and printed the install line, or the "Missing dependencies" line in a folder with no package.json. Verified: base template-needs.mjs:375; messages at template-needs.mjs:399-401.
  • Description: after, an approved integration counts only when the set's own node_modules holds it, and an unheld approved name is still named missing. Verified: package-root.mjs:211-214; tests template-needs.test.mjs:475-499 and :501-510.
  • Description: the cause was render's private list and template-needs reading only the listed packages. Verified: base api/render/_adapter.mjs:439-441.
  • Description: the three commands and render form one flow and must agree. Consistent with the change: both now read one list.
  • Description: the governing rules are the outside-a-project package-set rule and the rule that these commands name an unprovided package as missing. Verified in substance: the current approved-integration rule covers this change; the explicit "named missing" wording comes from the record change in the pull request below.
  • Description: one function returns the held approved integrations, then the listed packages, and its held check is shared with the integration scan. Verified: package-root.mjs:197-216, foundation/integrations/computer-integrations.mjs:260-263.
  • Description: render and template-needs both read it. Verified: api/render/_adapter.mjs:449 and :478, template-needs.mjs:375.
  • Description: the regression test names the package missing with no hosted run and complete when the host approves it and the set holds it, and fails before the change. Verified: it fails on the base and passes on the head.
  • Description: an approved name the set does not hold is still named missing. Verified: template-needs.test.mjs:501-510 passes.
  • Description: the function names the held approved integrations, then the declared packages. Verified: package-set.test.mjs:467-489.
  • Description: one defect, and no public API hidden under the fix. Verified: no exports entry or bin reaches the changed modules.
  • Description: public text has no internal context. Verified.
  • Description: the three named test files give 3 files, 62 passed. False: they give 64 passed at this head.
  • Description: the strict typecheck reports no error in the changed files. Verified: its two errors are in unchanged templates that need built themes.

Files:

  • .changeset/template-counts-approved-integrations.md: clear (optional note above).
  • packages/cli/api/render/_adapter.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.test.mjs: clear.
  • packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • packages/cli/foundation/runtime/package-root.mjs: clear.
  • packages/cli/foundation/runtime/package-set.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/served-set-template-packages branch from 2e9fab8 to ef2c6d7 Compare November 17, 2026 19:55
@josephfarina
josephfarina force-pushed the josephfarina/template-counts-approved-integrations-v2 branch from 9172fb7 to 8f05e61 Compare November 17, 2026 19:55

@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 the pull request is a draft. Outside a project, template, build and theme eject now count an approved integration the host's package set holds, from the same list render serves, and the earlier Testing-line finding is fixed. Next, mark the pull request ready for review so CI runs; it lands after the pull request below it merges.

Optional: a hosted-packages.test.mjs case that approves an integration held in the set, and one held only above it, would pin the render half in a committed test.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Description: outside a project, in a hosted run, render serves each approved integration the set holds, beside Astryx, React, StyleX and the listed packages. Verified: foundation/runtime/package-root.mjs:210-216, api/render/_adapter.mjs:453; a hosted render of a page importing a held approved package renders.
  • Description: before, the three commands counted only the listed packages and printed an install line, or the "Missing dependencies" line in a folder with no package.json. Verified: base foundation/discovery/template-needs.mjs:375, messages at :399-401; a hosted template copy on the base names the package missing.
  • Description: after, an approved integration counts only when the set's own node_modules holds it, and an unheld approved name is still named missing. Verified: package-root.mjs:211-214; tests template-needs.test.mjs:475-499 and :501-510.
  • Description: render now takes an approved integration only from the set itself; one held only in a folder above the set rendered before and now fails with the missing-package error. Verified: a hosted render of that layout renders on the base and fails on the head.
  • Description: the cause was render's private list and template-needs reading only the listed packages. Verified: base api/render/_adapter.mjs:443-444.
  • Description: an agent follows the install line, and the three commands and render form one flow that must agree. Consistent with the change: they now read one list.
  • Description: the governing rules are the outside-a-project package-set rule and the rule that these commands name an unprovided package as missing. Verified in substance: the current rules on approved integrations outside a project and on approved names the set does not hold cover this change; the explicit "named missing" wording comes from the record change in the pull request below.
  • Description: one function returns the held approved integrations, then the listed packages, and its held check is shared with the integration scan. Verified: package-root.mjs:197-216, foundation/integrations/computer-integrations.mjs:260-263.
  • Description: render and template-needs both read it. Verified: api/render/_adapter.mjs:453 and :484, template-needs.mjs:375.
  • Description: the regression test names the package missing with no hosted run and complete when the host approves it and the set holds it, and fails before the change. Verified: it fails on the base and passes on the head.
  • Description: an approved name the set does not hold is still named missing. Verified: template-needs.test.mjs:501-510 passes.
  • Description: the function names the held approved integrations, then the declared packages. Verified: package-set.test.mjs:470-489.
  • Description: one defect, and no public API, visual, default or interaction model hidden under the fix. Verified: no exports entry or bin reaches the changed modules; the render narrowing is disclosed.
  • Description: public text has no internal context. Verified.
  • Description: the four named test files give 4 files, 74 passed. Verified at this head: 37, 25, 2 and 10 tests.
  • Description: the strict typecheck reports no error in the changed files. Verified: its two errors are in unchanged templates that need built themes.
  • Description: stacked on the pull request that makes a page take the packages its host's set lists. Verified: the base branch is that pull request's.
  • Changeset: in a hosted run outside a project, template, build and theme eject no longer name an approved, installed integration as missing. Verified: the red-first test and a hosted template copy of a page that integration contributes (named missing on the base, not on the head); call sites api/template/copy/copy.mjs:167, api/build/_adapter.mjs:375, api/theme/_adapter.mjs:918.
  • Changeset: render already gives the page that integration. Verified: a hosted render of a held approved package renders on the base and the head.
  • Changeset: render now takes an approved integration only from the set itself, not from a folder above it. Verified: hosted render probe.

Files:

  • .changeset/template-counts-approved-integrations.md: clear.
  • packages/cli/api/render/_adapter.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.test.mjs: clear.
  • packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • packages/cli/foundation/runtime/package-root.mjs: clear.
  • packages/cli/foundation/runtime/package-set.test.mjs: clear (optional test note above).

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/template-counts-approved-integrations-v2 branch from 8f05e61 to 6324914 Compare November 17, 2026 20:46
@josephfarina
josephfarina changed the base branch from josephfarina/served-set-template-packages to main November 17, 2026 20:46
@josephfarina
josephfarina marked this pull request as ready for review November 17, 2026 20:46
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · cbf3dbb

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.39 MB packed (+292 B); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@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 for one sentence in the description; the code is right. Outside a project, template, build and theme eject now count an approved integration the host's package set holds, from the same list render serves, and the regression tests and a hosted render check confirm both halves.

  • Miss: the User impact section says a hosted render of an approved integration held only above the set "now fails with the missing-package error, as for any package the set does not hold", but a package the set's package.json lists that only a folder above the set holds still renders (served names resolve from the set's Core folder upward, and hostedPagePackages() checks only approved names), so reword it to "as for a package the set neither holds nor lists" or drop the comparison.

Nothing else needs to change. The CI workflow found no capacity on this revision and needs a re-run; Lint and the CLI smoke test passed.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Description: in a hosted run outside a project, render serves each approved integration the set holds, beside Astryx, React, StyleX and the listed packages. Verified: packages/cli/foundation/runtime/package-root.mjs:210-216, packages/cli/api/render/_adapter.mjs:453; a hosted render of a held approved package renders.
  • Description: before, the three commands counted only the listed packages and printed an install line, or the "Missing dependencies" line in a folder with no package.json. Verified: base packages/cli/foundation/discovery/template-needs.mjs:375 and its notes; the new test, run on the base, gets the "Missing dependencies" note.
  • Description: after, an approved integration counts only when the set's own node_modules holds it, and an unheld approved name is still named missing. Verified: package-root.mjs:211-214; template-needs.test.mjs:475-499 and :501-510.
  • Description: render now takes an approved integration only from the set; one held only above the set rendered before and now fails with the missing-package error. Verified: a hosted render of that layout renders on the base and fails on the head.
  • Description: that failure is the same "as for any package the set does not hold". False: a listed package held only above the set renders on the head.
  • Description: the cause was render's private served list and template-needs reading only the listed packages. Verified: base packages/cli/api/render/_adapter.mjs:443-444, base template-needs.mjs:375.
  • Description: an agent follows the install line, and the three commands and render form one flow that must agree. Consistent with the change: they now read one list.
  • Description: the governing rules are the outside-a-project package-set rule and the rule that these commands name an unprovided package as missing. Verified at the current records.
  • Description: one function returns the held approved integrations, then the listed packages, and its held check is shared with the integration scan. Verified: package-root.mjs:197-216, packages/cli/foundation/integrations/computer-integrations.mjs:260-263.
  • Description: render and template-needs both read it. Verified: _adapter.mjs:453 and :484, template-needs.mjs:375.
  • Description: the regression test names the package missing with no hosted run, is complete when the host approves it and the set holds it, and fails before the change. Verified: it fails on the base and passes on the head.
  • Description: the list function names the held approved integrations, then the declared packages. Verified: package-set.test.mjs:470-489.
  • Description: one defect, with no public API, visual, default or interaction model hidden under the fix, and no internal context. Verified: no exports entry or bin reaches the changed modules.
  • Description: the five named test files give 5 files, 251 passed. Verified at this head.
  • Description: the strict typecheck reports no error in the changed files. Verified: its two errors are in unchanged templates that need a built theme.
  • Changeset: in a hosted run outside a project, template, build and theme eject no longer name an approved, installed integration as missing. Verified: the red-first test; call sites api/template/copy/copy.mjs:167, api/build/_adapter.mjs:375, api/theme/_adapter.mjs:918.
  • Changeset: render already gives the page that integration. Verified: a hosted render of a held approved package renders on the base and the head.
  • Changeset: render now takes an approved integration only from the set itself, not from a folder above it. Verified: hosted render check.

Files:

  • .changeset/template-counts-approved-integrations.md: clear.
  • packages/cli/api/render/_adapter.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.test.mjs: clear.
  • packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • packages/cli/foundation/runtime/package-root.mjs: clear.
  • packages/cli/foundation/runtime/package-set.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: the CI workflow found no capacity on this head and needs a re-run; Lint and the CLI smoke test passed. Outside a project, template, build and theme eject now count an approved integration the host's package set holds, from the same list render serves, and the reworded description now matches what render does for an approved integration held only above the set.

Nothing else needs to change.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Description: in a hosted run outside a project, render serves each approved integration the package set holds, beside Astryx, React, StyleX and the listed packages. Verified: packages/cli/foundation/runtime/package-root.mjs:210-216, packages/cli/api/render/_adapter.mjs:453; a hosted render of a held approved package renders.
  • Description: before, template, build and theme eject counted only the listed packages, so such a page got an install line, or the "Missing dependencies" line in a folder with no package.json. Verified: base packages/cli/foundation/discovery/template-needs.mjs:375 and the notes at template-needs.mjs:399-401; the new test fails on the base.
  • Description: after, an approved integration counts only when the set's own node_modules holds it, and an approved name the set does not hold is still named missing, as render fails on it. Verified: package-root.mjs:197-200 and :212-214; template-needs.test.mjs:501-510; a hosted render check.
  • Description: render now takes an approved integration only from the set; before, one held only above the set resolved, because served packages resolve from the Core folder upward. Verified: packages/cli/foundation/render/served-packages.mjs:61-77; that render succeeds on the base and fails on the head.
  • Description: that render now fails with the missing-package error, as for a package the set neither holds nor lists. Verified: both get the same ERR_RENDER_MISSING_DEPENDENCY refusal on the head.
  • Description: the cause was render's private served list and template-needs reading only the listed packages. Verified: base packages/cli/api/render/_adapter.mjs:443-445, base template-needs.mjs:375.
  • Description: an agent follows the install line, and these commands and render form one flow that must agree. Consistent with the change: they now read one list.
  • Description: the governing rules are the outside-a-project package-set rule and the rule that these commands name an unprovided package as missing. Verified at the current records.
  • Description: one function returns the held approved integrations, then the listed packages, and its held check is shared with the integration scan. Verified: package-root.mjs:190-216, packages/cli/foundation/integrations/computer-integrations.mjs:260-263.
  • Description: render and template-needs both read it. Verified: _adapter.mjs:453 and :484, template-needs.mjs:375.
  • Description: the regression test names the package missing with no hosted run, is complete when the host approves it and the set holds it, and fails before the change. Verified: template-needs.test.mjs:475-499 fails on the base and passes on the head.
  • Description: the list function names the held approved integrations, then the declared packages. Verified: packages/cli/foundation/runtime/package-set.test.mjs:470-488.
  • Description: one defect, with no new public API, visual representation, default or interaction model, and no internal context. Verified: no exports entry or bin reaches the changed modules; no internal context found.
  • Description: the five named test files give 5 files, 251 passed. Verified at this head.
  • Description: the strict typecheck reports no error in the changed files. Verified: its two errors are in unchanged page templates.
  • Changeset: outside a project, template, build and theme eject no longer name an integration the tool approves and installs as a missing dependency. Verified: the red-first test; callers api/template/copy/copy.mjs:167, api/build/_adapter.mjs:375, api/theme/_adapter.mjs:918.
  • Changeset: render already gives the page that integration. Verified: a held approved package renders on the base and the head.
  • Changeset: render now takes an approved integration only from the package set itself, not from a folder above it. Verified: a hosted render check on the base and the head.

Files:

  • .changeset/template-counts-approved-integrations.md: clear.
  • packages/cli/api/render/_adapter.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.test.mjs: clear.
  • packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • packages/cli/foundation/runtime/package-root.mjs: clear.
  • packages/cli/foundation/runtime/package-set.test.mjs: clear.

Automated review (maintainer link)

…ost's set holds it

INV30 leaves out an approved name the root serving the run does not hold, and
render fails on such an import, so template, build and theme eject still name
it missing. ownPackageDir (own node_modules only) moves to package-root.mjs and
the computer-integrations scan shares it.
@josephfarina
josephfarina force-pushed the josephfarina/template-counts-approved-integrations-v2 branch from a7f0e24 to 1992e49 Compare November 18, 2026 05:13
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 1992e49

@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 for one line in the description; the code is right. Outside a project, template, build and theme eject now count an approved integration the host's package set holds, from the same list render serves, and render no longer takes one from a folder above the set.

  • Regression: the Testing line says the five named test files give "5 files, 251 passed", but after the rebase onto main they give 5 files, 254 passed (three new render.test.mjs cases came in from main), so update the count to 254 or drop it.

Nothing else needs to change.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Description: in a hosted run outside a project, render serves each approved integration the package set holds, beside Astryx, React, StyleX and the listed packages. Verified: packages/cli/foundation/runtime/package-root.mjs:210-216, packages/cli/api/render/_adapter.mjs:485; a hosted render of a held approved package renders.
  • Description: before, template, build and theme eject counted only the listed packages, so such a page got an install line, or the "Missing dependencies" line in a folder with no package.json. Verified: base packages/cli/foundation/discovery/template-needs.mjs:387 and its notes at :408-417; the new test fails on the base.
  • Description: after, an approved integration counts only when the set's own node_modules holds it, and an approved name the set does not hold is still named missing, as render fails on it. Verified: package-root.mjs:197-200 and :213; template-needs.test.mjs:501-510; a hosted render check.
  • Description: render now takes an approved integration only from the set; before, one held only above the set resolved through the served Core folder's lookup. Verified: packages/cli/foundation/render/served-packages.mjs:61-77; that render succeeds on the base and fails on the head.
  • Description: that render now fails with the missing-package error, as for a package the set neither holds nor lists. Verified: both get the same ERR_RENDER_MISSING_DEPENDENCY refusal on the head.
  • Description: the cause was render's private served list and template-needs reading only the listed packages. Verified: base packages/cli/api/render/_adapter.mjs:475-476, base template-needs.mjs:387.
  • Description: an agent follows the install line, and these commands and render form one flow that must agree. Consistent with the change: they now read one list.
  • Description: the governing rules are the outside-a-project package-set rule and the rule that these commands name an unprovided package as missing. Verified at the current records.
  • Description: one function returns the held approved integrations, then the listed packages, and its held check is shared with the integration scan. Verified: package-root.mjs:190-216, packages/cli/foundation/integrations/computer-integrations.mjs:260-263.
  • Description: render and template-needs both read it. Verified: _adapter.mjs:485 and :516, template-needs.mjs:387.
  • Description: the regression test names the package missing with no hosted run, is complete when the host approves it and the set holds it, and fails before the change. Verified: template-needs.test.mjs:475-499 fails on the base and passes on the head.
  • Description: an approved name the set does not hold is still named missing. Verified: template-needs.test.mjs:501-510.
  • Description: the list function names the held approved integrations, then the declared packages. Verified: packages/cli/foundation/runtime/package-set.test.mjs:470-488.
  • Description: one defect, with no new public API, visual representation, default or interaction model, and no internal context. Verified: no exports entry or bin reaches the changed modules; no internal context found.
  • Description: the five named test files give 5 files, 251 passed. False: they give 5 files, 254 passed at this head.
  • Description: the strict typecheck reports no error in the changed files. Verified: its two errors are in unchanged page templates.
  • Changeset: outside a project, template, build and theme eject no longer name an integration the tool approves and installs as a missing dependency. Verified: the red-first test; callers api/template/copy/copy.mjs:168, api/build/_adapter.mjs:375, api/theme/_adapter.mjs:919.
  • Changeset: render already gives the page that integration. Verified: a held approved package renders on the base and the head.
  • Changeset: render now takes an approved integration only from the package set itself, not from a folder above it. Verified: a hosted render check on the base and the head.

Files:

  • .changeset/template-counts-approved-integrations.md: clear.
  • packages/cli/api/render/_adapter.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.test.mjs: clear.
  • packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • packages/cli/foundation/runtime/package-root.mjs: clear.
  • packages/cli/foundation/runtime/package-set.test.mjs: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec cbf3dbb

@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: Lint and the CLI smoke test passed on this head, but the CI workflow found no room under its ceiling and needs a re-run of all jobs. Outside a project, template, build and theme eject now count an approved integration the host's package set holds, from the same list render serves, and render no longer takes one from a folder above the set. The Testing line now matches what the five named test files give (254 passed), which was the only open point from the last review.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.

Claims:

  • Description: in a hosted run outside a project, render serves each approved integration the package set holds, beside Astryx, React, StyleX and the listed packages. Verified: packages/cli/foundation/runtime/package-root.mjs:210-216, packages/cli/api/render/_adapter.mjs:485; a hosted render of a held approved package renders.
  • Description: before, template, build and theme eject counted only the listed packages, so such a page got an install line, or the "Missing dependencies" line in a folder with no package.json. Verified: base packages/cli/foundation/discovery/template-needs.mjs:387 and its notes; the new test fails on the base.
  • Description: after, an approved integration counts only when the set's own node_modules holds it, and an approved name the set does not hold is still named missing, as render fails on it. Verified: package-root.mjs:197-200 and :213; template-needs.test.mjs:501-510.
  • Description: render now takes an approved integration only from the set; before, one held only above the set resolved through the served Core folder's lookup, and such a render now fails with the missing-package error, as for a package the set neither holds nor lists. Verified: packages/cli/foundation/render/served-packages.mjs:61-77; a hosted render of such a package succeeds on the base and fails on the head with the same refusal as an unlisted package.
  • Description: the cause was render's private served list and template-needs reading only the listed packages. Verified: base packages/cli/api/render/_adapter.mjs:475-477, base template-needs.mjs:387.
  • Description: an agent follows the install line, and these commands and render form one flow that must agree. Consistent with the change: they now read one list.
  • Description: the governing rules are the outside-a-project package-set rule and the rule that these commands name an unprovided package as missing. Verified at the current records.
  • Description: one function returns the held approved integrations, then the listed packages, and its held check is shared with the integration scan. Verified: package-root.mjs:197-216, packages/cli/foundation/integrations/computer-integrations.mjs:260-263 and :282.
  • Description: render and template-needs both read it. Verified: _adapter.mjs:485 and :516, template-needs.mjs:387.
  • Description: the regression test names the package missing with no hosted run, is complete when the host approves it and the set holds it, and fails before the change. Verified: template-needs.test.mjs:475-499 fails on the base and passes on the head.
  • Description: an approved name the set does not hold is still named missing. Verified: template-needs.test.mjs:501-510.
  • Description: the list function names the held approved integrations, then the declared packages. Verified: packages/cli/foundation/runtime/package-set.test.mjs:470-488, which fails on the base.
  • Description: one defect, with no new public API, visual representation, default or interaction model, and no internal context. Verified: no exports entry or bin reaches the changed modules; no internal context found.
  • Description: the five named test files give 5 files, 254 passed. Verified at this head.
  • Description: the strict typecheck reports no error in the changed files. Verified: its two errors are in unchanged page templates.
  • Changeset: outside a project, template, build and theme eject no longer name an integration the tool approves and installs as a missing dependency. Verified: the red-first test; callers api/template/copy/copy.mjs:168, api/build/_adapter.mjs:375, api/theme/_adapter.mjs:919.
  • Changeset: render already gives the page that integration. Verified: a held approved package renders on the base and the head.
  • Changeset: render now takes an approved integration only from the package set itself, not from a folder above it. Verified: a hosted render check on the base and the head.

Files:

  • .changeset/template-counts-approved-integrations.md: clear.
  • packages/cli/api/render/_adapter.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.mjs: clear.
  • packages/cli/foundation/discovery/template-needs.test.mjs: clear.
  • packages/cli/foundation/integrations/computer-integrations.mjs: clear.
  • packages/cli/foundation/runtime/package-root.mjs: clear.
  • packages/cli/foundation/runtime/package-set.test.mjs: clear.

Automated review (maintainer link)

@josephfarina josephfarina reopened this Nov 18, 2026
@josephfarina
josephfarina merged commit 39e859a into main Nov 18, 2026
134 of 140 checks passed
@github-actions
github-actions Bot deleted the josephfarina/template-counts-approved-integrations-v2 branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — cbf3dbba Deployed Nov 18, 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