v1.6.0: the media manifest - #54
Conversation
Add an optional top-level `media[]` array of `MediaAsset` entries, each naming a visual asset by role, IANA media type, and a standard file reference (filename, optional URL, mandatory SHA-256 content hash), plus optional descriptors for presentation, rights, and scoping. Entries are pointers, never bytes: no image data enters a record. Back it with two closed taxonomy enums. `MediaRole` carries four tokens that map one-to-one to GLDF's image types, and `MediaType` carries four image-format tokens: the manifest admits image formats only, so a document stays in `source_files` and the two lists share no format. A media entry carries no `SourceFileType` token by design, so a photograph can never serve as the provenance source for a measured value. Both enums are descriptive vocabulary that gates no conformance tier and feeds no rubric row, so both join the drift guard's descriptive allowlist. `media` is optional and joins no `required` set, and every constraint lives inside the new definition, so no previously-valid record is affected and no stored record changes.
Add `media[].reference` to the file-reference verification registry with the default policy, so a media asset is checked on a plain `ulc validate` run exactly like the source files, the family cutsheet, the emergency photometry reference, and the family warranty-conditions document: a local hash mismatch is an ERROR, an unreadable file a WARNING, and a locally absent file an INFO. Media findings reuse the established file-reference finding codes, which are a stable public contract, and the finding's JSON Pointer names the media site, for example `/media/0/reference`. Pin the new site in the walk's fixture table and policy map, so the outcome matrix exercises it, and name it in the validate help text.
Add a `media` entry to the authoring-patterns primitives section covering the two vocabularies, the format boundary against `source_files`, the drawing preference order, and the three-state verification and rendering guidance consumers should follow. State in `docs/how-it-works.md` that the manifest follows the identifies-never-embeds model, name it in the schema scope list and the README record-contents list, and add `media[].reference` to the validator README's default-site list.
Add the dated 1.6.0 CHANGELOG section, move the active-version heading and narrative to v1.6.x, and record the deferred media index projection alongside the inline-media-payload and image-quality-grading items that stay out of scope.
…ndary Rename two `MediaAsset` members to match the conventions the rest of the schema follows: `extracted_from` becomes `extracted_from_ref`, joining every other intra-record pointer (`source_ies_ref`, `source_document_ref`, `attestation_ref`, `configuration_refs`), and `byte_size` becomes `size_bytes`, matching the quantity-first, unit-last form of `width_px`, `height_px`, `input_power_w`, and `term_years`. State the format boundary as what it actually enforces. The manifest admits image formats only, so a document format can never be declared in `media`; the reverse does not hold, because a document keeps its place in `source_files` whatever its byte format, which is where a photographed certificate belongs. The previous wording claimed the two lists share no format, which overstated the rule in one direction and read against the scanned-document guidance in the same paragraph.
Codex Automated Code ReviewCode Review SummaryPR: Adds the v1.6 pointer-only media manifest, taxonomy, documentation, and hash verification. P0 - Critical Issues (Must Fix)None found. P1 - High Priority Issues (Should Fix)
P2 - Medium Priority Issues (Consider Fixing)
P3 - Low Priority Issues (Optional)None found. Positive Observations
The Go test suite could not be executed because the review environment is entirely read-only and Go could not create its build cache. Automated review by OpenAI Codex |
Codex Automated Code ReviewCode Review SummaryPR: Adds a pointer-only media manifest and media hash verification for ULC 1.6.0. P0 - Critical Issues (Must Fix)None found. P1 - High Priority Issues (Should Fix)
P2 - Medium Priority Issues (Consider Fixing)
P3 - Low Priority Issues (Optional)None found. Positive Observations
Automated review by OpenAI Codex |
|
| Filename | Overview |
|---|---|
| schema/ulc.schema.json | Adds the optional media manifest and MediaAsset definition; the schema is additive, but the new authoring surface was not propagated to mappings or templates. |
| schema/taxonomy.schema.json | Adds closed MediaRole and MediaType enums with references resolving from MediaAsset. |
| tools/validator/internal/validate/references.go | Registers media[].reference under the established default file-verification policy using the shared traversal implementation. |
| tools/validator/internal/validate/references_test.go | Extends registry, policy, default-run, and per-site outcome coverage to the media reference site. |
| tools/validator/internal/validate/schema_test.go | Covers required media members, taxonomy rejection, FileReference requirements, and representative optional constraints. |
| CHANGELOG.md | Documents v1.6.0 and its media behavior, including the intentional omission of workbook authoring support. |
Prompt To Fix All With AI
### Issue 1
schema/ulc.schema.json:179-183
**Media authoring paths remain stale**
The new `media[]` surface is absent from the PIM mappings and workbook template, so authors following the supported integration guidance cannot emit the manifest and can incorrectly route visual assets through `source_files[]` or omit them.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "docs(release): date the 1.6.0 section to..." | Re-trigger Greptile
| "media": { | ||
| "description": "Pointer-only manifest of the visual assets that document this product: product photographs, application photographs, and dimensional drawings. Entries reference each asset by filename, IANA media type, and SHA-256 content hash; no image data is ever embedded. Deliberately separate from source_files: a media asset documents the product's appearance and geometry for presentation, while source_files names the documents a record derives data from, so a media entry can never become a provenance source for a measured value.", | ||
| "type": "array", | ||
| "items": { "$ref": "#/$defs/MediaAsset" } | ||
| }, |
There was a problem hiding this comment.
Media authoring paths remain stale
The new media[] surface is absent from the PIM mappings and workbook template, so authors following the supported integration guidance cannot emit the manifest and can incorrectly route visual assets through source_files[] or omit them.
Rule Used: Field added/renamed/removed in schema/** must prop... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: schema/ulc.schema.json
Line: 179-183
Comment:
**Media authoring paths remain stale**
The new `media[]` surface is absent from the PIM mappings and workbook template, so authors following the supported integration guidance cannot emit the manifest and can incorrectly route visual assets through `source_files[]` or omit them.
**Rule Used:** Field added/renamed/removed in schema/** must prop... ([source](greptile.json))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Thanks both. Each finding was checked against the shipped schema and validator source. No changes for this release; the reasoning is below so the decisions are on the record rather than implicit. Requiring More than one entry with "a document format can never be declared there". The claim is scoped to declaration, which is exactly what the schema enforces: A BCP 47 pattern on Media absent from the PIM mapping guides and the workbook template. Intentional, and stated in the release notes: |
What this release adds
A record gains an optional pointer-only
media[]array naming the visual assets that document the product: product photographs, application photographs, and dimensional drawings, each referenced by filename, IANA media type, and SHA-256 content hash. Entries are pointers, never bytes: no image data enters a record.Cutsheets carry photographs and dimensional drawings, and until now a record had no home to reference them by content hash.
Schema
media, entries defined by the new$defs/MediaAsset. Each entry requiresrole,reference(a standard FileReference, sofilenameandsha256are required andurlis optional), andmedia_type. Optional descriptors:primary,alt_text,caption,language,width_px,height_px,size_bytes,rights,credit,extracted_from_ref, andconfiguration_refs.MediaRolecarries four tokens (product_photo,application_photo,dimensional_drawing,other) that map one-to-one to GLDF's image types, so a crosswalk between the two formats is mechanical.MediaTypecarries four RFC 6838 image-format tokens (image/jpeg,image/png,image/svg+xml,image/webp).source_files, so the media manifest and the source-file list share no format and list placement is decided by format rather than by judgement.SourceFileTypetoken by design, so a photograph can never serve as the provenance source for a measured value.mediajoins norequiredset, so no previously-valid record is affected.Validator
media[].referencewith the default policy: a local hash mismatch is an ERROR, an unreadable file a WARNING, a locally absent file an INFO. The site registry, the validate help text, and the validator README all name the new site./media/0/reference.Inert by construction
No grading change, no achievements change, and no index change.
BuilderVersionstays0.7.0, so no stored record needs re-stamping. All 8 example records, every golden file, and thevalidateandscopeoutputs are byte-identical against pre-change baselines, exit codes included.Deliberately not in this release
ROADMAP.md,CONTRIBUTING.md) forbids fabricating values, so shipped examples gain media entries when their manufacturers supply real imagery with written usage rights.ulc from-sheetgains no media columns here; workbook authoring for media arrives with the first example records that carry real imagery, designed against real files. No template or mapping guide changes.ROADMAP.md).primaryper role, duplicate role and hash pairs, an extension inconsistent withmedia_type, a danglingextracted_from_ref) are schema-valid by design and stay deferred until real media-bearing records exist to design them against.Governance
Proposed as a Schema Change Proposal in #55, opened alongside this PR.