Checkwright v0.37.0

2026-11-24

Checkwright catches reproducible classes of unsupported claims in coding-agent delivery before merge, and this release makes the battery’s SARIF log a versioned verdict contract and lets --run-validate write a gate-run Statement that another tree can verify and import. It also adds opt-in test controls and rule-id coverage, and a request channel between projects.

In brief

Section Entries Who acts
New and tightened gates 4 everyone: these may red on upgrade
Knob changes 14 if you set knobs
Gate-authoring changes 0 if you write or shadow gates
Platforms 0 if you install on a listed platform
Behavior changes 21 if you depend on a listed behavior
  • The SARIF log now carries a result for every gate the battery ran, pass, not applicable or fail, under a versioned contract with a provenance block, so a reader can tell a clean gate from one that never ran.
  • --run-validate can write an in-toto Statement binding each suite’s verdict to its commit and command. --verify-gate-run judges one against your tree, with a --json form, and --import-gate-run records one, refused until you opt in.
  • Declared test controls prove a suite can go red, and check-rule-id-coverage holds your rule ids to the specs citing them. Both do nothing until you configure them.
  • You must act on one red: check-gate-substrate-parity names check-rule-id-coverage, and check-test-control where you vendor evidence-kit, until your gates.list registers each or declares it unregistered. Both read clean until you set their knobs.
  • The evidence manifest moves to v2: run your full suite roster before your next close.

New and tightened gates

  • check-test-control — new, opt-in: init registers it nowhere, and registered it asserts nothing until EVIDENCE_KIT_CONTROLS names a control. Then it reds a newly baselined pass row no control names, and at a close cursor a declared control with no red witness under its suite’s current line, or witnessed under assignments its declaration no longer carries. Register it with --with-gate once you declare your first control.
  • check-gate-substrate-parity — reds after upgrading through assertion I, which holds every gate the binary carries for a kit you vendor to be registered in your gates.list or declared # unregistered: there. If you vendor evidence-kit, the new check-test-control is such a gate: register it once you declare a control, or declare # unregistered: check-test-control — <reason>.
  • check-docs-since — tightened: reds a governed page whose front matter carries a second since: line, whatever either value says, where it read the first and passed while a YAML renderer showed the last. --emit docs-since refuses such a page at exit 2 before writing any page. Keep one since: line per page.
  • check-rule-id-coverage — new, canon-kit, opt-in by configuration: registered, it asserts nothing until CANON_KIT_RULE_ID_DECLARES names a rule family. Then it reds a declared rule id no spec file cites, one cited by two or more spec files under CANON_KIT_RULE_ID_HOMES’ default, and a cited id no declaring file declares; rule-id-exempt: <reason> keeps a site. Register it in your gates.list beside the other canon-kit gates, or declare # unregistered: check-rule-id-coverage — <reason>, and set its knobs once your code declares rules by id.

Knob changes

  • EVIDENCE_KIT_CONTROLS — new: the ordered test-control names, empty by default, which runs no control.
  • EVIDENCE_KIT_CONTROL_<name> — new declared family: a control’s <suite> <scenario> <VAR>=<value> [...]. A malformed declaration refuses --run-validate at exit 2 before any suite runs, and a control named SINCE refuses since that name is the row below.
  • EVIDENCE_KIT_CONTROL_SINCE — new: the revision check-test-control judges new tests against where the state file names no iteration start, empty by default, which disarms that check.
  • GATE_SDK_SARIF_RESULTS — new: which results the SARIF log GATE_SDK_SARIF_FILE names carries, every result by default or only the failures under failures, environment-only and read only where that log is written. Any other value stops the battery at exit 2 before the first gate runs. Set failures wherever the log is uploaded to code scanning.
  • EVIDENCE_KIT_STATEMENT_FILE — new: the path --run-validate writes a gate-run Statement to whenever it records a run, empty by default, which writes none.
  • EVIDENCE_KIT_STATEMENT_CMD — new: an indexed command whose standard output is the Statement --verify-gate-run and --import-gate-run read when given no operand, empty by default.
  • EVIDENCE_KIT_STATEMENT_WRITE_CMD — new: an indexed command --run-validate hands the run’s Statement to on stdin, with the subject commit appended as its last argument, empty by default, which stores none. Bind it with EVIDENCE_KIT_STATEMENT_CMD to a git notes ref to keep Statements out of your tree (evidence-kit/SPEC.md §bin/run-validate.sh).
  • EVIDENCE_KIT_IMPORTED_RUNS — new: refuse or accept, refusing by default, under which --import-gate-run exits 2 before reading anything. Any other value is a configuration error. Select accept only once your own signer’s tooling verifies a Statement’s signature before the import reads it.
  • EVIDENCE_KIT_VERIFY_REQUIRE — new: space-separated requirement words --verify-gate-run adds as a sixth check, head (the subject is HEAD itself) and verdict (every suite clean), empty by default, which adds none. Select head verdict for a merge predicate; any other word is a configuration error.
  • EVIDENCE_KIT_TREE_UNTRACKED — new: ignore or count, by default today’s tracked-only tree read. Under count, --run-validate records a suite’s tree=modified when an untracked path the ignore rules leave sits outside its own tmp dir and Statement, an untracked link judged where it sits and never by its target. Any other value is a configuration error.
  • CANON_KIT_RULE_ID_DECLARE_GLOBS and CANON_KIT_RULE_ID_SPEC_GLOBS — new: the globs naming the files that declare rule ids and the spec files that cite them, empty by default.
  • CANON_KIT_RULE_ID_DECLARES and CANON_KIT_RULE_ID_CITES — new keyed knobs: per rule family, the one-group ERE declaring an id and the one citing it, empty by default, which disarms check-rule-id-coverage. Unequal key sets, a pattern outside the one-group shape, or a set family with either glob knob empty refuses every canon-kit gate at exit 2.
  • CANON_KIT_RULE_ID_HOMES — new: one or any, how many spec files may cite a declared id, one by default. Any other value is a configuration error.
  • LIFECYCLE_KIT_PEER_CHANNEL — new: the peer request channel directory, empty by default, which binds no channel: the reading arms and the bulk peer-reply --landed and --shipped forms print nothing at exit 0, and peer-file and the targeted peer-reply <id> forms refuse. Bind it in untracked configuration, the environment or a local knob overlay, to an absolute directory outside every git work tree; a relative, missing or in-tree value refuses those arms at exit 2.

Gate-authoring changes

None.

Platforms

None.

Behavior changes

  • The SARIF log GATE_SDK_SARIF_FILE names — is now the battery’s versioned verdict contract, properties.verdictContract 1.0.0: it carries a result for every member it ran, pass, notApplicable or fail, a rule for each, a declared omission as a notApplicable result in a bare run, and a provenance block naming the binary’s release, each kit’s version from the lock and the commit. A --for run selecting no gate now writes it too, for-scoped with no result, where it left a prior run’s log in place. The exit statuses are unchanged. Where you upload the log to code scanning, set GATE_SDK_SARIF_RESULTS to failures to keep the red-only log; the installer’s CI action already does.
  • Bundled gates that checked nothing — print clean (not applicable: <reason>) where they printed a plain clean line on that branch, still at exit 0. That now reaches every bundled gate’s empty-corpus early-out, among them the action gates on a tree with no workflow YAML, the docs gates with no page, the commit-message gates with no message and the claim and manifest gates with nothing declared. A reader matching a gate’s exact clean-line text on such a branch reads the new parenthetical; one keyed on : clean ( is unaffected.
  • --emit trajectory — spawns a fixed handful of git processes however long the history, where it spawned one per evidence-manifest revision, one per closed iteration’s range and one per close commit’s gates roster, so it and a freshness gate over it run several times faster and no longer slow with history or machine load. Its output is byte-identical. Nothing to do.
  • init --user, update --user and uninstall --user, and a tree-free --hook <member> — read a path as absolute only as the host does, refusing as relative a drive spelling or a leading backslash on POSIX and a lone leading separator on Windows. That covers HOME, LOCALAPPDATA, the --knobs file, the knob-file locators and a member’s path knobs under the tree-free mark; an XDG value so spelled is ignored. Where one is refused, set it as an absolute path on its host.
  • stop-liveness under resume-wait — reads a launch record’s handoff= path as a hand-back marker only where it is absolute on the host, so a drive spelling on POSIX or a driveless rooted one on Windows no longer refuses a turn end. Where a session declares a hand-back, write the path absolute on its host.
  • --hook <member> --observe — logs reason=withheld for a block and an advise in place of the member’s first line, so the observe log holds no refusal or context text that can quote a typed command. An observed session-context no longer sweeps the scratch dir. A trial reviewer reads the decision from would= and status=; nothing to do.
  • The evidence manifest — moves to # contract: evidence-manifest v2: each suite line appends commit=, tree=, cmd= and origin= after v1’s eight fields, which keep their order. check-evidence-manifest reads both majors, each under its own grammar, and --run-validate refuses at exit 2 a manifest whose first line names neither. init seeds new trees at v2.
  • --run-validate — can write an in-toto Statement of predicate type https://checkwright.dev/gate-run/v1 binding each suite’s verdict to its commit and command, where EVIDENCE_KIT_STATEMENT_FILE names a path, and store it outside the tree through EVIDENCE_KIT_STATEMENT_WRITE_CMD, a store that fails exiting 2 after the manifest publishes. It emits and never signs; sign it with your own CI signer. With a Statement configured, a pre-hook that moves HEAD refuses the run at exit 2.
  • --run-validate test controls — where EVIDENCE_KIT_CONTROLS names controls, re-runs each control’s suite straight after it under the control’s assignments and records a control= line after the suite’s line, witnessed=red, green or absent, with an assign= digest of the assignments it ran under. A control witnessing no red exits 1, the lines and any Statement still written. check-evidence-manifest reads the control line as v2’s second kind and reds one with no suite line above it. A run or import superseding a suite’s line drops its control lines. With no control declared nothing changes.
  • --verify-gate-run and --import-gate-run — new arms. The first judges a Statement’s bindings against this tree’s history and configuration, exit 1 on a contradiction, and checks no signature; the second records a verified Statement’s suites as origin=imported lines, refused by default. Both refuse at exit 2 a Statement whose provenance block is not typed to the verdict contract’s table: a tool object with a name, a kits array of {name, root} objects, commit and worktree present together, and an optional string either absent or non-empty, never blank, a whitespace-only string included. An outside producer writes the block whole, or its Statement is refused rather than verified.
  • drift-kit --price-coverage — prints a further indented line, unpriced row(s): line <n>[, <n>…] of <table>, naming each price-table row that prices nothing for its shape: short of four numeric prices, as a fused id and input column leaves it, or an effective_from that is not an ISO day. Such a row read all priced wherever another row priced its model. Repair any row it names.
  • --usage-poll — refuses as unparseable a payload carrying half of the weekly window, a utilization with no reset epoch or the reverse, and leaves the snapshot untouched to go STALE, where it wrote the half pair beside the five-hour pair and the verdict left the weekly axis unarmed. A payload with no weekly window writes the three mandatory lines as before. Nothing to do.
  • --statusline — writes no snapshot for a render whose payload carries half of the weekly window, a used percentage with no reset or the reverse, so the last good reading survives and ages into STALE, where it wrote the half pair and the verdict left the weekly axis unarmed. Nothing to do.
  • init --user, update --user and uninstall --user — refuse at exit 2, before any file the manifest names is read or removed, a user.lock whose files key is not a path inside the data dir: an empty, . or .. component, a backslash or a colon. Such a key let uninstall --user --force remove a file outside the install. The installer writes no such key; restore an edited manifest, or remove the user install by hand.
  • lib/test-hermetic.sh — a gate-tests/*.test.sh sourcing it now runs git with GIT_CONFIG_GLOBAL at an empty file in the temp dir and, off native Windows, GIT_CONFIG_NOSYSTEM set, so a host’s system or global git setting, core.hooksPath among them, no longer reaches the suite or the gates it runs. A suite that committed under the host’s global identity sets user.name and user.email in its own repository; one that must read a global or system file sets or unsets the variable after its source line.
  • --emit peer-file, --emit peer-list, --emit peer-reply and --emit peer-ready — new lifecycle-kit arms over the peer request channel: a peer files a request in four sections and gets an opaque id, the receiving project lists requests and records each one filed, refused, landed or shipped, refusing a tab in a request’s first ## need line or a refused reason since the list prints both into a tab-separated row, and the peer’s notice prints each shipped request until it runs a binary carrying that release. The two peer arms run from any directory, and outside a repository they read knobs only from the environment or an absolute knob file locator. Wire --emit peer-ready <peer> into CONTEXT_KIT_BRIEF_COMMANDS to see the notice at session start.
  • check-comment-tier — reads a comment check-rule-id-coverage reads as a declaration as a reason directive, blessing it and its wrapped continuation within CANON_KIT_COMMENT_RUN_CAP, while the same comment outside the declaring files stays prose. A tree with no rule family configured sees no change. Where you blessed your declarations through CANON_KIT_COMMENT_REASON or tagged them comment-tier-exempt:, drop that entry.
  • check-amendment-queue — prints clean (not applicable: no queue file at <path> …) and exits 0 where nothing exists at the queue path, where it exited 2 with file not found; a queue path naming a directory still exits 2. Where you left the gate unregistered or declared # unregistered: because your tree has no TASK-QUEUE.md, you may register it.
  • --verify-gate-run --json — new option: prints the result as one JSON object, contract 1.0.0, with verdict, subject, ahead (absent where the subject is no ancestor of HEAD), each suite’s name, tree and verdict, and the findings, in place of the verdict line, on exit 0 or 1, and nothing on exit 2. The checks and exit statuses are unchanged and the text form is byte-identical without it. A caller gating on the result reads the document instead of parsing the line, refusing a contract major it does not know; test a reader against the goldens at /contracts/verify-gate-run/v1/.
  • --measure-commit — prints a third line, binary: <bytes> bytes, the size of the running gate binary, read from its metadata with no spawn; it is absent where the platform cannot name the running executable. A reader of the first two lines is unaffected; one counting the lines reads three.
  • The scope and close templates — scope gains a third step dispositioning each received peer request, and close stamps filed requests landed before clearing Done and landed requests shipped once a tag is applied. Re-vendor the templates; with no channel bound each step has nothing to do.

Upgrading

Replace the vendored kit directories wholesale at v0.37.0, or run checkwright update. Regenerate your generated artifacts; each freshness gate that reds prints its own regen command. Then run the full battery.

  • Evidence manifest v2 — the next --run-validate rewrites a v1 manifest’s header to v2 and drops its v1 lines, since they bind no commit or command; run the full suite roster before a close so every suite has a v2 line.

The allowed reds. Every gate under New and tightened gates above may red, and its bullet names what clears it. On a tree that sets none of the new knobs, expect only check-gate-substrate-parity’s assertion I, naming check-rule-id-coverage and, where you vendor evidence-kit, check-test-control: add each to your gates.list, where it reads clean until you set its knobs, or declare it # unregistered: <gate> — <reason>. check-docs-since reds only a page carrying a second since: line; keep one.

The behavior changes above are declared for reading, not a mechanical scan. If a gate reds that this note does not name, the upgrade smoke was supposed to catch it first — open an issue, because that is a defect in the release rather than work for you.