Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…or, add change files (#120)
| if (rasterEdge.totalPixels > 0) | ||
|
|
||
| const qreal inkCoverage = static_cast<qreal>(rasterEdge.inkPixels) / static_cast<qreal>(rasterEdge.totalPixels); | ||
| const bool populated = inkCoverage >= settings.minEdgeCoverage; |
There was a problem hiding this comment.
Pale-tint vector bleed is demoted to empty. Non-rectangular vector bleed art now always goes to the raster pass, and pixelIsInk treats near-white pixels as background. A light tint (e.g. a 3% yellow curved background) that really fills the bleed measures under 10% ink, so it is demoted and reported as bleed-margin-empty. Before this PR it passed.
There was a problem hiding this comment.
Policy, not a bug: ink is any non-near-white pixel (probe_threshold, default 16), and the 10% coverage floor is deliberate. A tint under that floor on a sparse area is flagged, and this is recorded as a residual limit in the evidence manifest. Left open for your call.
|
|
||
| // An edge that artwork bounds call populated but that is not provably solid, and that no | ||
| // raster measurement confirmed, must not pass as clean bleed. | ||
| if (!result.allEdgesConfirmed()) |
There was a problem hiding this comment.
Incomplete on every vector-bleed page by default. raster_confirm is off by default, so every page whose bleed is a curve, a logo or text, rather than an image or a filled rectangle, gets a check-incomplete finding. That marks ordinary, correct documents as not fully inspected.
There was a problem hiding this comment.
Intended fail-closed: without raster_confirm, bounds cannot show a hairline/stroke/text-only strip is inked, so the page reports informational check-incomplete (severity info) rather than passing. Fixture content-bleed-hairline-margin asserts it; profiles that want a verdict enable raster_confirm. Left open for your call.
| } | ||
| } | ||
|
|
||
| const QString reason = check.rasterConfirm |
There was a problem hiding this comment.
The reason always blames the pixel budget. Edges also stay unconfirmed when the reference or target box is invalid or the strip maps to an empty pixel rect. In those cases the message tells the operator to raise max_raster_pixels, which changes nothing.
There was a problem hiding this comment.
Partly addressed in 1b1bf0b: the reason now distinguishes raster-off from "raster could not be measured (over pixel budget, or unusable page boxes)". Separate reasons for an invalid reference vs target box are not split; they share the 'unusable page boxes' wording. Left open.
| PDFBleedMarginProbeResult result = probeFast(page, pageIndex, settings); | ||
|
|
||
| if (settings.fastOnly || result.allEdgesCovered() || !m_session) | ||
| if (settings.fastOnly || (result.allEdgesCovered() && result.allEdgesConfirmed()) || !m_session) |
There was a problem hiding this comment.
The raster pass now runs for most pages. Any unconfirmed edge (any bleed art that isn't an image, a shading or a filled rectangle) triggers it, and probeRaster re-renders the whole page once per strip. A 300-page document with vector bleed art goes from zero renders to 1200 full content-stream renders.
There was a problem hiding this comment.
Scoped, not removed: the raster only runs when raster_confirm is on and some edge is unconfirmed or uncovered; pages whose edges are all bounds-confirmed short-circuit. The cost is real for stroke/text-heavy pages (documented under Remaining risk). Per-strip render skipping is not added here. Left open.
A stroke-only rectangle on the bleed box passed the rectangle test because piece paths are unstroked, confirming every edge with an empty margin. GraphicPieceInfo now records whether a path is filled, and the rectangle test rejects diagonal edges and doubled-back corners. The fill test runs once per piece instead of per band, the per-side probe accessors collapse into one, and the incomplete reason no longer blames only the pixel budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edges were confirmed only by images, shadings and filled rectangles, judged on unclipped bounds. A full-bleed image clipped at trim was proven solid, while any filled non-rectangular background (curves, pale tints) went to raster, where near-white tints were demoted, or reported check-incomplete when raster_confirm is off. GraphicPieceInfo now carries the clip in effect, and an edge is confirmed by the area that images and filled paths or glyphs actually paint inside the strip, cut by their clip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Closes #120 (L01-15). Lands backlog row
bleed-raster-strip-depth.What was wrong
content-bleedaccepted a bleed strip as populated as soon as the union of artwork bounds touched it, so a single stray mark per edge passed clean. Raster confirmation never re-checked an edge the bounds pass had accepted, so enabling it did not help, and the 10% ink floor only applied to upgrading empty edges.Change
PDFBleedMarginProbeSettings::minEdgeCoverage). The fast pass measures bounds coverage per strip in 8 bands across its depth.04b2b684,1b1bf0be); stroke-only paths never count as solid (79d44ad2). Anything else that touches enough of the strip (hairlines, strokes) is unconfirmed (PDFBleedMarginProbeEdgeResult::confirmed).raster_confirmthe strip raster decides every unconfirmed edge, including demoting a sparse one tobleed-margin-empty. Without it, or when the strip raster cannot be measured (overmax_raster_pixelsor unusable page boxes), the page reports informationalcheck-incomplete(sopassis false) with a reason naming which applies, instead of passing clean.bleed-raster-strip-depthislanded;content-bleedlimitations rewritten; generated catalogs regenerated; README documents the floor.Proof
Fixtures committed first (
6ea3891b) and shown clean on the unchanged engine:content-bleed-sparse-marks(1 pt dot per edge)content-bleedwarning, all four edgescontent-bleed-hairline-margin(0.1 pt diagonal per edge)bleed-margin-emptycontent-bleed-hairline-margincheck-incomplete(pass false), covered by an engine testgit diff origin/dev --statshows only the two new snapshots).generate-architecture-catalogs.py --check,check_source_integrity.pyandcheck-change.py --dry-runpass. clang-format 18 clean on every touched source file (the probe.cpp/.halready violated on dev; formatted in0559ee62).04b2b684(adds theUnitTestsBleedMarginProbeproof lane inarchitecture/proof-lanes.yaml;check-architecture.pypasses locally).Remaining risk
raster_confirmon, pages whose artwork is not rectangles or images now render strips that were previously skipped.raster_confirmthat relied on a stroked or text-only margin will now seecheck-incomplete.Anti-slop review
The change is one coverage rule applied in the existing probe, with one new finding type reused from other checks. No new profile keys, no evidence added to existing findings, and no snapshot churn beyond the two new fixtures.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.