Documentation
¶
Overview ¶
Command rootshard is the CI-REDESIGN stage 5A root-suite sharding PILOT: it splits the root package's race+coverage test suite across isolated processes and proves, before anyone relies on it, 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). 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, time an empty run, 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
verdict check every shard + the lane, merge all coverage profiles
compare compare the pilot against the unsharded reference run
timings derive a timing file from a reference `go test -v` log
See roadmap/CI-REDESIGN.md §13 and .github/workflows/qa-root-shard-pilot.yml.