fix(build): re-verify the seed across the step boundary; refuse a cross-series seed #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/seed-integrity-and-series"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three gaps around the config seed, plus the validator that would have caught the stale cross-series pin fixed in #28.
1. The seed was never re-verified after the step that verified it
build/fetch-seed.shchecks the signed commit and the sha256, then the workflow step ends.build/configure-kernel.shruns in a later step and did a barecp "$seed_config" .config. Anything that mutated$WORKDIRin between went undetected — and the fidelity assertion cannot see it, because that only provesconfigs/intent.configlanded. The seed supplies every hardening default we deliberately inherit rather than pin (~31 symbols).build/apply-patches.sh:29-35already re-checksinput-hashes.txtacross the same boundary, with the threat model spelled out. This is the symmetric guard:fetch-seed.shrecordsseed-hashes.txtfrom the same$seed_sha256that feedsseed-info.json, andconfigure-kernel.shrunssha256sum -cbefore the copy. A missing hash file is a hard failure, never a skip — a guard that disables itself when its input is absent is the failure class this repo keeps hitting.sha256sum(coreutils) rather thanjq, becauserepro-check.sh's rebuild container deliberately has nojq.2. A tag whose series had no seed pin silently built from another series' seed
fetch-seed.sh:47-53fell through toconfigs/upstream-seed.toml— a symlink to the current stable line — wheneverconfigs/seeds/$SERIES.tomlwas absent. Pushingv7.2.1-hardened1before addingseeds/7.2.tomlwould build a 7.2 kernel from the 7.1 config, and it turns both safety nets off at once: the fidelity assertion still passes (intent is satisfied by either seed) and the drift guard finds noreleases/v7.2.*baseline, so it skips. Green log, wrong config.build-kernel.yml:120-127already hard-fails the analogous cross-series hazard for the stale-tag case; this matches that precedent, with anALLOW_CROSS_SERIES_SEEDhatch for a deliberate one-off.repro-check.shnever setsSERIES(it overrides viaFETCH_SEED_*), so its path is unchanged.3.
lines.py'sseed_path_for()returned the configured path uncheckedfetch-seed.shresolves the seed by convention (configs/seeds/$SERIES.toml) and never readslines.toml, so aseedvalue pointing anywhere else is silently ignored by the build whileseed-bump.yml— which does go throughseed_path_for()— would faithfully bump the wrong file. Now asserts the convention and existence. Deliberately not inload():prune.pycalls that for retention bucketing and must keep working for a line whose seed file has been removed.4. New
validate.ymljob:seed-pins-well-formedPer
configs/seeds/<X.Y>.toml: the pinnedtagbelongs to that series; all six keys parse;commitis 40 hex;sha256is 64 hex. Plus theupstream-seed.tomlsymlink tracks the stable line (a documented manual step when advancing the line, previously unchecked), and every registered line satisfiesseed_path_for().A cross-series seed is sometimes legitimate — a line stood up before anthraxx packages a config for it — so the escape hatch is a
# cross-series-seed: <reason>marker in the pin file itself rather than a workflow variable. It belongs with the pin, and it forces the reason to be written down where the next reader will see it. This is the check that would have caughtseeds/7.1.tomlsitting on a 7.0.12 config for four releases while its header claimed otherwise.Verification
Seed re-verification (real script block, fixture
$WORKDIR):upstream-seed.config: OKFAILED, copy never reachedseed-hashes.txtmissingCross-series resolution:
SERIES=7.2, noseeds/7.2.tomlgit clone(confirmed no clone dir created)ALLOW_CROSS_SERIES_SEED=1::warning::fires, resolution proceeds toupstream-seed.tomlseed-pins-well-formed, extracted from the workflow and run against copies of the real tree:2 file(s) examined; symlink -> seeds/7.1.toml# cross-series-seed:markerlines.tomlseed pointing at the wrong fileseed_path_forConfirmed
repro-check.shrunsfetch-seed.shbeforeconfigure-kernel.sh, so the hash file exists on the rebuild path too, and in repro mode it records the historical sha from the manifest.Validators:
shellcheckclean,yamllint -d relaxedexit 0,py_compileclean,workflow-expressionsclean,lines.pyCLI and library paths both still resolve for the real registry.🤖 Generated with Claude Code