Skip to content

feat(report): bound report.md so GitHub can always render it#164

Merged
BenSheridanEdwards merged 1 commit into
mainfrom
feat/bounded-report
Jul 5, 2026
Merged

feat(report): bound report.md so GitHub can always render it#164
BenSheridanEdwards merged 1 commit into
mainfrom
feat/bounded-report

Conversation

@BenSheridanEdwards

Copy link
Copy Markdown
Owner

Why

A StyleProof report a reviewer can't open isn't a source of truth. On a large redesign (a 218-surface nav rebuild), report.md came out 4.7 MB / 133k table rows — GitHub's markdown viewer refuses to render past ~512 KB, so clicking the report gave "Sorry, we can't show files that are this big." The report failed exactly when the change was biggest.

What

The report generator now holds report.md to a byte budget (maxReportBytes, default ~400 KB):

  • Full property tables are emitted greedily until the budget is reached.
  • Remaining changed surfaces are listed as one-liners`surface` (+N more) · N change(s) — [crop] — under an announced banner ("summarized to keep this report renderable").
  • The exhaustive per-row detail is always in report.json and every crop in crops/, so nothing is dropped from the certification — only the inline detail is capped. Set maxReportBytes: Infinity to opt out.

On by default, so every adopter's reports become renderable without any config.

Verification

  • Bounding proven: a 40-surface synthetic that renders 139 KB uncapped comes out 17 KB under a 15 KB budget, with all 40 surfaces still in report.json (nothing dropped), the cap banner present, and one-line summaries with crop links. Regression test added in test/report.test.mjs.
  • No regression to small reports: npm run demo:check — the demo report is byte-identical (the cap never triggers below the budget).
  • Full suite 283/283; build, typecheck, lint, prettier, fallow all green.

Note

This also ships affectedSurfaces (#158), which was sitting in [Unreleased] — so the release is 3.17.0.

Proof

Not applicable — Node library / report generator; behaviour covered by the tests above.

A large redesign produced a report.md too big for GitHub's markdown viewer
(it refuses past ~512 KB) — the reviewer clicked through and got "we can't show
files this big", so the report was useless exactly when the change was biggest
(seen on a 218-surface nav rebuild: 4.7 MB, 133k table rows). The generator now
holds report.md to a byte budget (maxReportBytes, default ~400 KB): full property
tables greedily, then remaining changed surfaces as one-liners (name · change
count · crop link) under an announced banner. The exhaustive per-row detail is
always in report.json and every crop in crops/, so nothing is dropped from the
certification — only the inline detail is capped.

Verified: a 40-surface synthetic that renders 139 KB uncapped comes out 17 KB
under a 15 KB budget with all 40 surfaces still in report.json; small reports
(the demo) are byte-identical. Regression test in report.test.mjs. On by default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

🗺️ StyleProof report

📊 View the side-by-side visual report →


To accept: rebuild the map with styleproof-map, then rerun the report.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Fallow audit report

No GitHub PR/MR findings.

Generated by fallow.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Fallow audit report

0 inline findings selected for GitHub review.

@BenSheridanEdwards BenSheridanEdwards merged commit 6809d71 into main Jul 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant