Skip to content

conformance: report valid extension media types as informational - #85

Draft
thegovind wants to merge 1 commit into
ards-project:mainfrom
thegovind:conformance-extension-media-types
Draft

conformance: report valid extension media types as informational#85
thegovind wants to merge 1 commit into
ards-project:mainfrom
thegovind:conformance-extension-media-types

Conversation

@thegovind

@thegovind thegovind commented Aug 27, 2026

Copy link
Copy Markdown

Summary

ARD §3.3 defines an artifact-agnostic envelope: the type term carries an IANA media type, and artifact schemas are delegated outside the core specification. The conformance CLI contradicts that by warning on every media type outside a fixed nine-entry list, including application/ai-skill+md from the specification's own example in spec/ard.md. This PR reclassifies valid, unrecognized application/* types as informational and keeps warnings for real compatibility risks.

Companion draft: huggingface/OpenEnv#1093. The two are coordinated, but neither depends on the other. This PR adds no OpenEnv type to ARD core.

flowchart LR
  Open["§3.3: 'type' is an open term"] --> Current["Every unlisted type warns,<br/>including the spec's own<br/>application/ai-skill+md example"]
  Current --> Cost["False non-conformance<br/>and central allowlist pressure"]
  Cost --> Fix["Generic media-type classifier"]
  Fix --> Standard["Standard types: silent"]
  Fix --> Extension["Valid application/* types: informational"]
  Fix --> Risk["Malformed, parameter mismatch,<br/>deprecated, other top-level: warning"]
Loading

Why this is needed

The tool tells a publisher that a conforming type "is not one of standard discovery types." Three consequences follow:

  1. The specification fails its own tool. Running the current CLI on the application/ai-skill+md entry from spec/ard.md emits a warning. After this PR it emits an informational message.
  2. Conforming extensions read as non-conforming, which pressures ARD maintainers to grow a central allowlist. That pattern already drives OKF bundles (#27), install manifests (#43), and ASM (#66).
  3. Extension ecosystems cannot evolve independently of the core release cycle, which is the outcome §3.3 was written to permit.

This is not a request to register one more domain type. It fixes the conformance tool's treatment of ARD's existing extension point.

The application/* scope is deliberate. Eight of the nine current standard discovery types use the application top-level type, and the motivating extension requests in #27, #43, and #66 do too. Well-formed non-application types keep their existing warning so this diagnostic-only PR does not broaden its behavior silently.

Broader goal

The broader effort is task-based discovery of portable RL environments across Hubs, using ARD as the outer catalog and search contract. ARD answers which resource matches a task and where its typed card lives, while an environment-specific card describes the domain details.

The companion OpenEnv RFC proposes application/vnd.openenv.environment-card+json and read-only openenv discover boundaries. OpenEnv is one motivating extension type for a generic ARD fix that is independently useful, and ARD does not depend on OpenEnv.

Changes

  • Parse RFC 6838 restricted names and RFC 9110 parameters with a bounded re expression and no new dependency. A timeout test covers pathological backtracking on a 10,000-character invalid subtype.
  • Keep standard discovery types silent after case and spacing normalization.
  • Report valid, unrecognized application/* types as informational.
  • Keep warnings for malformed syntax, unknown top-level types, known types with missing or extra parameters, and ADR-0008's deprecated application/mcp-server+json form. The deprecated diagnostic names its replacement.
  • Add a neutral eight-entry fixture and 19 focused tests.
  • Run the suite before and after installing optional JSON Schema support in CI.
  • Document the diagnostic behavior.

Compatibility

  • No specification or schema changes.
  • No new runtime dependency.
  • Exit codes are unchanged.
  • Warning counts can only stay the same or decrease.

Test plan

Without optional dependencies:

  • python3 -S conformance/tests/test_media_type_diagnostics.py -v
  • python3 -S conformance/bin/conformance-test manifest conformance/tests/fixtures/extension-media-types.json

With optional JSON Schema support:

  • python3 -m venv /tmp/ard-conformance-venv && /tmp/ard-conformance-venv/bin/python -m pip install jsonschema
  • ARD_REQUIRE_JSONSCHEMA=1 /tmp/ard-conformance-venv/bin/python conformance/tests/test_media_type_diagnostics.py -v

Regression check:

  • ./conformance/bin/run-conformance-demo

Expected: 19 tests pass (1 skipped without jsonschema, 0 skipped with it). The fixture exits 0 with 3 warnings and 3 informational messages.

This does not add the types from #27, #43, or #66 to the allowlist.

@YE-YI7

YE-YI7 commented Aug 27, 2026

Copy link
Copy Markdown

Independent verification against the current live ASM catalog (30 entries; fetched 2026-08-28; SHA-256 1c72a3e4dc4f712a66e2531a67ea7fa6862994fea9e2905cc5d5b62f16351c2b): base aa3e598 PASS, 0 critical / 60 warnings; PR 56e1325 PASS, 0 critical / 30 warnings / 30 informational. The 30 application/asm+json diagnostics moved from warning to informational; the separate 30 representativeQueries warnings remained. All non-media-type diagnostic output was unchanged. I also ran the 19 focused tests with and without site packages, the neutral fixture in both modes, and the conformance demo; all passed. This matches the intended diagnostic-only boundary. I found no blocker in this slice.

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.

2 participants