Skip to content

Define candidate rendered-check profiles and evidence identities - #28

Merged
AM-L merged 2 commits into
mainfrom
contract/rendered-evidence-profiles
Sep 7, 2026
Merged

AM-L merged 2 commits into
mainfrom
contract/rendered-evidence-profiles

Conversation

@ambroise-leclerc

@ambroise-leclerc ambroise-leclerc commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

The accepted rendered-check decision lacked profile identities, evidence schemas, and a shared corpus. This delivers the 0.3.0 candidate: separate extent-equality, ink-containment, tint-composition, and RGBA8 SHA-256 checks, plus complete evidence identity and independently supplied obligations. Missing baselines and omitted checks cannot produce a passing aggregate.

R03 specifies common effective coverage with one UNORM unit of allowance per composite, including the recorded narrow-span regression. Evidence uses explicit ordered asset identities and producer-scoped configuration/backend identifiers. Reports are parsed comparison inputs; no native artifact or canonical serialized report bytes are required.

Adds optional manifest claims, 64 public observation vectors, 37 schema cases, and dependency-free schema/coverage validation with CI regression tests. Existing compiler outcomes remain unchanged; local checks may coexist, and legacy obligations retain their identities during migration.

Validation: python3 tools/validate.py passes (27 compiler cases, 64 profile cases, 37 schema cases); all 19 tests pass with python3 -m unittest discover -s tools -p 'test_*.py'; git diff --check passes. An independent rational-arithmetic check confirms all 16 tint expectations. The seven previously documented diagnostic coverage gaps remain unchanged.

This is a candidate contract, not consumer conformance evidence. Consumers must execute their claimed corpus at an exact candidate SHA before advertising support or establishing a final release. The independent interaction/binding/presentation/pixel delivery is stacked in #29.

Closes #15.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Several R04 hash conformance vectors embed an inconsistent check.id in the evidence identity (using extent-equality instead of rgba8-sha256), which can mislead consumers implementing identity matching.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR advances the MedUI shared contract to the 0.3.0 candidate line by defining versioned optional observation profiles (rendered-check and evidence aggregation), their identities/schemas, and a portable synthetic corpus plus validator/test coverage to prevent silent profile/coverage regressions.

Changes:

  • Bumps VERSION to 0.3.0 and updates versioning/decision docs to reflect the candidate delivery of MEDUI-DEC-007.
  • Introduces optional profile registry + spec, new/updated JSON schemas, and conformance vectors/cases for rendered checks and evidence identity/completeness.
  • Extends tools/validate.py with dependency-free schema checking + profile/case coverage validation, and adds CI regression unit tests.
File summaries
File Description
VERSION Bumps contract line to 0.3.0 candidate.
tools/validate.py Adds schema subset validation and profile/case registry + coverage checks.
tools/test_validate.py Adds regression tests ensuring validator rejects corrupted candidate inputs.
tools/test_schema_check.py Adds regression tests for the dependency-free schema checker.
tools/schema_check.py Adds dependency-free JSON Schema subset checker used by repository validation.
spec/profiles.md Defines optional 0.3.0 candidate profile semantics and rule set.
schemas/profile-case.schema.json Adds schema for portable profile observation vectors.
schemas/evidence.schema.json Adds schema for evidence identity/rows/obligations.
schemas/diagnostic.schema.json Updates schema $id to 0.3 minor line.
schemas/contract-case.schema.json Adds schema for schema expectation cases (valid/invalid documents).
schemas/consumer-manifest.schema.json Updates $id to 0.3 and adds optional profiles claims.
schemas/case.schema.json Updates schema $id to 0.3 minor line.
README.md Documents new profiles/ directory purpose.
profiles/registry.json Registers candidate profiles and their rule IDs.
governance/versioning.md Updates current candidate line text and documents optional profiles manifest key.
decisions/MEDUI-DEC-007-rendered-check-profiles.md Points DEC-007 delivery to the 0.3.0 profile contract and corpus.
conformance/README.md Documents profile vectors and contract-schema case structure/expectations.
conformance/profiles/tint-wrong.json Adds R03 negative tint-composition vector.
conformance/profiles/tint-two-too-far.json Adds R03 negative tint-composition vector (2 composites).
conformance/profiles/tint-two-round.json Adds R03 positive tint-composition vector (2 composites).
conformance/profiles/tint-one-too-far.json Adds R03 negative tint-composition vector (1 composite).
conformance/profiles/tint-one-round.json Adds R03 positive tint-composition vector (1 composite).
conformance/profiles/tint-no-full-tint.json Adds R03 negative tint-composition vector (missing exact tint sample).
conformance/profiles/tint-missing.json Adds R03 negative tint-composition vector (tint absent).
conformance/profiles/tint-exact.json Adds R03 positive tint-composition vector (exact tint).
conformance/profiles/tint-empty.json Adds R03 negative tint-composition vector (no samples).
conformance/profiles/tint-blend.json Adds R03 positive tint-composition blend vector.
conformance/profiles/tint-background.json Adds R03 positive tint-composition vector with non-black background.
conformance/profiles/identity-screen.json Adds E01/E02 identity mismatch vector (screen differs).
conformance/profiles/identity-scenario.json Adds E01/E02 identity mismatch vector (scenario differs).
conformance/profiles/identity-producer.json Adds E01/E02 identity mismatch vector (producer differs).
conformance/profiles/identity-node.json Adds E01/E02 identity mismatch vector (node differs).
conformance/profiles/identity-locale.json Adds E01/E02 identity mismatch vector (locale differs).
conformance/profiles/identity-key-order.json Adds E01/E02 identity equivalence vector (key order differs).
conformance/profiles/identity-frame.json Adds E01/E02 identity mismatch vector (frame differs).
conformance/profiles/identity-contract.json Adds E01/E02 identity mismatch vector (contract differs).
conformance/profiles/identity-configuration.json Adds E01/E02 identity mismatch vector (configuration differs).
conformance/profiles/identity-check.json Adds E01/E02 identity mismatch vector (check differs).
conformance/profiles/identity-capture.json Adds E01/E02 identity mismatch vector (capture differs).
conformance/profiles/identity-backend.json Adds E01/E02 identity mismatch vector (backend differs).
conformance/profiles/identity-assets.json Adds E01/E02 identity mismatch vector (assets digest differs).
conformance/profiles/identity-artifact.json Adds E01/E02 identity mismatch vector (artifact digest differs).
conformance/profiles/hash-outside.json Adds R04 hash vector (golden outside capture bounds).
conformance/profiles/hash-missing.json Adds R04 hash vector (missing baseline => missing-baseline).
conformance/profiles/hash-mismatch.json Adds R04 hash vector (digest mismatch).
conformance/profiles/hash-match.json Adds R04 hash vector (digest match).
conformance/profiles/hash-empty.json Adds R04 hash vector (empty rectangle hashes empty string).
conformance/profiles/hash-crop.json Adds R04 hash vector (cropped golden region).
conformance/profiles/hash-backend.json Adds R04 hash vector (backend identity mismatch).
conformance/profiles/extent-overflow.json Adds R01 extent-equality negative vector (overflow).
conformance/profiles/extent-offset.json Adds R01 extent-equality negative vector (offset).
conformance/profiles/extent-inset.json Adds R01 extent-equality negative vector (inset).
conformance/profiles/extent-exact.json Adds R01 extent-equality positive vector (exact).
conformance/profiles/extent-empty.json Adds R01 extent-equality negative vector (empty ink).
conformance/profiles/evidence-unsupported.json Adds E02/E03 vector covering unsupported row outcome aggregation.
conformance/profiles/evidence-unexpected.json Adds E02/E03 vector covering unexpected rows vs empty obligations.
conformance/profiles/evidence-pass.json Adds E02/E03 positive aggregation vector.
conformance/profiles/evidence-omitted.json Adds E02/E03 vector covering missing row for obligation.
conformance/profiles/evidence-not-run.json Adds E02/E03 vector covering not-run row outcome.
conformance/profiles/evidence-missing-baseline.json Adds E02/E03 vector covering missing-baseline row outcome.
conformance/profiles/evidence-fail.json Adds E02/E03 vector covering fail row outcome.
conformance/profiles/evidence-empty.json Adds E02/E03 vector covering empty obligations + no rows => not-run.
conformance/profiles/evidence-duplicate.json Adds E02/E03 vector covering duplicate rows for one obligation.
conformance/profiles/evidence-duplicate-obligation.json Adds E02/E03 vector covering duplicate obligations.
conformance/profiles/containment-overflow.json Adds R02 ink-containment negative vector (overflow beyond margin).
conformance/profiles/containment-margin.json Adds R02 ink-containment positive vector (inside expanded margin).
conformance/profiles/containment-inset.json Adds R02 ink-containment positive vector (inset).
conformance/profiles/containment-exact.json Adds R02 ink-containment positive vector (exact).
conformance/profiles/containment-empty.json Adds R02 ink-containment positive vector (empty ink passes).
conformance/contracts/report-unsupported.json Adds evidence schema valid-case for unsupported outcome.
conformance/contracts/report-unknown-outcome.json Adds evidence schema invalid-case for unknown outcome.
conformance/contracts/report-pass.json Adds evidence schema valid-case for pass outcome.
conformance/contracts/report-not-run.json Adds evidence schema valid-case for not-run outcome.
conformance/contracts/report-missing-screen.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-scenario.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-profile.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-producer.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-node.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-locale.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-frame.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-contract.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-configuration.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-check.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-capture.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-baseline.json Adds evidence schema valid-case for missing-baseline outcome.
conformance/contracts/report-missing-backend.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-assets.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-missing-artifact.json Adds evidence schema invalid-case missing required identity field.
conformance/contracts/report-fail.json Adds evidence schema valid-case for fail outcome.
conformance/contracts/report-extra-identity.json Adds evidence schema invalid-case for extra identity member.
conformance/contracts/report-duplicate-obligation.json Adds evidence schema invalid-case for duplicate obligations.
conformance/contracts/manifest-unknown-key.json Adds manifest schema invalid-case for unknown manifest key.
conformance/contracts/manifest-profiles.json Adds manifest schema valid-case for optional profiles claims.
conformance/contracts/manifest-profile-version.json Adds manifest schema invalid-case for unknown profile version.
conformance/contracts/manifest-profile-unknown.json Adds manifest schema invalid-case for unknown profile id.
conformance/contracts/manifest-profile-extra.json Adds manifest schema invalid-case for extra claim member.
conformance/contracts/manifest-profile-empty.json Adds manifest schema invalid-case for empty profiles array.
conformance/contracts/manifest-profile-duplicate.json Adds manifest schema invalid-case for duplicate claims.
conformance/contracts/manifest-legacy.json Adds manifest schema valid-case for legacy manifest without profiles.
.github/workflows/ci.yml Runs validator and Python unit tests in CI.
Review details

Suppressed comments (7)

conformance/profiles/hash-match.json:90

  • In this R04 vector the identity embedded in baselineIdentity.check.id is set to extent-equality, but the vector is exercising the rgba8-sha256 check. Because identity matching is part of the contract, the baseline identity should use the same check ID/version as the hash check.
    conformance/profiles/hash-mismatch.json:90
  • baselineIdentity.check.id is extent-equality but this is an rgba8-sha256 check vector. Keeping the check ID aligned with the exercised check avoids teaching consumers the wrong identity fields.
    conformance/profiles/hash-missing.json:90
  • baselineIdentity.check.id is extent-equality but this vector is for rgba8-sha256; identity should name the exercised check.
    conformance/profiles/hash-empty.json:90
  • baselineIdentity.check.id is extent-equality but this is an rgba8-sha256 vector; keep the identity’s check ID consistent with the hash check.
    conformance/profiles/hash-crop.json:90
  • baselineIdentity.check.id is extent-equality but this vector is rgba8-sha256; update identity to match the exercised check.
    conformance/profiles/hash-outside.json:90
  • baselineIdentity.check.id is extent-equality but this is an rgba8-sha256 vector; align identity’s check ID with the hash check.
    conformance/profiles/hash-backend.json:90
  • baselineIdentity.check.id is extent-equality but this vector is for rgba8-sha256; update identity to use the hash check ID.
  • Files reviewed: 100/100 changed files
  • Comments generated: 8
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread conformance/profiles/hash-backend.json Resolved
Comment thread conformance/profiles/hash-crop.json Resolved
Comment thread conformance/profiles/hash-empty.json Resolved
Comment thread conformance/profiles/hash-match.json Resolved
Comment thread conformance/profiles/hash-mismatch.json Resolved
Comment thread conformance/profiles/hash-missing.json Resolved
Comment thread conformance/profiles/hash-outside.json Resolved
Comment thread tools/test_validate.py Resolved

@ambroise-leclerc ambroise-leclerc left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review — candidate rendered-check profiles and evidence identities (#28)

Reviewed from the MduX side, as the consumer that will pin this corpus for MduX #314. Overall this is a solid, well-scoped delivery of what MEDUI-DEC-007 deferred: four separately-versioned rendered checks with fixed arithmetic, a derived evidence identity, an optional manifest claim, and a dependency-free validator with regression tests. The spec/profiles.md prose is precise and the legacy-migration guidance ("map explicitly, run old and candidate together, no silent relabelling") is exactly right.

Below are the points that need resolving before MduX can execute this as a pinned candidate corpus, ordered by how much they matter to a consumer.

1. R03 tint tolerance: n/2 vs a measured n, and the arithmetic model

R03 fixes the per-composite rounding envelope at "at most n/2 UNORM units (inclusive)" and models n composites as t + (b-t)*(1-a)^n.

MduX's colorHash() (src/verify/Verify.cpp, couldBeBlend()) uses n UNORM units per channel, not n/2, and this is not an oversight — it is tuned to a cross-toolchain hardware measurement recorded in MduX #261. The verify-golden-two-coverage-rounding unit test pins a real pixel (215,134,135) rendered identically under lavapipe on the GCC, Clang and MSVC legs, for a two-composite node (Theme.Colors.Fault over Theme.Colors.TopbarBackground, a 10-unit red span). At ±1 (= n/2 for n=2) the feasible-coverage intersection is empty and the pixel is rejected; ±2 admits it.

Two questions follow:

  • Is ±n/2 intended to be normative for real GPU captures, or only for the round-to-nearest model of synthetic composites? If the former, a conformant R03 checker rejects a frame MduX's committed endoscope-monitor screen actually produces, and MduX cannot claim tint-composition/1 without failing its own hardware regression. If MduX's measurement is right, the bound should be n.
  • MduX's couldBeBlend() narrows a single feasible-coverage interval per channel and intersects (distance ± allowance over span), i.e. it does not compound (1-a)^n — it treats a two-composite pixel as one effective coverage. R03's (1-a)^n and MduX's linear model agree on "≥1 sample exactly equals the tint" but can disagree on the envelope. Please confirm the intended model and add a narrow-span (~10 UNORM) two-composite vector — the current tint-* fixtures all use wide spans (200/100), which is precisely the regime where n/2 vs n does not bite.

This is the one item most likely to block a clean #314.

2. configuration digest is required but undefined

evidence.schema.json requires identity.configuration as ^[0-9a-f]{64}$, and E01 says "backend and rendering configuration digest ... synthetic and the digest of the synthetic configuration." But nothing defines what object is hashed or how to produce that digest. Every fixture uses the placeholder eeee….

E01's guarantee is "different configurations never satisfy each other's obligations" — but its dual, same configuration ⇒ same digest, is unachievable without a canonical configuration schema + encoding. Two real consumers will each invent their own configuration object and never pair. This is the same class of problem ADR-007 decision 5 (MduX) and MEDUI-DEC-004 already navigate for other digests. Please either (a) add schemas/configuration.schema.json with a canonical encoding, or (b) scope configuration to an opaque per-producer string that is only ever compared within one producer's reports, and say so explicitly.

3. assets is a single SHA-256; real screens have several

identity.assets is one ^[0-9a-f]{64}$. A MedUI screen typically binds a font package, one text package per locale, an image package, and (for MduX) a shader package — each already digested. Collapsing them to one value needs a defined combination (ordered concatenation? a Merkle root over sorted (role,id,digest)?). ADR-015 D3 says "ordered asset identities/digests" (plural). Recommend assets be an array of {id, digest} or a defined canonical roll-up; the spec should state which.

4. Fixture identity blocks do not reflect the check under test

Every captureIdentity/baselineIdentity in every fixture carries check: {id: "extent-equality", version: 1} regardless of the operation — e.g. hash-missing.json and hash-crop.json are R04 (rgba8-sha256) cases whose identity says extent-equality. The schema's enum permits it, so the validator does not catch it, but a corpus meant to be authoritative should have identities that match the check. Worth a cross-field check in validate.py (inputs.check == captureIdentity.check.id for rendered-check operations).

5. Empty-content policies vs consumers that refuse degenerate input upstream

  • R02 — "Empty ink passes." MduX's ink-containment obligation is only ever raised for a text node with a non-empty run; TextExpectation::create() refuses an empty run (EmptyRun) before a check exists. MduX can implement the standalone R02 predicate to return pass on ink: null, but its integrated path will never exercise that branch.
  • R04 — "Empty rectangles hash the empty byte string." hash-empty.json expects pass against SHA-256(""). MduX's rawImageDigest() refuses a non-positive ROI (DigestRoiDegenerate).

Neither is a defect in the contract, but please state whether a consumer reporting unsupported for these degenerate cases still counts as "complete applicable passing cases" for the profile claim, or whether the standalone predicate must implement them. A zero-area authored golden is not something either compiler emits, so this only matters for the pure-predicate corpus.

6. Canonical encoding of a committed evidence report

E01 says identity comparison is fieldwise and key-order-independent — good for comparison. But MduX commits its evidence report (generated/screen/<id>/verification.json) and byte-compares it across four toolchain legs (evidence.screen.<id>). If MduX adopts the shared envelope, it needs a canonical serialization or it must keep verification.json in MduX's own canonical form and emit the shared report as a derived, uncommitted artifact. Please clarify the contract's intent: is a MedUI evidence report meant to be byte-stable/committable, or strictly a comparison input?

7. backend has no canonical spelling

backend is a free minLength: 1 string ("synthetic", "lavapipe", …). "lavapipe" vs "llvmpipe" vs "Mesa lavapipe" would fail identity pairing between consumers that mean the same thing. Consider an enum or a documented canonicalization rule, at least for the backends the two known consumers use.

8. Smaller notes

  • evidence.schema.json hardcodes identity.profile.id as {"const": "MEDUI-PROFILE-RENDERED"} and check.version / profile.version as {"const": 1}. Every version bump or second rendered profile edits the schema by hand and moves its $id. Acceptable for a candidate, but a note that these track profiles/registry.json would help.
  • tools/schema_check.py matches pattern with re.search, not re.fullmatch. The current schemas all anchor with ^…$ so it is equivalent today; an unanchored pattern added later would validate too loosely. A one-line switch to fullmatch (or asserting anchors in check_schema) closes it.
  • errors() resolves $ref with target[part], which raises KeyError on a dangling ref rather than reporting it. check_schema could verify every #/$defs/... target exists.
  • The hash-empty baseline is e3b0c442…b855 (SHA-256 of the empty string) — correct, and a nice touch, but worth a comment in the fixture since it reads as a magic constant.

For MduX #314 specifically

MduX has a fifth rendered check with no shared equivalent: localizedTextPresence() compares a run's per-glyph baked coverage against the atlas (glyph-shape identity, not extent). R01–R04 have no glyph-shape rule. Please confirm the contract's intent that a consumer may run implementation-local checks alongside its claimed shared checks, provided the shared ones have complete passing corpus — spec/profiles.md's migration paragraph implies this but does not say it outright.


None of the above blocks the direction; items 1–3 are the ones that need a concrete answer before MduX can pin this as 0.3.0-rc and run its corpus. Happy to prototype the MduX-side mapping against a revised candidate SHA.

@ambroise-leclerc

Copy link
Copy Markdown
Contributor Author

Addressed in 35f5a09.

  1. R03 arithmetic: the candidate now uses a single effective coverage interval with an inclusive allowance of n UNORM units. Added the recorded narrow-span (215,134,135) pixel over (209,214,219) toward (219,51,46): one composite fails, two pass, and the foreign-green variant fails. Updated the wide-span boundary cases and added zero-span cases. Exact rational arithmetic independently confirmed all 16 tint expectations. The specification records this candidate amendment and its pinned source; it does not reinterpret a released profile.
  2. Configuration and backend identity: chose the producer-scoped alternative. configuration is explicitly an opaque SHA-256-shaped token governed by the named producer/version/source, not a shared canonical configuration digest. Backend spelling is also exact and producer-scoped, with no alias or case folding. Cross-consumer conformance compares outcomes, not differently produced report identities. Added producer-token and backend-case cases.
  3. Assets: replaced the unspecified roll-up with an explicit array of {id,digest} entries, strictly ordered by unique ASCII logical artifact IDs. Added multi-package, asset-free, changed-ID, duplicate-ID, unsorted, and malformed schema cases. All evidence fixtures now use this representation.
  4. Hash identities: corrected both identity blocks in all seven hash vectors. Repository validation now checks their check ID/version against the rendered operation, with a regression test for each identity block. The empty-hash fixture now explains its SHA-256 constant.
  5. Degenerate observations and local checks: clarified that every shared vector applies, including empty ink and zero-area hashing. A standalone predicate adapter may be needed; substituting unsupported does not satisfy the expected outcome. Implementation-local checks, including glyph-shape checks, can run alongside complete shared checks.
  6. Serialization: the shared envelope is a parsed comparison input, not a byte-stable committed artifact. Consumers may keep their own canonical committed report and derive this envelope separately.
  7. Tooling: added dangling-reference validation with readable failures, schema/registry consistency checks, and explicit UTF-8 in the test helper. Retained re.search intentionally: JSON Schema specifies that an unanchored pattern matches anywhere in the string (official definition). A regression test now distinguishes p from ^p$; changing to fullmatch would alter that standard behavior.

Validation passes: 27 compiler cases, 64 profile cases, 37 schema cases, and all 19 regression tests. Consumer execution at the candidate SHA remains required.

@ambroise-leclerc ambroise-leclerc left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Follow-up — 35f5a09

Re-reviewed the correction commit against every point raised. All resolved, and cleanly.

1 — R03 tint tolerance. The model is now b + (t-b)*a with a single effective coverage and an inclusive ±n per-channel allowance, feasible-coverage intervals intersected with [0,1], and the zero-span channel handled as "differ from the constant by at most n". This is bit-for-bit the semantics of MduX's couldBeBlend(). tint-narrow-two / tint-narrow-one / tint-narrow-foreign pin the exact (215,134,135) over (209,214,219) toward (219,51,46) case from MduX #261 — one composite fails, two pass, a foreign green channel fails at two — and I re-derived all three by hand against the new rule: they match. The old wide-span fixtures were correctly re-computed for the new model. The amendment note and the link to MduX's test file at a3f8b6d make the provenance auditable.

2 — configuration. Now an opaque producer-scoped token; MedUI defines no cross-producer object or canonical hash, and cross-consumer conformance is explicitly at the operation-outcome level rather than row pairing. Workable — MduX binds its own token to all rendering settings.

3 — assets. Now an ordered {id,digest} array with [a-z0-9][a-z0-9./_-]* IDs, strictly ascending, no roll-up. report-asset-legacy-rollup (single string) is now valid:false; report-asset-list, -free, -invalid-id, assets-unsorted, assets-duplicate-id cover it. Maps directly onto MduX's BoundArtifact roles (font/…, text/…, image/…, shader/…).

4 — fixture identities. Fixed in the vectors and enforced: validate.py now rejects a captureIdentity/baselineIdentity check that differs from the rendered-check operation.

5 — degenerate-input policy. spec/profiles.md now states it outright: every vector applies to the claim including empty ink and zero-area regions, a standalone predicate must produce the expected outcome, and unsupported does not satisfy the claim. Unambiguous — MduX will implement standalone R02/R04 that handle the degenerate cases its integrated path refuses.

6 — canonical encoding. "The evidence envelope is a parsed comparison input ... MedUI prescribes no canonical report serialization. Consumers may retain their own canonical committed reports and emit this envelope as a derived artifact." Exactly what MduX needs — verification.json stays MduX-canonical and byte-compared, the MedUI envelope is derived.

7 — backend. Producer-scoped exact string, no aliasing, comparison at operation-outcome level. Fine.

8 — smaller notes. $ref resolution now fails gracefully with a message; main() wraps ValueError; the re.search/anchor behaviour is documented; the schema's profile/check consts are cross-checked against the registry and spec/profiles.md in validate.py.

Implementation-local checks ("including glyph-shape checks, may run alongside the shared checks; they neither replace shared cases nor change their outcomes") settles MduX's localizedTextPresence() — it stays local.

python3 tools/validate.py → OK (27 / 64 / 37); 19/19 tests pass on my checkout.

From the MduX side this is ready to pin as a v0.3.0-rc. #314 becomes executable on merge; see the note there for the remaining MduX-side work (manifest claim + parser, the E01 identity envelope, the standalone-predicate corpus harness).

@AM-L
AM-L merged commit 6ce3420 into main Sep 7, 2026
2 checks passed
@AM-L
AM-L deleted the contract/rendered-evidence-profiles branch September 7, 2026 14:44
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.

Define versioned rendered-check profiles and evidence identities

3 participants