Skip to content

[NEW-SPEC-7] Require a persisted, CI-committed cross-implementation interop matrix (not just a one-shot pass/fail) #145

Closed

Description

@SoundMatt

Problem. §20.1.3's existing behavioural-conformance gate (referenced from §20.1 item 3 and §20.3)
checks that a port is EQUIVALENT to the reference implementation over golden vectors, but not against
its other language siblings, and the result is not persisted anywhere diffable. This is the mechanism
gap behind THEME-B/C/D and behind INTEROP-01 through INTEROP-05 (filed separately in this batch):
without a persisted matrix, a cross-language equivalence regression has no artifact trail.

Proposal. Extend §20.1's behavioural-conformance gate and the interop command: beyond checking
EQUIVALENT-vs-reference, each port's CI MUST regenerate and commit a relay interop --format json
matrix comparing it against every other published sibling implementation of the same protocol (not
only the reference) over the full pinned vector set. A pull request that regresses any previously-
EQUIVALENT cell MUST FAIL. This makes cross-language equivalence a persisted, diffable artifact instead
of a one-shot CI check whose result vanishes after the run.

Note: the audit's own reference to "§20.1.3" does not correspond to an actual numbered subsection at
current HEAD (§20.1 is a flat numbered-list, not further subdivided into 20.1.1/20.1.2/20.1.3) — noting
this citation mismatch rather than silently keeping it; the underlying behavioural-conformance gate it
refers to is real and is item 3 of §20.1's CI-gates list.


Filed from the 2026-07-29 ecosystem audit register; independently re-verified against current HEAD before filing.

Activity

  1. SoundMatt commented on Aug 21, 2026

    @SoundMatt
    OwnerAuthor

    Implemented and merged in #186 (v2.7.1 → v2.8, MINOR).

    What shipped

    • relay interop's JSON output is now a versioned artifact: kind: "relay-interop-matrix", matrix_version: "relay-interop-matrix/1", and an explicit participants[] list — so the set of compared implementations is itself part of the diffable artifact, not just the per-cell verdicts.
    • New --baseline FILE flag: compares a fresh run against a previously-committed matrix and reports regressions[] — one entry per (vector, participant) cell that was EQUIVALENT in the baseline but isn't now. A cell that was never EQUIVALENT to begin with is not reported as a regression, matching the issue's precise wording.
    • New §17 Requirement 18: CI MUST commit the matrix (covering every published sibling it can invoke) and MUST regenerate + --baseline-check it on every change, failing the build on any regression.
    • New spec/schemas/relay-interop-matrix.json, new REQ-RELAY-101.

    Deliberately not pairwise (N²)

    The issue's literal wording ("compare against every other sibling implementation, not only the reference") would mean diffing every binary's convert output against every other binary's directly. Not built: byte-equality is transitive, so "A equivalent to the shared reference" and "B equivalent to the shared reference" already jointly establish "A equivalent to B" — the existing O(N) hub-spoke comparison carries the same information an O(N²) pairwise matrix would, without the redundant convert invocations. Documented explicitly in §17 and §20.1 rather than silently narrowed.

    Bug found along the way

    §20.4 cited §20.1.2 for a specific CI-gate item, but §20.1 is a flat numbered list, not subdivided — the same class of citation drift the issue itself flags for the audit's stale §20.1.3. Corrected to "§20.1 item 2".

    Verification

    Local, pre-merge: go build/vet/test clean, gofmt -l . clean, golangci-lint run 0 issues, gofusa check 0 errors/PASS, gofusa trace -req-coverage 100 100%/100%.

    CI caught a real gap on first push: the 90% coverage gate failed (89.9%) — 3 genuinely-uncovered branches from the new code (malformed --baseline JSON, and the markdown/text regression-rendering blocks). Fixed with 3 targeted tests, coverage back to 90.3%, pushed as a follow-up commit, CI green on re-run.

    Post-merge, independently re-verified from a fresh clone at ba434c9: build/vet/gofmt/test clean (90.3% coverage confirmed), gofusa check 0 errors/PASS, gofusa trace 100%/100% (101/101 requirements), and end-to-end — built the binary, ran relay interop --format json against itself, fed the output back as --baseline (clean round-trip, no false regressions), and relay conform --manifest reports 18 total requirements with Requirement 18 correctly NOT_OBSERVABLE/implementation's own CI.

    CI green on the main merge commit (DCO, Lint, Docker build, CodeQL, Security, Test, Self-conformance, go-FuSa full safety lifecycle — all pass).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions