A scenario under testops/scenarios/*.yaml is a test definition, so a PR that
changes only scenarios (and tests) passes as kind TEST. Production Go next to
a scenario still fails TEST, as do a script beside the scenarios and a yaml
outside testops/scenarios.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An added line that begins with '++ ' is an added line, not a diff header;
the share path is matched with either slash; a missing title or
description file, an unknown commit or a failing grep is an error (exit 2),
never 'clean'. Controls for each in the self-test; each fails on the
previous script.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A check on the lines a pull request adds, its commit messages, its title
and its description: internal seat names and internal file-share paths
are refused, each hit printed with file and line. Runs beside the spec
trace check from the base branch; no pull request code is run.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Review fold. The check ran the tool with go run, which takes the .go
arguments as more source files, so in CI every DOCS PR touching Go would
have been refused; the self-test hid it by building the tool itself. The
check now builds the tool into a temporary directory, the self-test runs
that same path, and a build or tool failure exits 2 (the check did not
run) instead of reporting changed tokens. In a file that uses cgo every
comment counts (the grouped import ("C") form dropped the preamble).
The template says DOCS may still change contract text, with the reviewer
as the gate; the script header names the go:embed limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fold. The line-multiset comparison let reordered statements,
directive comments (//go:build, //go:linkname, the cgo preamble), a //
inside a string after a rune quote, a line inside a multi-line raw
string and spacing inside a string all pass as comment-only. A small Go
program (sametokens.go, go/scanner) now requires the old and new token
sequences of each changed non-test Go file to be identical, comments
dropped except directives and the cgo preamble; gofmt realignment passes
by construction. The workflow passes old/new blobs instead of a diff.
DOCS no longer covers docs/spec (the models); CI no longer covers
scripts/, which holds shipped install and deploy scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PR that changes no behaviour names one of three kinds instead of
IMPL, FIX or CHANGE. TEST may touch only tests, testdata and test
helpers; CI only .github/ and scripts/; DOCS docs, tests and Go whose
hunks change only comments. For DOCS the workflow passes the diff of the
non-test Go files, and the check compares removed and added lines with
line comments (outside strings) and spacing dropped; every changed Go
file must appear in that diff. Ten self-test cases added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second Machine/INV line (plain, list or bold form) could carry a second
kind past the check; every trace key must now be declared once. Three
self-test cases added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fold: Machine/INV must carry exactly one kind token that ends at a
space, comma, slash or the line end; trace keys count only at the start of
a line; a value still holding the template placeholder fails; deleting
non-test Go under core/ or cmd/ also needs Simplest; an unknown status or a
record cut off before its NUL is a malformed change list (exit 2). The
self-test grows to 31 cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The PR template now carries the five trace lines (Feature, Machine/INV,
Model, Red-first, Simplest). A pull_request_target workflow checks the
description from the base branch's script: the four trace lines are
present, NONE carries a reason, Machine/INV starts with the PR kind
(IMPL <machine>.<transition>, FIX <INV-ID> or CHANGE <machine>), and
Simplest is present when non-test Go under core/ or cmd/ changes.
The self-test runs before the check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>