The scope gate selected the real-filer suites only for chunk-store and
storage changes, but its second suite tests the durable provider: a PR
that changed only core/frontend/durable/ skipped it. The ledger anchor
check is the hardened script: a git failure or a ledger with no rows is
an error (exit 2), not a pass, and a path matches whole components only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PR from a fork keeps a GitHub-hosted machine: pull_request_target
starts for any PR without approval. The DOCS blob step wrote files by the
paths a PR's tree names, which git does not check when it prints a diff;
a crafted tree with '..' entries wrote outside the workspace. The step is
now a script that refuses such a path before any write, and both jobs
fetch the PR head with fetch.fsckObjects=true. spec trace sets up Go for
sametokens.go, which a self-hosted runner does not have on its PATH.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The path check piped git diff into grep -q under pipefail: on a match grep
exits early, git diff can die of SIGPIPE, and the pipeline's failure read as
"no match", so the tests were skipped exactly when they were needed.
chunkstore-scope.sh writes the NUL-delimited list to a file and reads it to
its end, as docs-only-scope.sh does; an error of the check runs the tests.
Its self-test covers a match listed after 20000 other files, a deletion, a
look-alike prefix and an unknown revision. Each filtered go test must PASS at
least one test, so a filter that matches nothing fails instead of passing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chunkstore_integration tests (real weed master, volume and filer) ran
nowhere in CI. They now run in the process-level job against the pinned weed
it already downloads: always on pushes to main and train PRs, and on any other
PR that touches core/frontend/chunkstore/ or core/storage/. Only the
integration tests run (-run '^TestIntegration' in chunkstore, the layout
sync crash cases in durable); the default suite already covers the rest.
The spec-trace job also prints every code and test anchor of
docs/design/invariants.md that does not exist at the PR's commit. It reads
git objects only and never fails the check yet: it becomes gating once the
known imprecise anchors are corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The process-level job ran its 44 named tests in sequence, about 53 min of
the CI time. They now run in 4 parallel shards in the same job, so the
required check keeps its name and its gate: shard-named-tests.py splits
the names file by each test's last measured time
(.github/process-level-seconds.txt; longest first into the least-loaded
shard; about 787 s each), each shard runs run-named-tests.sh with its own
slice of the test port ranges (SWBLOCK_TEST_PORT_SHARD) and its own TMPDIR,
and required-tests-check.py then judges every named test from all the
shards' events and statuses. shard-named-tests-test.py runs in the gate's
self-test step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The classification moves into .github/scripts/docs-only-scope.sh: it
writes git's NUL-delimited list to a file and reads it to the end, so no
pipe stops early and a writer's error cannot read as "no other file". A
failed git diff exits nonzero, and the step then runs the tests.
docs-only-scope-test.sh runs first in the step, against real commits:
docs only, docs and a test file, no file, a docs-like prefix, README, a
move out of docs, a docs deletion, 20000 docs files with one other file
last, an unknown revision (an error), and that test.yml applies the check
only to a pull request's process suite and gates all four process steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 3 at 19cef1c printed each failed test's own file:line lines, but for
two tests the twelve shown were all cleanup headers ('<process> log:',
'---- <x> log tail ----'), pushing the failing assertion out. Those
headers and successful command echoes are no longer counted. Control: the
reason is shown behind 21 such headers; a mutant without the filter turns
it red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 2 at 774ee23 showed the last 40 lines of each failed test, which were
the harness's SeaweedFS log tails printed after the failure; the test's
own file:line messages fell outside. The gate now prints the test's own
messages (its last 12 file:line lines at the test's indent) and then its
last 5 lines. Control: the reason line is shown behind 60 lines of log
noise; a mutant that drops the own lines turns it red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The events file is not kept, so the job log showed which tests failed but
not why. The gate now prints the last 40 output lines of every named test
that did not pass. Control: a failed test's reason line appears.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code review at 1fb51fc: the loop printed each process's exit status and
dropped it, and the checker ignored package-level failures, so a test
that reported PASS and then failed, panicked or hung on its way out
passed. run-named-tests.sh now keeps each process's status; the checker
(--status) passes a named test only with a PASS event and exit 0, and any
package-level failure fails the run. Controls: 7 new gate cases, and a
real-shell control with fake test binaries (PASS then exit 1, PASS then a
hang until the timeout) that both fail the gate; dropping the status in
the runner turns two of them red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The process-level tests (cmd/blockvolume, tags subprocess and
chunkstore_integration) were only compiled; the workflow ran two of them.
A new job runs every test named in .github/process-level-tests.txt, each
in its own bounded process of one prebuilt test binary, against the
pinned SeaweedFS release. required-tests-check.py fails the job unless
every named test passed: a skip, a failure, a test that never ran or one
cut off mid-run is a failure. Its self-test runs first in the job.
The tests that need root, a mapped device or systemd stay outside CI
(named in the list's header). The previous two-test step is folded in.
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>