Skip to content

[experimental] export: the size output names each part of the file under its JSON key - #12405

Closed
josephfarina wants to merge 1 commit into
josephfarina/rl-render-checksfrom
josephfarina/rl-size-breakdown
Closed

josephfarina wants to merge 1 commit into
josephfarina/rl-render-checksfrom
josephfarina/rl-size-breakdown

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Record change: cli-surface's owning-code list names the render's size output (the bytes line, then one line per part under its JSON key) and the experimental markupBytes and sourceBytes fields. 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), then scriptBytes:, cssBytes:, markupBytes: (the markup with its inlined images) and sourceBytes: (the embedded source), in KB (a part under 1 KB prints in bytes). JSON adds markupBytes and sourceBytes beside cssBytes and scriptBytes. Render's record and the CLI surface record say what the size output holds.

Current specification

astryx experimental export is experimental (spec:AST-017 FR27). The JSON shape is the contract and only grows; the text output may change.

Public delta and caller burden

  • Text: the bytes line, then one line per part under its JSON key.
  • JSON: two new number fields; no field changes or goes away.

Evidence

  • Text: each size under its JSON key. render.interactive.test.mjs checks the bytes line and the four <key>: <n> KB lines, and text-json-parity.test.mjs checks every key, with no allowlist entry.
  • JSON: render.test.mjs checks the four parts are each above zero and add up to no more than bytes.
  • Blind runs (48 per arm, the same task with and without the breakdown): median calls 11 → 10; agents that asked about the size 21 → 10; 48 of 48 correct in both.

Writing rubric results

docs/architecture/cli-surface.md (the owning-code bullet for the render's size output) and render.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; and pnpm check:knowledge).
  • ESLint; 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)

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 19, 2026 4:04am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 19, 2026, 4:14 AM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision, and two fixes are needed either way.

  • The bytes: line prints cssBytes and scriptBytes under the words "CSS" and "script" and never names markupBytes or sourceBytes, 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 on bytes:) 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 bytes line 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 markupBytes and sourceBytes: 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.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

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 markupBytes and sourceBytes fields beside the existing sizes. Render's record states this.

@josephfarina
josephfarina force-pushed the josephfarina/rl-size-breakdown branch from 411f2a8 to 8a81a7f Compare November 17, 2026 20:14
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 8a81a7f

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 0e95965

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 0fc19a4

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bytes line and then scriptBytes, cssBytes, markupBytes and sourceBytes on 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 on bytes when 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 kb helper (render.mjs:29), which the interactive test allows.
  • Description and changeset: the JSON adds markupBytes and sourceBytes, 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 at render.doc.mjs:80 lags (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 bytes line 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-538 keeps 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.

Automated review (maintainer link)

@josephfarina josephfarina changed the title [experimental] render: one size line says what the file holds [experimental] render: the size output names each part of the file under its JSON key Nov 17, 2026
@josephfarina
josephfarina force-pushed the josephfarina/rl-render-checks branch from 39a2ae2 to b85cb75 Compare November 17, 2026 21:31
@josephfarina
josephfarina force-pushed the josephfarina/rl-size-breakdown branch from 0fc19a4 to fbb1c9e Compare November 17, 2026 21:57
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec fbb1c9e

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 on bytes when 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 markupBytes and sourceBytes, 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 bytes line 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 (the bytes: 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.

Automated review (maintainer link)

);
expect(page.status).toBe(0);
expect(page.stdout).toMatch(/^scriptBytes:\s+[\d.]+ KB$/m);
expect(page.stdout).toMatch(/^bytes:\s+[\d.]+ KB/m);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b8edc82

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, cssBytes and scriptBytes).
  • 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 on bytes when 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 markupBytes and sourceBytes, 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 bytes line 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 (the bytes: 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.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/rl-render-checks branch from b85cb75 to 2aea420 Compare November 18, 2026 03:33
@josephfarina
josephfarina force-pushed the josephfarina/rl-size-breakdown branch from b8edc82 to b32bd8f Compare November 18, 2026 04:03
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b32bd8f

@josephfarina
josephfarina force-pushed the josephfarina/rl-size-breakdown branch from 043ba96 to 8189b3e Compare November 18, 2026 10:45
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 8189b3e

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: bytes carries 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 markupBytes and sourceBytes beside cssBytes and scriptBytes, 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 bytes line 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 (the bytes: 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.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/rl-render-checks branch from 5e07e89 to 759b0bf Compare November 18, 2026 12:08
@josephfarina
josephfarina force-pushed the josephfarina/rl-size-breakdown branch from 8189b3e to a2244cd Compare November 18, 2026 13:25
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a2244cd

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 render is experimental, but the base now carries the rename to astryx experimental export and astryx experimental render exits 1 at this head, so please say astryx experimental export there.

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: bytes carries 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 markupBytes and sourceBytes beside cssBytes and scriptBytes, 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 render command is experimental under the release record: false (the command is now astryx 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 bytes line 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 (the bytes pattern 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.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec fa23ed4

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at render.interactive.test.mjs:806 has 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, cssBytes and, 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, markupBytes and sourceBytes follow under their keys, in KB. Verified, except that parts under 1 KB print in bytes (export.mjs:30).
  • Claim: the JSON adds markupBytes and sourceBytes, 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 bytes line and the four key lines. Verified: render.interactive.test.mjs:806-808 (it also accepts B and does not check the note).
  • Claim: the parity test checks every key with no allowlist entry. Verified: only warnings is 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-130 and _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 (unanchored bytes: 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.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the josephfarina/rl-render-checks branch from 53c9e94 to 0eb39bd Compare November 18, 2026 19:14
@josephfarina
josephfarina force-pushed the josephfarina/rl-size-breakdown branch from fa23ed4 to 101aa1c Compare November 18, 2026 19:59
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 101aa1c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at render.interactive.test.mjs:1030 has 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, cssBytes and, below stylesheets, 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, markupBytes and sourceBytes follow under their keys, in KB. Verified, except that parts under 1 KB print in bytes (render-output.mjs:15).
  • Claim: the JSON adds markupBytes and sourceBytes, 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 bytes line and the four key lines. Verified: render.interactive.test.mjs:1030-1032 (it also accepts B and does not check the note).
  • Claim: the parity test checks every key with no allowlist entry. Verified: only warnings is 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-86 and _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 (unanchored bytes: 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.

Automated review (maintainer link)

@josephfarina josephfarina changed the title [experimental] render: the size output names each part of the file under its JSON key [experimental] export: the size output names each part of the file under its JSON key Nov 18, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at render.interactive.test.mjs:1030 has 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, cssBytes and, below stylesheets, 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, markupBytes and sourceBytes follow under their keys, in KB. Verified, except that parts under 1 KB print in bytes (render-output.mjs:15).
  • Claim: the JSON adds markupBytes and sourceBytes, 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:19 and :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 bytes line and the four key lines. Verified: render.interactive.test.mjs:1030-1032 (it also accepts B and does not check the note).
  • Claim: the parity test checks every key with no allowlist entry. Verified: only warnings is 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-86 and _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 (unanchored bytes: 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.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a6dec9c

1 similar comment
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a6dec9c

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #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
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12859.

@josephfarina
josephfarina deleted the josephfarina/rl-size-breakdown branch November 19, 2026 17:42

This branch was successfully deployed

1 active deployment
Preview — a6dec9cf Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant