Repository navigation
[experimental] export: the size output names each part of the file under its JSON key - #12405
josephfarina wants to merge 1 commit into
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 either way.
- The
bytes:line printscssBytesandscriptBytesunder the words "CSS" and "script" and never namesmarkupBytesorsourceBytes, so the text no longer mirrors the JSON keys one to one as the CLI surface architecture (INV5) requires; print each size under its own JSON key (keeping the "most is the script" clause onbytes:) and drop the four new parity allowlist entries, or amend INV5 first. - The description says the text/JSON parity test shows the size fields on the size line, but that test only allowlists them (the line's shape is checked in
render.interactive.test.mjs), and its "632 passed" does not match the stated test command on this head, which passes 710 tests.
No current record settles the new size line (its wording and the clause shown when the script is over half the file) or the two experimental JSON fields markupBytes and sourceBytes. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, or names the clause that governs them; the author may do so as an engineering owner. Smaller points: a new comment in render-page.mjs restates its variable, and render.doc.mjs still lists only the CSS and script sizes.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset: the one
bytesline says what the size is made of (script, CSS, markup and embedded source): verified (render.mjs:83; base and head runs of one page). - Changeset and description: the JSON adds
markupBytesandsourceBytes: verified (_adapter.mjs:544-545). - Description: the line reads the total, then script, CSS, markup and source: verified (head run;
render.interactive.test.mjs:395). - Description: when the script is over half the file, the line adds why: verified (
render.mjs:83,scriptBytes > bytes / 2). - Description: the separate CSS and script lines fold into it, one size line in place of three: verified (head run).
- Description: no JSON field changes or goes away: verified (base and head JSON for one page differ only by the two new keys).
- Description: the command is experimental: verified (registered under
experimental; typedef and response type marked experimental). - Description: the JSON only grows and the text may change: the JSON only grows here (verified); the text change is held against INV5 (first finding).
- Description: the render test checks that each part is above zero and the four add up to at most the file: verified (
render.test.mjs:1111-1113, passing). - Description: the parity test shows the size fields on the size line: false; it only allowlists them (second finding).
- Description: 48 blind agent runs with fewer size questions: stated by the author; not reproducible from the repository.
- Description: one change, the size line: verified (every changed file serves it).
- Description: no internal context in public text: verified.
- Description: the stated test command passes: verified (710 passed, 3 skipped); its count of 632 is false at this head (second finding).
- Description: typecheck and ESLint on the changed files: verified (both clean).
.changeset/render-size-breakdown.md: clear.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: clear; the clause is not asserted.packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render.mjs: first finding.packages/cli/clients/cli/commands/text-json-parity.test.mjs: its four new allowlist entries go with the first finding.packages/cli/foundation/render/render-page.mjs: clear apart from the comment note.packages/cli/foundation/response/response-types.doc.mjs: clear.
|
Owner decision (engineering owner, covering this pull request): render's size line states in one line what the file holds, naming each size under its own JSON key, with a short clause when the script is more than half of the file. JSON adds the experimental |
411f2a8 to
8a81a7f
Compare
|
/approve-spec 8a81a7f |
|
/approve-spec 0e95965 |
0e95965 to
0fc19a4
Compare
|
/approve-spec 0fc19a4 |
There was a problem hiding this comment.
Changes requested: the code, records and tests are in order, but the pull request text still describes an earlier version of the change.
- The title says one size line says what the file holds, but this head prints the
bytesline and thenscriptBytes,cssBytes,markupBytesandsourceByteson lines of their own, so retitle it to match (for example "the size output names each part of the file under its JSON key"). - The Testing line says the stated test command passed 565 tests at this head, but that command passes 658 (3 skipped) at this head, so give the count from a run of this head or drop it.
The size lines now mirror their JSON keys, the two new JSON fields are additive and experimental, and the written HTML is byte-identical to the base's for the same page. CI has not run on this head, since the pull request targets a feature branch. Optional: name the markup and embedded-source sizes in the render.page returns text of render.doc.mjs, revert the parity-test allowlist re-wrap, and drop the comment in render-page.mjs that restates its variable.
Claims and files checked
Review mode: full; reason: rebase
- Description: the render used to print the total and two parts on separate lines: verified (base
render.mjs; base run). - Description: each part now prints under its own JSON key after
bytes, with a note onbyteswhen the script is over half the file: verified (render.mjs:83-87; head run). - Description: the parts print in KB: verified; a part under 1 KB prints in bytes through the same
kbhelper (render.mjs:29), which the interactive test allows. - Description and changeset: the JSON adds
markupBytesandsourceBytes, and no field changes or goes away: verified (_adapter.mjs:544-545; base and head JSON for one page differ only by those two keys). - Description: render's record and the CLI surface record say what the size output holds: verified (
render.doc.mjs:19,cli-surface.md:782-787); the returns text atrender.doc.mjs:80lags (non-blocking). - Description: the command is experimental, its JSON only grows and its text may change: verified (experimental group;
response-types.doc.mjs:175). - Description: the interactive test checks the
bytesline and the four per-key lines: verified (render.interactive.test.mjs:395-397). - Description: the parity test checks every key with no allowlist entry for the sizes: verified (
text-json-parity.test.mjs:536-538keeps only the warnings entry; passing). - Description: the render test checks the four parts are above zero and add up to at most the file: verified (
render.test.mjs:1110-1113; passing). - Description: blind agent runs with fewer size questions: stated by the author; not reproducible from the repository.
- Description: writing rubric results for the two records: verified (present tense; no research, references, status or evidence-cell changes).
- Description: the stated test command passes 565 tests at this head: false; it passes 658, with 3 skipped (blocking).
- Description: ESLint and the API type sync: verified (ESLint and the strict typecheck are clean; the sync emits both fields).
- Description: stacked on the render share checks: verified (the base branch).
- Title: one size line says what the file holds: false; this head prints five size lines (blocking).
- Changeset: one line per part with a note when the script is most of the file, and two JSON fields: verified.
.changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: non-blocking (returns text).packages/cli/api/render/render.interactive.test.mjs: clear; the clause is not asserted (non-blocking).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/clients/cli/commands/text-json-parity.test.mjs: non-blocking (formatting only).packages/cli/foundation/render/render-page.mjs: clear apart from the comment note.packages/cli/foundation/response/response-types.doc.mjs: clear.
39a2ae2 to
b85cb75
Compare
0fc19a4 to
fbb1c9e
Compare
|
/approve-spec fbb1c9e |
There was a problem hiding this comment.
Changes requested: the code, records, tests and this head's spec approval are in order, but one line of the description no longer holds at this head.
- The Testing line says the stated test command gives 658 passed, 3 skipped at this head, but it gives 667 passed, 3 skipped here (the extra tests arrived with the rebased base branch), so give the count from a run of this head or drop the number.
The size lines mirror their JSON keys, the two new JSON fields are additive and experimental, and the written HTML is byte-identical to the base's for the same page. CI has not run on this head, since the pull request targets a feature branch. Optional: assert the "most is the script" clause and its threshold in the interactive test, which passes today with or without it.
Claims and files checked
Review mode: full; reason: rebase
- Description: the record change names the size output and the two experimental fields in the CLI surface record's owning-code list, with the tests passing: verified (
cli-surface.md:789-794; the interactive, render and parity tests pass at this head). - Description: the render used to print the total and two parts on separate lines: verified (base
render.mjs; base run). - Description: agents asked about the size in about half of the blind runs: stated by the author; not reproducible from the repository.
- Description: each part now prints under its own JSON key after
bytes, with a note onbyteswhen the script is over half the file, in KB: verified (render.mjs:83-87; head run); a part under 1 KB prints in bytes through the same helper (render.mjs:30). - Description: the JSON adds
markupBytesandsourceBytes, and no field changes or goes away: verified (_adapter.mjs:561-562; base and head JSON for the same page differ only by those two keys). - Description: render's record and the CLI surface record say what the size output holds: verified (
render.doc.mjs:19,render.doc.mjs:80,cli-surface.md:789-794). - Description: the command is experimental, its JSON only grows and its text may change: verified (experimental group;
response-types.doc.mjs:175). - Description: the interactive test checks the
bytesline and the four per-key lines: verified (render.interactive.test.mjs:571-573; fails on the base, passes on the head). - Description: the parity test checks every key with no allowlist entry for the sizes: verified (render's case forgives only
warnings; passing). - Description: the render test checks that the four parts are above zero and add up to at most the file: verified (
render.test.mjs:1110-1113; fails on the base, passes on the head). - Description: blind runs with fewer calls and fewer size questions, all correct: stated by the author; not reproducible from the repository.
- Description: writing rubric results for the two records: verified (present tense; no research, references, status or evidence-cell changes).
- Description: the stated test command passes 658, with 3 skipped, at this head: false; it passes 667, with 3 skipped (blocking).
- Description: the knowledge check, ESLint and the API type sync: verified (all clean; the sync emits both fields).
- Description: stacked on the render share checks: verified (the base branch).
- Title: the size output names each part of the file under its JSON key: verified (
render.mjs:83-87). - Changeset: one line per part with a note when the script is most of the file, two new JSON fields, patch: verified.
.changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear (approved for this head).packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking (thebytes:check is not anchored, so the clause is untested).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/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
| ); | ||
| expect(page.status).toBe(0); | ||
| expect(page.stdout).toMatch(/^scriptBytes:\s+[\d.]+ KB$/m); | ||
| expect(page.stdout).toMatch(/^bytes:\s+[\d.]+ KB/m); |
There was a problem hiding this comment.
Non-blocking: this pattern is not anchored at the end of the line, so it passes whether or not the "(most is the script: ...)" clause prints. Asserting the clause here (the counter page's script is most of the file), and its absence on a page whose script is under half, would pin the threshold in render.mjs:83.
|
/approve-spec b8edc82 |
There was a problem hiding this comment.
Approved: the description's test count now matches this head, and the code, records, tests and this head's spec approval are in order.
The size lines mirror their JSON keys, the two new JSON fields are additive and experimental, and the written HTML is byte-identical to the base's for the same page. CI does not run on this pull request because it targets a feature branch rather than main. Optional: assert the "most is the script" clause and its threshold in the interactive test, which passes today with or without it.
Claims and files checked
Review mode: incremental; reason: none
- Description: the CLI surface record's owning-code list names the size output and the two experimental fields: verified (
cli-surface.md:789-794, under Owning code). - Description: the interactive, render and text/JSON parity tests pass: verified (all pass at this head).
- Description: the render used to print the total and two parts on separate lines: verified (base run prints
bytes,cssBytesandscriptBytes). - Description: agents asked about the size in about half of the blind runs: stated by the author; not reproducible from the repository.
- Description: each part now prints under its own JSON key after
bytes, with a note onbyteswhen the script is over half the file, in KB: verified (render.mjs:83-87; head runs); a part under 1 KB prints in bytes through the same helper (render.mjs:30). - Description: the markup size includes its inlined images: verified (images are inlined into the markup before it is measured,
render-page.mjs:1142,:1567). - Description: the JSON adds
markupBytesandsourceBytes, and no field changes or goes away: verified (_adapter.mjs:561-562; base and head JSON for the same page differ only by those two keys). - Description: render's record and the CLI surface record say what the size output holds: verified (
render.doc.mjs:19,render.doc.mjs:80,cli-surface.md:789-794). - Description: the command is experimental, its JSON only grows here and its text may change: verified (experimental group;
response-types.doc.mjs:175). - Description: the interactive test checks the
bytesline and the four per-key lines: verified (render.interactive.test.mjs:571-573). - Description: the parity test checks every key with no allowlist entry for the sizes: verified (render's case forgives only
warnings; passing). - Description: the render test checks that the four parts are above zero and add up to at most the file: verified (
render.test.mjs:1110-1113). - Description: blind runs with fewer calls and fewer size questions, all correct: stated by the author; not reproducible from the repository.
- Description: writing rubric results for the two records: verified (present tense; no research, references, status or evidence-cell changes).
- Description: the stated test command passes 667, with 3 skipped, at this head: verified (667 passed, 3 skipped).
- Description: the knowledge check, ESLint and the API type sync: verified (all clean; the sync emits both fields).
- Description: stacked on the render share checks: verified (the base branch).
- Title: the size output names each part of the file under its JSON key: verified (
render.mjs:83-87). - Changeset: one line per part with a note when the script is most of the file, two new JSON fields, patch: verified.
.changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear (approved for this head).packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking (thebytes:check is not anchored, so the clause is untested).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/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
b85cb75 to
2aea420
Compare
b8edc82 to
b32bd8f
Compare
|
/approve-spec b32bd8f |
043ba96 to
8189b3e
Compare
|
/approve-spec 8189b3e |
There was a problem hiding this comment.
Approved: the size output and the two new JSON fields match the CLI surface record, an engineering owner approved the record change for this head, and the stated tests pass.
Each size prints under its own JSON key, the two new fields are additive and experimental, and the written HTML is byte-identical to the base's for the same page. CI workflows do not run on this pull request while it targets a feature branch rather than main. Optional: assert the "most is the script" note and its threshold in the interactive test, and say that parts under 1 KB print in bytes.
Claims and files checked
Review mode: full; reason: rebase
- Description: the CLI surface record's owning-code list names the size output and the two experimental fields: verified (
docs/architecture/cli-surface.md:797-802). - Description: the interactive, render and text/JSON parity tests pass: verified (the stated command gives 684 passed, 3 skipped at this head).
- Description: blind runs cut the median number of calls from 11 to 10: stated by the author; not reproducible from the repository.
- Description: the render used to print the total and two parts on separate lines: verified (base
render.mjs:118,:119,:125). - Description: agents asked about the size in 21 of 48 blind runs: stated by the author; not reproducible from the repository.
- Description:
bytescarries a note when the script is over half the file, then one line per part under its JSON key, in KB: verified (render.mjs:118-122; head runs); a part under 1 KB prints in bytes (render.mjs:30). - Description: the JSON adds
markupBytesandsourceBytesbesidecssBytesandscriptBytes, and no field changes or goes away: verified (_adapter.mjs:583-584; base and head JSON for the same page differ only by those two keys). - Description: render's record and the CLI surface record say what the size output holds: verified (
render.doc.mjs:19,render.doc.mjs:80,cli-surface.md:797-802). - Description: the command is experimental, its JSON only grows and its text may change: verified (experimental group;
response-types.doc.mjs:173). - Description: the interactive test checks the
bytesline and the four per-key lines: verified (render.interactive.test.mjs:806-808; the per-key pattern also accepts B). - Description: the parity test checks every key with no allowlist entry for the sizes: verified (render's case forgives only
warnings,text-json-parity.test.mjs:536; passing). - Description: the render test checks that the four parts are above zero and add up to at most the file: verified (
render.test.mjs:1111-1114). - Description: blind runs with fewer size questions and all answers correct in both arms: stated by the author; not reproducible from the repository.
- Description: writing rubric results for the two records: verified (present tense; no narration, research, references, status or evidence-cell changes).
- Description: the stated test command passes at this head, with the knowledge check: verified (684 passed, 3 skipped; knowledge check clean).
- Description: ESLint and the API type sync: verified (no errors; the sync emits both fields).
- Description: stacked on the render share checks and lands after them: verified (the base branch).
- Title: the size output names each part of the file under its JSON key: verified (
render.mjs:118-122). - Changeset: one line per part with a note when the script is most of the file, two new JSON fields, an experimental patch: verified (
render.mjs:118-122,_adapter.mjs:583-584; the changeset check passes). .changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear (approved for this head).packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking (thebytes:check is not anchored, so the note is untested).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/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
5e07e89 to
759b0bf
Compare
8189b3e to
a2244cd
Compare
|
/approve-spec a2244cd |
There was a problem hiding this comment.
Changes requested: the code, tests, records and this head's spec approval are in order, but one line of the description no longer holds at this head.
- Regression: the description's "Current specification" says
astryx experimental renderis experimental, but the base now carries the rename toastryx experimental exportandastryx experimental renderexits 1 at this head, so please sayastryx experimental exportthere.
Each size prints under its own JSON key, and the two new JSON fields are additive and experimental. Optional: assert the "most is the script" note and its threshold in the interactive test, which passes today with or without it, and say that parts under 1 KB print in bytes.
Claims and files checked
Review mode: full; reason: rebase
- Description: the CLI surface record's owning-code list names the size output and the two experimental fields: verified (
docs/architecture/cli-surface.md:807-812). - Description: the interactive, render and text/JSON parity tests pass: verified (the stated command passes at this head).
- Description: blind runs cut the median number of calls from 11 to 10: stated by the author; not reproducible from the repository.
- Description: the render used to print the total and two parts on separate lines: verified (base
export.mjs:126,:127,:133). - Description: agents asked about the size in 21 of 48 blind runs: stated by the author; not reproducible from the repository.
- Description:
bytescarries a note when the script is over half the file, then one line per part under its JSON key, in KB: verified (export.mjs:126-130; head runs); a part under 1 KB prints in bytes (export.mjs:30). - Description: the markup size includes its inlined images and the source size is the embedded source: verified (head run with an image page;
render-page.mjs:1747). - Description: the JSON adds
markupBytesandsourceBytesbesidecssBytesandscriptBytes, and no field changes or goes away: verified (_adapter.mjs:583-584; base and head JSON for the same page differ only by those two keys). - Description: render's record and the CLI surface record say what the size output holds: verified (
render.doc.mjs:19,render.doc.mjs:80,cli-surface.md:807-812). - Description: the
astryx experimental rendercommand is experimental under the release record: false (the command is nowastryx experimental export; the old name exits 1). - Description: the JSON shape is the contract and only grows, and the text may change: verified (experimental group;
response-types.doc.mjs:173). - Description: the interactive test checks the
bytesline and the four per-key lines: verified (render.interactive.test.mjs:806-808; the per-key pattern also accepts B). - Description: the parity test checks every key with no allowlist entry for the sizes: verified (the export case forgives only
warnings,text-json-parity.test.mjs:536; passing). - Description: the render test checks that the four parts are above zero and add up to at most the file: verified (
render.test.mjs:1111-1114). - Description: blind runs with fewer size questions and all answers correct in both arms: stated by the author; not reproducible from the repository.
- Description: writing rubric results for the two records: verified (present tense; no narration, research, references, status or evidence-cell changes).
- Description: the stated test command passes at this head, with the knowledge check: verified.
- Description: ESLint and the API type sync: verified (no errors; the sync emits both fields).
- Description: stacked on the render share checks and lands after them: verified (the base branch).
- Title: the size output names each part of the file under its JSON key: verified (
export.mjs:126-130). - Changeset: the export command lists each part with a note when the script is most of the file, and adds the two JSON fields, as an experimental patch: verified.
.changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear (owner-approved bullet; approval lines unchanged).packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking (thebytespattern does not pin the note).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/export.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
|
/approve-spec fa23ed4 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
astryx experimental export now names each part of the file's size under its own JSON key, the description names the current command, and the stated tests pass on this head.
- Non-blocking: the
bytes:assertion atrender.interactive.test.mjs:806has no end anchor, so no test checks that the "(most is the script: ...)" note prints over half or stays off under half. - Non-blocking: parts under 1 KB print in bytes (a one-heading page prints
markupBytes: 14 B), not "in KB" as the description says.
Claims and files checked
Review mode: incremental; reason: none
- Claim: the architecture record's owning-code list names the size output and the two experimental fields. Verified:
docs/architecture/cli-surface.md:807-812. - Claim: the interactive, render and text/JSON parity tests pass. Verified: the stated command gives 689 passed, 3 skipped.
- Claim: the command used to print the total size and two of its parts on separate lines. Verified: the base printed
bytes,cssBytesand, later,scriptBytes. - Claim:
bytes:gains the script note when the script is over half the file. Verified:export.mjs:126; it shows at 422.1 of 505.9 KB and not at 324.3 of 672.4 KB. - Claim:
scriptBytes,cssBytes,markupBytesandsourceBytesfollow under their keys, in KB. Verified, except that parts under 1 KB print in bytes (export.mjs:30). - Claim: the JSON adds
markupBytesandsourceBytes, and no field changes or goes away. Verified:_adapter.mjs:583-584, and the base and head JSON compared. - Claim: the render's doc and the CLI architecture record say what the size output holds. Verified:
render.doc.mjs:19,cli-surface.md:807-812. - Claim: the command is experimental, its JSON shape only grows, and its text may change. Verified as far as the experimental-isolation and additive-field clauses state it; this change only adds fields.
- Claim: the interactive test checks the
bytesline and the four key lines. Verified:render.interactive.test.mjs:806-808(it also acceptsBand does not check the note). - Claim: the parity test checks every key with no allowlist entry. Verified: only
warningsis allowlisted for this command, and the test passes. - Claim: the render test checks each part is above zero and their sum is at most
bytes. Verified:render.test.mjs:1111-1114. - Claim: the two record lines carry no narration, research, rejected alternatives, change references, open questions or project status. Verified by reading both lines.
- Claim: the knowledge check, ESLint and the API type sync pass. Verified on this head.
- Claim: the change is stacked on the render's share checks. Verified: the base branch carries them.
- Claim: the blind-run numbers (calls, size questions, correctness). Not checkable from the repository; not relied on.
- Changeset: an experimental patch note naming the four parts, the note, and the two JSON fields. Verified against
export.mjs:126-130and_adapter.mjs:583-584. .changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear (record change approved for this head).packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking note (unanchoredbytes:match).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/export.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
53c9e94 to
0eb39bd
Compare
fa23ed4 to
101aa1c
Compare
|
/approve-spec 101aa1c |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
astryx experimental export now names each part of the written file's size under its own JSON key and says when the script is most of the file, its JSON gains the two experimental size fields, the written file itself is unchanged, and the stated tests pass on this head. This pull request lands after the share-checks branch it is stacked on.
- Non-blocking: the
bytes:assertion atrender.interactive.test.mjs:1030has no end anchor, so no test checks that the "(most is the script: ...)" note prints over half or stays off under half. - Non-blocking: parts under 1 KB print in bytes (a one-heading page prints
markupBytes: 14 B), not "in KB" as the description says.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the architecture record's owning-code list names the size output and the two experimental fields. Verified:
docs/architecture/cli-surface.md:830-835. - Claim: the interactive, render and text/JSON parity tests pass. Verified: the stated command gives 711 passed, 3 skipped.
- Claim: blind runs (calls, size questions, correctness). Not checkable from the repository; not relied on.
- Claim: the command used to print the total size and two of its parts on separate lines. Verified: the base prints
bytes,cssBytesand, belowstylesheets,scriptBytes. - Claim:
bytes:gains the script note when the script is over half the file. Verified:render-output.mjs:82; it prints at 415.8 of 494.4 KB and not at 319.1 of 658.4 KB. - Claim:
scriptBytes,cssBytes,markupBytesandsourceBytesfollow under their keys, in KB. Verified, except that parts under 1 KB print in bytes (render-output.mjs:15). - Claim: the JSON adds
markupBytesandsourceBytes, and no field changes or goes away. Verified:_adapter.mjs:583-584, and the base and head JSON compared. - Claim: the render's doc and the CLI architecture record say what the size output holds. Verified:
render.doc.mjs:19,cli-surface.md:830-835. - Claim: the command is experimental, its JSON shape only grows, and its text may change. Verified as far as the experimental-isolation and additive-field clauses state it; this change only adds fields.
- Claim: the interactive test checks the
bytesline and the four key lines. Verified:render.interactive.test.mjs:1030-1032(it also acceptsBand does not check the note). - Claim: the parity test checks every key with no allowlist entry. Verified: only
warningsis allowlisted for this command (text-json-parity.test.mjs:536), and the test passes. - Claim: the render test checks each part is above zero and their sum is at most
bytes. Verified:render.test.mjs:1120-1123. - Claim: the two record lines carry no narration, research, rejected alternatives, change references, open questions or project status. Verified by reading both lines.
- Claim: the knowledge check, ESLint and the API type sync pass. Verified on this head.
- Claim: the change is stacked on the render's share checks and lands after them. Verified: the base branch carries them.
- Changeset: an experimental patch note naming the four parts, the note and the two JSON fields. Verified against
render-output.mjs:82-86and_adapter.mjs:583-584; the changeset check passes. .changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: clear (record change approved for this head).packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking note (unanchoredbytes:match).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear.packages/cli/clients/cli/commands/experimental/render-output.mjs: clear.packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
… JSON key [skip ci]
0eb39bd to
543465f
Compare
101aa1c to
a6dec9c
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's spec decision for this head; nothing else blocks.
The rebase made a new head, which the earlier spec approval does not cover, so the size output's "(most is the script: ...)" note and the experimental markupBytes and sourceBytes fields again rest only on the proposed Owning code bullet in docs/architecture/cli-surface.md. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The pull request's own patch is unchanged, and the stated tests pass on this head.
- Non-blocking: the
bytes:assertion atrender.interactive.test.mjs:1030has no end anchor, so no test checks that the "(most is the script: ...)" note prints over half and stays off under half. - Non-blocking: parts under 1 KB print in bytes (a one-heading page prints
markupBytes: 14 B), not "in KB" as the description says.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the architecture record's owning-code list names the size output and the two experimental fields. Verified:
docs/architecture/cli-surface.md:830-835; it needs an engineering owner's approval at this head. - Claim: the interactive, render and text/JSON parity tests pass. Verified: the stated command gives 716 passed, 3 skipped.
- Claim: blind runs (calls, size questions, correctness). Not checkable from the repository; not relied on.
- Claim: the command used to print the total size and two of its parts on separate lines. Verified: the base prints
bytes,cssBytesand, belowstylesheets,scriptBytes. - Claim:
bytes:gains the script note when the script is over half the file. Verified:render-output.mjs:82; it prints at 416.2 of 494.8 KB and not at 319.1 of 812.1 KB. - Claim:
scriptBytes,cssBytes,markupBytesandsourceBytesfollow under their keys, in KB. Verified, except that parts under 1 KB print in bytes (render-output.mjs:15). - Claim: the JSON adds
markupBytesandsourceBytes, and no field changes or goes away. Verified:_adapter.mjs:584-585, and the base and head JSON compared on four pages. - Claim: the render's doc and the CLI architecture record say what the size output holds. Verified:
render.doc.mjs:19and:80,cli-surface.md:830-835. - Claim: the command is experimental, its JSON shape is the contract and only grows, and its text may change. Verified that the command and its response are experimental and that text is a projection of the JSON; this change only adds fields.
- Claim: the interactive test checks the
bytesline and the four key lines. Verified:render.interactive.test.mjs:1030-1032(it also acceptsBand does not check the note). - Claim: the parity test checks every key with no allowlist entry. Verified: only
warningsis allowlisted for this command (text-json-parity.test.mjs:536), and the test passes. - Claim: the render test checks each part is above zero and their sum is at most
bytes. Verified:render.test.mjs:1357-1359. - Claim: the two record lines carry no narration, research, rejected alternatives, change references, open questions or project status. Verified by reading both lines.
- Claim: the knowledge check, ESLint and the API type sync pass. Verified on this head.
- Claim: the change is stacked on the render's share checks and lands after them. Verified: the base branch carries them.
- Changeset: an experimental patch note naming the four parts, the note and the two JSON fields. Verified against
render-output.mjs:82-86and_adapter.mjs:584-585; the changeset check passes. .changeset/render-size-breakdown.md: clear.docs/architecture/cli-surface.md: needs an engineering owner's approval at this head.packages/cli/api/render/_adapter.mjs: clear.packages/cli/api/render/render.doc.mjs: clear.packages/cli/api/render/render.interactive.test.mjs: non-blocking note (unanchoredbytes:match).packages/cli/api/render/render.test.mjs: clear.packages/cli/api/render/render.type.mjs: clear (the two new fields wait on the same approval).packages/cli/clients/cli/commands/experimental/render-output.mjs: clear (the note waits on the same approval).packages/cli/foundation/render/render-page.mjs: clear.packages/cli/foundation/response/response-types.doc.mjs: clear.
|
/approve-spec a6dec9c |
1 similar comment
|
/approve-spec a6dec9c |
- #12367 [experimental] export: checks the file it wrote and names the one file to share Author: @josephfarina - #12405 [experimental] export: the size output names each part of the file under its JSON key Author: @josephfarina - #12295 fix(Markdown): keep task lists inside their column Author: @josephfarina - #12696 docs: Toast needs no provider; Table hooks name their row-type generic Author: @josephfarina - #12733 [experimental] export: a package linked from a folder inside the project is a package, so --reverse gives the page back Author: @josephfarina
|
Landed in #12859. |
Record change: cli-surface's owning-code list names the render's size output (the
bytesline, then one line per part under its JSON key) and the experimentalmarkupBytesandsourceBytesfields. Proof: the interactive, render and text/JSON parity tests pass; blind runs: median calls 11 → 10.User need
An agent that renders a page and finds the file large wants to know why before it shares or trims it. The render printed the file's total size and two of its parts on separate lines; agents asked for "the size" in 21 of 48 blind runs and spent calls working it out.
Problem and solution fit
The size output now says what the file is made of, each part under its own JSON key:
bytes: 533.0 KB(with "(most is the script: the page as a live app, with React and the packages it imports)" when the script is over half the file), thenscriptBytes:,cssBytes:,markupBytes:(the markup with its inlined images) andsourceBytes:(the embedded source), in KB (a part under 1 KB prints in bytes). JSON addsmarkupBytesandsourceBytesbesidecssBytesandscriptBytes. Render's record and the CLI surface record say what the size output holds.Current specification
astryx experimental exportis experimental (spec:AST-017FR27). The JSON shape is the contract and only grows; the text output may change.Public delta and caller burden
bytesline, then one line per part under its JSON key.Evidence
render.interactive.test.mjschecks thebytesline and the four<key>: <n> KBlines, andtext-json-parity.test.mjschecks every key, with no allowlist entry.render.test.mjschecks the four parts are each above zero and add up to no more thanbytes.Writing rubric results
docs/architecture/cli-surface.md(the owning-code bullet for the render's size output) andrender.doc.mjs(the render's record line on its size output):R1 narration: none; each states what the module owns or prints, in the present tense.
R2 research: none in the records; the blind-run numbers stay in this description.
R3 evidence: no evidence cells changed.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.
R7 project status: none; "experimental" is the fields' stability, not project status.
Testing
pnpm exec vitest run --project node packages/cli/clients/cli/commands/text-json-parity.test.mjs packages/cli/api/render packages/cli/foundation/render/share-checks.test.mjs packages/cli/foundation/response(all pass at this head; andpnpm check:knowledge).pnpm sync:api-types.This change is stacked on the render's share checks and lands after them.
preflight: pass a6dec9c (env-only fails excused: setup-workspace fixture install, packed-gather-cache.records, handoff.e2e re-run pass)