Skip to content

fix: admit corroborated passive documentation PNG and JPEG references - #877

Merged
rng1995 merged 18 commits into
mainfrom
codex/passive-documentation-images
Nov 2, 2026
Merged

rng1995 merged 18 commits into
mainfrom
codex/passive-documentation-images

Conversation

@mohgupta-ship-it

Copy link
Copy Markdown
Member

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:

  • 760 focused reference, finalizer, JPEG, native-graph, context and opaque-reporting tests passed with the frozen main lock; make lint, make format-check, wheel build and twine check passed.
  • Independent review covered provenance forgery/mixed-use omissions, malformed JPEG structure and near-budget entropy. All 128 packaged source files and 132 wheel RECORD entries were independently verified.
  • The exact candidate wheel and unchanged PNG/JPEG fixture bytes were scanned offline and consumed by the approved evaluator 1.6.1: both benign cases pass with advisory partial coverage; both hostile trailing-data cases remain blocked with High AE1 plus the existing Critical opaque-content limitation. The frozen main baseline blocks both benign cases.
  • Raw native completion remains partial for all four. The hostile fixtures’ authored incomplete completion 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’s 2.12.0; this is an unreleased source candidate, not a published release or PR #852 update. Base source is dcebfa6f; main subsequently merged unrelated P2 comment-boundary changes in 95a52d89 with no overlapping files. Full hosted CI and Docker checks remain pending; this task ran the bounded affected tests locally.

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>
yashrajp22 added a commit that referenced this pull request Oct 22, 2026
Signed-off-by: yashrajbasav <yashrajbasav@nvidia.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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>
@rng1995
rng1995 merged commit 415d507 into main Nov 2, 2026
6 checks passed
@rng1995
rng1995 deleted the codex/passive-documentation-images branch November 2, 2026 19:06
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.

2 participants