Checkwright v0.39.0
2026-11-26
Checkwright catches reproducible classes of unsupported claims in coding-agent delivery before merge, and this release keys the verdict store before dispatch and adds gate-sdk content checks, from deny terms in path names and build outputs to script, migration and execute-bit rules. It also splits exit 3, a tool error, from exit 2, and gives every SARIF result a rule class and a stable fingerprint.
In brief
| Section | Entries | Who acts |
|---|---|---|
| New and tightened gates | 10 | everyone: these may red on upgrade |
| Knob changes | 19 | 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 | 10 | if you depend on a listed behavior |
- The verdict-store fix ships in this release together with the content checks, as one cut. A store keyed before dispatch keeps no verdict for a tree that moved while its members ran, so
GATE_SDK_VERDICT_STOREis safe to turn on from this version. check-binary-strings,check-path-names,check-pipefail-readers,check-script-preflight,check-site-count,check-migration-guardandcheck-exec-writeare new and disarmed until you configure each.check-tree-termsnow prints a rule id in place of the matched line.- Exit 3 now means the tool could not do the work, and exit 2 means a usage error or a refusal. A script that read 2 as could-not-run should read 2 or 3.
- You must act on one red if you vendor gate-sdk:
check-gate-substrate-paritynames each of the seven new gates until yourgates.listregisters it or declares it unregistered.
New and tightened gates
check-tree-terms— reads the deny-term listsGATE_SDK_DENY_TERMSnames beside its pattern files, a literal term hitting a line where it stands as a whole word, ASCII case folded; a# rule: <ID>line in a term list or pattern file names the id of the entries after it, and a malformed one refuses at exit 2. Its record is now<path>:<line>: [<ID>], one per matching line per distinct id,TEXT-DENIEDwhere no rule line names one, and never the matched line; a binary’s is<path>: [<ID>]. A consumer binding no term list is unchanged in verdict; a script grepping the oldpath:line:textrecord reads the id instead.check-binary-strings— new,on-surface, disarmed untilGATE_SDK_STRINGS_FILESnames a build output: each named output’s printable strings (runs of 4 or more bytes, and in an ELF64 little-endian file only its non-executable sections) against the deny terms, a whole token equal to a term, and the ERE shapesGATE_SDK_STRINGS_SHAPESnames. Its record is<path>@<offset>: [<ID>] term|shape <position>, never the string. A named output that is absent refuses at 2, and an unparseable ELF64 header is exit 3. Copytemplates/strings-shapes.listinto your gates dir to start from home-path, cargo-registry and URL shapes.check-path-names— new,on-surface, disarmed until a deny-term list holds a live term: no tracked path has a file or directory name equal to a term or opening with it followed by-,_or., ASCII case folded. Its record is<path>: [<ID>]at the shortest hitting prefix,NAMES-DENIEDwhere no rule line names an id, and never the term. It takes no valve: rename the component.check-pipefail-readers— new,on-surface, disarmed untilGATE_SDK_PIPEFAIL_PATHSnames a shell file or directory: no early-exit reader (grep -q/-m/-l,head,read,sed … q,awk … exit, awhile readloop that breaks) is fed underpipefailbeyond the file’s count in an optionalGATE_SDK_PIPEFAIL_BASELINE. Its record is<path>:<line>: [PIPEFAIL-EARLY-EXIT] <reader>, ending in[auto-fix]where the new--emit pipefail-fix [<path>…]arm rewrites the site in place; waive a site with# pipefail-ok: <reason>on a line of its pipeline. A shell span the reader cannot parse is[LINT-PARSE]at exit 3.check-script-preflight— new,on-surface, disarmed untilGATE_SDK_SCRIPT_FILESselects tracked scripts or a script is named as an operand: no script breaks a rule in yourGATE_SDK_SCRIPT_RULESfile, whose blocks are of four kinds —command(an invocation refused unless analloworbeforeERE matches),forbidden-token,early-exitandid-grammar(each listed flag’s value against an ERE). Its record is<path>:<line>: [<ID>] <what>, never a value from the script; waive a site with# <token>: <reason>on a line of its logical line, the reason at leastwaiver-mincharacters. An absent operand or rules file, or a malformed rules file, refuses at 2; a script the reader cannot parse is[LINT-PARSE]at exit 3. Copytemplates/script-rules.listinto your gates dir to start from one commented example per kind.check-site-count— new,on-surface, disarmed until yourGATE_SDK_SITE_RULESfile holds arule <ID> site-countblock: each tracked file’s count of the block’ssiteEREs, binary files and test code skipped, equals its row in the block’sbaseline, a count baseline of<count><TAB><path>rows. The comparison is exact, a file with no row counting 0, so a new site, a removed one and a stale row each red<path>: [<ID>] <found>/<reviewed>. A malformed rules file or an absent baseline refuses at 2; an unparseable baseline is exit 3.check-migration-guard— new,on-surface, taking[--base <ref> | --base-dir <dir>], disarmed untilGATE_SDK_MIGRATION_DIRnames your migration directory: since the merge base withHEAD, uncommitted edits included, the branch only appends migrations, in order. Every file there is namedNNNN_<name>.sql; an edited, deleted or renamed one reds<path>: [MIGRATION-EDITED], an added one numbered at or under the base’s highest<path>: [MIGRATION-ORDER] <added> <= <highest>, and an added statement matching an ERE in your destructive list<path>:<line>: [MIGRATION-DESTRUCTIVE]unless a-- migration-ok: <reason>comment on one of its lines declares it.--base-dir <dir>compares against a directory standing in for the base’s migrations. Any other file there is exit 3; an unresolved base or a malformed list refuses at 2. Copytemplates/migration-destructive.listinto your gates dir to start from theDROPandALTER TABLE … DROP|RENAMEfloor.check-exec-write— new,on-surface, disarmed untilGATE_SDK_EXEC_WRITE_PATHSselects tracked Rust files: no file but a helperGATE_SDK_EXEC_WRITE_HELPERSnames writes a file with an execute bit. Read in a code view with comments and literals blanked, it reds<path>:<line>: [EXEC-WRITE] <call>at afrom_mode,mode,set_mode, low-levelchmod-family,openorcreatcall whose mode is not an integer literal free of0o111, aset_permissionstaking a copied set, anyfs::copy, aCommand::new("chmod")or("install"), and an execute-mode constant. It takes no waiver. A helper absolute, holding..or naming no file refuses at 2; an unterminated literal or an unbalanced call is[LINT-PARSE]at exit 3.check-pipe-membership— now reads through the shared shell reader, its predicate unchanged: a file holding an unterminated quote, an unclosed here-doc or an unbalanced(,)or$(is<path>:<line>: [LINT-PARSE] unparseable spanat exit 3, where it was judged on a best-effort split. Action owed only by a tree with such a file: fix the span.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 gate-sdk, the newcheck-binary-strings,check-path-names,check-pipefail-readers,check-script-preflight,check-site-count,check-migration-guardandcheck-exec-writeare such gates: register each, since its battery run is a clean skip until you name a build output, a deny term, a shell path, a script, a site rule, a migration directory or a Rust path, or declare# unregistered: <gate> — <reason>.
Knob changes
GATE_SDK_DENY_TERMS— new: space-separated literal-term lists, default<gates-dir>/deny-terms.local.list, each optional; an absent list contributes nothing and one that is no readable regular file is exit 3. The kit ships no starter list. Read bycheck-tree-terms,check-path-namesandcheck-binary-strings; a tracked list is self-exempt from the first two.GATE_SDK_STRINGS_FILES— new: space-separated build-output pathscheck-binary-stringsscans, each named exactly; default empty, which leaves the gate disarmed.GATE_SDK_STRINGS_SHAPES— new: space-separated ERE shape lists forcheck-binary-strings, default<gates-dir>/strings-shapes.list, each optional; the kit ships a starter atgate-sdk/templates/strings-shapes.list, whichinitdoes not seed.GATE_SDK_PIPEFAIL_PATHS— new: space-separated shell files and directoriescheck-pipefail-readersand--emit pipefail-fixread, a directory searched for*.shunder the prune dirs; default empty, which leaves the gate disarmed.GATE_SDK_PIPEFAIL_LIBRARIES— new: basename globs of files linted withpipefailon from their first line, default*lib.sh *-lib*; empty names none.GATE_SDK_PIPEFAIL_ALL— new:1lints every file in that corpus from its first line, default0; any other value is refused at exit 2.GATE_SDK_PIPEFAIL_BASELINE— new: a count baseline of<count><TAB><path>rows holding each file’s early-exit sites to a ceiling, default empty (every file at 0). A row above its file’s count reds[BASELINE-STALE] <found>/<count>; a malformed row or a repeated path is exit 3.GATE_SDK_SCRIPT_FILES— new: space-separated pathspecs over the tracked treecheck-script-preflightreads, the prune dirs applied; default empty, which leaves the gate disarmed.GATE_SDK_SCRIPT_RULES— new:check-script-preflight’s rules file, default<gates-dir>/script-rules.list, required while a corpus is configured; the kit ships a starter atgate-sdk/templates/script-rules.list, whichinitdoes not seed.GATE_SDK_SITE_RULES— new:check-site-count’s rules file, default<gates-dir>/site-rules.list, optional; absent, or holding no block, it leaves the gate disarmed.GATE_SDK_TEST_GLOBS— new: space-separated globs naming test code, defaulttests/ fixtures/ tests.rs *_tests.rs tests_*.rs test_* *_test.*; a glob ending in/matches a directory component and any other the basename, and in a.rsfile the lines from its first#[cfg(test)]on are test code too. Empty names none. Read bycheck-site-countand--emit stale-literals.GATE_SDK_BASE_REF— new: the ref a since-base reader takes its merge base withHEADfrom when no--baseis given, defaultmain. A ref naming no commit, or sharing no merge base withHEAD, refuses at exit 2. Read by--emit stale-literalsandcheck-migration-guard; bind it where your base branch is named otherwise.GATE_SDK_MIGRATION_DIR— new: the directorycheck-migration-guardreads, relative to where the gate runs; default empty, which leaves the gate disarmed.GATE_SDK_MIGRATION_DESTRUCTIVE— new:check-migration-guard’s destructive-statement list, one ERE per line, default<gates-dir>/migration-destructive.list, optional; absent, it turns the destructive check off and the clean line says so. The kit ships a starter atgate-sdk/templates/migration-destructive.list, whichinitdoes not seed.GATE_SDK_EXEC_WRITE_PATHS— new: space-separated pathspecs over the tracked tree whose.rsfilescheck-exec-writereads, the prune dirs applied; default empty, which leaves the gate disarmed.GATE_SDK_EXEC_WRITE_HELPERS— new: space-separated helper filescheck-exec-writeexempts for their own content, relative to where the gate runs; default empty.GATE_SDK_VERDICT_STORE— new: an absolute directory--runkeeps a judged verdict in, environment-only; default unset, which keeps nothing. A registry run on a clean worktree whose verdict ispassorfail, by a stamped binary, writes one record under a key digestingtreeId,tool.versionandgateSet, and keeps nothing where that key moved while its members ran. A relative path is refused at exit 2 before the first member runs, and a store that cannot be written is exit 3.GATE_SDK_PAYLOAD_WITHHOLD— defaultSPEC.md smoke→SPEC.md SPEC-*.md smoke: the payload--pack-installerbuilds no longer carries a kit root’s openSPEC-<slug>.mdamendment, and the install-size figure stops counting one. A member carrying*,?or[is now a glob whose wildcards never cross a/, so a same-named file deeper in a kit root still ships, andcheck-packed-linksreds a packed README linking a member it matches. Action owed only by a publisher setting the knob: addSPEC-*.mdto withhold amendments too.DELEGATION_KIT_TIER_CLASSESandLIFECYCLE_KIT_CONSULT_CLASS— a class spelled as a lone-is now refused by each validator, since a foreign session’s record readsclass=-as no class and a resume under it failed. Action owed only by a table naming-as a class: rename it.
Gate-authoring changes
None.
Platforms
None.
Behavior changes
- The verdict contract (
--run’s SARIF log) and the gate-run predicate — both move to1.1.0: the provenance block gainstreeId, the tree object a clean worktree’sHEADnames, andgateSet, a digest of the selected gates as resolved (written by--runalone), and eachfailresult gainsfingerprints["checkwright/v1"], an identity that survives a rerun and a line move.--verify-gate-runnow reds a Statement whoseprovenance.treeIdis not its subject’s tree. Nothing to do: a reader ignoring unknown fields reads both unchanged, and a 1.0.0 Statement carries notreeIdand judges as before. - Exit 3 is a tool error, split from exit 2 — the binary, both front ends and the gates now exit 2 only for a usage error or a refusal (argv, a malformed knob, a request declined, an operand naming nothing) and exit 3 where the tool could not do the work (a file it cannot read or parse, a failed write or spawn, git failing, an absent or unrunnable gate binary).
--runexits 0, 1 or 3 forpass,failorerror, a run that also fails readingfail, and the dispatch tail reads(dispatch harness error, exit 3). Under--json, an arm that refuses or fails prints the error document{"contract":…,"error":"<usage|refused|input|tool>"};--verify-gate-run’s contract moves to1.1.0with anerror.jsongolden. Kept at 2: the hook block, the verdict-word members’ words (STALE,UNKNOWN,FAILED,OFF,FAIL(env), “no comparison made”, “nothing written”), and a relay’s passed-through child status; the installer keeps 1 for an adopter-actionable refusal. Action owed: a script or CI step that branches on exit 2 to mean “could not run” now misses 3 — read “2 or 3”, or any non-zero, as could-not-run. - The verdict contract moves to
1.2.0— a placed result whose finding text opens a rule class token[<CLASS>](upper-case, as check-prose-tells’ and check-prose-bounds’ findings already print) carries it asproperties.ruleClass, and two new finding shapes are placed:<path>: [<CLASS>]on a file or directory with no region, and<path>@<offset>: [<CLASS>]at a region carryingbyteOffsetalone, its offset outside the fingerprint. Every line a1.1.0member printed keeps its placement and fingerprint. Nothing to do: a reader ignoring unknown fields reads the log unchanged; test a reader keying on the class against the goldens at/contracts/verdict/v1/. - A configured file now splits on whether it is there — a file the caller names or configures (an operand, a knob, a registry, a queue file, a ceiling or declaration file) that is absent, a directory or a dangling link is now refused at exit 2, where many gates and arms exited 3; one that is present but cannot be read or decoded is now exit 3, where the queue gates,
check-brevityand--emit port-blockersexited 2. An optional file is still its default when nothing is there, and anything else there that cannot be read is exit 3. A failing command knob’s command (check-prose-enum,check-unmarked-claimand the other claim gates) and an unrunnable registry member now exit 3, and--emit gate-argvexits 2 only for an absent declaration or an unset host knob. Unreadable files that read as clean or empty before (check-gate-binary-fresh’s registry,check-gate-fixture-coverage’s declarations, the provenance-seam and PSScriptAnalyzer registry reads) now exit 3. Action owed only by a script branching on 2 versus 3 for these: read “2 or 3” as could-not-run. --verdict-lookup <tree> <kit-ver> <digest>— new arm: answers a key fromGATE_SDK_VERDICT_STOREwith one JSON object, contract1.0.0, itsverdictthe storedpassorfailat exit 0, orabsentat exit 0 where no run stored the key. A malformed operand or an unset or relative store is exit 2, and a record that cannot be read or does not answer for its key is exit 3, each with the error document. It reads no repository, so a caller can ask before checking a tree out; through the front end it still runs inside one. Test a reader against the goldens at/contracts/verdict-lookup/v1/.--emit stale-literals [--base <ref>] [--tools <dir>]— new arm: lists the test lines that may assert a string your branch removed, comparing the merge base with the working tree, uncommitted edits included. A string is a literal fragment of 8 or more characters holding 4 ASCII letters, removed from a non-test line and held by no non-test line still in the tree; a test line unchanged since the merge base whose literal overlaps one printsLITERAL <test>:<line> (was <src>:<line>), an assertion’s message never.--tools <dir>adds a test suite outside the repository. It judges nothing: exit 0 whatever it lists, 2 for an unresolved base or a malformed argv, 3 for a git failure.--run --json— new option, leading any selector: prints the run’s verdict as one JSON object on stdout, contract1.0.0, withverdict,scope, the provenance block, each member’sname,kind(pass,notApplicable,failorerror),exitand an error member’serror(refusedortool), in gate-set order, and the declared omissions with theirreason. It is written last, after the SARIF log and the verdict store; the transcript and summary move to stderr, and the exit status is unchanged. A refused or failed invocation prints the error document instead. Without the option the output is byte-identical. Test a reader against the goldens at/contracts/run/v1/, pinned by version and digest.- The foreign run’s confinement record — a lone
-is no longer a policy:--foreign-run --sandbox -is a shape refusal at exit 2, and theDELEGATION_KIT_FOREIGN_SANDBOXvalidator refuses an<adapter>/-=<word>element, so every delegation-kit knob reader refuses on such a table. A--foreign-resumewhoseDELEGATION_KIT_FOREIGN_RESUMEform carries no@SANDBOX@under a session that recorded a policy now fails before the spawn asFAILED (sandbox: …), where it ran a literal its line’ssandbox=did not name. Action owed only by a table binding-as a policy: rename the policy. --enter-stage --open-lead-journal’s session-role marker — the id is now the lead’s own:LIFECYCLE_KIT_SESSION_IDwhere set, elseCLAUDE_CODE_SESSION_IDwhatever the child-session flag says, else the stamp’s derivation. A lead the harness flags as a child no longer writes its newest stage session’s id, which had lost it the executor-facing suppression. Nothing to do.- check-provenance-seam and a slug named for an arm — a live queue slug equal to a non-gate arm’s name, less its leading
--emit-or--, is now exempt like a kit or gate name, so a kit SPEC may spell that arm’s contract path. Nothing to do.
Upgrading
Replace the vendored kit directories wholesale at v0.39.0, or run checkwright update. Regenerate your generated artifacts; each freshness gate that reds prints its own regen command. Then run the full battery.
The allowed reds. Every gate under New and tightened gates above may red, and its bullet names what clears it. On a tree that vendors gate-sdk, expect check-gate-substrate-parity’s assertion I naming check-binary-strings, check-path-names, check-pipefail-readers, check-script-preflight, check-site-count, check-migration-guard and check-exec-write: add each to your gates.list, where its battery run is a clean skip until you configure it, or declare it # unregistered: <gate> — <reason>. check-pipe-membership reds only a shell file with an unparseable span; fix the span. check-tree-terms changes its record and keeps its verdict.
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.