~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

just compat: the compatibility check in one command

Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:compat-just
compat/README.md+10−1
@@ -10,6 +10,12 @@ past a difference: each area records its checks that agree and that differ,
and the first difference in full. [`RESULTS.md`](RESULTS.md) is a run against
spec-pds, zds and vlpds.
```sh
just compat # from the repository's root: everything below, in one
```
or by hand:
```sh
cd harness
node bench.mjs --setup # once: spec-pds's binary, and the zds and vlpds images (bench/README.md)
@@ -18,7 +24,10 @@ node compat.mjs --report ../compat/results.json # the tables again
```
`--impls spec-pds,zds` and `--areas oauth,records` run only some; `--seed`
draws other requests; `--jobs` is how many runs go at once (3).
draws other requests; `--jobs` is how many runs go at once (3). `just
compat` passes them on (`just compat --impls zds --areas oauth`), a flag
given there winning over the recipe's. Its tables go to standard output;
`RESULTS.md` holds them with what they show.
spec-pds's own gates are not this: `just gates` runs `compare.mjs` as
before, every check, stopping at the first difference.
harness/compat.mjs+3−1
@@ -20,8 +20,10 @@ import { join } from 'node:path'
import { pins, root, sh } from './lib/impls.mjs'
const here = new URL('.', import.meta.url).pathname
/// A flag's value; given twice, the last wins, so `just compat --steps 50`
/// overrides the recipe's own.
const arg = (name, fallback) => {
const i = process.argv.indexOf(name)
const i = process.argv.lastIndexOf(name)
return i === -1 ? fallback : process.argv[i + 1]
}
Justfile+4−0
@@ -37,3 +37,7 @@ test:
# The PDS benchmark (bench/README.md): build every implementation at its pin (bench/impls.json), then three rounds of each, one at a time.
bench:
cd harness && node bench.mjs --setup && node bench.mjs --rounds 3 --json ../bench/results.json
# The compatibility check (compat/README.md): build every implementation at its pin (bench/impls.json), then every core area of each beside the reference; the tables on stdout, the raw results in compat/results.json. Arguments pass through, as `just compat --impls zds --areas oauth`.
compat *args:
cd harness && node bench.mjs --setup && node compat.mjs --steps 200 --json ../compat/results.json {{args}}
README.md+1−1
@@ -188,7 +188,7 @@ says which checks it runs and how to add an implementation;
`compat/RESULTS.md` holds the last run, against spec-pds, zds and vlpds.
```sh
cd harness && node bench.mjs --setup && node compat.mjs --steps 200 --json ../compat/results.json
just compat # cd harness && node bench.mjs --setup && node compat.mjs --steps 200 --json ../compat/results.json
```
## Checks