Repository navigation
Build the conformance suite — and no blessed implementation #9
Description
Build the conformance suite. This is the single highest-leverage artifact this repository can produce, and it is the thing that makes "one format, many engines" true instead of aspirational.
The problem it solves
Today, compatibility between engines is a claim nobody can adjudicate. Implementations state they are compatible with the ruleset format; users discover the edges in production. There is no test anyone can point at, because there is nothing to test against — the only available definition of a valid ruleset has been "whatever the incumbent linter accepts today," discovered by reading its source.
Everyone who has attempted parity independently reports the same finding: the happy paths pass everywhere, and real production rulesets are where implementations come apart.
What this issue covers
A public, machine-readable test suite — on the order of several hundred cases, not a dozen — that any implementation can run to demonstrate conformance.
Shape of a case. Each case is data, not code, so that engines in any language can consume it: a ruleset, an input document, and the expected diagnostics (rule code, severity, path, and whether position information is required to match). Cases carry a stable identifier and a pointer to the normative statement in the specification they exercise.
Coverage the suite has to reach, because this is where engines actually diverge:
givenas a single expression versus an array; the JSONPath dialect and its edge cases- resolved versus unresolved document handling, and
resolved: falsesemantics $refresolution, including external and circular references- severity handling, and the difference between a disabled rule and an absent one
- ruleset
extends— including inheritance order, overrides, and the difference between extending a ruleset and merging two - aliases and their expansion
- formats: detection, negotiation, and behaviour when a document matches none
- the built-in functions, each with its options matrix — the largest single block of cases
- error behaviour: what a conforming implementation does with a malformed ruleset, an unknown function, an unknown keyword
- documents that are not OpenAPI, since the format is general-purpose
Explicitly out of scope for v1: JavaScript rulesets that inline function implementations. The specification covers the serialized JSON/YAML form; a code-carrying ruleset has no portable representation and cannot be a conformance case.
No blessed implementation
Worth stating in the issue because it shapes the design: this suite exists so that no single implementation is the definition of correct. The reference implementation in spotlight-tools is one conforming engine among several, and it is expected to fail cases too — those failures are bugs in it, not amendments to the suite.
That has a consequence for how the suite is written: cases must be derived from the specification text, not captured from any engine's output. Capturing output from an implementation and calling it a conformance suite just re-encodes that implementation's bugs as the standard. Where the specification is currently too vague to write a case from, that is a finding to raise against the specification, not a licence to look at what the code does.
Conformance classes
The specification needs to say what conformance even means before the suite can assert it. At minimum:
- a conforming ruleset — the document is valid against the schema and uses only specified features
- a conforming validator — given a conforming ruleset and a document, produces the required diagnostics
- optional feature sets, declared rather than assumed, for anything that is genuinely permitted variation
Deliverables
- Conformance classes defined in the specification
- Case format specified and documented, with a worked example
- Suite repository layout and a runner contract any language can implement
- Initial case set covering the divergence areas listed above
- Published results for known implementations, run and reported the same way for all of them
Badging conformance is deliberately a separate issue — a badge is only meaningful once this exists.
Anyone who has attempted engine parity, in any language: your list of where it broke is the most valuable contribution to this issue.
Activity
kinlane commentedon Aug 21, 2026
From office hours, 2026-08-21. Two things came out of the session that change this issue:
one sharpens it, one contradicts its title.
1. The suite wants tiers, and the model is the JSON Schema test suite
Not a flat pass/fail. Two tiers:
more than the baseline.
The reason to copy JSON Schema specifically is that its suite is run by essentially every major
validator across JS, Rust and Go — which is why JSON Schema gets consistent behavior across
tools and OpenAPI does not. The diagnosis offered on the call for why this format has the
OpenAPI problem rather than the JSON Schema one:
Also worth recording: the tests in the implementation's repository are not a substitute.
They are a pre-selected set of examples that the implementation happens to pass. That is
regression testing. It says nothing about compliance.
2. The motivating example is a claim nobody can check
The concrete reason this matters, from someone who spent five years maintaining the
implementation:
That is the strongest available argument for the suite, and it is a better one than
"specifications should have conformance suites." A compatibility claim is currently a marketing
statement that nobody — including the project making it — can check. A suite converts it into a
testable one, for every implementation, ours included.
To be explicit about the spirit of raising it: this is the reason to build the suite, not an
attack on vacuum. vacuum is welcome to run it and prove the claim, and that outcome is strictly
better for this specification than the argument continuing. The same test applies to us — a
canonical implementation that cannot pass its own suite is a bug report, not an embarrassment.
3. This issue's title may be wrong
The title says "and no blessed implementation." Two people on the call independently argued
the opposite, and neither had read this issue:
The argument is about adoption, not purity: a new specification with no reference implementation
gives nobody anything to point at, and tooling always lags. The counter-argument — that a blessed
implementation becomes the de facto specification and the written one stops mattering — is the
reason the title reads as it does today, and it is also correct.
Both positions are defensible. They cannot both be the plan. Options as they stand:
where it disagrees with the specification, the specification wins and it is a bug in the
implementation. This is the JSON Schema-ish middle and is probably what people are actually
asking for.
Related to this: the constraint recorded in #11 that the implementation stay JavaScript/Node.js
is only meaningful if there is a canonical implementation. These two questions resolve together.
Ask: settle this in writing before any normative wording is drafted, and retitle the issue to
match whatever is decided.
Filed from the office hours of 2026-08-21. Full notes: #34.
kinlane commentedon Aug 27, 2026
The contradiction, and a position on it
This issue is titled "and no blessed implementation." At the 2026-08-21 session (#34 §1) two people independently argued the opposite: that without a canonical implementation nobody adopts a new specification, because tooling always lags the spec and there has to be something to point at.
Both positions are defensible. The title has been carrying the decision instead of the body, and that is my fault for filing it that way. Here is a position, in writing, to argue with — not a ruling, and I will change it if the room takes it apart.
The position: these are two different things, and only one of them is refused
The first is a starting point for adopters. The second is a definition of the format. Conflating them is how a specification ends up being whatever one codebase happens to do — which is the exact condition this project exists to escape, and it is the condition the format is in today.
So, concretely:
spotlight-toolsis the reference implementation, named as such, documented as such, and the thing a newcomer is pointed at. The adoption argument from Office hours notes — 2026-08-21 #34 is correct and this satisfies it.Point 2 is the falsifiable part, and it is the one to hold me to. If the answer to a disagreement is ever "the implementation is right because it is the implementation," this position has failed and the title was right all along.
The argument that convinced me, and it is not a theoretical one
From #34 §13: the Dutch government's stated requirement is that the implementation stay JavaScript / Node.js, because their tooling runs in the browser. That is a real constraint from the one government with a publicly documented dependency on this format, and it belongs in #11.
Now notice what happens under each reading:
The distinction is not pedantry. It is the difference between honouring a mandated dependent and letting them design the format by accident.
What this changes
What I am not claiming
That a reference implementation is harmless. It is not. An implementation that is also the only implementation becomes blessed in practice no matter what any document says, because there is nothing to disagree with it. The guard against that is not this position — it is the suite existing, being run by more than one engine, and results being published for all of them.
Which means the honest version of this is: the position is only true once somebody else runs the suite. Until then it is an intention. That is uncomfortable and it should stay written down rather than smoothed over.
Related: #2, #10, #11, #13, #34, #35, #37.
Objections welcome here, in writing, before or instead of the call — particularly from anyone who made the adoption argument on the 21st. If you think the distinction does not survive contact with how people actually pick tools, that is the thing I most want to hear.
kinlane commentedon Aug 27, 2026
Research: how the JSON Schema Test Suite actually works, and what it says about #37
#34 §1 named the JSON Schema Test Suite as the model — "a set of tests that MUST pass to claim compliance, and a set that MAY pass for an additional layer," and the reason it works being that essentially every major validator runs against it. I went and read it rather than working from the summary. Everything below is checkable; figures pulled 2026-08-27.
It changes one thing in #37 materially, and corrects a mistake I made there.
What it actually is
optional/formatat 21 files · 850 tests$reffixtureshttp://localhost:1234/<relative path>test-schema.json— a JSON Schema that validates the test files themselvesConsumption model worth noting: the recommended workflow is to vendor it as a git submodule or subtree, and
mainis guaranteed stable. Nothing is published as a package. That is a deliberately low-tech distribution choice and it is part of why sixty-nine implementations could adopt it.Five things to copy directly
suite/validate-cases.pyin Propose a conformance suite: a case format, a runner contract, and thirteen cases #37 does the first half. The daily cron is the half I missed, and it is the one that catches rot in a repository nobody is actively editing.proposals/— a directory per active specification proposal, holding the tests that would become required if the proposal lands, explicitly marked volatile. That is a better answer than our MAY tier for things like JSON Path: the RFC exists, this format does not follow it — pick a path and an escape route #28 (RFC 9535) and Markdown as a first-class format — linting agent skills, and why paths do not fit prose #32 (markdown): a proposal can carry its tests before it carries consensus, without contaminating the required set.optional/tier is honest about being a muddle. Their own README says it "currently conflates many reasons why a test may be optional." Ours will drift the same way. Worth borrowing the honesty rather than pretending our MAY tier is crisper than theirs.The thing that solves gap 1 — and it is not what I proposed
They hit our exact problem years ago: error message content is not specified, so it cannot be asserted literally. From
output-tests/README.md:Their solution is the interesting part. In the output tests, the expected value is not a literal — it is a JSON Schema that the produced output must validate against, one per output format:
That is the mechanism #37 needs. Instead of asserting a diagnostic is exactly
{code, severity, path: ["items", 0, "a"]}— which forces the suite to invent a path representation the specification does not define — a case asserts with a schema that constrains only what the specification actually pins down, and says nothing about the rest.It also lets a case make the weaker assertions that are often the true ones: a diagnostic for this rule is present at this severity, and its location, however represented, is non-empty. That is testable today.
path: ["items", 0, "a"]is not.Second half of the same lesson: JSON Schema specified an output format (
flag/basic/detailed/verbose, andflag/list/hierarchicalin later drafts) and shippedoutput-schema.jsonalongside the tests. They did not leave reporting to convention. Gap 1 is not a gap we can close inside a suite — it is a section the specification is missing, and #2 should carry it.The rule I broke in #37, stated by them in one sentence
Their output README, on an ambiguity in
basic:suite/README.mdin #37 currently says the opposite. It invents an array-of-keys path representation and documents it under "What counts as a match" — andGAPS.mdcalls that out as "a specification gap being papered over by a test harness, which is exactly backwards" while doing it anyway.By this standard that is not a documented compromise, it is a defect. The suite must not pick a side in an ambiguity the specification has not resolved. Two ways to fix it, and I do not think it should be my call:
codeandseverity.Either is better than what is in the PR now. This is the most concrete thing to come out of the research and it should probably be settled before #37 grows past thirteen cases.
Where the analogy breaks down, and it is in our disfavour
Worth being clear-eyed: JSON Schema's oracle is a boolean. Every one of those 1,299 required tests asks "is this instance valid under this schema — true or false?" That is why the suite could be built at all, and why the output tests are a separate, smaller, later, and still-evolving effort.
Our oracle is a set of diagnostics. A ruleset run produces zero or more findings, each with a rule name, a severity, and a location — and we also have to say whether extra findings are a failure. That is strictly harder than a boolean, and every one of our thirteen cases lives in the territory JSON Schema quarantined into
output-tests/precisely because it was the hard part.Two consequences:
The results half: Bowtie
The suite defines correct; a separate project publishes who passes. Bowtie — "JSON Schema in every programming language" — runs implementations in containers against the suite and publishes a compliance report at bowtie.report.
The separation is the design decision worth stealing. The specification repository owns the cases; a harness that has to know how to invoke a Go binary and a PostgreSQL extension lives somewhere else. #37 currently proposes a
results/directory in this repository, which is fine for a proposal and probably wrong at scale.It also answers the vacuum question from #34 §1 without anybody having to argue: in that ecosystem, a compatibility claim is a row on a public dashboard rather than a sentence in a README.
Proposed changes to #37
output-schema.json.proposals/convention, and point JSON Path: the RFC exists, this format does not follow it — pick a path and an escape route #28 and Markdown as a first-class format — linting agent skills, and why paths do not fit prose #32 at it.conformance-casesCI job.results/will likely become a separate project, and design the case format so it does not assume otherwise.mainbeing stable.One licensing note for #33
The JSON Schema Test Suite is MIT, separately from the specification itself. A conformance suite is something we want every engine — including commercial ones — to vendor and run. Whatever is decided for the specification text, the suite should carry a licence that makes vendoring a non-event.
Related: #2, #10, #11, #28, #32, #33, #34, #35, #37.
kinlane commentedon Aug 28, 2026
From the office hours of 28 August 2026 (#40) — the count on this is now three, and the title is still the other way round.
From the OpenAPI Initiative side, on why reference tooling is needed:
That is a third voice, after the two on 2026-08-21 (#34 §1), arguing that something canonical is required — and it is a different argument from theirs, which is worth noting because it changes what "canonical" has to mean:
The first two are not the same ask, and neither is the thing this issue's title rules out. A specification can decline to bless an implementation while still shipping libraries and a suite — or it can bless one. Those are different decisions and this issue currently pre-empts both with a title.
There is also now a decision that depends on the answer. api-commons/spotlight-tools#77 is about persuading vendors to adopt the core libraries instead of writing their own linter. That pitch is materially different depending on whether the core is the reference or one implementation among equals — and the outreach should not start before this is settled.
Proposal: split the title. Keep the conformance suite here, and move the blessed-implementation question to its own issue where it can be decided on the merits, since three people have now argued the position the title assumes.