Repository navigation
[experimental] render: the text answer names at most 10 files, then counts the rest - #12287
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.
Approved pending CI: CI has not run on this head yet, and it starts once this pull request targets main after the live-app render change it is stacked on lands.
The files line of astryx experimental render now stops at 10 names and names the folder that holds the rest, --json still lists every file, and the new test fails before the change and passes after it. Two small points, neither blocking:
- With exactly 11 files the cut line is longer than the full list (263 to 273 bytes in a probe) and hides the 11th name, so cut only when it saves bytes.
- Ending the cut with
(--json lists every one), asexperimental icondoes, tells an agent where the full list is.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the text answer names at most 10 files, forward and with
--reverse: verified (code at both call sites, new test, a probe of each direction). - Claim: it counts the rest and names the folder they share, with no folder when they share none: verified (code; a 201-file restore ends
... and 191 more in page-restored/images/). - Claim: a page with many images no longer prints a long line: verified (201 files: 7,230 to 397 bytes).
- Claim: the JSON answer still lists every file and its shape is unchanged: verified (the JSON branch returns before the text shaping; the test expects 13 files).
- Claim: before this change both directions printed every file on one line, about 9 KB for 200 images: verified (base code; 7,230 bytes with 34-character paths).
- Claim: the command is experimental and the change ships as an experimental patch: verified (registered only under
experimental; the changeset is apatchwith[experimental]). - Claim: the new render test and the text/JSON parity test pass: verified (both pass on this head; the new test fails on the base).
- Claim: no internal context in public text, and the change lands after the live-app render change: verified.
- File
.changeset/render-reverse-long-file-list.md: clear. - File
packages/cli/api/render/render.test.mjs: clear; the forward render's cut has no case of its own (non-blocking). - File
packages/cli/clients/cli/commands/experimental/render.mjs: the two non-blocking points above.
| * @param {string[]} files | ||
| */ | ||
| function fileList(files) { | ||
| if (files.length <= LISTED_FILES) return files.join(', '); |
There was a problem hiding this comment.
Non-blocking: with exactly 11 files the cut replaces one name with ... and 1 more in <folder>/, so the line gets longer than the full list (263 to 273 bytes in a probe) and the 11th name is gone. Cutting only when it saves bytes, for example only past 11 files, keeps the 11-file case whole.
d2409de to
ab0bf5c
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, and it runs once this pull request targets main after the live-app render change it is stacked on lands.
The files line of astryx experimental render now stops at 10 names and names the folder that holds the rest, --json still lists every file, and the new test fails before the change and passes after it. Two small points, neither blocking:
- With exactly 11 files the cut line is longer than the full list (263 to 273 bytes in a probe) and hides the 11th name, so cut only when it saves bytes.
- Ending the cut with
(--json lists every one), asexperimental icondoes, tells an agent where the full list is.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the text answer names at most 10 files, forward and with
--reverse: verified (both call sites, the new test, a probe). - Claim: it counts the rest and names the folder they share, with no folder when they share none: verified (code; a 201-file restore ends
... and 191 more in page-restored/images/). - Claim: a page with many images no longer prints a long line: verified (201 files: 7,230 to 397 bytes).
- Claim: the JSON answer still lists every file and its shape is unchanged: verified (the JSON branch returns before the text shaping; the test expects 13 files).
- Claim: before this change both directions printed every file on one line, about 9 KB for 200 images: verified (base code; 7,230 bytes with 34-character paths, more with longer names).
- Claim: the command is experimental and the change ships as an experimental patch: verified (registered only under
experimental; the changeset is apatchwith[experimental]and passes the changeset check). - Claim: the new render test and the text/JSON parity test pass: verified (both pass on this head; the new test fails on the base).
- Claim: no internal context in public text, and the change lands after the live-app render change: verified.
- File
.changeset/render-reverse-long-file-list.md: clear. - File
packages/cli/api/render/render.test.mjs: clear; the forward render's cut has no case of its own (non-blocking). - File
packages/cli/clients/cli/commands/experimental/render.mjs: the two non-blocking points above.
| if (files.length <= LISTED_FILES) return files.join(', '); | ||
| const rest = files.slice(LISTED_FILES); | ||
| const folder = sharedFolder(rest); | ||
| return `${files.slice(0, LISTED_FILES).join(', ')}, ... and ${rest.length} more${folder ? ` in ${folder}/` : ''}`; |
There was a problem hiding this comment.
Non-blocking: the cut names the folder of the remaining files but not where the full list is. Ending it with (--json lists every one), as experimental icon does, lets an agent that needs every name get it with one more call.
ab0bf5c to
e7e7c38
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The files line of astryx experimental render now names at most 10 files and counts the rest with the folder they share, --json still lists every file, and the new test fails before the change and passes after it. Three optional points, none blocking:
- With exactly 11 files the cut line is longer than the full list (263 to 273 bytes in a probe) and hides the 11th name, so cut only when it saves bytes.
- Ending the cut with
(--json lists every one), asexperimental icondoes, tells an agent where the full list is. - GitHub still compares this pull request with the old head of the branch it was stacked on, so the Files tab lists 119 files from 14 commits already on
mainand the review-signal check fails on that list; the change itself is three files.
Claims and files checked
Review mode: full; reason: rebase
- Claim: before this change both directions printed every file on one line, about 9 KB for 200 images: verified (base code joins every file; 7,230 bytes for 201 files with 34-character paths in a probe, more with longer names).
- Claim: the text answer names at most 10 files, then the count of the rest and the folder they share, with no folder when they share none: verified (the new helper in the render command; probes of 10 to 201 files; the new test).
- Claim: the JSON answer still lists every file and its shape is unchanged: verified (the JSON branch returns before the text shaping; the test expects 13 files; probes list every file).
- Claim: the command is experimental and only text output changes: verified (registered only under
experimental; only the two text records change). - Claim: the new test restores a page with 12 stylesheets, names the first 10 and then
... and 3 more in many-text/styles/, and JSON lists all 13 files: verified (it passes on this head and fails before the change). - Claim: the text/JSON parity test passes: verified (passes on this head).
- Claim: one change, with no internal context in public text: verified (a three-file patch; nothing internal in the added lines, title, body or commit message).
- Release note: names at most 10 files, then counts the rest and names their folder, as in
... and 190 more in page-restored/images/: verified (the same form as the probe's... and 191 more in page-restored/images/for 201 files). - Release note: a page with many images no longer prints a long line: verified (201 files: 7,230 to 397 bytes).
- Release note: the JSON answer still lists every file, as an
[experimental]patch: verified (the changeset check passes). - File
.changeset/render-reverse-long-file-list.md: clear. - File
packages/cli/api/render/render.test.mjs: clear; the forward render's cut has no case of its own (non-blocking). - File
packages/cli/clients/cli/commands/experimental/render.mjs: the first two optional points above. - The other 116 files GitHub lists arrive with 14 commits already on
main, each landed through its own pull request; merging this pull request changes none of them.
PR Analysis Report🔎 Preview ·
|
e7e7c38 to
415f495
Compare
|
/approve-spec 415f495 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The files line of astryx experimental render, and now its notCarried line, names at most 10 files and counts the rest with the folder they share, --json still lists every file, and the new test fails before the change and passes after it. Three optional points, none blocking:
- With exactly 11 files the cut line is longer than the full list (253 to 264 bytes in a probe) and hides the 11th name, so cut only when it saves bytes.
- Ending the cut with
(--json lists every one), asexperimental icondoes, tells an agent where the full list is. - The render function's doc still says the text output names every file in
notCarried; past 10 it now names the first 10 and counts the rest.
Claims and files checked
Review mode: full; reason: rebase
- Claim: before this change both directions printed every file on one line, about 9 KB for 200 images: verified (the base joins every file; 7,230 bytes for 201 files with 34-character paths in a probe, about 9 KB with 44-character paths).
- Claim: the text answer names at most 10 files, then the count of the rest and the folder they share, with no folder when they share none: verified (the new helper in the render command; probes of 10 to 201 files; the new test).
- Claim: the JSON answer keeps every file and its shape is unchanged: verified (the JSON branch returns before the text shaping; the test expects 13 files; probes list every file and every left-out file).
- Claim: the command is experimental and only text output changes: verified (registered only under
experimental; only the text records change). - Claim: the new test restores a page with 12 stylesheets, names the first 10 and then
... and 3 more in many-text/styles/, and JSON lists all 13 files: verified (it passes on this head and fails before the change). - Claim: the text/JSON parity test passes: verified (passes on this head).
- Claim: one change, with no internal context in public text: verified (a three-file patch; nothing internal in the added lines, title, body, branch name or commit message).
- Release note: names at most 10 files, then counts the rest and names their folder, as in
... and 190 more in page-restored/images/: verified (the same form as the probe's... and 191 more in page-restored/images/for 201 files). - Release note: a page with many images no longer prints a long line: verified (201 files: 7,230 to 397 bytes).
- Release note: the JSON answer still lists every file, as an
[experimental]patch: verified (the changeset check passes). - File
.changeset/render-reverse-long-file-list.md: clear. - File
packages/cli/api/render/render.test.mjs: clear; the forward render's cuts have no case of their own (non-blocking). - File
packages/cli/clients/cli/commands/experimental/render.mjs: the three optional points above.
| files: d.files.join(', '), | ||
| ...(d.notCarried?.length ? {notCarried: d.notCarried.join(', ')} : {}), | ||
| files: fileList(d.files), | ||
| ...(d.notCarried?.length ? {notCarried: fileList(d.notCarried)} : {}), |
There was a problem hiding this comment.
Non-blocking: render.doc.mjs still says each file a render cannot carry is named in notCarried in "the JSON result and the text output"; with this line the text names the first 10 and counts the rest. The Warnings list still names every file, so only the doc needs to say the text names the first 10.
User need
renderand--reverseprint every file they carried or wrote on one line. A page with 200 images prints about 9 KB on that line, and an agent reads every byte a command prints.Problem and solution fit
Current specification
astryx experimental renderis experimental (spec:AST-017FR27). The JSON shape is unchanged.Public delta and caller burden
Evidence
render.test.mjs: a page with 12 stylesheets in one folder; the text names the first 10, then "... and 3 more in many-text/styles/"; the JSON lists all 13 files.text-json-parity.test.mjspasses.Scope
Testing
pnpm exec vitest run --project node packages/cli/api/render/render.test.mjs packages/cli/clients/cli/commands/text-json-parity.test.mjs.