Repository navigation
[experimental] render: say when a file the page imports is not carried because its name reads as a tool's configuration - #12272
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 four fixes are needed first.
No current record governs the new not-carried warning, the note's "Not carried" line or the notCarried JSON field: 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 them.
- The rename hint tells a page that reads
./package.json(and likewisetsconfig.json, a lockfile orvite.config.ts) to "Rename it, such as package-data.json", which breaks the project if followed, so suggest moving the values the page reads into a separately named file instead. - The description says such a page rendered "with exit 0 and no warning" and the changeset says the render "now names" every left-out file, but the base already warns
not-embeddedfor each one, so reword both to say that the note line andnotCarriedare what is new. carriedNameFor('test.config.ts')suggeststest-data.ts, which the test-runner rule also refuses, so check the suggested name withembeddedPathProblembefore offering it and add that case to the test.- The text output of
astryx experimental renderhas nonotCarriedfield while the JSON has one, against the CLI rule that text field names mirror JSON keys, so add it the way the reverse view showsmissing.
The changeset could also say that not-carried replaces not-embedded for configuration-like names.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Title, the render now says when a configuration-named import is not carried: partly false; the base already warned
not-embeddedfor it (base run), and what is new is the specific code. - Description, such a page renders with exit 0 and no warning: false; the base warns
not-embeddednaming the file (base run; the existing test "never embeds a configuration file the page imports, and says so"). - Description, the note still promises an exact return,
--reversereports the file missing and the restored page fails to render: verified (base run). - Description, the render applied the carry rule in silence: false (same evidence).
- Description, the carry rule is unchanged: verified (
embedded-files.mjs:90-93,:145-146). - Description, the new warning names the file and a name that carries it: true for
chart.config.json, false fortest.config.ts, harmful forpackage.json(head runs). - Description, every left-out file is named in the note and in
notCarried, present only when not empty: verified (render-page.mjs:1392-1414,:1529;file-header.mjs:76-80; head tests). - Description, the opening sentence no longer claims an exact return then: verified (
file-header.mjs:70-72). - Description, other reasons keep
not-embedded: verified (render-page.mjs:1403-1408,:1300). - Description, the release record for experimental changes governs this behavior: partly; it covers the release route and namespace only.
- Description, the maintainers decided the warning's shape and text: not verified; no record or comment shows it.
- Description, the list of changed files: verified against the diff.
- Description, the three described tests exist and pass: verified (190 of 190 in the two changed test files).
- Description, every configuration name's suggested name is carried: false (
test.config.ts). - Description, frozen-set upgradability and chaos scores: not checked.
- Description, no new public API is hidden under the bug-fix label: partly; two experimental type rows are added, and the description names them.
- Description, public text has no internal context: verified.
- Description, full render suites, typecheck and ESLint: not re-run in full; the changed test files pass.
- Changeset, the render now names every left-out file: partly; the warnings already did, and the note and
notCarriedare new. - Changeset, a configuration-named file gets
not-carriedwith a name that carries it: false fortest.config.ts, misleading forpackage.json. - Changeset, the note lists left-out files and drops the exact-return promise: verified.
- Changeset, the JSON adds
notCarriedonly when a file is left out: verified (render-page.mjs:1529,_adapter.mjs:526).
Files:
.changeset/render-not-carried.md: finding (claims the base was silent; does not name the replacement).packages/cli/api/render/_adapter.mjs: finding (new JSON key without a text field).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: finding (rename hint).packages/cli/foundation/render/file-header.mjs: clear.packages/cli/foundation/render/render-page.mjs: finding (rename hint text).packages/cli/foundation/render/render.test.mjs: finding (asserts the rename hints and missestest.config.ts).
761f9a3 to
77bc237
Compare
There was a problem hiding this comment.
Changes are requested: one sentence in the pull request description still misstates what the base does, and the new reporting waits on an engineering owner's decision.
- The description's User impact says a page importing
./chart.config.jsonrenders "with exit 0 and no warning", but the base already warnsnot-embeddednaming that file (as the description's own Problem item 1 now says), so reword it to say the base gives only a genericnot-embeddedwarning while the note still promises an exact return.
No current record governs the new not-carried warning code with its rename or move hint, the note's "Not carried" line and reworded opening sentence, or notCarried in the JSON result, the text output and the RenderPageResponse type: approval needs an engineering owner to record that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or to name the record that should hold them. The move hint for a tool's own file, the test.config.ts hint, the notCarried text field and the changeset wording are fixed. One smaller point: any *.config.json gets the rename hint, so a page that imports a real tool's file such as babel.config.json is told to rename it (see the inline note).
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Description, user impact: a configuration-named import renders without that file, with exit 0: verified (base run).
- Description, user impact: it renders with no warning: false; the base warns
not-embeddednaming the file (base run; the edited base test asserted that code). - Description, user impact: the note still says the page comes back exactly, the way back reports the file missing, and the restored page fails with a file-not-found error: verified (base runs).
- Description: the carry rule is unchanged: verified (
embedded-files.mjs:90-93,:160-161; same expression as the base). - Description: the base already warns
not-embeddedfor each left-out file: verified (base runs). - Description: a configuration-named file gets
not-carriedwith a rename for*.config.jsonor a move-the-values hint for a tool's own file: verified (head runs;render-page.mjs:1403-1413). - Description: each offered name is checked against the carry rules: verified (
embedded-files.mjs:111-118; foundation tests). - Description: every left-out file is listed on a "Not carried" line, and the note then drops the exact-return promise: verified (
file-header.mjs:70-80; head runs). - Description:
notCarriedis added to the JSON result and the text output, only when not empty: verified (_adapter.mjs:542,commands/experimental/render.mjs:88; head runs). - Description: the release record's experimental route covers the command: partly; it covers the release route and namespace, not what the render reports.
- Description: the maintainers decided the warning's shape and text: not verified; no record, comment or reply shows it.
- Description: the list of changed files and functions: verified; it leaves out the one-line text-output change.
- Description: the described tests exist and pass: verified.
- Description: frozen-set upgradability and chaos scores: not checked.
- Description: one defect restored, no hidden public API, no internal context: partly; two experimental type rows and a JSON and text field are added, and the description names them; no internal context found.
- Description: the render suites pass, with typecheck and ESLint: verified (311 passed and 3 skipped at this head, more than the stated 299 because the rebased base added tests; strict and JSON-API typechecks and ESLint pass).
- Description: stacked on the live-app change: verified (base branch).
- Changeset: an experimental patch for the CLI: verified.
- Changeset: names every file the page uses that the rendered file does not carry: verified (note,
notCarried, warnings). - Changeset: a configuration-named file gets
not-carriedinstead ofnot-embedded: verified. - Changeset: rename a
*.config.json, or move the values from a tool's own file such aspackage.json: verified; a real tool's*.config.jsonalso gets the rename. - Changeset: the note lists every left-out file on a "Not carried" line and drops the exact-return promise: verified.
- Changeset: the JSON adds
notCarriedand the text output shows it, only when a file is left out: verified.
Files:
.changeset/render-not-carried.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 (its two rows wait on the owner decision).packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: non-blocking finding (rename hint for any*.config.json).packages/cli/foundation/render/file-header.mjs: clear.packages/cli/foundation/render/render-page.mjs: non-blocking finding (same hint wording).packages/cli/foundation/render/render.test.mjs: clear.
|
Owner decision (engineering owner, covering this pull request): |
|
/approve-spec 9edf6fe |
There was a problem hiding this comment.
Changes are requested: two sentences misdescribe what the render does, while the reporting itself now has an engineering owner's approval at this head.
- The new sentence in
packages/cli/api/render/render.doc.mjssays each left-out file "is listed with its reason" on the note's "Not carried" line and innotCarried, but both hold only file paths (the reason is only in each file's warning), so reword it to say each file is named there and its warning says why, or add the reasons to both. - The description's User impact says a page importing
./chart.config.jsonrenders "with exit 0 and no warning", but the base already warnsnot-embeddednaming that file (as the description's own Problem item 1 says), so reword it to say the base gives only a genericnot-embeddedwarning while the note still promises an exact return.
The /approve-spec at this head settles the open question about the new warning code, the note line and notCarried. One smaller point stays open: a real tool's *.config.json, such as babel.config.json, still gets the rename hint (see the inline note).
Claims and files checked
Review mode: incremental; reason: none
Changed rules (0): none.
Claims:
- Description, user impact: a configuration-named import renders without that file, with exit 0: verified (base run).
- Description, user impact: it renders with no warning: false; the base warns
not-embeddednaming the file (baserender-page.mjs:1394-1398; base run). - Description, user impact: the note still says the page comes back exactly, the way back reports the file missing, and the restored page fails with a file-not-found error: verified (base runs).
- Description: the base already warns
not-embeddedfor each left-out file, and the carry rule is unchanged: verified (embedded-files.mjs:90-93,:160-161, same expression as the base). - Description: a configuration-named file gets
not-carried, with a rename for*.config.jsonor a move-the-values hint for a tool's own file: verified (head runs;render-page.mjs:1403-1413). - Description: each offered name is checked against the carry rules: verified (
embedded-files.mjs:111-118; foundation tests). - Description: every left-out file is listed on a "Not carried" line, and the note then drops the exact-return promise: verified (
file-header.mjs:70-80; head runs). - Description:
notCarriedis added to the JSON result and the text output, only when not empty: verified (_adapter.mjs:542,commands/experimental/render.mjs:88; head runs and tests). - Description: the release record's experimental route covers the command: partly; it covers the release route and namespace, not what the render reports.
- Description: the maintainers decided the warning's shape and text: verified; an engineering owner recorded the decision and approved this head.
- Description: the list of changed files and functions: verified; it leaves out the API doc and the one-line text-output change.
- Description: the described tests exist and pass: verified (376 passed and 3 skipped in the render suites and the API-doc parse test at this head, more than the stated 299 because the rebased base added tests).
- Description: frozen-set upgradability and chaos scores: not checked.
- Description: one defect restored, no hidden public API, no internal context: partly; two experimental type rows and a JSON and text field are added, and the description names them; no internal context found.
- Description: typecheck and ESLint pass: verified (strict and JSON-API typechecks, ESLint on the changed files).
- Description: stacked on the live-app change: verified (base branch).
- Changeset: an experimental patch for the CLI that names every left-out file: verified.
- Changeset: a configuration-named file gets
not-carriedinstead ofnot-embedded, with a rename for a*.config.jsonor a move for a tool's own file such aspackage.json: verified; a real tool's*.config.jsonalso gets the rename. - Changeset: the note lists every left-out file on a "Not carried" line and drops the exact-return promise;
notCarriedis in the JSON and the text output only when a file is left out: verified. - API doc: each left-out file is listed with its reason on the note line and in
notCarried: false; both hold only paths. - API doc: the note then no longer says the page comes back exactly, and a configuration-named file gets the
not-carriedwarning saying what carries it: verified. - API doc: the page result lists the files it could not carry as
notCarriedwhen there are any: verified.
Files:
.changeset/render-not-carried.md: clear.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: blocking finding (the "with its reason" sentence).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: non-blocking finding (rename hint for any*.config.json).packages/cli/foundation/render/file-header.mjs: clear.packages/cli/foundation/render/render-page.mjs: non-blocking finding (same hint wording).packages/cli/foundation/render/render.test.mjs: clear.
|
/approve-spec c479c8d |
There was a problem hiding this comment.
Changes are requested for one sentence in the pull request description; the code changes since the last review fix both earlier code findings.
- The description's User impact says a page importing
./chart.config.jsonrenders "with exit 0 and no warning", but the base already warnsnot-embeddednaming that file (as the description's own Problem item 1 says), so reword it to say the base gives only a genericnot-embeddedwarning while the note still promises an exact return.
The owner decision on this pull request covers the new warning code, the note's "Not carried" line and notCarried, and the render tests pass at this head. Editing the description needs no new commit.
Claims and files checked
Review mode: incremental; reason: none
Changed rules (0): none.
Claims:
- Description, user impact: a configuration-named import renders without that file, with exit 0: verified (base run).
- Description, user impact: it renders with no warning: false; the base warns
not-embeddednaming the file (baserender-page.mjs:1395-1398; base run). - Description, user impact: the note still promises an exact return, the way back reports the file missing, and the restored page fails with a file-not-found error: verified (base runs).
- Description: the base already warns
not-embeddedfor each left-out file, and the carry rule is unchanged: verified (embedded-files.mjs:90-93,:160-162, the same expression as the base). - Description: a configuration-named file gets
not-carried, with a rename for a*.config.jsonor a move for a tool's own file: verified (head runs;render-page.mjs:1405-1412); the rename advice now also offers the move when a tool reads the file. - Description: each offered name is checked against the carry rules: verified (
embedded-files.mjs:106-119; foundation tests). - Description: every left-out file is listed on a "Not carried" line, and the note then drops the exact-return promise: verified (
file-header.mjs:70-80; head runs). - Description:
notCarriedis added to the JSON result and the text output, only when not empty: verified (_adapter.mjs:542,commands/experimental/render.mjs:88; head runs and tests). - Description: the release record's experimental route covers the command: verified for the release route and namespace; what the render reports is covered by the owner decision.
- Description: the maintainers decided the warning's shape and text: verified; an engineering owner recorded the decision on this pull request.
- Description: the list of changed files and functions: verified; it leaves out the API doc and the one-line text-output change.
- Description: the described tests exist and pass: verified (376 passed and 3 skipped in the render suites and the API-doc parse test).
- Description: frozen-set upgradability and chaos scores: not checked.
- Description: one defect restored, no hidden public API, no internal context: partly; two experimental type rows and a JSON and text field are added, and the description names them; no internal context found.
- Description: typecheck and ESLint pass: verified (strict and JSON-API typechecks, ESLint on the changed files).
- Description: stacked on the live-app change: verified (base branch).
- Changeset: an experimental patch for the CLI that names every left-out file: verified.
- Changeset: a configuration-named file gets
not-carriedinstead ofnot-embedded, with a rename for a*.config.jsonor a move for a tool's own file such aspackage.json: verified. - Changeset: the note lists every left-out file on a "Not carried" line and drops the exact-return promise;
notCarriedis in the JSON and the text output only when a file is left out: verified. - API doc: each left-out file is named on the note line and in
notCarried, and its warning says why: verified (every left-out file has a warning,render-page.mjs:1303-1308,:1404-1418). - API doc: the note then no longer says the page comes back exactly, and a configuration-named file gets
not-carried, which says what carries it: verified. - API doc: the page result lists the files it could not carry as
notCarriedwhen there are any: verified.
Files:
.changeset/render-not-carried.md: clear.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear (the earlier sentence is fixed).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: clear.packages/cli/foundation/render/file-header.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear (the rename advice now covers a file a tool reads).packages/cli/foundation/render/render.test.mjs: clear.
c479c8d to
9b01552
Compare
|
/approve-spec 9b01552 |
PR Analysis Report🔎 Preview ·
|
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| ~ | cli |
./api/experimental · Types · type RenderPageResponse |
data: { input: string; output: string; bytes: number; files: string[]; stylesheets: string[]; classes: number; cssBytes: number; images: number; warnings: RenderWarni … #49f620bb → data: { input: string; output: string; bytes: number; files: string[]; stylesheets: string[]; classes: number; cssBytes: number; images: number; warnings: RenderWarni … #528aac16 |
import type {RenderPageResponse} from '@astryxdesign/cli/api/experimental'; const x: RenderPageResponse = {data: …} |
| ~ | cli |
./api/experimental · Types · type RenderWarning |
code: "dropped-children" | "remote-asset" | "missing-asset" | "page-output" | "page-script" | "no-astryx-styles" | "chart-size" | "screen-query" | "not-embedded" | "node-crash" → code: "dropped-children" | "remote-asset" | "missing-asset" | "page-output" | "page-script" | "no-astryx-styles" | "chart-size" | "screen-query" | "not-embedded" | "not-carried" | "node-crash" |
import type {RenderWarning} from '@astryxdesign/cli/api/experimental'; const x: RenderWarning = {code: …} |
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
There was a problem hiding this comment.
Changes are requested for one claim. The description's User impact is now accurate, and the reporting has an engineering owner's approval at this head.
- Miss: the changeset, the new
notCarriedsentence inpackages/cli/api/render/render.doc.mjsanddata.notCarriedinrender.type.mjssay every file the page uses that the render does not carry is named, but a page outside a project, rendered from its own folder, that imports../lib/rows.tsgets no warning, nonotCarriedand a note saying it can come back exactly, while--reversereportsmissing: ['../lib/rows']; narrow those three sentences to the files inside the folder the render carries from, or add such imports to the not-carried list so the note,notCarriedand a warning name them.
Claims and files checked
Review mode: full; reason: rebase
- Claim: on the base, a page importing
chart.config.jsonrenders with exit 0 and only the genericnot-embeddedwarning, its note promises an exact return,--reversereports the file missing, and the restored page fails withERR_FILE_NOT_FOUND: verified (base run). - Claim: a configuration-like name gets
not-carriedinstead ofnot-embedded, with rename-or-move advice whose offered name the render carries: verified (embedded-files.mjs:106-119,render-page.mjs:1403-1412, tests). - Claim: the note lists every left-out file on a "Not carried" line and then stops saying the page comes back exactly: verified for files the render refuses (
file-header.mjs:70-80); false for an import from above the folder the render runs in (finding above). - Claim:
notCarriedappears in the JSON result and the text output only when a file is left out: verified (render-page.mjs:1540,_adapter.mjs:542,commands/experimental/render.mjs:88). - Claim: the carry rule itself is unchanged: verified (
readsAsToolConfigholds the same test the base had inline). - Claim: the maintainers decided the warning's shape and text: verified (engineering-owner decision and
/approve-specat this head). - Claim: the listed tests pass, and typecheck and ESLint are clean: verified (render suites 377 passed, 3 skipped; strict and JSON-API typechecks; ESLint).
- Claim: frozen-set scores match the base: not checkable here (the sets are not in the repository).
- Claim: public text carries no internal context: verified.
- Changeset: an
[experimental]patch;not-carriedreplacesnot-embeddedfor configuration-like names; rename or move advice;notCarriedin JSON and text only when a file is left out: verified. "Names every file the page uses that the rendered file does not carry": false (finding above). - Files:
.changeset/render-not-carried.md(finding),packages/cli/api/render/render.doc.mjs(finding),packages/cli/api/render/render.type.mjs(finding),packages/cli/api/render/_adapter.mjsclear,packages/cli/api/render/render.test.mjsclear,packages/cli/clients/cli/commands/experimental/render.mjsclear,packages/cli/foundation/render/embedded-files.mjsclear,packages/cli/foundation/render/file-header.mjsclear,packages/cli/foundation/render/render-page.mjsclear,packages/cli/foundation/render/render.test.mjsclear.
|
/approve-spec a50cf39 |
There was a problem hiding this comment.
Changes are requested for two findings. The earlier finding about modules imported from outside the carried folder is fixed, and the reporting has an engineering owner's approval at this head.
- A JSON file, stylesheet or image that a page rendered from its own folder imports from above that folder is carried and comes back from
--reversewithexact: true, but the render now also lists it under "Not carried", adds it tonotCarriedand warns that--reversecannot give it back, so inrender-page.mjsname anoutsidefile only when it is not already infiles, and add a test for that layout. - Miss: a Sass or Less stylesheet the page imports is left out (
--reversereports it missing), yet the note still says the page comes back exactly and neither the "Not carried" line nornotCarriednames it, contrary to the changeset andrender.doc.mjs, so add skipped stylesheets to the left-out list or narrow those sentences.
The Testing line's tally (299 passed) is from an earlier run; the same command gives 313 passed, 3 skipped at this head.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none since the last review.
- Claim, user impact: on the base a page importing
chart.config.jsonrenders with onlynot-embedded, the note promises an exact return,--reversereports it missing and the restored page fails withERR_FILE_NOT_FOUND: verified by running the base. - Claim, the carry rule is unchanged: verified (
readsAsToolConfigholds the base condition verbatim). - Claim, a configuration-named file gets
not-carriedwith a rename or move suggestion whose name is checked against the carry rules: verified (render-page.mjs:1412-1421,embedded-files.mjs:106-119, unit tests). - Claim, the note lists every left-out file on a "Not carried" line and then drops the exact-return sentence: false (carried files from above the page's folder are listed; Sass and Less imports are not).
- Claim,
notCarriedappears in the JSON and text output only when a file is left out: verified for the code paths, false for the over-reported layout above. - Claim, an engineering owner decided the reporting: verified (owner decision and
/approve-specon this head). - Claim, the listed tests cover the config, rename and mixed cases and
--reverseresults: verified; they pass at this head. - Claim, frozen-set scores are unchanged: not checkable from the repository.
- Claim, the test command passes: verified (313 passed, 3 skipped; the stated tally is stale).
- Changeset claims:
[experimental]patch,not-carriedreplacesnot-embeddedfor config names, the suggestion text andnotCarriedin JSON and text: verified; "names every file" and "lists every left-out file": false as above. - Files:
.changeset/render-not-carried.md(finding: Sass/Less claim),api/render/_adapter.mjs(clear),api/render/render.doc.mjs(finding: same claim),api/render/render.test.mjs(clear; no test for files above the page's folder),api/render/render.type.mjs(clear),commands/experimental/render.mjs(clear),foundation/render/embedded-files.mjs(clear),foundation/render/file-header.mjs(clear),foundation/render/page-worker.mjs(finding: over-collects outside files),foundation/render/render-page.mjs(finding: names carried files),foundation/render/render.test.mjs(clear).
There was a problem hiding this comment.
Changes are requested for two findings. The last review's finding is fixed: a module the page imports through a path alias from outside the carried folder is now named, and the engineering owner's approval covers this head.
- Miss: for a page inside a project, the outside-folder warning at
packages/cli/foundation/render/render-page.mjs:1447says "Render from a folder that holds it", but the render carries from the project's folder whatever the current folder (render-page.mjs:138-142), so rendering again from the repository root leaves the file out with the same warning; in a project, tell the reader to move the file inside the project's folder, and keep that remedy for a page outside a project. - Miss: the changeset,
render.doc.mjs:19andrender.type.mjs:55say every file the page uses that the render does not carry is named, but a file an outside module imports (../lib/rows.tsimporting./helper.ts) is neither carried nor named, because the import walk atpage-worker.mjs:1498-1524reads only carried modules; walk the outside modules' imports too, with a test, or narrow those three texts.
Non-blocking: the Testing line's tally is one test short at this head (440 passed, 3 skipped).
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim (changeset): every file the page uses that the render does not carry is named: false, a file an outside module imports is not named.
- Claim (changeset): a file left out for a configuration-like name warns
not-carriedinstead ofnot-embedded: verified (render-page.mjs:1409-1421, tests). - Claim (changeset): the warning says what carries the file, a rename for a
*.config.jsonor a move for a tool's own file: verified (embedded-files.mjs:106-119,render-page.mjs:1418-1419, tests). - Claim (changeset): the note lists left-out files on a "Not carried" line and drops the exact-return sentence: verified (
file-header.mjs:70-80, tests), bounded by the finding above. - Claim (changeset): the JSON adds
notCarriedand the text output shows it, only when a file is left out: verified (_adapter.mjs:542,render-page.mjs:1564,commands/experimental/render.mjs:88, test). - Claim (description): on the base a configuration-named data file is left out with exit 0 and a generic warning, the note promises an exact return, and the restored page fails to render: verified (base code; head probe of the restore).
- Claim (description): the carry rule is unchanged: verified (
readsAsToolConfigis the base expression). - Claim (description): each offered name is checked against the carry rules: verified (
carriedNameForcallsembeddedPathProblem; tests). - Claim (description): files outside the carried folder and Sass or Less stylesheets are named, and JSON or stylesheets carried from above are not: verified (tests, probes), with the remedy finding above.
- Claim (description):
embeddedPathProblemmarks when the configuration rule is the only reason: verified (embedded-files.mjs:160-161, test). - Claim (description): an engineering owner decided the warning's shape and text: verified (owner decision and approval for this head).
- Claim (description): the listed tests show each behaviour: verified, all pass.
- Claim (description): scores on the frozen evaluation sets: not checkable from the repository.
- Claim (description): the test command gives 439 passed, 3 skipped: stale, 440 passed, 3 skipped at this head.
- Claim (description): typecheck and lint pass: verified (both typecheck projects and ESLint on the changed files exit 0).
- Claim (description): no hidden public API and no internal context: verified (the two experimental type changes are stated; no internal context found).
- File
.changeset/render-not-carried.md: finding (every-file claim). - File
packages/cli/api/render/_adapter.mjs: clear. - File
packages/cli/api/render/render.doc.mjs: finding (every-file claim, line 19). - File
packages/cli/api/render/render.test.mjs: clear. - File
packages/cli/api/render/render.type.mjs: finding (every-file claim, line 55). - File
packages/cli/clients/cli/commands/experimental/render.mjs: clear. - File
packages/cli/foundation/render/embedded-files.mjs: clear. - File
packages/cli/foundation/render/file-header.mjs: clear. - File
packages/cli/foundation/render/page-worker.mjs: finding (the import walk reads only carried modules). - File
packages/cli/foundation/render/render-page.mjs: finding (the remedy at line 1447). - File
packages/cli/foundation/render/render.test.mjs: clear.
|
/approve-spec 285fac1 |
There was a problem hiding this comment.
Approved pending CI: the CI run on this head was refused for capacity before any test ran, so it needs a re-run before merge.
Both findings of the last review are fixed: the files an outside module imports are now named, and a page in a project is told to move an outside file inside the project's folder. Two non-blocking suggestions:
- Each outside file gets its own full
not-embeddedwarning, so a page that imports an outside barrel of 30 modules prints 31 near-identical warnings; one warning that names the count and points tonotCarriedwould keep the output short. - The changeset says the note lists every left-out file, but past 24 files it lists the first 24 and a count;
notCarriedholds them all, so "names the left-out files" would be exact.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none.
- Claims:
- The changeset is an experimental patch for the CLI: verified (changeset front matter).
- The render names every file the page uses that the file does not carry: verified for configuration names, runner names, files that are not images, Sass and Less, modules outside the carried folder by a relative path or an alias, the files those modules import, and outside images (the render tests; probes of a three-module chain and a project's outside chain).
- A configuration-named file gets
not-carriedinstead ofnot-embedded, with a rename or a move as the fix: verified (render-page.mjs:1413-1422; tests). - Each offered name passes the carry rules: verified (
embedded-files.mjs:106-119; unit test). - The note lists every left-out file and then drops the exact-return sentence: verified, except that past 24 files it lists 24 and a count (
file-header.mjs:70-80; non-blocking). notCarriedis in the JSON and the text output only when a file is left out: verified (render-page.mjs:1569,_adapter.mjs:542,render.mjs:88; text test).- On the base, a configuration-named import renders with exit 0 and only
not-embedded, the note promises an exact return,--reversereports the file missing and the restored page fails with a file-not-found error: verified (base render). - Outside files are named with a warning, a project page is told to move the file inside the project's folder, and a JSON file or stylesheet that widens the carried folder is carried, not named: verified (tests; probes).
- The carry rule is unchanged: verified (
embedded-files.mjs:90-92,:160-161keep the same condition). - An engineering owner decided the warning's shape and text: verified (decision comment and an approval for this head).
- The listed tests exist and pass, 441 passed and 3 skipped: verified.
- Typecheck (strict and JSON API) and ESLint on the changed files are clean: verified.
- Scores on the frozen evaluation sets: not checkable from the repository; no bearing on the code.
- Public text has no internal context: verified.
- Files:
.changeset/render-not-carried.md: non-blocking wording about the note's list.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: clear.packages/cli/foundation/render/file-header.mjs: clear (the note's 24-file cap is the changeset point above).packages/cli/foundation/render/page-worker.mjs: non-blocking, a stale comment onoutsideFiles.packages/cli/foundation/render/render-page.mjs: non-blocking, one warning per outside file.packages/cli/foundation/render/render.test.mjs: clear.
| leftOut.push(rel); | ||
| // A Sass or Less stylesheet already has its missing-asset warning. | ||
| if (/\.(scss|sass|less)$/i.test(f)) continue; | ||
| warnings.push({ |
There was a problem hiding this comment.
Non-blocking: this pushes one full sentence per outside file, and the walk now adds every file an outside module reaches. A page that imports an outside barrel of 30 modules gets 31 near-identical warnings (about 8.5 KB of text output). One warning that names the count, such as "31 files from outside the folder the render carries from are not carried (see notCarried) …", would keep the answer short.
| '@astryxdesign/cli': patch | ||
| --- | ||
|
|
||
| [experimental] `astryx experimental render` names every file the page uses that the rendered file does not carry. A file left out because its name reads as a tool's configuration now gets the warning code `not-carried` instead of `not-embedded`. It says what carries the file: rename a `*.config.json`, such as `chart.config.json` to `chart-data.json`, or move the values the page reads from a tool's own file, such as `package.json`, into a file of its own. The note at the top of the file lists every left-out file on a "Not carried" line, and then no longer says the page comes back exactly. The JSON adds `notCarried`, and the text output shows it, both only when a file is left out. |
There was a problem hiding this comment.
Non-blocking: "lists every left-out file on a 'Not carried' line" holds up to 24 files. Past that the note lists 24 and then "and N more" (file-header.mjs:78, MAX_LISTED), while notCarried holds them all. "names the left-out files on a 'Not carried' line" would be exact.
| const localFiles = []; | ||
| /** | ||
| * Local files the page uses that the file cannot carry: a module or JSON | ||
| * file it reaches by a relative import from outside the folder it carries |
There was a problem hiding this comment.
Non-blocking: this still says "by a relative import", but the list now also holds files reached through a path alias and the files that outside modules import. Suggested: "Local files the page uses that the file cannot carry: a module or JSON file outside the folder it carries from, which a carried or outside module imports, and a Sass or Less stylesheet, which a render does not compile."
285fac1 to
7a923f2
Compare
|
/approve-spec 7a923f2 |
There was a problem hiding this comment.
Approved pending CI: the CI run on this head was refused for capacity before any test ran ("CI is full"), so it needs a re-run before merge.
The rebase onto main keeps the approved change: the render names each file it leaves out, a configuration-named file gets not-carried with a fix that carries it, and the note stops promising an exact return when a file is missing. Three non-blocking suggestions from the last review still apply:
- Each outside file gets its own full
not-embeddedwarning, so a page that imports an outside barrel of 30 modules prints 31 near-identical warnings (about 8.5 KB of text); one warning that gives the count and points tonotCarriedwould keep the output short. - The changeset and the API doc say the note lists every left-out file, but past 24 files it lists 24 and a count while
notCarriedholds them all; "names the left-out files" would be exact. - The comment on
outsideFilesinpage-worker.mjsstill says "by a relative import", but the list also holds files reached through a path alias and the files outside modules import.
Claims and files checked
Review mode: full; reason: rebase
- Claims:
- The changeset is an experimental patch for the CLI: verified (changeset front matter).
- The render names every file the page uses that the file does not carry: verified for configuration names, runner names, files that are not images, Sass and Less, modules outside the carried folder by a relative path or an alias, the files those modules import, and outside images (render tests; probes).
- A configuration-named file gets
not-carriedinstead ofnot-embedded, with a rename or a move as the fix: verified (render-page.mjs:1413-1422; tests). - Each offered name passes the carry rules: verified (
embedded-files.mjs:106-119; unit tests). - The note lists every left-out file and then drops the exact-return sentence: verified, except that past 24 files it lists 24 and a count (
file-header.mjs:70-80; non-blocking). notCarriedis in the JSON and the text output only when a file is left out: verified (render-page.mjs:1569,_adapter.mjs:559,render.mjs:88; text test).- On the base, a configuration-named import renders with exit 0 and only
not-embedded, the note promises an exact return, the way back reports the file missing and the restored page fails with a file-not-found error: verified (base render). - Outside files are named with a warning, a page in a project is told to move the file inside the project's folder, and a JSON file or stylesheet that widens the carried folder is carried, not named: verified (tests; probes).
- The carry rule is unchanged: verified (
embedded-files.mjs:90-93and:160-161keep the same condition). - An engineering owner decided the warning's shape and text: verified (decision comment and an approval for this head).
- The listed tests exist and pass: verified; the command now reports 454 passed and 3 skipped, since the rebase brought in tests from
main(the description says 441). - Typecheck (strict and JSON API) and ESLint on the changed files are clean: verified.
- No new public API is hidden under the fix label: verified;
notCarriedand thenot-carriedcode are stated in the description and the changeset, and both are experimental. - Scores on the frozen evaluation sets: not checkable from the repository; no bearing on the code.
- Public text has no internal context: verified.
- Files:
.changeset/render-not-carried.md: non-blocking wording about the note's list.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: non-blocking, the same wording about the note's list; the rebase keepsmain's host-entry clause.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: clear.packages/cli/foundation/render/file-header.mjs: clear (the note's 24-file cap is the wording point above).packages/cli/foundation/render/page-worker.mjs: non-blocking, a stale comment onoutsideFiles.packages/cli/foundation/render/render-page.mjs: non-blocking, one warning per outside file.packages/cli/foundation/render/render.test.mjs: clear.
7a923f2 to
52f4253
Compare
|
/approve-spec 52f4253 |
There was a problem hiding this comment.
Approved pending CI: the CI workflow has not finished on this head yet, so it needs to pass before merge.
The rebase onto main keeps the approved change: the render names each file it leaves out, a configuration-named file gets not-carried with a fix that carries it, and the note stops promising an exact return when a file is missing. Four non-blocking suggestions:
- Each outside file gets its own full
not-embeddedwarning, so a page that imports an outside barrel of 30 modules prints 31 near-identical warnings (about 8.5 KB of text); one warning that gives the count and points tonotCarriedwould keep the output short. - The changeset and the API doc say the note lists every left-out file, but past 24 files it lists 24 and a count while
notCarriedholds them all; "names the left-out files" would be exact. - The comment on
outsideFilesinpage-worker.mjsstill says "by a relative import", but the list also holds files reached through a path alias and the files outside modules import. - The
render.pageentry infoundation/response/response-types.doc.mjslists every field of the JSON payload except the newnotCarried; adding it keeps the response reference in step.
Claims and files checked
Review mode: full; reason: rebase
- Claims:
- The changeset is an experimental patch for the CLI: verified (changeset front matter).
- The render names every file the page uses that the file does not carry: verified for configuration names, runner names, files that are not images, Sass and Less, modules outside the carried folder by a relative path or an alias, the files those modules import, and outside images and stylesheets (render tests; probes).
- A configuration-named file gets
not-carriedinstead ofnot-embedded, with a rename or a move as the fix: verified (render-page.mjs:1432-1441; tests). - Each offered name passes the carry rules: verified (
embedded-files.mjs:106-119; unit tests). - The note lists every left-out file and then drops the exact-return sentence: verified, except that past 24 files it lists 24 and a count (
file-header.mjs:70-80; non-blocking). notCarriedis in the JSON and the text output only when a file is left out: verified (render-page.mjs:1609,_adapter.mjs:559,render.mjs:88; text test).- On the base, a configuration-named import renders with exit 0 and only
not-embedded, the note promises an exact return, the way back reports the file missing and the restored page fails with a file-not-found error: verified (base render). - Outside files are named with a warning, a page in a project is told to move the file inside the project's folder, and a JSON file or stylesheet that widens the carried folder is carried, not named: verified (tests; probes).
- The carry rule is unchanged: verified (
embedded-files.mjs:90-93and:160-161keep the same condition). - An engineering owner decided the warning's shape and text: verified (decision comment and an approval for this head).
- The listed tests exist and pass: verified; the command now reports 456 passed and 3 skipped, since the rebase brought in tests from
main(the description says 441). - Typecheck (strict and JSON API) and ESLint on the changed files are clean: verified.
- No new public API is hidden under the fix label: verified;
notCarriedand thenot-carriedcode are stated in the description and the changeset, and both are experimental. - Scores on the frozen evaluation sets: not checkable from the repository; no bearing on the code.
- Public text has no internal context: verified.
- Files:
.changeset/render-not-carried.md: non-blocking wording about the note's list.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: non-blocking, the same wording about the note's list.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: clear.packages/cli/foundation/render/file-header.mjs: clear (the note's 24-file cap is the wording point above).packages/cli/foundation/render/page-worker.mjs: non-blocking, a stale comment onoutsideFiles.packages/cli/foundation/render/render-page.mjs: non-blocking, one warning per outside file.packages/cli/foundation/render/render.test.mjs: clear.
…figuration A page can import a file whose name reads as a tool's configuration, such as chart.config.json. The render keeps the carry rule and leaves it out, but it now says so: a not-carried warning names the file and a name that carries, the note at the top lists it under the carried files, and the JSON result lists it in notCarried.
A render leaves out files for other reasons too: a file a test or story runner would run, a file outside the carried folder, or an image it cannot carry. Each already has a warning; the note at the top and the JSON notCarried now name them as well, so the note never says the page comes back exactly when it cannot.
…text The not-carried warning tells a page that reads a tool's own file, such as package.json, tsconfig.json, a lockfile or vite.config.ts, to move the values it reads into a file of its own, and offers a rename only for a *.config.json. Every name it offers is checked against the carry rules, so test.config.ts never gets test-data.ts, which a test runner picks up. The text output shows notCarried, as the reverse view shows missing.
… Not carried line and notCarried
…e doc says where the reason is A *.config.json can be a real tool's file, such as babel.config.json, so the not-carried warning now says to rename it only if it holds the page's data, and to move the values the page reads if a tool reads it. Render's doc says each left-out file is named on the note's line and in notCarried, and its warning says why.
…carries from A page rendered from its own folder that imports ../lib/rows.ts loaded the module but the render left it out with no word: the note said the page comes back exactly, and --reverse then reported it missing. Such a module, JSON file or stylesheet now gets a not-embedded warning that says why and what to do, and is named on the note's Not carried line and in notCarried.
…uded A JSON file or stylesheet from above the page's folder is carried, so it is no longer also named as left out. An image the page shows from outside the folder it carries from, and a Sass or Less stylesheet, are left out, so the note's Not carried line and notCarried name them, and the note no longer says the page comes back exactly.
…tside the carried folder A tsconfig path alias such as @shared/* mapped to ../shared/* reached a module outside the folder a render carries from, and the render left it out without naming it. The worker now records any import outside that folder, relative or aliased, so the note, notCarried and a warning name it. The notCarried description also names the Sass and Less case.
…emedy in a project A module from outside the folder a render carries from can import more files; the import walk now follows those modules too, so each file the page needs is named. In a project a render carries from the project's folder wherever it runs, so the warning for a file outside it says to move the file inside the project's folder.
52f4253 to
beb0587
Compare
|
/approve-spec beb0587 |
There was a problem hiding this comment.
Approved pending CI: the CI workflow's jobs were refused for capacity on this head, so they need a re-run and must pass before merge.
The rebase onto main keeps the approved change: the render names each file it leaves out, a configuration-named file gets not-carried with a fix that carries it, and the note stops promising an exact return when a file is missing. Four non-blocking suggestions:
- Each outside file gets its own full
not-embeddedwarning, so a page that imports an outside barrel of 30 modules prints 31 near-identical warnings (about 8.5 KB of text); one warning that gives the count and points tonotCarriedwould keep the output short. - The changeset and the API doc say the note lists every left-out file, but past 24 files it lists 24 and a count while
notCarriedholds them all; "names the left-out files" would be exact. - The comment on
outsideFilesinpage-worker.mjsstill says "by a relative import", but the list also holds files reached through a path alias and the files outside modules import. - The
render.pageentry infoundation/response/response-types.doc.mjslists every field of the JSON payload except the newnotCarried; adding it keeps the response reference in step.
Claims and files checked
Review mode: full; reason: rebase
- Claims:
- The changeset is an experimental patch for the CLI: verified (changeset front matter).
- The render names every file the page uses that the file does not carry: verified for configuration names, runner names, files that are not images, Sass and Less, modules outside the carried folder by a relative path or an alias, the files those modules import, and outside images (render tests; probe).
- A configuration-named file gets
not-carriedinstead ofnot-embedded, with a rename or a move as the fix: verified (render-page.mjs:1437-1447; tests; probe). - Each offered name passes the carry rules: verified (
embedded-files.mjs:106-119; unit tests). - The note lists every left-out file and then drops the exact-return sentence: verified, except that past 24 files it lists 24 and a count (
file-header.mjs:70-80; non-blocking). notCarriedis in the JSON and the text output only when a file is left out: verified (render-page.mjs:1614,_adapter.mjs:565,render.mjs:88; text test; probe).- On the base, a configuration-named import renders with exit 0 and only
not-embedded, the note promises an exact return, the way back reports the file missing and the restored page fails with a file-not-found error: verified (base probe). - Outside files are named with a warning, a page in a project is told to move the file inside the project's folder, and a JSON file or stylesheet that widens the carried folder is carried, not named: verified (tests).
- The carry rule is unchanged: verified (
embedded-files.mjs:90-93and:160-161keep the same condition). - The files listed under the smallest restoration hold what the description says: verified;
page-worker.mjs, the text view and the API doc change too. - An engineering owner decided the warning's shape and text: verified (decision comment and an approval for this head).
- The listed tests exist and pass: verified; the new tests fail on the base, and the command now reports 458 passed and 3 skipped, since the rebase brought in tests from
main(the description says 441). - Typecheck (strict and JSON API) and ESLint on the changed files are clean: verified.
- No new public API is hidden under the fix label: verified;
notCarriedand thenot-carriedcode are stated in the description and the changeset, and both are experimental. - Scores on the frozen evaluation sets: not checkable from the repository; no bearing on the code.
- Public text has no internal context: verified.
- Files:
.changeset/render-not-carried.md: non-blocking wording about the note's list.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: non-blocking, the same wording about the note's list.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: clear.packages/cli/foundation/render/embedded-files.mjs: clear.packages/cli/foundation/render/file-header.mjs: clear (the note's 24-file cap is the wording point above).packages/cli/foundation/render/page-worker.mjs: non-blocking, a stale comment onoutsideFiles.packages/cli/foundation/render/render-page.mjs: non-blocking, one warning per outside file.packages/cli/foundation/render/render.test.mjs: clear.
User impact
A page that imports a data file whose name reads as a tool's configuration, such as
./chart.config.json, renders without that file in its embedded source, with exit 0 and only the genericnot-embeddedwarning. The note at the file's top still says the page comes back exactly, but--reversegives back a page that imports a file it does not have (exact: false,missing: [chart.config.json]), and the restored page fails withERR_FILE_NOT_FOUND.Problem and solution fit
not-embeddedfor each file it leaves out, but the note at the file's top still says the page comes back exactly.--reversecannot tell the file was incomplete.The carry rule stays. This PR:
not-carriedinstead ofnot-embedded, with what carries it: rename a*.config.json(such aschart.config.json→chart-data.json), or move the values the page reads from a tool's own file (package.json,tsconfig.json, a lockfile,vite.config.ts) into a file of its own, such aspage-data.json. Each offered name is checked against the carry rules before it is offered.notCarriedto the JSON result and to the text output, only when not empty.Expected behavior and authority
astryx experimental render(experimental,spec:AST-017FR27): the carry rule inembedded-files.mjsis unchanged; a render reports what it leaves out.Smallest restoration
foundation/render/embedded-files.mjs:readsAsToolConfig(name)(the rule, unchanged) andcarriedNameFor(name), the name the warning offers;embeddedPathProblemmarks when that rule is the only reason.foundation/render/render-page.mjs: thenot-carriedwarning andnotCarried.foundation/render/file-header.mjs: the "Not carried" line and the opening sentence.api/render/_adapter.mjs,api/render/render.type.mjs: the JSON field and the warning code.Evidence
render.test.mjs: a page importingchart.config.jsonrenders with exit 0, thenot-carriedwarning, the note line, the honest opening sentence andnotCarried;--reversereportsexact: falseandmissing: [chart.config.json]. Renamed tochart-data.json, it is carried,notCarriedis absent, and--reverseis exact.foundation/render/render.test.mjs: every configuration name's suggested name is one the rule carries; a runner or dotfile name is not marked as configuration.render.test.mjs: a page importingrows.test.ts,chart.config.jsonand afake.pngthat is not an image lists all three under "Not carried" and innotCarried, with onenot-carriedand twonot-embeddedwarnings.Scope
Components:
astryx experimental renderTesting
pnpm exec vitest run --project node packages/cli/api/render packages/cli/foundation/render packages/cli/foundation/doc-compiler/doc-loads.test.mjs(441 passed, 3 skipped).