Repository navigation
[experimental] render: --reverse names every file the render records as not carried as missing - #12404
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision, and two fixes are needed first.
No current record settles what --reverse reports in exact and missing, or the embedded-source notCarried list it now reads: an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or names the record that should hold it.
- A page that imports a folder from above the carried folder (
../lib/rows, resolving to../lib/rows/index.ts) now getsmissing: ['../lib/rows', '../lib/rows/index.ts'], one file named twice, because the check inpackages/cli/api/render/_adapter.mjs:843-844strips only an extension, so also match a recorded…/index.<ext>to its folder and add a reverse test for that layout. - The title and changeset say
--reversenames every file the render could not carry, but a file an outside module imports (../lib/rows.tsimporting./helper.ts) is in neithernotCarriednormissing, so say it names every file the render records as not carried, or add a reverse test for that layout once #12272 records such files.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Changeset and title: the reverse names every file the render could not carry as missing: false for a file an outside module imports (head probe); verified for an alias import from outside, a relative import from above and a Sass import (tests).
- Changeset:
exactis false whenever such a file exists: verified (tests; probes of six layouts). - Changeset: a rendered file records the files the render left out, and the reverse adds them to
missing: verified (render-page.mjs:1528,source-block.mjs:119,_adapter.mjs:841-847). - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the new test fails on the base with
exact: true). - Description: the record field appears only when files were left out, and survives a round trip: verified (foundation test, which fails on the base).
- Description: each recorded file is added once unless an import already names it: false for a folder-index import from above; verified for a plain module and a Sass import (tests).
- Description: a reader that does not know the field ignores it: verified (the base reader checks only the format, entry and files; the format number is unchanged).
- Description: the restored page then failed to build: not reproduced; the restored folder holds only the page, which imports the alias.
- Description: the command is experimental under the release record's experimental route: verified; that record does not settle what the reverse reports.
- Description: the smallest restoration touches the listed files: verified (seven files).
- Description: the listed tests pass (441 passed, 3 skipped) and the strict and JSON-API typechecks pass: verified at this head; the browser interaction parity check was not run.
- Description: no new public API, and no internal context in public text: verified.
- Description: stacked on #12272 and lands after it: verified (the base is that pull request's head).
Files:
.changeset/render-reverse-not-carried.md: finding (wording broader than the behaviour).packages/cli/api/render/_adapter.mjs: finding (folder-index import named twice).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear (a non-blocking wording note onexact).packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
9010409 to
c9f8688
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision, and one fix is needed first.
No current record settles what --reverse reports in exact and missing, or the embedded-source notCarried list it now reads: an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or names the record that should hold it.
- A page that imports a folder from above the carried folder (
../lib/rows, resolving to../lib/rows/index.ts) getsmissing: ['../lib/rows', '../lib/rows/index.ts'], one file named twice, because the check inpackages/cli/api/render/_adapter.mjs:843-844strips only an extension, so also match a recorded…/index.<ext>to the folder an import names and add a reverse test for that layout.
The changeset's claim now holds: with the render recording what an outside module imports, the reverse names those files too.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Changeset and title: the reverse names every file the render could not carry as missing, so
exactis false whenever one exists: verified for every file the render records (an alias import from outside, the same with a module it imports, a relative import from above with a module it imports, a folder index, a Sass file, an image from above, and a project layout). - Changeset: a rendered file records the files left out, and the reverse adds them to
missing: verified (render-page.mjs:1533,source-block.mjs:119,_adapter.mjs:841-847). - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the base answers
exact: truefor that layout). - Description: the record field appears only when files were left out, and survives a round trip: verified (the foundation test, and a page with nothing left out carries no field).
- Description: each recorded file is added once unless an import already names it: false for a folder imported from above; verified for plain modules, Sass files and images.
- Description: a reader that does not know the field ignores it: verified (the reader checks only the format, entry and files, and the format number is unchanged).
- Description: the restored page then failed to build: not reproduced; no finding rests on it.
- Description: the command is experimental under the release record's experimental route: verified; that record does not settle what the reverse reports.
- Description: the change touches the listed source files, the type description and a changeset: verified (seven files with the two test files).
- Description: the listed tests pass (442 passed, 3 skipped), and the strict and JSON-API typechecks pass: verified at this head; the browser parity check was not rerun, as no rendered surface changes.
- Description: no new public API and no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified (the base branch is that change's head).
Files:
.changeset/render-reverse-not-carried.md: clear.packages/cli/api/render/_adapter.mjs: a folder imported from above is named twice (:843-844).packages/cli/api/render/render.test.mjs: clear; a folder-index reverse test belongs with the fix.packages/cli/api/render/render.type.mjs: non-blocking, theexactdescription still says every file it imports (:80).packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
|
Owner decision (engineering owner, covering this pull request): |
|
/approve-spec 8098f30 |
There was a problem hiding this comment.
Changes requested: the reverse rule and the new record field are settled by the engineering owner's approval at this head, and two fixes are needed before approval.
- Miss:
--reversedrops a recorded file that shares a stem with a module an import names (a page importing../lib/rows, which resolves torows.tsxand shows../lib/rows.png, getsmissing: ['../lib/rows']), because the check inpackages/cli/api/render/_adapter.mjs:843-847strips any extension, so match the stem and theindexfolder only for the extensions an extensionless import resolves to and add a reverse test for that layout. - Miss: the title and changeset say the reverse names every file the render could not carry, but it can name only the files the render records, and a not-carried
../lib/rows.tsthat imports./helper.jsleaveshelper.tsunnamed, so say it names every file the render records as not carried, or make the render record that module.
The folder imported from above is now named once.
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- Title and changeset: the reverse names every file the render could not carry, so
exactis false whenever one exists: the first half is false (a module that a not-carried module imports through a.jsspecifier is unnamed); the second half is verified in every layout tried. - Changeset: a rendered file records the files left out and the reverse adds them to
missing: verified, except that a recorded image sharing a stem with an imported module is dropped. - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the base answers
exact: true). - Description: the render's note names a file it cannot carry in the listed cases: verified (from the change below this one).
- Description: the restored page then failed to build: not reproduced; consistent with the restored folder lacking the module.
- Description: the record field appears only when files were left out, and survives a round trip: verified (the foundation test, and a page with nothing left out carries no field).
- Description: each recorded file is added once unless an import already names it: false for a same-stem image; verified for folders, index files, Sass, configuration-named files and images otherwise.
- Description: a reader that does not know the field ignores it: verified (the reader checks only the format, entry and files, and the format number is unchanged).
- Description: the command is experimental under the release record's experimental route, and the reverse reports
exactonly when nothing is missing: verified. - Description: the files listed, the record entry and its rubric results: verified (eight files).
- Description: the listed test expectations: verified (the outside-folder, folder-index, alias and Sass tests).
- Description: the render tests pass (443 passed, 3 skipped), with the strict and JSON API typechecks and the knowledge check: verified; the browser parity check was not rerun, as nothing rendered changes.
- Description: no new public API and no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified (the base branch is that change).
Files:
.changeset/render-reverse-not-carried.md: claims more than the reverse can name (:5).docs/architecture/cli-surface.md: clear.packages/cli/api/render/_adapter.mjs: drops a recorded file that shares a stem with an imported module (:843-847).packages/cli/api/render/render.test.mjs: clear; a same-stem reverse test belongs with the fix.packages/cli/api/render/render.type.mjs: non-blocking, theexactdescription still says every file it imports (:80).packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
|
/approve-spec d5ca48b |
There was a problem hiding this comment.
Changes requested: both fixes from the last review are in, and the reverse rule is settled by an engineering owner's approval at this head, but one new fix is needed before approval.
--reversenames an extensionless JSON import that the render leaves out twice (a page importing./site.configfor asite.config.jsongetsmissing: ['site.config', 'site.config.json']), becausepackages/cli/api/render/_adapter.mjs:845strips an extension only for module extensions while such an import also resolves to.json, so match.jsontoo (as line 946 does, or reuse the walk'sRESOLVE_EXTENSIONS) and add a reverse test for that layout.
Non-blocking: the data.exact description in packages/cli/api/render/render.type.mjs:80 still says "every file it imports", while a recorded file no import names now also makes it false.
Claims and files checked
Review mode: incremental; reason: none
changed rules (0): none
Claims:
- Title and changeset: the reverse names every file the render records as not carried, so
exactis false whenever one exists: verified in every layout tried. - Changeset: a rendered file records the files left out and the reverse adds them to
missing: verified. - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the base answers
exact: true). - Description: the render's note names a file it cannot carry in the listed cases: verified (from the change below this one).
- Description: the restored page then failed to build: not reproduced; consistent with the restored folder lacking the module.
- Description: the record field appears only when files were left out, and survives a round trip: verified (the foundation test).
- Description: each recorded file is added once unless an import already names it: false for an extensionless JSON import, which is named twice.
- Description: a recorded file matches an extensionless import or its folder's index only for module extensions, so a same-stem image is still named: verified (the same-stem reverse test).
- Description: a reader that does not know the field ignores it: verified (the reader checks only the format, entry and files, and the format number is unchanged).
- Description: the command is experimental under the release record's experimental route, and the reverse reports
exactonly when nothing is missing: verified. - Description: the files listed, the record entry and its rubric results: verified (eight files).
- Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, Sass): verified.
- Description: the render tests pass (444 passed, 3 skipped), with the strict and JSON API typechecks and the knowledge check: verified; the browser parity check was not rerun, as nothing rendered changes.
- Description: no new public API and no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified.
Files:
.changeset/render-reverse-not-carried.md: clear.docs/architecture/cli-surface.md: clear.packages/cli/api/render/_adapter.mjs: names an extensionless JSON import twice (:845).packages/cli/api/render/render.test.mjs: clear; a JSON reverse test belongs with the fix.packages/cli/api/render/render.type.mjs: non-blocking, theexactdescription still says every file it imports (:80).packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
285fac1 to
7a923f2
Compare
d5ca48b to
cd1189b
Compare
|
/approve-spec cd1189b |
There was a problem hiding this comment.
Changes requested: the reverse rule and the new record field are settled by an engineering owner's approval at this head, but one fix is needed before approval.
--reversenames a not-carried JSON file imported without its extension twice (a page importing./site.configfor asite.config.jsonthe render leaves out getsmissing: ['site.config', 'site.config.json']), becausepackages/cli/api/render/_adapter.mjs:862strips only module extensions while the import walk also resolves.json, so reuse the walk'sRESOLVE_EXTENSIONS(or add.jsonas line 963 does) and add a reverse test for that layout.
Non-blocking: the data.exact description in packages/cli/api/render/render.type.mjs:80 still says "every file it imports", while a recorded file no import names now also makes it false.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Title and changeset: the reverse names every file the render records as not carried, so
exactis false whenever one exists: verified in every layout tried. - Changeset: a rendered file records the files it left out and the reverse adds them to
missing: verified. - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the base answers
exact: true). - Description: the render's note names a file it cannot carry in the listed cases: verified (from the change below this one).
- Description: the restored page then failed to build: not reproduced; consistent with the restored folder lacking the module.
- Description: the record field appears only when files were left out: verified (the record and the foundation round-trip test).
- Description: each recorded file is added once unless an import already names it: false for a JSON file imported without its extension, which is named twice.
- Description: a recorded file matches an extensionless import or its folder's index only for module extensions, so a same-stem image is still named: verified (the same-stem reverse test).
- Description: a reader that does not know the field ignores it: verified (the reader checks only the format, entry and files, and the format number is unchanged).
- Description: the command is experimental under the release record, and the reverse reports
exactonly when nothing is missing: verified. - Description: the files listed, the record entry and its rubric results: verified (eight files).
- Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, Sass, record round trip): verified.
- Description: the render tests pass, with the strict and JSON API typechecks and the knowledge check: verified (now 457 passed and 3 skipped, as the base gained tests); the browser parity check was not rerun, as nothing rendered changes.
- Description: no new public API and no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified.
Files:
.changeset/render-reverse-not-carried.md: clear.docs/architecture/cli-surface.md: clear (approved by an engineering owner at this head).packages/cli/api/render/_adapter.mjs: names a not-carried JSON file imported without its extension twice (:862).packages/cli/api/render/render.test.mjs: clear; a JSON reverse test belongs with the fix.packages/cli/api/render/render.type.mjs: non-blocking, theexactdescription still says every file it imports (:80).packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
|
/approve-spec 1c5a5ca |
There was a problem hiding this comment.
Changes requested: the reverse rule is settled by an engineering owner's approval at this head and an extensionless JSON import is now named once, but the dedupe now drops some recorded files from missing.
--reversedrops a recorded JSON file that shares its stem with a recorded module: a page that imports../lib/rowsfrom a not-carriedrows.tsthat imports./rows.jsongetsmissing: ['../lib/rows']although the render recordsrows.json, becausepackages/cli/api/render/_adapter.mjs:862counts any recordedrows.<ext>as named by../lib/rows; count only the one recorded file that import resolves to, in the walk's first-match order (one resolver shared withresolveIninfoundation/render/embedded-imports.mjs), and add a reverse test forrows.tswithrows.json.- Miss: the folder match at
packages/cli/api/render/_adapter.mjs:863drops a recordedindexfile beside a same-named module (a not-carriedrows.tsthat imports./rows/index.tsgivesmissing: ['../lib/rows']), and the same first-match resolution fixes it.
The earlier suggestion to match through RESOLVE_EXTENSIONS fixed the duplicate but was incomplete: the match also has to follow the walk's order, as resolveIn does.
Claims and files checked
Review mode: incremental; reason: none
changed rules (0): none
Claims:
- Title and changeset: the reverse names every file the render records as not carried: false when a recorded JSON file or folder
indexshares its stem with a recorded module (reverse probe ofrows.tsimporting./rows.json). - Changeset:
exactis false whenever a file is recorded as not carried: verified (_adapter.mjs:972; every recorded file is added or already covered by an entry inmissing). - Changeset: a rendered file records the files the render left out: verified (
render-page.mjs:1533,source-block.mjs:119, the foundation round-trip test). - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the base answers
exact: true). - Description: the render's note names a file it cannot carry in the listed cases: verified (tests from the change below this one).
- Description: the restored page then failed to build: not reproduced; consistent with the restored folder lacking the module.
- Description: the record field appears only when files were left out: verified.
- Description: each recorded file is added once unless an import already names it: false for the same-stem JSON and folder
indexlayouts above. - Description: matching uses only the walk's extensions, so a same-stem image is still named and an extensionless JSON import is named once: verified (the two new reverse tests and a probe).
- Description: a reader that does not know the field ignores it: verified (the reader checks only the format, entry, files and checksums; the format number is unchanged).
- Description: the command is experimental under the release record, and
exactholds only when nothing is missing: verified. - Description: the files listed, the record entry and its rubric results: verified; the list leaves out the one-word export in
embedded-imports.mjs. - Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, extensionless JSON, Sass, record round trip): verified.
- Description: the render tests pass (458 passed, 3 skipped), with the strict and JSON API typechecks and the knowledge check: verified; the browser parity check was not rerun, as nothing rendered changes.
- Description: one defect, no new public API, no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified (the base branch is that change's head).
Files:
.changeset/render-reverse-not-carried.md: its claim is false in the layouts of the two findings.docs/architecture/cli-surface.md: clear (approved by an engineering owner at this head).packages/cli/api/render/_adapter.mjs: both findings (lines 862-864).packages/cli/api/render/render.test.mjs: clear; no test covers a recorded file that shares a stem with a recorded module.packages/cli/api/render/render.type.mjs: clear.packages/cli/foundation/render/embedded-imports.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
|
/approve-spec 9b43f21 |
There was a problem hiding this comment.
Changes requested: --reverse now names every recorded not-carried file once, and the record entry is approved by an engineering owner at this head; one fix remains.
recordedFileOfatpackages/cli/api/render/_adapter.mjs:863-867copies the resolution order thatresolveInalready implements inpackages/cli/foundation/render/embedded-imports.mjs:300-308, so the next change to how the walk resolves an import would leave the reverse on the old order andmissingwould again name one file twice or drop one; export one resolver (for exampleresolutionCandidates(spec)) fromembedded-imports.mjs, use it inresolveInand in the reverse, and delete the copy.
Claims and files checked
Review mode: incremental; reason: none
changed rules (0): none
Claims:
- Title and changeset: the reverse names every file the render records as not carried as missing: verified (reverse probe over 11 layouts that render; tests at
render.test.mjs:2542and:2562). - Changeset:
exactis false whenever a file is recorded as not carried: verified (_adapter.mjs:978). - Changeset: a rendered file records the files the render left out: verified (
render-page.mjs:1533,source-block.mjs:119, the foundation round-trip test). - Changeset and description: an alias import from outside the carried folder used to come back as exact: verified (the base answers
exact: true). - Description: the render's note names a file it cannot carry in the listed cases: verified (tests from the change below this one).
- Description: the restored page then failed to build: not reproduced; consistent with the restored folder lacking the module.
- Description: the record field appears only when files were left out: verified.
- Description: each import in
missingnames exactly one recorded file, the first in the walk's order, and every other recorded file stays inmissing: verified (same-stem image, JSON and folderindexprobes and tests). - Description: a reader that does not know the field ignores it: verified (the base CLI reverses a file with the new field without error).
- Description: the command is experimental under the release record, and
exactholds only when nothing is missing: verified. - Description: the files listed, the record entry and its rubric results: verified; the list leaves out the one-word export in
embedded-imports.mjs. - Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, extensionless JSON, same-stem JSON, folder
indexbeside a module, Sass, record round trip): verified. - Description: the render tests pass (460 passed, 3 skipped), with the strict and JSON API typechecks and the knowledge check: verified; the browser parity check was not rerun, as nothing rendered changes.
- Description: one defect, no new public API, no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified (the base branch is that change's head).
Files:
.changeset/render-reverse-not-carried.md: clear.docs/architecture/cli-surface.md: clear (approved by an engineering owner at this head).packages/cli/api/render/_adapter.mjs: the finding (lines 863-867).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/foundation/render/embedded-imports.mjs: clear; the shared resolver belongs here.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
7a923f2 to
52f4253
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's spec approval at the current head; no code changes are needed.
The branch was rebased onto its updated base with its own commits unchanged, but the spec approvals on record are for earlier heads. The cli-surface render entry, which states what --reverse reports in missing and exact, and the embedded-source notCarried field the reverse reads need an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request at the current head; the author may do so as an engineering owner.
Non-blocking:
bySuffixinpackages/cli/foundation/render/embedded-imports.mjs(lines 326-330) still spells the same candidate list inline; iteratingresolutionCandidates(rest)there would leave one definition of the order.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Title and changeset:
--reversenames every file the render records as not carried as missing: verified (packages/cli/api/render/_adapter.mjs:865-879; reverse tests atpackages/cli/api/render/render.test.mjs:2472,:2542,:2562,:2580,:2618,:2688). - Changeset:
exactis false whenever a recorded file exists: verified (_adapter.mjs:983). - Changeset and description: a rendered file records the files the render left out, only when there are any: verified (
packages/cli/foundation/render/render-page.mjs:1578,source-block.mjs:119,packages/cli/foundation/render/render.test.mjs:123-128). - Changeset and description: a module imported through a path alias from outside the carried folder used to come back exact: verified (the alias case answers
exact: trueon the base andexact: falsewith the module inmissinghere). - Description: the render's note names a file it cannot carry (an aliased or relative module from outside the carried folder, a Sass or Less stylesheet): verified (
render-page.mjs:1432-1475; tests atrender.test.mjs:2618,:2688). - Description: the restored page then failed to build: not reproduced; it follows from the restored folder lacking the module.
- Description: each import in
missingnames exactly one recorded file, the first in the walk's order, and every other recorded file stays: verified (embedded-imports.mjs:289-295,_adapter.mjs:869-879; same-stem image, JSON and folder-index tests). - Description: a reader that does not know the record field ignores it: verified (the reader keeps the parsed payload; the reverse treats an absent list as empty).
- Description: the command is experimental under the release record, and
exactholds only when nothing is missing: verified. - Description: the files of the smallest restoration: verified; the list leaves out
embedded-imports.mjs, which now holds the shared resolution order. - Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, extensionless JSON, same-stem JSON, folder index beside a module, Sass, record round trip): verified at the cited tests.
- Description: the render tests, typechecks and knowledge check pass: verified (464 passed and 3 browser-only skipped; the rebased base adds tests to the count stated; both typechecks and the knowledge check pass); the browser parity check was not rerun, as nothing rendered changes.
- Description: the record change names
api/renderandfoundation/renderwith the--reverserule: verified (docs/architecture/cli-surface.md:779-784); approval at the current head is pending. - Description: one defect, no new public API, no internal context: verified.
- Description: stacked on the change that names the files a render does not carry: verified (the base branch is that change).
Files:
.changeset/render-reverse-not-carried.md: clear.docs/architecture/cli-surface.md: waits on an engineering owner's approval at the current head.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/foundation/render/embedded-imports.mjs: clear; non-blocking note onbySuffix.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
|
/approve-spec 8a6129b |
8a6129b to
19de8a9
Compare
|
/approve-spec 19de8a9 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
--reverse now names every file the render records as not carried, the record entry that states the rule is approved by an engineering owner at this head, and the new reverse tests fail before this change and pass with it. The last inline copy of the import resolution order now calls resolutionCandidates, so nothing is left to change.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Title and changeset:
--reversenames every file the render records as not carried as missing, soexactis false whenever one is: verified (packages/cli/api/render/_adapter.mjs:891-904,:1009; reverse tests atpackages/cli/api/render/render.test.mjs:2557,:2627,:2647,:2665,:2703,:2773). - Changeset and description: a rendered file records the files the render left out, only when there are any: verified (
packages/cli/foundation/render/render-page.mjs:1578,source-block.mjs:119,packages/cli/foundation/render/render.test.mjs:122-130). - Changeset and description: a module imported through a path alias from outside the carried folder used to come back exact: verified (that test answers
exact: truewith nomissingbefore this change). - Description: the render's note names a file it cannot carry (an aliased or relative module from outside the carried folder, a Sass or Less stylesheet): verified (
render-page.mjs:1457-1477, already onmain). - Description: the restored page then failed to build: not reproduced; it follows from the restored folder lacking the module.
- Description: each import in
missingnames exactly one recorded file, the first in the walk's order, and every other recorded file stays: verified (embedded-imports.mjs:289-295,_adapter.mjs:895-904; same-stem image, JSON and folder-index tests). - Description: a reader that does not know the record field ignores it: verified (the reader keeps the parsed payload,
source-block.mjs:211-254; the reverse treats an absent list as empty). - Description: the command is experimental, and
exactholds only when nothing is missing: verified. - Description: the files of the smallest restoration: verified; the list leaves out
embedded-imports.mjs, which now holds the shared resolution order. - Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, extensionless JSON, same-stem JSON, folder index beside a module, Sass, record round trip): verified at the cited tests.
- Description: the render tests, typechecks and knowledge check pass: verified (467 passed and 3 skipped after the rebase onto
main; both typechecks and the knowledge check pass); the browser parity check was not rerun, as nothing rendered changes. - Description: the record change names
api/renderandfoundation/renderwith the--reverserule: verified (docs/architecture/cli-surface.md:782-787), approved at this head. - Description: one defect, no new public API, no internal context: verified.
- Description: stacked on the change that names the files a render does not carry, landing after it: verified (that change is on
main, and this branch sits on it).
Files:
.changeset/render-reverse-not-carried.md: clear.docs/architecture/cli-surface.md: clear.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/foundation/render/embedded-imports.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
…ssing A rendered file now records the files the render left out, and --reverse adds each to missing, so exact is false whenever one is. A module a page imports through a path alias from outside the carried folder, which the reverse cannot resolve, no longer comes back reported as exact. A file the imports already name is named once.
…CLI record states the rule A page that imports a folder from above the carried folder named it twice in missing, as the import and as its recorded index file; the recorded index file now matches its folder. The CLI surface record states what --reverse reports: missing lists every file the restored page imports that it lacks and every file the rendered file records as not carried, and exact is true only when missing is empty.
…dule extension A recorded image that shared its stem with an imported module, such as rows.png beside rows.tsx, was taken for the import and dropped from missing. A recorded file now matches an extensionless import, or its folder's index, only when its extension is one such an import resolves to.
An import such as ./site.config also stands for site.config.json, so a recorded file now matches an import by every extension the import walk resolves, JSON included, from the walk's own list. The exact field says a recorded file no import names makes it false too.
An extensionless import counted every recorded file that shared its stem, or its folder's index, as named, so a recorded rows.json beside an imported rows.ts, or rows/index.ts beside it, dropped out of missing. Each import now names the one recorded file it resolves to in the walk's order (as written, each extension, then the folder's index), and every other recorded file stays in missing.
embedded-imports.mjs exports resolutionCandidates, the paths a relative import may name in order, and both the walk and --reverse use it, so --reverse no longer keeps its own copy. Recorded files are checked against a set, so a long list stays fast.
bySuffix, which finds the one carried file an alias import names, now iterates resolutionCandidates instead of spelling the order inline, so the walk, alias lookup and --reverse share one definition.
…adds experimental render is now experimental export: the changeset, the CLI surface record's entry and this change's tests use the new name.
19de8a9 to
48e38f5
Compare
|
/approve-spec 48e38f5 |
There was a problem hiding this comment.
Approved pending CI: some checks are still running on this head.
--reverse now names every file the render records as not carried, the record entry that states the rule is approved by an engineering owner at this head, and the new reverse tests fail before this change and pass with it. Nothing is left to change in the code.
- Non-blocking: the description's "Expected behavior and authority" paragraph still calls the command
astryx experimental render; it is nowastryx experimental export, as the changeset, record entry and tests already say.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Title and changeset:
--reversenames every file the render records as not carried as missing, soexactis false whenever one is: verified (packages/cli/api/render/_adapter.mjs:881-894,:999; reverse tests atpackages/cli/api/render/render.test.mjs:2579,:2649,:2669,:2687,:2725,:2759). - Changeset: the command is
astryx experimental export --reverse: verified (packages/cli/clients/cli/commands/experimental-export.doc.mjs, its--reverseoption). - Changeset and description: a rendered file records the files the render left out, only when there are any: verified (
packages/cli/foundation/render/render-page.mjs:1578,source-block.mjs:119,packages/cli/foundation/render/render.test.mjs:122-130). - Changeset and description: a module imported through a path alias from outside the carried folder used to come back exact: verified (that test answers
exact: truewith nomissingbefore this change). - Description: the render's note names a file it cannot carry (an aliased or relative module from outside the carried folder, a Sass or Less stylesheet): verified (
render-page.mjs:1457-1477, already onmain). - Description: the restored page then failed to build: not reproduced; it follows from the restored folder lacking the module.
- Description: each import in
missingnames exactly one recorded file, the first in the walk's order, and every other recorded file stays: verified (embedded-imports.mjs:289-295,_adapter.mjs:885-894; same-stem image, JSON and folder-index tests). - Description: a reader that does not know the record field ignores it: verified (the reader keeps the parsed payload,
source-block.mjs:211-254; the render format number is unchanged; the reverse treats an absent list as empty). - Description: the command is experimental, and
exactholds only when nothing is missing: verified, under the command's new nameexperimental export(the description still saysexperimental render). - Description: the files of the smallest restoration: verified; the list leaves out
embedded-imports.mjs, which now holds the shared resolution order. - Description: the listed test expectations (alias, outside folder with a helper, folder from above, same-stem image, extensionless JSON, same-stem JSON, folder index beside a module, Sass, record round trip): verified at the cited tests.
- Description: the render tests, typechecks and knowledge check pass: verified (468 passed and 3 skipped on this head; both typechecks and the knowledge check pass); CI's interaction checks pass at this head.
- Description: the record change names
api/renderandfoundation/renderwith the--reverserule: verified (docs/architecture/cli-surface.md:797-802), approved by an engineering owner at this head. - Description: one defect, no new public API, no internal context: verified.
- Description: stacked on the change that names the files a render does not carry, landing after it: verified (that change is on
main, and this branch sits on it).
Files:
.changeset/render-reverse-not-carried.md: clear.docs/architecture/cli-surface.md: clear.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/foundation/render/embedded-imports.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/render/render.test.mjs: clear.packages/cli/foundation/render/source-block.mjs: clear.
PR Analysis Report🔎 Preview ·
|
Record change: cli-surface's module list names
api/renderandfoundation/render, with the--reverserule:missinglists every file the restored page lacks and every file the rendered file records as not carried, andexactis true only whenmissingis empty. Proof: the reverse tests (alias layout, relative import from above, folder index, stem-sharing image, JSON import) pass.User impact
When a render cannot carry a file the page needs (a module imported through a path alias from outside the carried folder, a module imported by a relative path from above it, a Sass or Less stylesheet), the file's note now names it. But
--reversestill answeredexact: truewith nomissingfile for the alias case, since it cannot resolve the alias, and the restored page then failed to build.Problem and solution fit
exact: truetells the caller the restored page is complete, while it does not build.exactandmissingto decide whether it has the whole page back.A rendered file now records the files the render left out, beside its other record fields, only when there are any.
--reverseadds each one tomissing, once, unless an import already names it, soexactis false whenever one exists. Each import the restored page lacks names exactly one recorded file: the first it resolves to in the walk's own order (the path as written, then each extension the walk tries, then the folder'sindex). Every other recorded file stays inmissing, so an image or JSON file that shares a module's stem, or a folder index beside a same-named module, is still named. A reader that does not know the record field ignores it.Expected behavior and authority
astryx experimental renderis experimental (spec:AST-017FR27).--reversereports the files the restored page lacks (missing), andexactonly when it lacks none.Smallest restoration
foundation/render/source-block.mjsandfoundation/render/render-page.mjs: the record carries the files left out.api/render/_adapter.mjs: the reverse adds them tomissing.api/render/render.type.mjs: themissingdescription.docs/architecture/cli-surface.md: the module list namesapi/renderandfoundation/render, with the rule formissingandexact.Evidence
api/render/render.test.mjs: "names a module the page imports through a path alias from outside the folder it carries from" (@shared/*→../shared/*):--reversereportsexact: false,missing: ['../shared/rows.ts'](it reportedexact: true). The outside-folder test has../lib/rows.tsimport./helper.ts, and--reversereportsmissing: ['../lib/rows', '../lib/helper.ts']. "names a folder the page imports from above the carried folder once on the way back":missing: ['../lib/rows']. "keeps a recorded image that shares its stem with an imported module on the way back":../lib/rows.tsxshowing../lib/rows.pnggivesmissing: ['../lib/rows', '../lib/rows.png']. "names an extensionless JSON import the render leaves out once on the way back":./site.configgivesmissing: ['site.config']. A not-carriedrows.tsimporting./rows.jsongivesmissing: ['../lib/rows', '../lib/rows.json'], and one importing./rows/indexgivesmissing: ['../lib/rows', '../lib/rows/index.ts']. A Sass stylesheet is named once.Writing rubric results
docs/architecture/cli-surface.md(the module list entry for the render):R1 narration: none; the entry states what render and
--reversedo, in the present tense.R2 research: none.
R3 evidence: no evidence cell added; the tests name the behavior.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.
R7 project status: none.
Scope
Testing
pnpm exec vitest run --project node packages/cli/api/render packages/cli/foundation/render packages/cli/foundation/doc-compiler/doc-loads.test.mjs(460 passed, 3 skipped); the interaction parity check in Chromium.pnpm check:knowledge.This change is stacked on the change that names the files a render does not carry, and lands after it.