Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

Build the conformance suite — and no blessed implementation #9

Open

Description

@kinlane

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:

  • given as a single expression versus an array; the JSONPath dialect and its edge cases
  • resolved versus unresolved document handling, and resolved: false semantics
  • $ref resolution, 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

  1. added
    task
    roadmap
    maturity:consensus
    on Jul 31, 2026
  2. kinlane commented on Aug 21, 2026

    @kinlane
    ContributorAuthor

    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:

    • MUST — the tests an implementation has to pass to claim compliance.
    • MAY — the tests for an additional layer, passed by implementations that want to advertise
      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:

    You went to the spec and the spec was like, it should instead of must. And it basically
    left room for error.

    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:

    At least vacuum — they claim they are backward compatible, but they are not. And there is no
    way to prove it, because you don't have any suite or anything that could prove it. You would
    basically need to come up with your own examples and prove that it's not.

    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:

    I don't see anyone actually supporting the spec initially… it usually takes a while for
    tooling to catch up. I feel like it would be tricky without the canonical implementation.

    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:

    1. No canonical implementation — the suite is the only arbiter. Purest, slowest to adopt.
    2. A canonical implementation, explicitly non-normative — it ships, it is the on-ramp, and
      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.
    3. A blessed implementation — the thing this issue was filed to avoid.

    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.

  3. kinlane commented on Aug 27, 2026

    @kinlane
    ContributorAuthor

    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

    A reference implementation is something you point at.
    A blessed implementation is something you measure correctness against.

    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:

    1. spotlight-tools is 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.
    2. It is not the definition of correct. When the conformance suite and the reference implementation disagree, the suite wins and the implementation gets a bug filed against it.
    3. Cases are derived from the specification text, never captured from any engine's output — including ours. Capturing an engine's behavior and calling it a conformance suite re-encodes that engine's bugs as the standard.
    4. The suite lives in this repository, not in the tool. The moment it lives inside an engine it measures that engine instead of defining the format.
    5. Published results include the reference implementation, especially where it fails. An engine that fails cases is in a better position than one that has never been measured, and that has to be true for us before we can ask it of anyone else.

    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:

    • Reference implementation: a constraint on our engine. Legitimate, honoured, and it does not touch the format. Someone can still write a conforming Go or Rust engine.
    • Blessed implementation: a constraint on the specification itself. One country's browser requirement quietly becomes a property of the format, and the multi-engine goal in Rule portability across policy engines (OPA/Rego) without a second rule language #13 dies without anyone deciding to kill it.

    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.

  4. kinlane commented on Aug 27, 2026

    @kinlane
    ContributorAuthor

    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

    License / activity MIT · 745 stars, 302 forks · last push today
    Adoption 69 implementations across 24 languages listed in the README — Clojure, C++, Dart, Elixir, Erlang, Go, Haskell, Java, JS, Kotlin, Lua, .NET, Perl, PHP, PostgreSQL, Python, Ruby, Rust, Scala, Swift, Unison and more
    Size, draft2020-12 required 46 files · 383 cases · 1,299 tests
    Size, draft2020-12 optional 13 files · 162 tests, plus optional/format at 21 files · 850 tests
    Across all drafts roughly 6,500 tests
    Remote $ref fixtures 79 files, served at http://localhost:1234/<relative path>
    Self-check test-schema.json — a JSON Schema that validates the test files themselves
    CI a job literally named "Test Suite Sanity Checking", run on push, PR, release and daily on a cron

    Consumption model worth noting: the recommended workflow is to vendor it as a git submodule or subtree, and main is 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

    1. "Language agnostic and should require only a JSON parser." Propose a conformance suite: a case format, a runner contract, and thirteen cases #37 already takes this position. It is worth stating as loudly as they do — the moment a case needs a harness, half the languages fall out.
    2. The suite is not a style guide. Their README: "Tests may appear unusual or unintuitive, but they exist solely to exercise behavior prescribed by the specification." Ours will attract the same objection — "nobody writes a ruleset like that" — and the answer is that it is not an example, it is a probe.
    3. A schema that validates the cases, and CI that runs it on a schedule, not just on pull requests. suite/validate-cases.py in 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.
    4. 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.
    5. The 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:

    Since there are no requirements on the content of error messages, there's not much that can be verified for them, but it is possible to identify when an error message could be present.

    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:

    The output property itself has a property for each of the output formats where the value is a schema that will successfully validate for compliant output.

    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, and flag/list/hierarchical in later drafts) and shipped output-schema.json alongside 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:

    As the Test Suite should not prefer one interpretation over another, these cases need to be tested another way.

    suite/README.md in #37 currently says the opposite. It invents an array-of-keys path representation and documents it under "What counts as a match" — and GAPS.md calls 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:

    • Schema-shaped expectations (their answer), which lets a case assert a rule fired without asserting how the location is spelled; or
    • Move location out of the required tier entirely until the specification defines a reporting format, and assert only code and severity.

    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:

    • We cannot skip the reporting question the way they could for years. It is not an advanced topic for us, it is case one.
    • Their required-tier ratio does not transfer. Expect a larger share of our suite to be genuinely contentious.

    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

    1. Replace literal diagnostic matching with schema-shaped expectations, or drop location from the required tier until the specification defines reporting.
    2. Raise "the specification has no defined output/reporting format" from a gap note to a work item on Take the format to a formal specification — normative wording, conformance, versioning #2, modelled on their output-schema.json.
    3. Add a 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.
    4. Add a daily cron to the conformance-cases CI job.
    5. Note that results/ will likely become a separate project, and design the case format so it does not assume otherwise.
    6. Document the submodule/subtree consumption model and commit to main being 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.

  5. kinlane commented on Aug 28, 2026

    @kinlane
    ContributorAuthor

    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:

    Having some reference tooling with regards to this will just be useful, rather than 100 implementations that implement a different surface area of the spec — or at least providing the foundations or the abstractions to allow higher-fidelity tooling to be more easily built.

    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:

    Argument Made by What it actually asks for
    Nobody adopts a new spec with no implementation to point at 2026-08-21 A reference implementation — a thing you run
    100 partial implementations is the failure mode; give people foundations and abstractions 2026-08-28 Reference libraries — things you build on
    The suite is what makes a compatibility claim checkable 2026-08-21 A conformance suite — which is the part nobody disputes

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    maturity:consensusroadmaptask

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions