PPLT-6073: raise the PDF regression tolerance and close the PDF coverage gaps - #2432
Merged
Merged
Conversation
Two CI failures on the 1.32.10 release PR, neither a product bug.
Regression (Track P): `jack sparrow resume.pdf` diffed by 648 pixels against
a 600 budget, in box [369, 1447, 692, 1448] at a channel delta of 4. That box
is not the circular photo clip the 600 was measured against — it is the
hairline rule under the LANGUAGES heading, whose two pixel rows are the only
non-white rows across those 324 columns. A second, previously unmeasured
source of run-to-run jitter on a fixed Chromium build (the manifest browser
and the run browser matched, so the goldens are not stale). Budget raised to
2000, ~2x the 918-pixel worst case of both sources landing at once and still
0.1% of the page, with the second source documented.
@percy/core: all 1322 specs passed; the job failed nyc's 100% threshold on
two uncovered spots.
- pdf-rasterize.js:128, the asInputError rethrow when a rendered page comes
back under Percy's 10px floor. fitScale only clamps the upper bound, so a
4x4pt MediaBox rasterizes to 8x8 at scale 2 and trips it. The new test
also pins that this surfaces as a 400, not a 500.
- pdf-snapshot.js:67-68, the decoded-size check. The existing oversize test
trips the encoded cap first, leaving the decoded one unreachable. The cap
rounds up to a whole base64 quantum, so 52428801 bytes encodes to exactly
MAX_PDF_BASE64_CHARS and clears it — the two-byte window the second check
exists to close.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 42 minutes. View limit detailsLimit details: You’ve used the included review currently available. This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Review configuration: ⚙️ Run configurationConfiguration used: Workspace UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Comment |
rishigupta1599
approved these changes
Sep 16, 2026
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.
Fixes the two CI failures seen on the 1.32.10 release PR (#2430). Test-only — no product code changes.
Regression (Track P)
jack sparrow resume.pdfdiffed by 648 pixels against a 600 budget, in box[369, 1447, 692, 1448]at a channel delta of 4.That box is not the circular photo clip the 600 was measured against — it is the hairline rule under the LANGUAGES heading, whose two pixel rows are the only non-white rows across those 324 columns. A second, previously unmeasured source of run-to-run jitter on a fixed Chromium build (the manifest browser and the run browser matched, so the goldens are not stale).
Budget raised to 2000 — roughly 2x the 918-pixel worst case of both sources landing at once, and still 0.1% of the page. A real rendering regression moves glyphs or layout and blows straight past it, and a size change is never tolerated at all. The second source is now documented alongside the first.
@percy/corecoverageAll 1322 specs passed; the job failed nyc's 100% threshold on two uncovered spots.
pdf-rasterize.js:128— theasInputErrorrethrow when a rendered page comes back under Percy's 10px floor.fitScaleonly clamps the upper bound, so a 4x4pt MediaBox rasterizes to 8x8 at scale 2 and trips it. The new test also pins that this surfaces as a 400, not a 500.pdf-snapshot.js:67-68— the decoded-size check. The existing oversize test trips the encoded cap first, leaving the decoded one unreachable. The cap rounds up to a whole base64 quantum, so 52428801 bytes encodes to exactlyMAX_PDF_BASE64_CHARSand clears it — the two-byte window the second check exists to close.Verification
Both new specs pass locally. Because nyc returns no data for a spec-filtered run, coverage was confirmed by mutation instead — each target line was broken in turn and the corresponding spec failed:
pdf-rasterize.js:128—throw asInputError(error)→throw errorExpected 500 to be 400pdf-snapshot.js:67—if (buffer.length > MAX_PDF_BYTES)→if (false && …)%PDF-magic checkRegressionhas already passed green with this change.Merge order
CI runs on the merge result (
refs/pull/N/merge), so once this lands on master, re-running #2430 will pick the fix up automatically — no change needed on the release branch.🤖 Generated with Claude Code