Repository navigation
fix(cli): theme build --check and doctor ignore which CLI release, and which command name, built a theme - #12282
josephfarina wants to merge 7 commits into
Conversation
…lt a theme Each theme output's header names the CLI release that built it. --check and doctor's theme-local-builds compared that line as content, so every update of the CLI that answers marked every local theme stale, though a rebuild changed only that line. The comparison now leaves out the header's CLI line; the Core line and all real content still count. AST-050 FR8 states the rule.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Waiting on a spec decision: the code does what it says, since with the header's CLI: line ignored, theme build --check and doctor pass outputs that another CLI release built, and a different Core: line still fails them.
Approval needs an engineering-owner decision on the sentence this pull request adds to spec:AST-050 FR8: "An output's header names the CLI release that built it. That line alone never makes an output stale: an output that another CLI release built checks clean when everything else matches." No current spec claim already says whether that header line counts, so 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.
Blocking, independent of that decision:
- The Testing section names
api/integration/verify.test.mjs, which does not exist in the repository, so name the test file that actually timed out or drop that sentence.
A non-blocking note on the CLI: filter's scope is inline.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset:
theme build --checkand doctor no longer call outputs stale only because another CLI release built them: verified (new test inbuild.test.mjs; doctor runs the same check). - Changeset: each output's header still names the CLI release that built it: verified (the header writer in
build.mjsis unchanged). - Changeset: before, every CLI update made every local theme stale although only that line changed: verified (the new test fails on the base).
- Changeset: the answering CLI can be a global install or a tool that runs it: verified (the global-mode spec's rule for projects without their own CLI).
- Description:
--checkand doctor compared theCLI:line as content on the base: verified (the base comparison dropped only theCommand:line). - Description: afterwards the
Core:line and real content still count: verified (the new test's Core case and a terminal run). - Description:
withoutBuildCommandLineis split out andintegration verifybehaves as before: verified (same filter; pack-check tests pass). - Description: FR8 is amended with the quoted sentence: verified; it is not yet approved.
- Description: the cited global-mode FR1 says one release gives the same files through every door: accurate, but it covers a single release only.
- Description: the manual before/after evidence: consistent (reproduced with a four-output theme).
- Description: the build and pack-check suites pass (236, 1 skipped) and the doctor theme suite passes (79): verified.
- Description:
api/integration/verify.test.mjstimes out locally: false, no such file exists. - Description: strict typecheck and the knowledge check pass: verified.
- Description: no new public API and no internal context: verified (unchanged API surface; no residue).
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: needs an engineering-owner decision on the new FR8 sentence.packages/cli/api/integration/pack-check.mjs: clear.packages/cli/api/theme/build/build.mjs: non-blocking note on the filter's scope.packages/cli/api/theme/build/build.test.mjs: clear (fails on the base, passes on the head).
…ot the CLI line AST-050 FR8 now says what --check compares: each output against what the build writes from the theme's inputs, the header's Core line included. Tests cover a CLI-line-only difference (not stale), content drift beside another release's header (stale), a Core-line difference (stale), and pack-check's build comparison leaving out only the CLI line.
|
Owner decision (engineering owner, covering this pull request): a theme output is stale when the theme's inputs or the output's content differ. The output header's CLI release line only records which release built the file, so a difference in that line alone never makes an output stale; the header's Core line and the content still count. |
|
/approve-spec 701b273 |
There was a problem hiding this comment.
Changes requested: the code does what it says, and the spec:AST-050 FR8 amendment it rests on is approved by an engineering owner at this head, so one description claim is all that stands in the way.
- The Testing section names
api/integration/verify.test.mjs, which does not exist in the repository, so name the test file that actually timed out or drop that sentence.
While you edit the description, update its test count (237 passed and 1 skipped in the two named files at this head) and quote the whole amended FR8 passage, including the new Core: sentence. A description-only edit keeps the existing spec approval; a new commit needs a new /approve-spec. CI's Node test legs stopped before running any test because the repository-wide Node suite plans past its time budget; this change adds no test file and does not cause that.
Claims and files checked
Review mode: full; reason: spec-record
- Changeset:
theme build --checkand doctor no longer call a local theme's outputs stale only because another CLI release built them: verified (new tests inbuild.test.mjsandpack-check.test.mjsfail on the base and pass here; doctor runs the same check). - Changeset: each output's header still names the CLI release that built it: verified (the header writer in
build.mjsis unchanged). - Changeset: before, every update of the answering CLI marked every local theme stale although a rebuild changed only that line: verified (the real CLI exits 1 on the base for a
CLI:-line-only difference). - Changeset: that CLI can be a global install or a tool that runs it: verified (the global-mode spec answers a project without its own CLI with the copy that started the run).
- Description: the header names the CLI release, and the base compared that line as content because the comparison dropped only the
Command:line: verified (basenormalizeThemeBuildForCompare). - Description: the quoted failure messages of
--checkand doctor: verified (both strings exist in the source). - Description: in a project without its own CLI, with people on different global releases, or after a patch update of a project's CLI, the check failed for a header-only change: verified by the same base failure.
- Description: after the change the
CLI:line no longer decides staleness, while theCore:line and content still count: verified (tests and a scratch-theme run). - Description: FR8 is amended with the quoted sentence: verified, though the quote predates the second commit, which also adds the
Core:sentence. - Description: the global-mode spec's FR1 says one release gives the same files through every door: verified as a paraphrase; it covers one release, not different releases.
- Description:
withoutBuildCommandLineis split out,--checkalso leaves out theCLI:line, and doctor uses the same comparison: verified. - Description:
integration verifybehaves exactly as before: verified (its normalizer's input is byte-for-byte the old one; its tests pass). - Description: an app with 6 outputs flips from stale to up to date: consistent (reproduced with a 4-output scratch theme, not with that app).
- Description: the regression test covers another CLI release (up to date) and another Core (stale): verified.
- Description: build and pack-check tests, 236 passed and 1 skipped: stale count, 237 passed and 1 skipped at this head; doctor theme checks, 79 passed: verified.
- Description:
api/integration/verify.test.mjstimes out locally: false, no such file exists. - Description: strict typecheck has no error in the changed files, and the knowledge check passes: verified.
- Description: no new public API, and no internal context in public text: verified (no surface change in any published package).
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: clear (owner-approved at this head).packages/cli/api/integration/pack-check.mjs: clear.packages/cli/api/integration/pack-check.test.mjs: clear.packages/cli/api/theme/build/build.mjs: non-blocking note on theCLI:filter's whole-file scope (existing inline thread).packages/cli/api/theme/build/build.test.mjs: clear.
|
/approve-spec 8254cb4 |
There was a problem hiding this comment.
Changes requested: the code does what it says, and the spec:AST-050 FR8 amendment it rests on is approved by an engineering owner at this head, so one description claim is all that stands in the way.
- The Writing rubric results line says the record change is one sentence, but the FR8 amendment adds three sentences, so correct the count or drop it.
A description edit keeps the existing spec approval; a new commit needs a new /approve-spec. CI's Node test legs stopped before running any test because the repository-wide Node suite plans past its time budget; this change adds no test file and does not cause that. The non-blocking note on the CLI: filter's scope stays inline.
Claims and files checked
Review mode: incremental; reason: none
- Changeset:
theme build --checkand doctor no longer call a local theme's outputs stale only because another CLI release built them: verified (new tests inbuild.test.mjsandpack-check.test.mjsfail on the base and pass here; a real local theme fork checks clean after a CLI version change). - Changeset: each output's header still names the CLI release that built it: verified (the header writer in
build.mjsis unchanged). - Changeset: before, every update of the answering CLI marked every local theme stale although a rebuild changed only that line: verified (on the base, a CLI version change alone fails all six outputs and doctor's check).
- Changeset: that CLI can be a global install or a tool that runs it: verified (the global-mode spec answers a project without its own CLI with the copy that started the run).
- Description: the header names the CLI release, and
--checkand doctor compared that line as content because the comparison dropped only theCommand:line: verified (basenormalizeThemeBuildForCompare). - Description: the quoted
--checkand doctor failure messages: verified (both strings exist in the source). - Description: in a project without its own CLI, with people on different global releases, or after a patch update of a project's CLI, the check failed for a header-only change: verified by the same base failure.
- Description: after the change the
CLI:line no longer decides staleness, while the header still names the release and theCore:line and content still count: verified (tests and real CLI runs). - Description: the base compared the
CLI:andCore:lines verbatim on the assumption that the toolchain is the project's: verified (base doc comment). - Description: FR8 is amended with the quoted passage: verified (word for word,
spec.md:231-235). - Description: the global-mode spec's FR1 says one release gives the same files through every door: verified as a paraphrase; it covers one release.
- Description:
withoutBuildCommandLineis split out,--checkalso leaves out theCLI:line, and doctor uses the same comparison: verified. - Description:
integration verifybehaves exactly as before: verified (its normalizer's input is byte-for-byte the old one; its tests pass). - Description: an app with its own CLI and an ejected neutral theme goes from six stale outputs and a failing doctor check to up to date and passing when only the CLI version changes: verified (reproduced on the base and here).
- Description: the regression tests cover another CLI release (up to date), content drift beside it (stale) and another Core (stale), and the comparison leaves out only the
CLI:line: verified. - Description: one defect restored, no tagalongs, no new public API or default, and no internal context in public text: verified (no surface change in any published package).
- Description: Writing rubric, one record change in present tense stating the rule and its consequence with no history or project status: verified; "one sentence": false, the amendment adds three sentences.
- Description: build and pack-check tests, 237 passed and 1 skipped; doctor theme checks, 79 passed: verified (same counts here).
- Description: strict typecheck has no error in the changed files, and the knowledge check passes: verified.
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: clear (owner-approved at this head).packages/cli/api/integration/pack-check.mjs: clear.packages/cli/api/integration/pack-check.test.mjs: clear.packages/cli/api/theme/build/build.mjs: non-blocking note on theCLI:filter's whole-file scope (existing inline thread).packages/cli/api/theme/build/build.test.mjs: clear.
|
/approve-spec c029708 |
There was a problem hiding this comment.
Approved pending CI: the theme build --check and doctor change does what it says, and the spec:AST-050 FR8 amendment it rests on is approved by an engineering owner at this head.
CI's Node test legs stopped before running any test because the repository-wide Node suite plans past its time budget; this change adds no test file and does not cause that, but the merge still waits for the required checks to pass. The earlier description count is fixed, and the non-blocking note on the CLI: filter's whole-file scope stays inline.
Claims and files checked
Review mode: incremental; reason: none
- Changeset:
theme build --checkand doctor no longer call a local theme's outputs stale only because another CLI release built them: verified (the new tests inbuild.test.mjsandpack-check.test.mjsfail on the base and pass here; a real local theme fork checks clean after a CLI version change). - Changeset: each output's header still names the CLI release that built it: verified (the header writer in
build.mjsis unchanged). - Changeset: before, every update of the answering CLI marked every local theme stale although a rebuild changed only that line: verified (on the base, a CLI version change alone fails all six outputs and doctor's check).
- Changeset: that CLI can be a global install or a tool that runs it: verified (the global-mode spec answers a project without its own CLI with the copy that started the run).
- Description: the header names the CLI release, and
--checkand doctor compared that line as content because the comparison dropped only theCommand:line: verified (basenormalizeThemeBuildForCompare). - Description: the quoted
--checkand doctor failures: verified (the--checkline matches the source; the doctor line abbreviates the real[fail] theme-local-builds - Local theme build freshness - …output with the same message). - Description: in a project without its own CLI, with people on different global releases, or after a patch update of a project's CLI, the check failed for a header-only change: verified by the same base failure.
- Description: after the change the
CLI:line no longer decides staleness, while the header still names the release and theCore:line and content still count: verified (tests and real CLI runs). - Description: the base compared the
CLI:andCore:lines verbatim on the assumption that the toolchain is the project's: verified (base doc comment). - Description: FR8 is amended with the quoted passage: verified (word for word,
spec.md:231-235). - Description: the global-mode spec's FR1 says one release gives the same files through every door: verified as a paraphrase; it covers one release.
- Description:
withoutBuildCommandLineis split out,--checkalso leaves out theCLI:line, and doctor uses the same comparison: verified. - Description:
integration verifybehaves exactly as before: verified (its normalizer's input is byte-for-byte the old one; its tests pass). - Description: an app with its own CLI and an ejected neutral theme goes from six stale outputs and a failing doctor check to up to date and passing when only the CLI version changes: verified (reproduced on the base and here).
- Description: the regression tests cover another CLI release (up to date), content drift beside it (stale) and another Core (stale), and the comparison leaves out only the
CLI:line: verified. - Description: one defect restored, no tagalongs, no new public API, visual, default or interaction model, and no internal context in public text: verified (no surface change in any published package).
- Description: Writing rubric, one record change of three present-tense sentences stating what
--checkcompares, what the CLI line records and that this line alone never makes an output stale, with no history or project status: verified. - Description: build and pack-check tests, 237 passed and 1 skipped; doctor theme checks, 79 passed: verified (316 passed and 1 skipped over the three files here).
- Description: strict typecheck has no error in the changed files, and the knowledge check passes: verified (the two strict typecheck errors are unbuilt-theme imports in two page templates).
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: clear (owner-approved at this head).packages/cli/api/integration/pack-check.mjs: clear.packages/cli/api/integration/pack-check.test.mjs: clear.packages/cli/api/theme/build/build.mjs: non-blocking note on theCLI:filter's whole-file scope (existing inline thread).packages/cli/api/theme/build/build.test.mjs: clear.
A built module's doc comment names the command that built it. Modules built while the CLI ran under one command name (a package runner, or a tool that runs the CLI for its users) were stale under any other, though only that name differed. The --check comparison now treats that command as a placeholder, as integration verify already does; the theme name on the line still counts. BUILT_BY_LINE moves to build.mjs and pack-check imports it. AST-050 FR8 says both lines alone never make an output stale.
|
Owner decision (engineering owner, covering this pull request): provenance is not an input. |
|
/approve-spec ce038da |
There was a problem hiding this comment.
Changes requested: the theme build --check and doctor change does what it says, and the spec:AST-050 FR8 amendment it rests on is approved by an engineering owner at this head, but one piece of logic is copied instead of shared.
normalizeThemeBuildForCompare(packages/cli/api/theme/build/build.mjs:876-881) copies the one-built-by-line placeholder thatnormalizeThemeVerifyForComparealready implements (packages/cli/api/integration/pack-check.mjs:133-138); export one helper besideBUILT_BY_LINEand call it from both, sotheme build --checkandintegration verifycannot drift apart on that line.
The fix is a new commit, so an engineering owner comments /approve-spec again for that head. Two non-blocking notes are inline: two comments still list only the Command: and CLI: lines, and the CLI: filter covers the whole file rather than the header.
Claims and files checked
Review mode: full; reason: spec-record
- Changeset:
theme build --checkand doctor no longer call outputs stale only because another CLI release built them or the CLI ran under another command name: verified (the new tests fail on the base and pass here; real CLI runs in an app with a local theme). - Changeset: each output's header still names the release, and a built module still names the build command: verified (the writers in
build.mjsare unchanged). - Changeset: before, every update of the answering CLI marked every local theme stale: verified (on the base, a difference in the
CLI:lines alone fails all six outputs and doctor's check). - Changeset: so did building under one command name and checking under another: verified (on the base, a difference in the built-by command alone fails the module and doctor's check).
- Changeset: that CLI can be a global install or a tool that runs it: verified (the global-mode spec answers a project without its own CLI with the copy that started the run, and the CLI-command picker names a tool's command).
- Description: the header names the CLI release, and
--checkand doctor compared that line as content: verified (the base comparison dropped only theCommand:line). - Description: the quoted
--checkand doctor failures: verified (the--checkline matches the source; the doctor line abbreviates the real output with the same message). - Description: a global install, two people on different releases, or a patch update in CI each fail the check for a header-only change: verified by the same base failure.
- Description: a built module's comment names the command, and a module built under one command name is stale under another: verified (base behavior and the red-first tests).
- Description: in a check of 24 agent-built apps, the 8 failures differed only in these two kinds of line: not reproducible here (the apps are not in the repository); the two kinds are exactly the two lines the change normalizes.
- Description: after the change neither line decides staleness, while the header and module still name them and the
Core:line, theme name and content still count: verified (tests and real CLI runs). - Description: the base compared the
CLI:andCore:lines verbatim on the assumption that the toolchain is the project's: verified (the base doc comment). - Description: the app-themes spec's FR8 is amended with the quoted passage: verified (word for word).
- Description: the global-mode spec's FR1 has one release give the same files through every door: verified as a paraphrase.
- Description:
withoutBuildCommandLineis split out,--checkleaves out theCLI:line and compares the built-by command as a placeholder,BUILT_BY_LINEmoves intobuild.mjs, and doctor uses the same comparison: verified, but the placeholder code is copied rather than shared (blocking finding). - Description:
integration verifybehaves exactly as before: verified (same input, same pattern; its tests pass). - Description: an app with its own CLI and a local theme goes from six stale outputs and a failing doctor check to up to date and passing when only the CLI version changes: verified (reproduced on the base and here).
- Description: the regression tests cover another release, another command, content drift, another Core, and a Core, Source, body or theme-name difference: verified.
- Description: one defect restored, no tagalongs, no new public API, visual, default or interaction model, and no internal context in public text: verified (no surface change in any published package).
- Description: Writing rubric, one record change of three present-tense sentences with no history or project status: verified.
- Description: build and pack-check tests 238 passed and 1 skipped, doctor theme checks 79 passed: verified (317 passed and 1 skipped over the three files here).
- Description: strict typecheck has no error in the changed files, and the knowledge check passes: verified.
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: clear (owner-approved at this head).packages/cli/api/integration/pack-check.mjs: keeps its copy of the built-by placeholder (part of the blocking finding).packages/cli/api/integration/pack-check.test.mjs: clear.packages/cli/api/theme/build/build.mjs: blocking copied placeholder (:876-881); non-blocking stale comments (:50-53,:6255-6257) and whole-fileCLI:filter (:875).packages/cli/api/theme/build/build.test.mjs: clear.
…header's one CLI line counts as provenance withBuiltByCommandPlaceholder is the one rule for the built-by line, called by theme build --check and integration verify. --check now replaces the release in the header's one CLI line instead of dropping every CLI line, so a missing or second CLI line, or one outside the header, stays significant. Comments name the built-by command.
|
/approve-spec ef701bb |
There was a problem hiding this comment.
Changes requested: the theme build --check and doctor change works, the built-by rule is now shared, and the spec:AST-050 FR8 amendment is approved by an engineering owner at this head, but the new header-only CLI: rule is a second copy of logic integration verify already has.
normalizeThemeBuildForCompare(packages/cli/api/theme/build/build.mjs:893-905) re-implements the header bounds, the exactly-oneCLI:line guard and the<version>placeholder thatnormalizeThemeVerifyForComparealready applies (packages/cli/api/integration/pack-check.mjs:120-141); export one helper besidewithBuiltByCommandPlaceholderand call it from both normalizers, so the two checks cannot drift apart on that line.
The three earlier findings are fixed. The fix is a new commit, so an engineering owner comments /approve-spec again for that head.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Changeset:
theme build --checkand doctor no longer call outputs stale only because another CLI release built them or the CLI ran under another command name: verified (tests that fail on the base pass here; real CLI runs in an app with a local theme). - Changeset: each output's header still names the release, and a built module still names the build command: verified (the writers in
build.mjsare unchanged). - Changeset: before, every update of the answering CLI marked every local theme stale: verified (on the base, a difference in the
CLI:lines alone fails all six outputs and doctor's check). - Changeset: so did building under one command name and checking under another: verified (on the base, a difference in the built-by command alone fails the module and doctor's check).
- Changeset: that CLI can be a global install or a tool that runs it: verified (the global-mode spec answers a project without its own CLI with the copy that started the run).
- Description: the header names the CLI release, and
--checkand doctor compared that line as content: verified (the base comparison dropped only theCommand:line). - Description: the quoted
--checkand doctor failures: verified (the messages match the source and the real output). - Description: a global install, two people on different releases, or a patch update in CI each fail the check for a header-only change: verified by the same base failure.
- Description: a built module's comment names the command, and a module built under one command name is stale under another: verified (base behavior and the tests).
- Description: in a check of 24 agent-built apps, the 8 failures differed only in these two kinds of line, and all 24 pass with this change and another pull request installed globally: not reproducible here (the apps are not in the repository); the two kinds are exactly the lines the change normalizes.
- Description: after the change neither line decides staleness, while the header and module still name them and the
Core:line, theme name and content still count: verified (tests and real CLI runs). - Description: the base compared the
CLI:andCore:lines verbatim on the assumption that the toolchain is the project's: verified (the base doc comment). - Description: the app-themes spec's FR8 is amended with the quoted passage: verified (word for word).
- Description: the global-mode spec's FR1 has one release give the same files through every door: verified as a paraphrase.
- Description:
withoutBuildCommandLineis split out;--checkcompares the header's oneCLI:release and the module's one built-by command as placeholders; a missing, second or out-of-headerCLI:line stays significant; the helpers live inbuild.mjs; doctor uses the same comparison: verified, but the one-CLI:-line rule is copied from the verify normalizer rather than shared (blocking finding). - Description:
integration verifystarts fromwithoutBuildCommandLine, calls the same built-by helper, and behaves exactly as before: verified (same filter and guards; its tests pass). - Description: an app with its own CLI and a local theme goes from six stale outputs and a failing doctor check to up to date and passing when only the CLI version changes: verified (reproduced here).
- Description: the regression tests cover another release, another command, content drift, another Core, a Source, body or theme-name difference, and a missing, second or out-of-header
CLI:line: verified. - Description: one defect restored, no tagalongs, no new public API, visual, default or interaction model, and no internal context in public text: verified (no surface change in any published package).
- Description: writing rubric, one record change of three present-tense sentences with no history or project status: verified.
- Description: the build, pack-check and doctor theme tests give 318 passed and 1 skipped: verified (same count here).
- Description: strict typecheck has no error in the changed files, and the knowledge check passes: verified.
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: clear (owner-approved at this head).packages/cli/api/integration/pack-check.mjs: keeps its own copy of the one-CLI:-line rule (part of the blocking finding); the built-by rule is shared.packages/cli/api/integration/pack-check.test.mjs: clear.packages/cli/api/theme/build/build.mjs: blocking copied one-CLI:-line rule (:893-905).packages/cli/api/theme/build/build.test.mjs: clear.
withCliReleasePlaceholder (with generatedHeaderEnd) is the one rule for the header's CLI line: the release becomes <version> when the header holds exactly one. theme build --check and integration verify both call it.
|
/approve-spec 69ffc2c |
There was a problem hiding this comment.
Approved pending CI: the theme build --check and doctor change does what it says, the spec:AST-050 FR8 amendment is approved by an engineering owner at this head, and the earlier finding about a second copy of the header CLI: line rule is fixed. CI's run on this head was refused for capacity ("CI is full"), so its required checks have not run yet: re-run all jobs, and the merge waits for them to pass.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Changeset:
theme build --checkand doctor no longer call outputs stale only because another CLI release built them or the CLI ran under another command name: verified (tests that fail on the merge base pass here; real CLI runs). - Changeset: each output's header still names the release, and a built module still names the build command: verified (the writers are unchanged; the head build writes both lines).
- Changeset: before, every update of the answering CLI marked every local theme stale: verified (on the base, a difference in the
CLI:lines alone fails every output). - Changeset: so did building under one command name and checking under another: verified (on the base, a difference in the built-by command alone fails the module).
- Changeset: that CLI can be a global install or a tool that runs it: verified (the global-mode spec answers a project without its own CLI with the copy that started the run).
- Description: the header names the CLI release, and
--checkand doctor compared that line as content: verified (the base comparison dropped only theCommand:line). - Description: the quoted
--checkand doctor failure messages: verified (they match the source and the base output). - Description: a global install, two people on different releases, or a patch update in CI each fail the check for a header-only change: verified by the same base failure.
- Description: a built module's comment names the command, and a module built under one command name is stale under another: verified (base behavior and tests).
- Description: in a check of 24 agent-built apps, the 8 failures differed only in these two kinds of line, and all 24 pass with this change and another pull request installed globally: not reproducible here (the apps are not in the repository); the two kinds are exactly the lines the change normalizes.
- Description: after the change neither line decides staleness, while the header and module still name them and the
Core:line, theme name and content still count: verified (tests and real CLI runs). - Description: the base compared the
CLI:andCore:lines verbatim on the assumption that the toolchain is the project's: verified (the base doc comment). - Description: the app-themes spec's FR8 is amended with the quoted passage: verified (word for word).
- Description: the global-mode spec's FR1 has one release give the same files through every door: verified as a paraphrase.
- Description:
withoutBuildCommandLineis split out;--checkcompares the header's oneCLI:release and the module's one built-by command as placeholders; a missing, second or out-of-headerCLI:line stays significant; the helpers live inbuild.mjs; doctor uses the same comparison: verified. - Description:
integration verifystarts fromwithoutBuildCommandLine, calls the same header-bounds,CLI:and built-by helpers, and behaves exactly as before: verified (same guards and output; its unchanged tests pass). - Description: an app with its own CLI and a local theme goes from every output stale to up to date when only the CLI version changes: verified with a four-output local theme; doctor runs the same check.
- Description: the regression tests cover another release, another command, content drift, another Core, a Source, body or theme-name difference, and a missing, second or out-of-header
CLI:line: verified. - Description: one defect restored, no tagalongs, no new public API, visual, default or interaction model, and no internal context in public text: verified (no surface change in any published package).
- Description: writing rubric, one record change of three present-tense sentences with no history or project status: verified.
- Description: the build, pack-check and doctor theme tests give 318 passed and 1 skipped: verified (same count here).
- Description: strict typecheck has no error in the changed files, and the knowledge check passes: verified.
.changeset/theme-check-ignores-cli-release.md: clear.docs/specs/AST-050-app-themes/spec.md: clear (owner-approved at this head).packages/cli/api/integration/pack-check.mjs: clear (calls the shared header-bounds,CLI:and built-by helpers).packages/cli/api/integration/pack-check.test.mjs: clear.packages/cli/api/theme/build/build.mjs: clear (one rule per provenance line).packages/cli/api/theme/build/build.test.mjs: clear.
- #12072 fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint Author: Joey Farina <[email protected]> - #12274 fix(core): cap the Selector family's trigger-width list minimum at the viewport Author: josephfarina <[email protected]> - #12215 fix(cli): advise keeping one dependency when two packages declare one provider ID Author: Joey <[email protected]> - #12322 [experimental] export --reverse: use the project's own copy of an aliased file, or restore the page's copy with its paths entry Author: josephfarina <[email protected]> - #12403 docs(core): Text's as and PowerSearch's statusVariant list every value their types allow Author: Joey Farina <[email protected]> - #12494 fix(templates): dashboard templates use page sections, not cards, for page regions Author: Joey Farina <[email protected]> - #12282 fix(cli): theme build --check and doctor ignore which CLI release, and which command name, built a theme Author: Joey Farina <[email protected]> - #12420 fix(Chat): ChatToolCalls and ChatDictationButton without a required prop name it and the fix in development Author: Joey Farina <[email protected]> - #12205 fix(cli): equally scored icons put first one whose id the query names in full Author: Joey Farina <[email protected]> - #12455 fix(core): a theme sets the room between a checkbox or a switch and its label Author: josephfarina <[email protected]> - #12658 perf(cli): the first theme build after a CLI upgrade reuses the JavaScript it compiled from a theme's local modules Author: Joey <[email protected]> - #12323 [experimental] export: React logs no render timings while the export draws a page Author: Joey Farina <[email protected]>
|
Landed in #12713. |
Main now hides the command on a built module's built-by line (#12282, by Joey Farina), which was this branch's core, and a build now always names `astryx theme build` there. Main hides the command only when the module has exactly one such line. A theme family has one line per member, so a family an earlier release built with another command still read as out of date. This merge keeps main's normalization and changes withBuiltByCommandPlaceholder to hide the command on every member's line, unless two lines name the same theme. integration verify shares the helper. The branch's own pack-check and AST-050 changes are dropped: AST-050 already says that another command never makes an output stale.
… of a theme family (#11542) * fix(cli): theme build --check ignores which package manager built the theme * Merge remote-tracking branch 'origin/main' into fix/theme-check-ignores-runner * chore(cli): credit the theme --check changeset * Merge remote-tracking branch 'origin/main' into fix/theme-check-ignores-runner * refactor(cli): integration verify relies on the shared built-by normalization * Merge remote-tracking branch 'origin/main' into fix/theme-check-q * docs(spec): AST-050 FR8 — --check and integration verify ignore the built-by command * Merge remote-tracking branch 'origin/main' into fix/theme-check-ignores-runner # Conflicts: # packages/cli/api/integration/pack-check.test.mjs * fix(cli): theme build --check also ignores the command on each family member's built-by line; FR8 scopes verbatim provenance to --check * Merge main and reshape to the family residual Main now hides the command on a built module's built-by line (#12282, by Joey Farina), which was this branch's core, and a build now always names `astryx theme build` there. Main hides the command only when the module has exactly one such line. A theme family has one line per member, so a family an earlier release built with another command still read as out of date. This merge keeps main's normalization and changes withBuiltByCommandPlaceholder to hide the command on every member's line, unless two lines name the same theme. integration verify shares the helper. The branch's own pack-check and AST-050 changes are dropped: AST-050 already says that another command never makes an output stale. * fix(cli): hide the command on every built-by line, and say so in the doc comments A second built-by line for one theme already differs from a fresh build, so the guard for it changed no result; the helper now hides the command on every line. The doc comments of normalizeThemeBuildForCompare and normalizeThemeVerifyForCompare name one line per theme. The drift cases check that their build succeeded. Prettier formats two lines main left unformatted in build.mjs.
User impact
theme buildwrites a header into each output, and the header names the CLI release that built it (CLI: @astryxdesign/cli@<version>).theme build --checkanddoctor'stheme-local-buildscheck compared that line as content. So outputs built by one CLI release were stale to every other release, even when every byte of the output was the same:That turns every update of the CLI that answers into a rebuild of every local theme, whose only change is the header line, and in some setups into a flip back and forth:
theme build --checkin CI until someone rebuilds, for a header-only change.A built theme module's doc comment has the same problem with the command name:
* <name> theme — built by \theme build`. A module built while the CLI ran under one command name (a package runner, or a tool that runs the CLI for its users under its own name) is stale when checked under another, though only that name differs. In a check of 24 agent-built apps, the 8 that failedtheme-local-builds` differed from a fresh build in only these two kinds of line.After this change, neither line decides staleness: the
CLI:line is left out, and the command in a built module's one built-by line is compared as a placeholder, asintegration verifyalready does. The same outputs built by another CLI release, or under another command name, check clean. The header still names the release that built each output, the module still names the command, theCore:line still counts, the theme name on the built-by line still counts, and so does every change to real content.Problem and solution fit
normalizeThemeBuildForComparedrops only the header'sCommand:line before comparing; theCLI:andCore:lines compared verbatim, on the assumption that the toolchain is the project's.Expected behavior and authority
spec:AST-050FR8 (--check), amended in this pull request: "--checkcompares each output with what the build writes from the theme's inputs now, the header'sCore:line included. An output's header also names the CLI release that built it, and a built module's comment names the command that built it. Those two lines alone never make an output stale: an output that another CLI release or another command built checks clean when everything else matches."spec:AST-081FR1: one release gives the same files through every door; this makes outputs from different releases agree when their content does.Smallest restoration
api/theme/build/build.mjs:withoutBuildCommandLine(CRLF as LF, without theCommand:line) is split out ofnormalizeThemeBuildForCompare, which now also compares the release in the header's oneCLI:line as<version>and the command in a built module's one built-by line as<command>. A header with noCLI:line or with two, and aCLI:-like line outside the header, stay significant.withBuiltByCommandPlaceholderandwithCliReleasePlaceholder(withgeneratedHeaderEnd, the header's bounds),BUILT_BY_LINEandCLI_VERSION_LINElive here.doctor's check uses the same comparison.api/integration/pack-check.mjs:integration verify's own normalization now starts fromwithoutBuildCommandLineand calls the samegeneratedHeaderEnd,withCliReleasePlaceholderandwithBuiltByCommandPlaceholder, so the two checks share one rule for each of those lines, and verify behaves exactly as before.Evidence
theme eject neutral, built and added): up to date, andtheme-local-buildspasses. Then the same CLI with only its version raised, as the next release with no theme change would be: before,--checkfails on all 6 outputs andtheme-local-buildsfails; with only these files changed,--checkis up to date and the check passes.theme-local-buildsunder a newer CLI, and in each, the only lines that differed from a fresh build were the header'sCLI:line and the built module's built-by command. With this head and the pull request that makestheme buildread the Core it builds with, installed as the CLI for the computer, all 24 apps pass every check with no rebuild (0 failing, was 8).--checkcomparison leaves out only the CLI line's release and the built-by command: a Core, Source, body or theme-name difference still differs, and so does a missing or secondCLI:line, or one outside the header.Scope
Components: CLI (
theme build --check,doctor'stheme-local-builds)Writing rubric results
--checkcompares, what the header's CLI line and a built module's command line record, and that those two lines alone never make an output stale; no history or project status.Testing
vitest run --project nodeoverapi/theme/build/build.test.mjs,api/integration/pack-check.test.mjsandapi/doctor/theme-checks.test.mjs: 3 files, 318 passed and 1 skipped.tsc --project tsconfig.strict.json: no error in the changed files;pnpm check:knowledgepasses.