Repository navigation
fix: integrate reviewed renderer and CLI maintenance into dev - #441
Merged
Merged
Conversation
…page Fixes #102. `readLimited(page.response, MAX_HTML_BYTES)` counted the entire HTML response against the 256 KiB cap, so a page with a tiny <head> (a handful of icon <link> tags) failed with "brand asset is too large" whenever its total body -- content the icon scan never even looks at -- pushed past the cap. Confirmed against the issue's own repro: `brands capture https://xquik.com` failed on main, succeeds after this change. Replace the html-page read with readHtmlHead(): stream the response and stop as soon as `</head>` appears in what's been read so far, before ever counting or downloading the rest of the body. Only fails closed with the existing "brand asset is too large" error if the byte budget runs out before a head close is seen -- same failure mode as before for pages whose head itself is huge or missing, per the issue's explicit requirement to keep that path failing closed. readLimited itself is unchanged and still guards image bytes. Regression coverage (three CLI-level tests, per CONTRIBUTING's "behavioral fixes need a failing regression test" -- verified failing on main via `git stash` before writing the fix): - a small head followed by a >256 KiB body now captures its icon; - a `</head>` split across two response chunks is still found; - a head that alone exceeds the cap (no `</head>` within budget) still fails closed with the same error and exit code. `npm test` (archify/): 729 passed, 0 failed, 16 skipped (real-Chrome visual-check tests, gated behind ARCHIFY_CHROME which isn't set here).
archify/renderers/shared/brand-marks.mjs changed in the previous commit, but archify.zip -- the distributable Skill package -- was not rebuilt, so it still shipped the old whole-page-capped readLimited() call. Installed Skill users would not have received the fix. Rebuilt with the canonical Node 22 toolchain via scripts/build-zip.sh. Verified: - scripts/build-zip.sh /tmp/fresh.zip; cmp -s /tmp/fresh.zip archify.zip -- exact byte match (the same comparison the zip-freshness CI job runs), confirming the build is both fresh and reproducible. - npm run check:brand-marks / check:validators -- clean, so the archive isn't stale because of an unrelated generated-artifact drift. - npm test (archify/) -- 841 passed, 0 failed, 27 skipped (unchanged). - package-smoke equivalent: unzipped archify.zip and ran scripts/package-smoke.mjs against the extracted package directly, matching the CI package-smoke job -- passed. Also rebased this branch onto the current main (several commits had landed, including the zip determinism work in #99-era commits this rebuild depends on) before rebuilding, so the archive reflects both this fix and everything else currently on main.
Signed-off-by: ketpatil77 <[email protected]>
Replace the spread-based minimum calculation with a one-pass reduction so large renderer receipts cannot exceed JavaScript's argument limit. Add a 200,000-measurement regression and rebuild the deterministic package.
# Conflicts: # archify.zip
…ation # Conflicts: # archify.zip
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 16, 2026
…ation # Conflicts: # archify.zip
# Conflicts: # archify.zip
…ation # Conflicts: # archify.zip
…gration # Conflicts: # archify.zip
…gration # Conflicts: # archify.zip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
This dev integration batch brings together five reviewed PRs while retaining their original commits and authorship:
Integration and impact
Base: dev
b98a414. Source changes merged without conflicts; competing archive snapshots were resolved by rebuilding one canonical ZIP from the final combined source. This avoids repeatedly rebasing the same independently reviewed fixes over binary package conflicts. No version, schema, rendered appearance, or geometry acceptance rule changes. #396 remains a separate diagnostic-classification change.Original author PRs are preserved and will become merged when this batch is merged with a merge commit. #418 could not be pushed by the maintainer, which is why its integration lives here.
Validation
Candidate
da85751, official Node22.23.2/macOS:145 focused tests passed,0 failures/skips across compiler import/call isolation, diagnostic boundary, brand capture, geometry, output checker, and README contracts. Installed dependencies from lockfile; rebuilt archify.zip from combined source;git diff --checkpasses. The brand boundary regressions were observed failing before correction. Existing authored diagram and CLI contracts are retained.Earlier per-PR CI results belong to their original heads. Final full CI and three-platform package smoke for this combined candidate are pending. Integration targets dev; actual-use acceptance and a separate promotion PR are required before main.