Skip to content

fix(dng): repair the real-camera conformance tier and gate it per-PR - #415

Merged
justin13888 merged 2 commits into
masterfrom
fix/353-real-dng-probe
Aug 31, 2026
Merged

fix(dng): repair the real-camera conformance tier and gate it per-PR#415
justin13888 merged 2 commits into
masterfrom
fix/353-real-dng-probe

Conversation

@justin13888

Copy link
Copy Markdown
Collaborator

Closes #353.

Both feature halves of #353 are already merged — #410 (typed ColorProfileInfo/NoiseProfile
read projection) and #411 (gamut-dng consumes the gamut-metadata facade; ExifMetadata
removed). This is the real-camera conformance tier catching up to them, plus the CI gap that let
it fall behind.

The breakage

#411 removed DecodedDng::exif_extra — correctly, since the whole EXIF sub-IFD now arrives inside
DngMetadata::exif and an extras list beside it would be the same data twice. But
tooling/gamut-dng-real-conformance/examples/probe.rs still read that field:

error[E0609]: no field `exif_extra` on type `DecodedDng`
   --> examples/probe.rs:104:17

Extended CI's "Real camera DNG conformance" job was green on the #410 merge and has failed on
every push since #411. Because the failure is at compile time, the gate has never run a
single sample against #411's change — the corpus assertions, the Adobe DNG SDK differential and
the preserving-rewrite round-trip have all been dark since that merge.

Why no per-PR gate caught it

gamut-dng-real-conformance is excluded from the workspace and nothing depends on it — it is
invoked by manifest path from mise run test-dng-real. So cargo clippy --workspace --all-targets and cargo test --workspace never compile it, and both #410 and #411 validated
clean. It is the only excluded tooling crate with this property: every other one is a path
dev-dependency of a workspace crate, so the workspace build reaches it.

ci: adds mise run check-dng-real to the lint job to close that. cargo check needs no corpus,
so the job does not grow the ~178 MiB fetch, and the expensive half — the Adobe DNG SDK — is
already built there for gamut-dng's own dev-dependency on gamut-dng-oracle.

The probe change

Beyond the repair, probe now reports the two projections #353 added. probe is how a corpus file's
MANIFEST.toml expectations are derived from measured behaviour, and these tags previously
reached it as the ifd0_extra/raw_extra residue it already prints — so typing them made probe
quieter without making it more informative. Measured output:

  profile       : model="iPhone13,3 back camera" as_shot_neutral=[0.448…, 1.0, 0.540…]
  color_profile : hue_sat=[-, -, -] look=- tone_curve=257 pts exposure_offset=None
      third calibration set: matrix=false illuminant=None calibration=false forward=false
      reduction matrices: 1=- 2=- 3=-
  noise_profile : planes=1 [scale=3.000e-5 offset=3.000e-8]
  extras        : ifd0=8 raw=1 exif=31 gain_map=true gain_map2=false

exif=31 is the EXIF sub-IFD's own entry count, not an extras list — the field the counter now
reads is the facade's whole directory, where the pre-#411 ExifMetadata carried five.

The Adobe-converted Canon file exercises the table path (hue_sat=[90x30x1 Linear, 90x30x1 Linear, -] look=36x8x16 Linear), and the Leica M Monochrom — no colour calibration at all —
prints color_profile : none / noise_profile : none, which is the case #410 called out for
keeping noise_profile off CameraProfile.

Validation

Command Outcome
mise run check-dng-real pass — the E0609 is gone
mise run test-dng-real 6 passed, 0 failed (408s), incl. the Adobe SDK differential
mise run lint pass
mise run fmt-check pass
mise run check-commits no errors in 2 commits
probe on 4 corpus files new lines render, populated and empty cases

test-dng-real was run against the full fetched corpus — the first time it has executed against
#411's change.

Notes

  • Deliberately touches nothing under crates/: no Cargo.toml, CHANGELOG.md or STATUS.md,
    which chore: release #412 (the open chore: release) owns. Commit types are test/ci so release-plz derives
    no version bump while that PR is in flight; none of the three paths sits in a published package.
  • Pre-existing and left alone: cargo fmt --all does not reach this excluded crate either, so
    gaps.rs, src/lib.rs, tests/real_corpus.rs and parts of probe.rs carry nightly-rustfmt
    deviations. Same root cause, but reformatting them here would bury a 3-file fix in unrelated
    churn. Worth a follow-up that decides whether the tier should be fmt-gated too.

`DecodedDng::exif_extra` went away when gamut-dng moved to the metadata
facade (#353), leaving `probe` reading a field that no longer exists — so
the real-camera conformance tier has not compiled since. The EXIF data did
not disappear, it moved inside `DngMetadata::exif`, so the counter now
reports that sub-IFD's own entry count instead.

Also reports the two projections #353 added, `color_profile` and
`noise_profile`. probe is how a corpus file's MANIFEST expectations are
derived from measured behaviour, and those tags used to reach it as the
`ifd0_extra`/`raw_extra` residue it already prints.
The tier is excluded from the workspace *and* nothing depends on it — it is
invoked by manifest path — so neither `clippy --workspace --all-targets` nor
`test --workspace` ever builds it. A gamut-dng API change can therefore break
it while every per-PR gate stays green, which is how the previous commit's
breakage reached master: only the extended run noticed, at compile time,
before a single sample was decoded.

`check` needs no corpus, so the lint job carries it without the ~178 MiB
fetch, and the Adobe DNG SDK it links is already built there for gamut-dng's
own dev-dependency. The corpus-backed assertions stay in `test-dng-real`.
@justin13888
justin13888 merged commit 0851e17 into master Aug 31, 2026
8 checks passed
@justin13888
justin13888 deleted the fix/353-real-dng-probe branch August 31, 2026 04:03
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.

gamut-dng: typed DNG metadata projection and facade consumption

1 participant