Skip to content

Replace the manual Canon AFInfo2 reader with generated tables - #760

Merged
swackhamer merged 12 commits into
refactor/tag-machineryfrom
codex/afinfo2-production-integration-20260913
Sep 13, 2026
Merged

Replace the manual Canon AFInfo2 reader with generated tables#760
swackhamer merged 12 commits into
refactor/tag-machineryfrom
codex/afinfo2-production-integration-20260913

Conversation

@swackhamer

@swackhamer swackhamer commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Canon AFInfo2/AFInfo3 metadata was decoded through a separate manual field sequence and mode map. This replaces that reader with the generated Canon::AFInfo2 table through the shared IFD/serial path, deleting the duplicate arm, eight private offsets, two parent IDs and the 20-value mode enum.

Effective processors and validation operands come from authenticated pinned ExifTool source. Generated ownership does not revive the retired manual decoder on refusal; the reader discards speculative child values/state while preserving earlier parent effects. Old AFInfo geometry and four CanonRaw parent omissions remain explicit separate work. The plan now records shared read/write definitions, separate writer acceptance, and reproducible random-release rehearsals that verify each version against its own native ExifTool; this change activates reading only.

Validation against ExifTool 13.59 and Perl 5.38.2:

  • Official two-tier regeneration: all 32 declared artifacts reproduce with no drift. 140 focused Python tests pass with zero skips, including mutations of the actual generated parent/child artifacts. Three public-reader tests, 55 IFD-reader tests, formatting and full Clippy pass.
  • Exact public fixture replay: seven TIFF inputs, both display and numeric modes, 14 native invocations pass. The 67-file native/control/candidate comparison adds two correct rows and removes 40 extras, with no lost correct keys or real-file output changes.
  • Fresh paired full corpus at runtime 3d0353f versus merged base 8887e5d: 4,238 files, 518,919 native tags, 468,087 correct rows in both builds, no meaningful per-file output changes, lost correct keys or crashes. The supervisor's exit 1 is retained for ExifTool's pre-existing empty-file diagnostic, independently reviewed; both OxiDex builds exit 0 on that input.
  • Supported source change: rename AFInfo2 entry 8 only in a copied native source, run official regeneration, and rebuild without handwritten Rust/Python changes. Both byte orders and display/numeric output use the new name and preserve native values. Only established volatile file-access timestamps are excluded; original raw comparisons are retained.

Production source and Cargo files retain the accepted 3d0353f behavior; the only later Rust edit is within the legacy Canon test module. Its zero-size fixture now asserts native rejection and its positive case uses the correct size. The full local Cargo unit/integration/doc run passes with 5,993 passes, zero failures and 124 ignored tests in 150.641 seconds. The first hosted test failure and the unavailable local nextest executable remain recorded; hosted checks must pass on this repaired head. Independent whole-source review found no remaining blocker. Native warnings, broader occurrence/group fidelity and generated writing are not claimed by the bounded checks. Failed intermediate attempts and exact evidence identities are recorded in docs/reference/afinfo2-production-plan.md.

All five required hosted checks passed on 2630ded8; complete job logs are preserved with the checkpoint evidence.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T16:03:00.968261Z 2630ded New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2630ded84a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2742 to +2743
if edge_processor is None or serial_tables is None or not _u16_membership_helper(validation_helper):
return False

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow validator-free serial edges through verification

When an IFD SubDirectory targets an authenticated ProcessSerialData table but declares no Validate, codegen.py still emits processor: Serial with validation: None. Here validation_helper is necessarily None, so this unconditional helper check rejects the route and expected_ifd_edge instead expects Native/unwalked, causing the official verifier to reject its own freshly generated artifact. Require _u16_membership_helper only when the source edge actually has Validate.

Useful? React with 👍 / 👎.

@swackhamer
swackhamer merged commit 4a3eb26 into refactor/tag-machinery Sep 13, 2026
6 checks passed
@swackhamer
swackhamer deleted the codex/afinfo2-production-integration-20260913 branch September 13, 2026 16:11
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.

1 participant