Repository navigation
Description
From Office Hours #7: Joost pointed out that two code bases now run the same tests, and asked for them to be consolidated. Agreed on the call: the spec stays the source of truth, the spec's CI tests our tools, and conformance.openlint.org tests a growing list of community tools. This is a proposal for consolidating them.
What exists today
| openlint/spec | openlint/conformance | |
|---|---|---|
| Tests | v1/conformance/**/test.json + fixtures (240) |
reads the spec's, plus its own 14 interop cases in cases/ |
| Runner | tools/conformance.py (Python, 211 lines) |
run.mjs (Node, 309 lines) |
| How a tool plugs in | a command template that prints Spectral-model JSON: --linter "openlint lint -r {ruleset} -f json {document}" |
a JS adapter per tool inside run.mjs |
| Results | pass / fail, per requirement and conformance class; proposed requirements don't count | exact / detected / fail / error / unsupported, as matrix.json for the dashboard |
| Tools | OpenLint (pinned commit), Spectral 6.17.0 (lockfile) | OpenLint, Spectral, vacuum, IBM, Insomnia, Redocly (latest) |
The duplicate isn't the tests, since conformance already reads them from the spec. It's the judging: two implementations decide whether a result matches an expectation, and they can drift apart. Today run.mjs doesn't know about proposed requirements, for example.
The design: three layers
- Tests: data only. Ruleset, document, expected results, and the requirements they cover.
- Runner: one implementation that judges a tool against the tests.
- Tools: each one is just a command that meets the runner's contract. The pipeline decides which tools to run.
1. Tests: the spec is the source of truth
The tests stay in openlint/spec, where they already are:
- The spec build checks them.
tools/build.pychecks each test's requirement IDs against the spec text, and puts the tests into the spec's "Conformance tests" section. - They're versioned with the spec:
v1/conformance/now, andv2/conformance/for the next version. - Other pipelines read them from there. Any pipeline can check out
openlint/specat a tag or commit and readv1/conformance/without building the spec. The conformance repo does this today, and never copies or edits a test.
A test that's wrong is fixed in the spec, and every pipeline picks up the fix.
2. Runner: one judge, owned by the spec
Make the spec's tools/conformance.py the only judge, and have the conformance repo call it instead of reimplementing it. It needs three small additions:
--report json: write per-test results (id, covers, status, reason, proposed or not) to a file, for the dashboard.- An "unsupported" exit code, for example exit 3 with a reason on stderr. A tool can then say "outside my scope" (vacuum and IBM given a non-OpenAPI document) without counting as a fail.
- "detected" as an extra level: the same rule codes and counts, but different paths or messages. It's useful for the dashboard, and the spec's CI can ignore it.
run.mjs then shrinks to: install the tools, call the runner once per tool, merge the JSON reports into matrix.json, and run the interop cases. The interop cases aren't spec tests: they include Redocly translations, so they stay in the conformance repo.
3. Tools: a command per tool, chosen by each pipeline
The spec's contract is already the right plug: "print Spectral-model JSON on stdout; on a ruleset you can't load, print nothing parseable and exit nonzero".
- OpenLint and Spectral meet it natively:
lint -r {ruleset} -f json {document}. - Community tools get a small shim in the conformance repo that wraps them and translates their output. For example,
adapters/vacuum.mjs {ruleset} {document}runs vacuum'sspectral-reportand maps it. The IBM, Insomnia and Redocly logic already inrun.mjsmoves into shims like this. A tool maintainer can own their own shim. - A tools registry,
tools.ymlin the conformance repo:
- name: openlint
install: npm i -g openlint
command: openlint lint -r {ruleset} -f json {document}
- name: vacuum
install: npm i -g @quobix/vacuum
command: node adapters/vacuum.mjs {ruleset} {document}
# ...one entry per tool; adding a tool = one entry + (maybe) one shimWho runs what
Spec CI (openlint/spec, on every PR):
- The tests come from the repo itself.
- Runner:
tools/conformance.py. - Tools: OpenLint only, plus the Spectral 6.17.0 baseline (see the open question below). These stay as they are in
check.yml: no registry and no dependency on the conformance repo, so the spec never breaks because of a community tool.
Conformance CI (openlint/conformance, daily and on push):
- Checks out the spec at
main(or a release tag) and uses its tests and its runner. - Tools: everything in
tools.yml, run as a GitHub Actions matrix, one job per tool. A broken tool shows as one red job and doesn't block the rest. - A final job merges the per-tool reports into
matrix.jsonand publishes the dashboard.
What changes where
| Repo | Change | Who |
|---|---|---|
| openlint/spec | conformance.py: --report json, an unsupported exit code, a detected level |
spec maintainers' call; happy to send a PR |
| openlint/conformance | tools.yml; adapters/*.mjs shims; run.mjs becomes install + call + merge; a matrix workflow |
Kin |
| openlint/conformance | Interop cases stay as they are | — |
The spec change goes first. Until it lands, the conformance repo keeps run.mjs as it is.
Open questions
- The Spectral baseline in spec CI. Is Spectral 6.17.0 "our tool"? It checks that v1 still describes Spectral, which is the compatibility promise. Keep it in spec CI, or move it to the dashboard only?
- Python runner, Node dashboard. Is calling
conformance.pyfrom the conformance repo fine (Python in CI), or would he rather the runner be published as a package? - Which spec ref does the dashboard test?
main(as today), the latest release, or both? - v2 tests. Should they go in
v2/conformance/, with the dashboard showing v1 and v2 side by side?
Next
- Agree the approach here.
- A PR to the spec for the runner changes.
- Refactor openlint/conformance onto wrappers, a registry and a matrix.
Activity
kinlane commentedon Nov 13, 2026
Can you take a look @joostfarla?
joostfarla commentedon Nov 14, 2026
Thanks for writing this up, @kinlane! The approach works for me. A few thoughts on the spec side before the runner PR.
Detected. I'd prefer to keep the runner's verdict at pass or fail, and put the expected and actual results in the JSON report. "Detected" can be worked out from those, and the spec doesn't have to define a level in between.
Unsupported. Works for me as a status in the report. I'd suggest counting it as not passed: the runner exits nonzero and the test doesn't count toward a conformance class. That keeps spec CI red if OpenLint or Spectral ever skips a test.
The contract. With a second repo and shim authors depending on it, it would help to document the output contract, the exit codes and the report format in the spec repo, next to the command template in
CONTRIBUTING.md. A schema for the report next toschema/registry.schema.jsonwould do.On your questions:
conformance.pyfrom a checkout is fine. It only needs the Python standard library and the full spec checkout, since it readsindex.bs.mainis fine for now. Let's change that once there's a first release.v2/conformance/once there's a v2 draft. I'd see the OpenLint and Spectral gate in spec CI as a v1 thing though. Anything v2 changes would start as a proposed requirement, with tests that run but don't count until a linter implements it.If that works for you, the runner PR would carry the report, the unsupported status and the contract docs. Open to other ideas on any of these!
joostfarla commentedon Nov 18, 2026
@kinlane, we might need to reconsider where and when conformance is tested. #27 states two behaviors that neither OpenLint nor Spectral has yet, and the spec's CI can't test them today. I've opened a discussion: https://github.com/orgs/openlint/discussions/45.
kinlane commentedon Nov 18, 2026
Thanks, Joost. All of that works for me: a pass or fail verdict with expected and actual results in the report, unsupported counting as not passed, and the contract and a report schema documented in the spec repo. Keeping the Spectral baseline in spec CI until backwards compatibility (#12) is decided makes sense too. Go ahead with the runner PR whenever you're ready, and I'll move openlint/conformance onto it.