Documentation
¶
Overview ¶
Command ratchet judges one ruby/spec sweep against a per-file baseline.
It replaces a single frozen scalar. The scalar could not work: a spec file that fails to load carries tens of examples -- one flip was measured moving the total by 43 on a documentation-only commit -- so the floor needed a margin wider than the largest file, and a gate with a 43-example margin is blind to every regression smaller than 43. Worse, the number it reported was unattributable: a drop of 43 is one file not loading, or 43 specs regressing, and those need opposite responses.
A per-file baseline needs no margin at all. Each file is judged against its own recorded count, so a real regression of one example in one file is visible while a file that failed to load is reported as a load failure and not summed into the same number. The total is still printed, but as a derived summary rather than as the thing being gated.
It reads the sweep's TSV on stdin or from -results:
OK\t<path>\t<pass-count> FILEFAIL\t<path>
and the baseline from -baseline, in the same shape minus the counts it does not need. Exit 0 means no file went backwards.