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

just compat: the compatibility check in one command

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:compat-just

harness/compat.mjs had no one-command entry, as the benchmark has just bench. From a fresh clone it failed at once: spec-pds: no target/release/pds.

What changes:

  • just compat: builds every implementation at its pin (node bench.mjs --setup: spec-pds's release binary, zds's image from its Dockerfile, vlpds's and RustFS's images), then node compat.mjs --steps 200 --json ../compat/results.json. The tables go to standard output. Arguments pass through, as in just compat --impls zds --areas oauth.
  • A flag given twice takes its last value (compat.mjs's arg). So just compat --steps 50 overrides the recipe's --steps 200; before, the first one won.
  • compat/README.md and README.md lead with just compat.

Checked from a clean worktree of main (npm ci, no build):

  • the command: just compat --impls spec-pds,zds --areas records,sessions --steps 20;
  • exit 0, with each area's 20 steps, so the passed --steps took effect: spec-pds 20/20 and 20/20, zds 13/20 and 6/20.

The committed compat/results.json is unchanged.

🤖 Generated with Claude Code

Approved

This adds a just compat recipe that runs setup and then compat.mjs --steps 200 --json ../compat/results.json, passing extra arguments through. It also makes compat.mjs's arg take the last value of a repeated flag, and updates both READMEs. I found nothing that must change. It changes no server behaviour, so it needs no spec change, and it touches no harness check. lastIndexOf is what makes --steps 50 override the recipe's --steps 200. The arg change affects only compat.mjs; I did not read bench.mjs to see how it parses its flags.

One thing to be aware of: the recipe runs bench.mjs --setup and overwrites compat/results.json on every run, even when you pass --impls or --areas. A partial run therefore replaces the committed full results. That may be intended, but a note in the README would help.

Merged as 04f0768