Skip to content

Commit b72854e

Browse files
committed
Add diagnostic severity/messages and RAW fixes
Introduce TransferConceptDiagnosticSeverity and message helpers for transfer diagnostics, compute default severity and message text, and expose them in the C++ API and Python bindings. Update TransferConceptDiagnostic to carry severity, add severity/message name helpers, and implement logic to derive severity and human-readable messages. Expand conservative vendor RAW/source-processing classification for multiple vendors (Pentax, Panasonic, Olympus, Kodak, Minolta, Sigma, etc.) and add corresponding unit tests. Update docs and version (0.4.12) to describe the new severity/message fields and host UI localization guidance.
1 parent 24a5635 commit b72854e

18 files changed

Lines changed: 365 additions & 33 deletions

CHANGES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# OpenMeta Changes
22

3+
## 0.4.12 - 2026-05-18
4+
5+
Changes compared with `0.4.11`.
6+
7+
### Added
8+
9+
- Added stable severity and message helpers for transfer concept diagnostics so
10+
host/UI code can display concise transfer-preview reasons without inventing
11+
its own default text.
12+
13+
### Changed
14+
15+
- Expanded conservative RAW/source-processing classification for additional
16+
Pentax, Panasonic, Olympus, Kodak, Minolta, and Sigma MakerNote/raw table
17+
patterns.
18+
319
## 0.4.11 - 2026-05-15
420

521
Changes compared with `0.4.10`.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.11
1+
0.4.12

docs/api_stability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ different status.
2727
| Semantic metadata query: `query_metadata(...)`, `query_crop_metadata(...)`, focused query helpers, and `metadata_query_fuzzy_search_available()` | `openmeta/metadata_query.h` | Experimental | Query contract for inspection matches plus normalized candidates. Current coverage includes crop/active-area/border margins, exposure/gain, white balance, color, lens correction, orientation, and RAW/source-processing metadata across standard tags, selected DNG tags, fuzzy XMP paths, and vendor RAW-processing classification. Matches report `exact_match`, `fuzzy_match`, and `fuzzy_score` so tools can label exact results separately from RapidFuzz near-miss hits. `OPENMETA_ENABLE_RAPIDFUZZ=ON` adds optional near-miss XMP/property-path scoring. Grouped candidates include `matrix_set`, `vector_set`, and `table` shapes for related non-crop metadata, including RAW black/white levels, linearization, CFA/sensor layout, source geometry, raw-storage identifiers, and source-processing buckets. Python `Document` and `TransferSourceSnapshot` mirror this as thin dictionary-returning wrappers. |
2828
| Structured metadata interpretation records: `interpret_metadata(...)`, `interpret_metadata_query(...)` | `openmeta/metadata_interpretation.h` | Experimental | Thin structured projection over semantic query candidates. Records carry query class, semantic kind, normalized shape, confidence, source entry ids, and normalized origin/size/rect/margins/value arrays where available. Current scope covers orientation, geometry/crop/border, exposure/gain, color/white-balance, lens-correction, and RAW/source-processing records. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
2929
| Cross-family concept resolution: `resolve_metadata_concepts(...)`, `resolve_metadata_concept(...)` | `openmeta/metadata_concepts.h` | Experimental | First bounded resolver for duplicated host-facing concepts. Current scope reports candidates, candidate source entries, source families, preferred entries, normalized numeric/text keys, full normalized value vectors, transfer hints, normalized date/time fields, date/time precision, timezone kind, normalized geometry fields, and same-role conflicts for orientation, date/time, color/profile, GPS, geometry, lens-correction, and RAW-processing evidence across EXIF, XMP, IPTC, ICC, PNG text, and query-backed interpretation records where applicable. Geometry candidates cover crop, active area, border, and sensor geometry with canonical origin, size, rect, and margin fields when available. Candidate transfer hints distinguish `safe`, `source_bound`, `rendered_unsafe`, and `requires_target_image_spec` evidence, with compatible-file and rendered-image safety booleans. Color/white-balance, lens-correction, and RAW-processing concepts preserve grouped matrix/vector/table values for host inspection; they do not make source-bound values safe to serialize into rendered targets. GPS date/time is combined from `GPSDateStamp` plus `GPSTimeStamp` when both entries exist, and GPS altitude candidates expose altitude-reference code plus below-sea-level state when reference metadata is present; `metadata_concept_gps_altitude_reference_name(...)` provides a stable display token for the reference code. It is intended for inspection UI and host policy decisions; it does not rewrite metadata or hide ambiguity. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
30-
| Transfer concept diagnostics: `transfer_concept_diagnostics_from_store(...)` | `openmeta/metadata_transfer.h` | Experimental | Preflight view over concept candidates for `TransferSafetyMode`. Each diagnostic reports concept kind/role, transfer hint, keep/drop/requires-target-image-spec action, reason token, conflict flag, source entries, compatible/rendered safety booleans, and GPS altitude-reference presentation fields. Intended for UI previews and host policy messages before calling `prepare_metadata_for_target(...)`; it does not replace the actual transfer filter. Python `Document` and `TransferSourceSnapshot` expose `transfer_concept_diagnostics(...)` dictionaries. |
30+
| Transfer concept diagnostics: `transfer_concept_diagnostics_from_store(...)`, `transfer_concept_diagnostic_message(...)` | `openmeta/metadata_transfer.h` | Experimental | Preflight view over concept candidates for `TransferSafetyMode`. Each diagnostic reports concept kind/role, transfer hint, keep/drop/requires-target-image-spec action, reason token, severity token, default message text, conflict flag, source entries, compatible/rendered safety booleans, and GPS altitude-reference presentation fields. Intended for UI previews and host policy messages before calling `prepare_metadata_for_target(...)`; it does not replace the actual transfer filter. Python `Document` and `TransferSourceSnapshot` expose `transfer_concept_diagnostics(...)` dictionaries with `severity_name` and `message` fields. |
3131
| Vendor RAW-processing summaries: `vendor_raw_processing_from_store(...)`, `classify_vendor_raw_processing_field(...)` | `openmeta/vendor_raw_processing.h` | Experimental | Conservative grouped source-RAW/source-processing field summaries for decoded Sony, Canon, Nikon, Fujifilm, Pentax, Panasonic, Olympus, Kodak, Minolta, Sigma, Samsung, Ricoh, Apple, DJI, Google, FLIR, Casio, Sanyo, KyoceraRaw, Reconyx, HP, JVC, GE, Motorola, Nintendo, and Microsoft MakerNotes, including vendor-private, computational, thermal, preview, face-geometry, stitch/panorama, Apple computational capture/HDR/motion, DJI pose/thermal, Google HDR+/shot-log, pixel-shift/multi-shot/composite/auto-lighting source processing, and FLIR radiometric/raw-value buckets. Direct field classification also recognizes decoded Phase One/Leaf RAW-processing tags; use the dedicated Phase One/Leaf helpers for normalized geometry and processing summaries. Intended for audit/UI and rendered-transfer safety decisions, not for writing vendor RAW/source-processing values into rendered targets. |
3232
| Transfer safety audit: `transfer_safety_audit_from_store(...)` | `openmeta/metadata_transfer.h` | Experimental | Preflight summary of source entries and entries filtered or invalidated by `TransferSafetyMode`, including Sony/Canon/Nikon/Fujifilm/Pentax/Panasonic/Olympus/Kodak/Minolta/Sigma/Samsung/Ricoh/Apple/DJI/Google/FLIR/Casio/Sanyo/KyoceraRaw/Reconyx/HP/JVC/GE/Motorola/Nintendo/Microsoft RAW/source-processing buckets. Intended for diagnostics and host UI before preparing rendered-image transfers. |
3333
| Raw-carrier passthrough audit: `raw_carrier_passthrough_audit_from_snapshot(...)` | `openmeta/metadata_transfer.h` | Experimental | Diagnostic preflight for opt-in raw carriers. Reports candidate carriers and primary block reasons such as missing payload, target incompatibility, safety filtering, content-bound C2PA, explicit profile policy, missing decoded-entry links, or unsupported carrier kind. Hosts can call it directly before enabling snapshot passthrough. |

docs/host_integration.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ hint: `safe`, `source_bound`, `rendered_unsafe`, or
6969
`rendered_image_safe` booleans for host UI and preflight policy. For transfer
7070
previews, `transfer_concept_diagnostics_from_store(...)` converts those hints
7171
into keep/drop/requires-target-image-spec actions for a selected
72-
`TransferSafetyMode`.
72+
`TransferSafetyMode`, plus stable severity tokens and default message text for
73+
host UI. Hosts can localize or replace the wording, but they do not need to
74+
invent the basic safe/drop/rewrite reasons.
7375

7476
## Adapter Classes
7577

@@ -640,8 +642,14 @@ for (size_t i = 0U; i < diagnostics.diagnostics.size(); ++i) {
640642
openmeta::transfer_concept_diagnostic_action_name(item.action);
641643
const char* reason =
642644
openmeta::transfer_concept_diagnostic_reason_name(item.reason);
645+
const char* severity =
646+
openmeta::transfer_concept_diagnostic_severity_name(item.severity);
647+
const char* message =
648+
openmeta::transfer_concept_diagnostic_message(item);
643649
(void)action;
644650
(void)reason;
651+
(void)severity;
652+
(void)message;
645653
}
646654
```
647655
@@ -659,7 +667,13 @@ diagnostics = doc.transfer_concept_diagnostics(
659667
openmeta.TransferSafetyMode.RenderedImage
660668
)
661669
for item in diagnostics["diagnostics"]:
662-
print(item["kind_name"], item["role_name"], item["action_name"])
670+
print(
671+
item["kind_name"],
672+
item["role_name"],
673+
item["action_name"],
674+
item["severity_name"],
675+
item["message"],
676+
)
663677
```
664678

665679
`metaread` prints

docs/interpretation_status.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ explicit outcome:
4040
| Vendor MakerNotes | Broad MakerNote naming and source-processing classification exists for common vendors and several live computational/thermal vendors. Unknown entries remain lossless and source-private subgroups distinguish preview, face geometry, computational, thermal, stitch/panorama, pixel-shift, multi-shot, composite, auto-lighting, RAW crop/active-area, source color-transform, lens-correction, raw-level processing data, and Phase One/Leaf RAW-processing fields handled by direct classification plus dedicated normalized helpers. | Medium-high, about 80-88%. | ExifTool-style long-tail print conversions, encrypted/custom settings, and per-model private tables. |
4141
| BMFF item graph, HEIF/AVIF/CR3, JUMBF, and C2PA | BMFF derived fields, item-info rows, bounded relations, primary-linked roles, aux semantics, and draft C2PA/JUMBF structural fields are exposed. | Medium, about 60-70%. | Full BMFF scene modeling and full C2PA manifest/policy semantics. |
4242
| Photoshop IRB | Raw resources are preserved and a bounded interpreted subset is decoded for fixed-layout resources. | Medium, about 60-70%. | Broader resource-specific interpretation. |
43-
| Semantic query/search and records | Query helpers expose raw matches, confidence, provenance, value shapes, normalized candidates, canonical crop/active-area rectangles, border margins, source-processing buckets, optional RapidFuzz near-miss matching, structured interpretation records, and bounded cross-family concept resolution for orientation, date/time, color/profile, GPS, geometry, lens-correction, and RAW-processing with parsed date/time fields, timezone/precision classification, combined GPS timestamps, GPS altitude-reference state and display token, canonical geometry origin/size/rect/margins, full grouped value vectors, transfer hints, rendered/compatible safety booleans, and tolerance-aware GPS/color/geometry conflicts. | Medium, about 68-74%. | More long-tail per-model concept aliases and clearer user-facing policy messages. |
44-
| Transfer-safety classification | Compatible-file versus rendered-image safety policies classify source-specific image geometry, color/profile, RAW-processing, MakerNote, JUMBF/C2PA, and vendor-private data, with concept-level diagnostics that report keep/drop/requires-target-image-spec actions before prepare. | High, about 87-91%. | More per-family policy tests and richer host-authored message text. |
43+
| Semantic query/search and records | Query helpers expose raw matches, confidence, provenance, value shapes, normalized candidates, canonical crop/active-area rectangles, border margins, source-processing buckets, optional RapidFuzz near-miss matching, structured interpretation records, and bounded cross-family concept resolution for orientation, date/time, color/profile, GPS, geometry, lens-correction, and RAW-processing with parsed date/time fields, timezone/precision classification, combined GPS timestamps, GPS altitude-reference state and display token, canonical geometry origin/size/rect/margins, full grouped value vectors, transfer hints, rendered/compatible safety booleans, and tolerance-aware GPS/color/geometry conflicts. | Medium, about 68-74%. | More long-tail per-model concept aliases and richer localized policy wording. |
44+
| Transfer-safety classification | Compatible-file versus rendered-image safety policies classify source-specific image geometry, color/profile, RAW-processing, MakerNote, JUMBF/C2PA, and vendor-private data, with concept-level diagnostics that report keep/drop/requires-target-image-spec actions, severity, and default message text before prepare. | High, about 88-92%. | More per-family policy tests and optional host localization hooks. |
4545

4646
## Competitor Position
4747

@@ -57,8 +57,8 @@ outputs.
5757

5858
## Next Interpretation Priorities
5959

60-
1. Deepen transfer diagnostics into host-authored message templates for GUI
61-
workflows.
60+
1. Deepen transfer diagnostics with optional host localization/formatting hooks
61+
for GUI workflows.
6262
2. Expand GPS policy beyond current coordinate tolerance, altitude-reference
6363
display, and EXIF timestamp assembly into broader cross-family
6464
reconciliation.

docs/quick_start.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ of guessing silently. Transfer hints use `safe`, `source_bound`,
175175
from source RAW/correction data and target-owned image facts.
176176
`transfer_concept_diagnostics_from_store(...)` applies those hints to a
177177
selected transfer safety mode and returns keep/drop/requires-target-image-spec
178-
actions for transfer-preview UI. GPS altitude reference codes can be displayed
179-
with `metadata_concept_gps_altitude_reference_name(...)`.
178+
actions, severity tokens, and default message text for transfer-preview UI. GPS
179+
altitude reference codes can be displayed with
180+
`metadata_concept_gps_altitude_reference_name(...)`.
180181

181182
For user-facing orientation display, use `openmeta/orientation.h` instead of
182183
showing only the numeric EXIF/TIFF index. `interpret_exif_orientation(...)`

docs/sphinx/api_stability.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,20 @@ Host-facing API map
152152
metadata or hide ambiguity. Python ``Document`` and
153153
``TransferSourceSnapshot`` expose matching dictionary wrappers.
154154
* - Transfer concept diagnostics:
155-
``transfer_concept_diagnostics_from_store(...)``
155+
``transfer_concept_diagnostics_from_store(...)``,
156+
``transfer_concept_diagnostic_message(...)``
156157
- ``openmeta/metadata_transfer.h``
157158
- Experimental
158159
- Preflight view over concept candidates for ``TransferSafetyMode``.
159160
Each diagnostic reports concept kind/role, transfer hint,
160-
keep/drop/requires-target-image-spec action, reason token, conflict
161-
flag, source entries, compatible/rendered safety booleans, and GPS
162-
altitude-reference presentation fields. Intended for UI previews and
163-
host policy messages before calling ``prepare_metadata_for_target(...)``;
164-
it does not replace the actual transfer filter. Python ``Document`` and
161+
keep/drop/requires-target-image-spec action, reason token, severity
162+
token, default message text, conflict flag, source entries,
163+
compatible/rendered safety booleans, and GPS altitude-reference
164+
presentation fields. Intended for UI previews and host policy messages
165+
before calling ``prepare_metadata_for_target(...)``; it does not replace
166+
the actual transfer filter. Python ``Document`` and
165167
``TransferSourceSnapshot`` expose ``transfer_concept_diagnostics(...)``
166-
dictionaries.
168+
dictionaries with ``severity_name`` and ``message`` fields.
167169
* - Vendor RAW-processing summaries:
168170
``vendor_raw_processing_from_store(...)``,
169171
``classify_vendor_raw_processing_field(...)``

docs/sphinx/host_integration.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ transfer hint: ``safe``, ``source_bound``, ``rendered_unsafe``, or
7575
``rendered_image_safe`` booleans for host UI and preflight policy. For transfer
7676
previews, ``transfer_concept_diagnostics_from_store(...)`` converts those hints
7777
into keep/drop/requires-target-image-spec actions for a selected
78-
``TransferSafetyMode``.
78+
``TransferSafetyMode``, plus stable severity tokens and default message text
79+
for host UI. Hosts can localize or replace the wording, but they do not need to
80+
invent the basic safe/drop/rewrite reasons.
7981

8082
Adapter classes
8183
---------------
@@ -631,8 +633,14 @@ host UI, not as a rendered-output write source.
631633
openmeta::transfer_concept_diagnostic_action_name(item.action);
632634
const char* reason =
633635
openmeta::transfer_concept_diagnostic_reason_name(item.reason);
636+
const char* severity =
637+
openmeta::transfer_concept_diagnostic_severity_name(item.severity);
638+
const char* message =
639+
openmeta::transfer_concept_diagnostic_message(item);
634640
(void)action;
635641
(void)reason;
642+
(void)severity;
643+
(void)message;
636644
}
637645
638646
Python uses the same family enum:
@@ -650,7 +658,13 @@ Python uses the same family enum:
650658
openmeta.TransferSafetyMode.RenderedImage
651659
)
652660
for item in diagnostics["diagnostics"]:
653-
print(item["kind_name"], item["role_name"], item["action_name"])
661+
print(
662+
item["kind_name"],
663+
item["role_name"],
664+
item["action_name"],
665+
item["severity_name"],
666+
item["message"],
667+
)
654668
655669
``metaread`` prints
656670
``vendor_raw_processing[sony|canon|nikon|fujifilm|pentax|panasonic|olympus|kodak|minolta|sigma|samsung|ricoh|apple|dji|google|flir|casio|sanyo|kyoceraraw|reconyx|hp|jvc|ge|motorola|nintendo|microsoft]=...``

docs/sphinx/interpretation_status.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,16 @@ Coverage matrix
148148
rendered/compatible safety booleans, and tolerance-aware
149149
GPS/color/geometry conflicts.
150150
- Medium, about 68-74%.
151-
- More long-tail per-model concept aliases and clearer user-facing policy
152-
messages.
151+
- More long-tail per-model concept aliases and richer localized policy
152+
wording.
153153
* - Transfer-safety classification
154154
- Compatible-file versus rendered-image safety policies classify
155155
source-specific image geometry, color/profile, RAW-processing, MakerNote,
156156
JUMBF/C2PA, and vendor-private data, with concept-level diagnostics that
157-
report keep/drop/requires-target-image-spec actions before prepare.
158-
- High, about 87-91%.
159-
- More per-family policy tests and richer host-authored message text.
157+
report keep/drop/requires-target-image-spec actions, severity, and
158+
default message text before prepare.
159+
- High, about 88-92%.
160+
- More per-family policy tests and optional host localization hooks.
160161

161162
Competitor position
162163
-------------------
@@ -174,8 +175,8 @@ outputs.
174175
Next interpretation priorities
175176
------------------------------
176177

177-
1. Deepen transfer diagnostics into host-authored message templates for GUI
178-
workflows.
178+
1. Deepen transfer diagnostics with optional host localization/formatting hooks
179+
for GUI workflows.
179180
2. Expand GPS policy beyond current coordinate tolerance, altitude-reference
180181
display, and EXIF timestamp assembly into broader cross-family
181182
reconciliation.

docs/sphinx/quick_start.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ of guessing silently. Transfer hints use ``safe``, ``source_bound``,
154154
facts from source RAW/correction data and target-owned image facts.
155155
``transfer_concept_diagnostics_from_store(...)`` applies those hints to a
156156
selected transfer safety mode and returns keep/drop/requires-target-image-spec
157-
actions for transfer-preview UI. GPS altitude reference codes can be displayed
158-
with ``metadata_concept_gps_altitude_reference_name(...)``.
157+
actions, severity tokens, and default message text for transfer-preview UI. GPS
158+
altitude reference codes can be displayed with
159+
``metadata_concept_gps_altitude_reference_name(...)``.
159160

160161
For user-facing orientation display, use ``openmeta/orientation.h`` instead of
161162
showing only the numeric EXIF/TIFF index. ``interpret_exif_orientation(...)``

0 commit comments

Comments
 (0)