Checkwright v0.40.0

2026-11-26

Checkwright catches reproducible classes of unsupported claims in coding-agent delivery before merge, and this release lets you set four content-check calibrations yourself and gives check-migration-guard duplicate, clash and attribute checks, judging a merged migration as a checkout writes it. It also closes the content gates’ reading limits and keeps temp files in a directory private to the user.

In brief

Section Entries Who acts
New and tightened gates 8 everyone: these may red on upgrade
Knob changes 4 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 8 if you depend on a listed behavior
  • Two fixes already on master ship here: a double-quoted SQL identifier now reads as a name, and an optional list that cannot be read is now exit 3 where it read as no list.
  • The migration guard now catches two branches taking one number, a number merged into the base after you forked, an edit a filter or line-ending conversion would undo, and a change to a merged migration’s attributes. With another local branch adding migrations, a tree that passes today can red.
  • Migration width, the shortest string the binary scan reads, the shortest waiver reason and the stale-literal length floors are now yours to set. Each default reads as before.
  • Temp files go under a per-user directory made mode 700. If a name there is a link, another user’s, or open to others, the binary stops at exit 3 until you remove it or point TMPDIR elsewhere.

New and tightened gates

  • check-migration-guard — reads a double-quoted SQL identifier as its name, a doubled quote inside it as one, where it read one as a string value and stripped it: ALTER TABLE "users" DROP COLUMN "email" now matches ALTER TABLE .* DROP and reds unless declared. It judges only an added or edited migration, so a clean upgrade cannot red it; a destructive migration you author after upgrading can.
  • check-binary-strings — reads a string down to the length of the shortest deny term able to hit, where every run under 4 bytes went unread: a three-byte term alone in a three-byte run now reds. The floor never drops below the shortest term, so a list whose terms are all 4 bytes or longer reads exactly as before.
  • check-migration-guard — refuses two additions sharing one number, [MIGRATION-DUP], and an addition sharing a number with a file another unmerged local branch adds under another name, [MIGRATION-CLASH], on by default over refs/heads/**. Order now also reads the base ref’s own commit, so a number another branch merged into the base after yours forked reds as [MIGRATION-ORDER]. Each can red a tree that passes today with another local branch or a moved base; renumber the addition above every other branch’s, or narrow or turn off the ref set with GATE_SDK_MIGRATION_REFS.
  • check-exec-write — reads a path with whitespace around a :: as one path, where std::fs ::copy lost its leading segments and passed: such a site now reds like its unspaced spelling; move it into a helper, as for any other site.
  • check-script-preflight — an id-grammar flag that ends its invocation is now judged as the empty value, where it passed unread: submit --owner with nothing after it reds unless the grammar accepts the empty text.
  • check-binary-strings — reads an ELF64 file whose header names no section table whole, where it read nothing and passed: a term anywhere in such a file now reds.
  • check-pipefail-readers and the early-exit kind of check-script-preflight — clear a reader only when every stage before it is guarded, where a guarded first stage cleared the whole pipeline: { a || true; } | cat | head -1 now reds at head, since cat can die of a broken pipe. Guard the middle stage too, or waive the pipeline.
  • check-migration-guard — reds a change since the merge base to a merged migration’s conversion attributes (text, crlf, eol, ident, filter, working-tree-encoding), [MIGRATION-ATTR] <attribute> <base value> -> <value>, and a filter attribute naming a driver this clone does not configure is exit 3, where git passed the blob through and the gate judged that. Restore the attributes, or install the driver.

Knob changes

  • GATE_SDK_MIGRATION_REFS — new: the ref globs check-migration-guard reads for a clash, default refs/heads/**, or none to turn the clash check off. A glob opening with -, or none beside another word, refuses at exit 2.
  • GATE_SDK_PIPEFAIL_WAIVER_MIN — new: the shortest trimmed reason a pipefail-ok waiver takes, read by check-pipefail-readers and --emit pipefail-fix, default 1, the floor both read before. Any value but a positive integer refuses at exit 2. Nothing to do unless you hold waiver reasons to a length.
  • GATE_SDK_STALE_LITERAL_CHARS — new: the fewest characters a literal’s fragment takes to count for --emit stale-literals, default 8, the floor it read before. Any value but a positive integer refuses at exit 2.
  • GATE_SDK_STALE_LITERAL_LETTERS — new: the fewest ASCII letters such a fragment holds, default 4, the floor it read before. Any value but a non-negative integer, or one above GATE_SDK_STALE_LITERAL_CHARS, refuses at exit 2 naming both; lower the two together.

Gate-authoring changes

None.

Platforms

None.

Behavior changes

  • An optional configured list — the GATE_SDK_DENY_TERMS lists, the GATE_SDK_SITE_RULES file and the destructive-migration list each take the absent default only when nothing is at its path. A lookup that fails otherwise, a permission error or a path through a non-directory, is now exit 3 where it read as no list and passed, across check-tree-terms, check-path-names, check-binary-strings, check-site-count and check-migration-guard.
  • The migration width — check-migration-guard takes a migration directory at any one width, <digits>_<name>.sql, where it took four digits alone: a five-digit history now reads clean. Every file at the merge base and in the working tree shares the width of the first by name, and a file off it, or a number too large for 64 bits, is exit 3, naming it.
  • A migration the base already holds — check-migration-guard drops from the branch’s additions a file the base ref’s own commit already holds under its name, one the base took by cherry-pick say: no class reads it, so a destructive statement in such a file no longer reds on the branch, judged where it landed.
  • The temp directory — the gate binary, outside a run that holds its own scratch, writes its spawn captures and sandboxes under checkwright-<uid> in the temp dir, and lib/test-hermetic.sh its empty files under gate-sdk-hermetic.<uid>, each a directory made mode 700 and private to the user, where both used fixed names in the shared temp dir. A name there that is a link, another user’s, or open to group or other is now exit 3, naming it; remove it, or point TMPDIR at a directory of your own.
  • The merged-migration comparison — check-migration-guard’s git arm compares a merged migration’s bytes on disk with the merge base’s blob in its checkout form, as this clone’s filters and line-ending settings write it, where it read git diff: an edit a clean filter or line-ending conversion undid now reds [MIGRATION-EDITED], and an untouched file in an autocrlf clone stays clean. Restore the file, or put the change in a new migration.
  • A merged migration’s attributes — a change to them now reds on check-migration-guard’s git arm, since it changes the bytes a checkout writes; --base-dir reads no attributes.
  • --emit stale-literals — collects a literal the branch edited on any line it spans, where it read its opening line alone: an edit inside a multi-line raw or triple-quoted string now lists the tests asserting it.
  • --emit pipefail-fix — leaves a zero count, and a grep count beside a flag shaping its output (context, count, only-matching, null-data and the like) or a file operand, as a hand fix, where it rewrote them to a sed -n that changed the output: grep -m1 -A2 x lost its context lines and head -n0 printed a line. Both still red; fix them by hand.

Upgrading

Replace the vendored kit directories wholesale at v0.40.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. Only a tree that configures the gate can red: check-migration-guard with GATE_SDK_MIGRATION_DIR set, where a migration another local branch adds or the base merged after you forked, or a changed attribute on a merged one, reds until you renumber or restore it; check-binary-strings on a deny term under 4 bytes or a sectionless ELF64 output; check-pipefail-readers and check-script-preflight on a pipeline with an unguarded middle stage or a valueless id-grammar flag; and check-exec-write on a spaced :: path.

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.