Checks and lints¶
Summarizes SPEC.md §11; SPEC.md is authoritative.
vouch check runs every check below. It never executes experiments or user
code.
- Exit codes:
0pass,1fail,2could not check (unreadable config, unparseable tex, no store). - Severities:
erroralways fails.warningfails under--strict.infonever fails. Override per check with[check] severity.
| Check | Default | Trigger | Fix |
|---|---|---|---|
config |
error | invalid vouch.toml or tex graph |
message names the file and line |
store-edited |
error | a run record's or derived.json's record_hash doesn't match its content |
re-run the experiment (or vouch build); never hand-edit .vouch/ |
derive-error |
error | a values module failed to import, or a definition raised, read an unknown key, read a failed definition, returned the wrong type, or was defined twice | fix the definition, then vouch build |
unknown-key |
error | a cited key exists nowhere (did-you-mean suggestions included) | fix the key, or record/derive/expect it |
key-conflict |
error | two sources produce one key | rename one |
out-of-sync |
error | generated files or derived.json differ from what build would write |
vouch build |
stale / upstream-stale |
error (info when the paper cites nothing from the run) | see Freshness | re-run (exact command shown) or vouch accept |
tampered / incomplete |
error | see Freshness | re-run |
untracked-input |
error | a derivation reads a file no run produced and not listed as external |
produce it in a run, or declare it external |
alias-target |
warning | an alias names a key under which nothing is recorded | fix the alias |
derive-cycle |
error | derived values depend on each other | break the cycle |
false-claim |
error | a claim no longer holds; the message shows the values it read | re-examine the result and the prose |
figure-stale |
error | a cited figure's producing run is stale | re-run |
changed / suspicious / figure-changed |
warning | see Change notification | re-read the cited sentences, then vouch ack |
fragile |
warning | a claim holds by less than changes.claim_margin |
soften the claim, or check it is not noise |
pending |
warning | a cited expect() key has no producing run |
run the producer command |
no-source |
warning | a bare number in prose that matches no recorded value: the signature of an invented number | find the real value (vouch search) or remove the number |
bare-number |
warning | a bare number that does match a recorded value | vouch suggest --apply |
figure-untracked |
warning | an \includegraphics with no producing run |
save it inside a run |
no-description |
warning | a cited key has no desc |
add desc= |
env-drift / absent |
warning | see Freshness | re-run if the difference matters |
imported |
info (warning without --producer) |
a run was registered with vouch import, not recorded live |
re-run the producer under vouch for full provenance |
cosmetic, accepted, hidden, reformatted, unused-value, expectation-met, default-float-format, dirty-tree-at-record |
info | — | — |
The bare-number lint¶
- Scope: the document body, with comments, vouch macro arguments and LaTeX plumbing masked. Plumbing includes
\label, the\reffamily,\cite*, URLs,\includegraphicsoptions, lengths and units, tabular column specs, and\begin/\end. - Always flagged, including in math: decimals (
0.93), percentages (12.5\%),\timesmultipliers, thousands separators (18{,}535), scientific notation, and\pmpairs. - Flagged in text mode: integers of two or more digits (
38 layers). Years (19xx/20xx) are skipped whenallow_yearsis on. Single digits and spelled-out numbers are never flagged. - Exemptions:
[lint] allowrules (a regex matched against context, plus a reason), and a% vouch: ignorepragma on the line. - Matching. Each flagged literal is parsed together with its implied precision (
93.2\%claims 1 decimal place), then compared against every recorded value and its common transforms. A match is exact when rounding the candidate to the literal's implied precision reproduces the literal. - Messages name the key and the exact snippet that prints the literal:
- Where it runs.
vouch buildandvouch checkboth report it, per paper.[lint] levelis"warn"(default),"error"or"off".--strictmakes the warnings errors.
See also: vouch suggest, vouch check.