Skip to content

fix: clean up mediaType-to-type rename fallout (ADR 0014/0015)#73

Merged
tadasant merged 1 commit into
Agent-Card:mainfrom
liady:fix/adr-0014-rename-fallout
Jul 11, 2026
Merged

fix: clean up mediaType-to-type rename fallout (ADR 0014/0015)#73
tadasant merged 1 commit into
Agent-Card:mainfrom
liady:fix/adr-0014-rename-fallout

Conversation

@liady

@liady liady commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #66

The mediaType -> type rename (ADR 0014) was applied mechanically in a few places it should not have been, and skipped one place it should have reached. This PR cleans up all three:

1. Duplicate type member in the Attestation schema

ADR 0014 removed mediaType from the Attestation object, but it was renamed to type instead of deleted, leaving the CDDL with a duplicate map key (invalid CDDL). The mermaid diagram in "Data Model Overview" had the same duplicate. Both now declare type once.

2. OCI Image Index example restored to mediaType

The example in "Mapping to OCI Distribution > OCI Image Index Example" used "type" on the index and manifest descriptors. The OCI image spec requires the field name mediaType, so the example was not valid OCI. The rename does not apply to third-party OCI JSON; restored mediaType in the three descriptor positions (artifactType fields untouched).

3. specification/examples/ai-catalog.json migrated

The standalone example file still used mediaType, so its entries were missing the required type member and did not validate against the spec's own CDDL. Migrated to type, and updated the identifiers from the pre-ADR-0015 urn:example:... style to the standardized urn:air:{publisher}:{namespace}:{name} form (with the host identifier aligned to the did:web: style used in the spec's other examples).

Verification

  • uv run --locked python tools/build_spec.py specification/ai-catalog.md ... --config specification/respec-config.json builds cleanly
  • specification/examples/ai-catalog.json parses as valid JSON and now conforms to the CatalogEntry CDDL (has identifier, type, and exactly one of url/data)

- Remove duplicate 'type' member from the Attestation CDDL and the
  data-model diagram (leftover of the removed 'mediaType' field)
- Restore 'mediaType' field names in the OCI Image Index example,
  which OCI requires; the rename does not apply to OCI JSON
- Migrate specification/examples/ai-catalog.json to the 'type' field
  and urn:air identifiers per ADR 0014 and ADR 0015
@liady
liady requested a review from a team as a code owner July 8, 2026 23:37

@tadasant tadasant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@tadasant
tadasant merged commit 8ce011f into Agent-Card:main Jul 11, 2026
1 of 2 checks passed
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.

ADR 0014 rename fallout: duplicate 'type' in Attestation schema, invalid OCI example, stale example file

2 participants