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-validatecan write an in-toto Statement binding each suite’s verdict to its commit and command.--verify-gate-runjudges one against your tree, with a--jsonform, and--import-gate-runrecords one, refused until you opt in.- Declared test controls prove a suite can go red, and
check-rule-id-coverageholds your rule ids to the specs citing them. Both do nothing until you configure them. - You must act on one red:
check-gate-substrate-paritynamescheck-rule-id-coverage, andcheck-test-controlwhere you vendor evidence-kit, until yourgates.listregisters 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:initregisters it nowhere, and registered it asserts nothing untilEVIDENCE_KIT_CONTROLSnames a control. Then it reds a newly baselinedpassrow 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-gateonce 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 yourgates.listor declared# unregistered:there. If you vendor evidence-kit, the newcheck-test-controlis 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 secondsince:line, whatever either value says, where it read the first and passed while a YAML renderer showed the last.--emit docs-sincerefuses such a page at exit 2 before writing any page. Keep onesince:line per page.check-rule-id-coverage— new, canon-kit, opt-in by configuration: registered, it asserts nothing untilCANON_KIT_RULE_ID_DECLARESnames a rule family. Then it reds a declared rule id no spec file cites, one cited by two or more spec files underCANON_KIT_RULE_ID_HOMES’ default, and a cited id no declaring file declares;rule-id-exempt: <reason>keeps a site. Register it in yourgates.listbeside 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-validateat exit 2 before any suite runs, and a control namedSINCErefuses since that name is the row below.EVIDENCE_KIT_CONTROL_SINCE— new: the revisioncheck-test-controljudges 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 logGATE_SDK_SARIF_FILEnames carries, every result by default or only the failures underfailures, environment-only and read only where that log is written. Any other value stops the battery at exit 2 before the first gate runs. Setfailureswherever the log is uploaded to code scanning.EVIDENCE_KIT_STATEMENT_FILE— new: the path--run-validatewrites 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-runand--import-gate-runread when given no operand, empty by default.EVIDENCE_KIT_STATEMENT_WRITE_CMD— new: an indexed command--run-validatehands the run’s Statement to on stdin, with the subject commit appended as its last argument, empty by default, which stores none. Bind it withEVIDENCE_KIT_STATEMENT_CMDto a git notes ref to keep Statements out of your tree (evidence-kit/SPEC.md §bin/run-validate.sh).EVIDENCE_KIT_IMPORTED_RUNS— new:refuseoraccept, refusing by default, under which--import-gate-runexits 2 before reading anything. Any other value is a configuration error. Selectacceptonly 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-runadds as a sixth check,head(the subject isHEADitself) andverdict(every suite clean), empty by default, which adds none. Selecthead verdictfor a merge predicate; any other word is a configuration error.EVIDENCE_KIT_TREE_UNTRACKED— new:ignoreorcount, by default today’s tracked-only tree read. Undercount,--run-validaterecords a suite’stree=modifiedwhen 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_GLOBSandCANON_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_DECLARESandCANON_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 disarmscheck-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:oneorany, 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 bulkpeer-reply --landedand--shippedforms print nothing at exit 0, andpeer-fileand the targetedpeer-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_FILEnames — is now the battery’s versioned verdict contract,properties.verdictContract1.0.0: it carries a result for every member it ran,pass,notApplicableorfail, a rule for each, a declared omission as anotApplicableresult in a bare run, and a provenance block naming the binary’s release, each kit’s version from the lock and the commit. A--forrun 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, setGATE_SDK_SARIF_RESULTStofailuresto 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 --useranduninstall --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 coversHOME,LOCALAPPDATA, the--knobsfile, 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-livenessunderresume-wait— reads a launch record’shandoff=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— logsreason=withheldfor 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 observedsession-contextno longer sweeps the scratch dir. A trial reviewer reads the decision fromwould=andstatus=; nothing to do.- The evidence manifest — moves to
# contract: evidence-manifest v2: each suite line appendscommit=,tree=,cmd=andorigin=after v1’s eight fields, which keep their order.check-evidence-manifestreads both majors, each under its own grammar, and--run-validaterefuses at exit 2 a manifest whose first line names neither.initseeds new trees at v2. --run-validate— can write an in-toto Statement of predicate typehttps://checkwright.dev/gate-run/v1binding each suite’s verdict to its commit and command, whereEVIDENCE_KIT_STATEMENT_FILEnames a path, and store it outside the tree throughEVIDENCE_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-validatetest controls — whereEVIDENCE_KIT_CONTROLSnames controls, re-runs each control’s suite straight after it under the control’s assignments and records acontrol=line after the suite’s line,witnessed=red,greenorabsent, with anassign=digest of the assignments it ran under. A control witnessing no red exits 1, the lines and any Statement still written.check-evidence-manifestreads 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-runand--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 asorigin=importedlines, refused by default. Both refuse at exit 2 a Statement whose provenance block is not typed to the verdict contract’s table: atoolobject with aname, akitsarray of{name, root}objects,commitandworktreepresent 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 aneffective_fromthat is not an ISO day. Such a row readall pricedwherever 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 --useranduninstall --user— refuse at exit 2, before any file the manifest names is read or removed, auser.lockwhosefileskey is not a path inside the data dir: an empty,.or..component, a backslash or a colon. Such a key letuninstall --user --forceremove 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— agate-tests/*.test.shsourcing it now runs git withGIT_CONFIG_GLOBALat an empty file in the temp dir and, off native Windows,GIT_CONFIG_NOSYSTEMset, so a host’s system or global git setting,core.hooksPathamong them, no longer reaches the suite or the gates it runs. A suite that committed under the host’s global identity setsuser.nameanduser.emailin its own repository; one that must read a global or system file sets or unsets the variable after itssourceline.--emit peer-file,--emit peer-list,--emit peer-replyand--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## needline 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>intoCONTEXT_KIT_BRIEF_COMMANDSto see the notice at session start.check-comment-tier— reads a commentcheck-rule-id-coveragereads as a declaration as a reason directive, blessing it and its wrapped continuation withinCANON_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 throughCANON_KIT_COMMENT_REASONor tagged themcomment-tier-exempt:, drop that entry.check-amendment-queue— printsclean (not applicable: no queue file at <path> …)and exits 0 where nothing exists at the queue path, where it exited 2 withfile not found; a queue path naming a directory still exits 2. Where you left the gate unregistered or declared# unregistered:because your tree has noTASK-QUEUE.md, you may register it.--verify-gate-run --json— new option: prints the result as one JSON object, contract1.0.0, withverdict,subject,ahead(absent where the subject is no ancestor ofHEAD), each suite’sname,treeandverdict, 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 acontractmajor 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-validaterewrites 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.