Repository navigation
fix: admit corroborated passive documentation PNG and JPEG references - #877
Conversation
From Codex: add bounded canonical source provenance for image declarations and rendered JPEGs, retaining independent threats and incomplete inspection evidence. Validate a conservative JFIF baseline subset without inspecting image semantics. Signed-off-by: Mohit Gupta <mohgupta@nvidia.com>
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Value and readiness
The narrow caption role and baseline JPEG corroboration remove only format-derived AE1 while preserving raw partial coverage. The reviewed code is approvable; hosted validation on the current head remains a merge prerequisite.
Material findings
No required code changes found. New declarations and rendered JPEGs require complete canonical source bytes, SHA256 and exact line/column/target/kind reconstruction. A nonpassive use in the reparsed source disqualifies the target even if its public record is missing. Mixed/fatal/truncated ledger evidence, executable or malformed assets and failed budgets preserve AE1. The JPEG validator checks bounded marker/table/frame/scan structure, exact coefficient-block consumption and terminal padding/EOI, rejecting metadata, redefinitions, unsupported coding modes and trailing bytes. There are no prior review threads.
PIC tradeoffs
Structural admission does not inspect image meaning or OCR and deliberately leaves coverage partial. The aggregate two-second format allowance is checked before and after each deterministic decoder; it prevents granting an exception after expiry but does not interrupt an in-progress JPEG entropy walk. Document/retain that distinction if a hard latency guarantee is intended. Format support is deliberately narrow, so ordinary unsupported JPEG metadata remains blocking.
Verification and gaps
Reviewed exact head 16453e1e20cb9a8e3e977cdbc4667ef49d0bb236, the full diff, pinned source, description, tests, and all prior review/comment threads. Read the full 1,647-line diff, all nine pinned files and surrounding extraction/finalizer paths. The tests cover native graph outcomes, forged provenance, omitted mixed records, aggregate budgets, malformed/trailing JPEGs, entropy/block counts and independent HIGH findings. No hosted checks attach to this exact head. The description reports 760 focused tests on older frozen commit 1487a18; that is supplemental author evidence, not independently verified current-head CI. Static review only; no contributor code, tests, installs, or external services were executed.
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Value and readiness
The code approval holds after synchronization. GitHub now reports a merge conflict, so the branch is not ready to merge.
Material findings
No new required code changes found. The JPEG validator, canonical source provenance, finalizer admission gates and all new image tests are unchanged. The only delta in a PR-owned production file is the already reviewed main ASCII fast path in artifacts.py from #907; it preserves the relevant ASCII folding behavior and does not alter reference kinds or source bindings.
PIC tradeoffs
Image meaning/OCR remains uninspected and coverage stays partial. The previously recorded before/after decoder time gate remains unchanged; it is not an interrupt inside the entropy loop.
Verification and gaps
Reviewed exact head 92ad386ca1b32e3833f0fcf2a6ec1fd44390021f against previously assessed 16453e1e20cb9a8e3e977cdbc4667ef49d0bb236. Reviewed the full prior image proof and current comparison, all changed owned-file hunks and pinned source. The intervening work is merged main plus synchronization. No hosted checks attach to this exact head. Conflict resolution must preserve the proof and receive fresh validation. No contributor code, tests, builds, imports or scanner invocations were executed.
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
From Codex, prepared on Mohit Gupta’s behalf.
A valid documentation image referenced as
Asset: `assets/overview.png`.currently receives High AE1 solely because its binary contents remain unsupported. This change recognizes a narrow standalone visual-caption role and corroborates it against complete canonical source bytes, SHA256, exact position and target. It also supports a bounded baseline JFIF JPEG subset; newly admitted rendered JPEG references require the same canonical provenance. Existing rendered-PNG policy remains intact.The exception applies only to format-only reference findings. Independent executable/ambiguous uses, malformed or trailing bytes, unknown metadata, missing/mixed/fatal/truncated evidence and exhausted budgets retain their findings. Source and format proofs are cached with aggregate work limits. Image coverage stays partial: this does not perform OCR, inspect image meaning, or claim complete inspection. See the policy and supported grammar.
Validation on frozen commit
1487a18cfbb288d49ee6f1ae16df440cf916b86b:make lint,make format-check, wheel build andtwine checkpassed.partialfor all four. The hostile fixtures’ authoredincompletecompletion expectation is still a mismatch; only their security-admission expectation passes. No fixture expectation or evaluator production filtering changed.Candidate wheel SHA256:
cedf1f3db9bd9c0c0bb69ddf5dfb76833ae20934b10cc8950865f10b4d814fe1. Its package metadata inherits main’s2.12.0; this is an unreleased source candidate, not a published release or PR #852 update. Base source isdcebfa6f; main subsequently merged unrelated P2 comment-boundary changes in95a52d89with no overlapping files. Full hosted CI and Docker checks remain pending; this task ran the bounded affected tests locally.