Documentation
¶
Overview ¶
Command rootshard runs the root package's race+coverage test suite across isolated processes (CI-REDESIGN stages 5A/5B) and proves, on every run and WITHOUT an unsharded reference, that nothing was lost on the way — no test, no coverage block and no failure.
Why a tool and not a shell pipeline: every step here is a place a sharded suite can SILENTLY lose evidence (a test no regex selected, an escaping bug that selects a neighbour, an empty selection that `-test.run` reads as "run everything", a shard that crashed and wrote no profile, a profile from a different binary, a lane profile truncated to nothing). Each of those has to fail closed, and each failure path is pinned by a test in this package, which the ordinary `go test ./...` runs.
Subcommands (all JSON artifacts are deterministic):
build compile the root race+coverage test binary ONCE, list its entries
from the binary itself, record its empty-run block universe,
write manifest.json
plan partition the binary's inventory into N shards by measured duration
run-shard run one shard's chunks against the prebuilt binary
run-lane run every OTHER package of the module as whole packages
universe the lane's exact command with no test selected: its block universe
verdict check every shard, the lane and both universes against the
source/build expectations; merge all coverage profiles
compare audit mode: compare against the unsharded reference run
timings derive a timing file from a reference `go test -v` log
inventory list the source's runnable test entries per package
Timing data only BALANCES shards; test inclusion comes from the binary's own -test.list and the source, never from a timing file.
See roadmap/CI-REDESIGN.md §13–§14 and .github/workflows/qa-race-shards.yml.