The dead-recorder twins wrote a large stdout but one short stderr line,
so removing only the stderr fallback still passed. A fake Go that writes
10,000 stderr lines now runs with a recorder that dies after 100 bytes,
and with no recorder at all (no such interpreter); each keeps Go's own
exit 0 and 7, and dropping the stderr fallback turns the suite red.
The sampler stop test's wait for its stand-in is bounded (10 s) and
fails at once if the stand-in exits before it is ready.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If the Go event recorder itself dies or cannot start, the rest of its
stream (stdout, and the stderr side) now drains through cat, so go test
never writes into a closed pipe and its own exit status stays the answer.
Twins with a recorder that exits after 100 bytes and a large stream:
exit 0 stays 0, exit 7 stays 7.
Stopping the load sampler now waits on its pidfd (readable on exit) for
2 s; a sampler still alive leaves load.incomplete beside its rows and a
stderr note instead of returning as if it had flushed. The stop test
checks the process is gone (no file-stability guess) and a SIGTERM-
ignoring stand-in yields the note within 5 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in the test workflow: main added the self-hosted runner NVMe
check after checkout; this branch adds the load-evidence start and its
self-test there. Both kept, the NVMe check first so a misplaced runner
stops before anything else runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tmpfs mounted under another source name (shm, a custom label) was
refused because the check compared the source name. And an lsblk that
printed an NVMe disk and then failed was accepted, since its status was
discarded. The check now reads the filesystem type from df and treats any
lsblk failure as "not a block device". Two stub cases pin both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One runner box kept its runners' work, temp and Go cache directories on
its SATA system disk (the default install puts _work under the runner
directory in /home). Under the process-level tests' fsync load that disk
saturated and jobs timed out, which read as test failures.
The first step of the test and known-bugs jobs on a self-hosted runner now
checks that every disk behind the workspace, RUNNER_TEMP, TMPDIR and GOCACHE
is NVMe (tmpfs accepted) and fails naming the runner and the directory
otherwise. GitHub-hosted runners skip the step. The script's test stubs df
and lsblk: NVMe, tmpfs, a not-yet-created dir pass; SATA, an array with a
SATA member and a network share fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swblock_v11_format now turns on the draft v1.1 store format;
swblock_lab_bigvol lifts only the create cap and the headroom refusal.
A build with the format tag names itself in its revision
("LAB BUILD(swblock_v11_format)"), so the image refusal keys on it as it
does on the cap tag, and the CI tag check refuses either tag outside its
allowlist. CI tests each tag alone and both together.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The summary kept only each file:line line, so a message whose reason is on
its next lines (a holder's log tail after "its log ends:") lost it. Each
own message now keeps its last 20 continuation lines; a harness header's
dump stays out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refusal must be an executed line, RUN bash scripts/refuse-lab-binary.sh,
after the recipe's last go build and naming every binary the recipe builds
(go build ... -o /out/NAME); a comment no longer counts. Each recipe and the
publish workflow is read once with a checked read, so a read error fails
instead of reading as no match; failures go to stderr. The controls now
start from copies of the real recipes and publish workflow: the guard
deleted with its comment kept (both recipes), commented out, a built
binary left out, a new binary not refused, the refusal before the build,
and an unreadable recipe (Linux), each refused for its own reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lab build's revision carries LAB BUILD(swblock_lab_bigvol), so -version and
the volume's /status show it. Every image Dockerfile runs
scripts/refuse-lab-binary.sh right after its go build: a binary that is a
lab build, or cannot answer -version, stops the image build, so neither
the publish workflow nor the image scripts can push one. lab-tag-check.sh
now fails closed: an allowlist of the files that may name the tag (git grep;
a scan that cannot run fails), plus the wiring (each Dockerfile refuses
after its last build; the publish workflow builds only from those, with no
go build of its own). Controls cover each contamination and the refusal
script's stand-in binaries. The lab headroom test asserts the warning, and
both invariant rows name the lab exception.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The swblock_lab_bigvol tag lifts the 256 GiB create cap to the format's own
limit (16 TiB - 4 KiB) and turns the local headroom refusal at create into a
warning, so the scale rehearsals can create sparse volumes larger than the
release allows and than the disk. A release build is unchanged and pins
that (TestReleaseBuildKeepsTheCreateCap). CI refuses the tag under deploy/
and in every workflow but test.yml (lab-tag-check.sh, with controls), and
tests the lab build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>