Originally created by: lodar
DIVE-3163 (#577) removed the per-job exit 5 from the harness header-drift check, correctly — one
box cannot separate a stale # TIER: header from a slow runner, measured false three times on
2026-08-10 including a green re-run at the same sha. It left header_drift_wrong in the report and
named the reader it needed. This is that reader. Filed before [#577] merged, as main's condition
for it; [#577] has since landed as 062f04ce, so the gap is live now.
| item | file |
|---|---|
| 1. carrier | scripts/run-harnesses.sh — a parseable harness-budget[...] drift line |
| 2. identity | scripts/tier-cal-harvest.sh — per-file rows keyed by harvest_run_id/harvest_job |
| 3. verdict | scripts/tier-cal-window.sh — WRONG on >=2 distinct jobs is a STALE CLAIM |
4. --drift-fatal |
kept as a local re-arm, now watched |
| 5. rail | .github/workflows/header-drift-window.yml, nightly |
A report FIELD cannot be the cross-run carrier. A --report= file lives only inside the run
that wrote it — which is why tier-cal-harvest.sh exists at all, rebuilding reports from the CI
log because stdout is the one store GitHub already retains. A field the harvester does not parse is
a field the window never sees. So the facts go on a line shaped like the contract the harvester
already keys on; the prose block a human reads is unchanged beside it.
The carrier line prints on EVERY run, including a clean one. This is the load-bearing detail
and it is one layer up from where olivia found the same hazard. If the line only printed when
something drifted, then "nothing drifted" and "this build predates the carrier" would be the
same bytes in the log, permanently — and a missing-means-zero default in the window would
manufacture a majority of clean historical samples inside the very instrument built to count
recurrences across history. Not noise: it poisons the exact statistic, in the direction of "nothing
recurs", and looks like a healthy corpus doing it. A clean run prints files 0, wrong 0, so a
graded zero and a missing field stay different things, and the window excludes ungradeable
samples by name rather than scoring them clean.
The rail must never go red. release-cut.yml grades every check-run on main's tip and refuses
to cut on ANY red without reading which red it is. A scheduled workflow run is a check-run on
main's tip — so a nightly job reddening on a stale header would re-create the exact v0.19.14 freeze
DIVE-3163 removed, through a new door. --drift-strict (exit 8) exists in the script, the workflow
does not pass it, and a test arm holds that absence. The verdict lands on a step summary, an
artifact carrying the reports it was computed from, and a long-lived issue rewritten every run —
whose timestamp doubles as the rail's own liveness signal (DIVE-1924 principle: a dead rail leaves
a visibly frozen issue rather than a silence indistinguishable from "nothing recurred").
--runner-id is - on exactly the jobs this is about — full-sweep.yml passes
--tier/--shard/--label/--report and no runner id, and all three DIVE-3163 samples fired on
full-pristine shards. Reports are counted never: two attempts on one box are one box, and counting
them would let a re-run convict a file on its own second opinion. On GitHub-hosted runners every job
gets its own ephemeral VM, so harvest_run_id/harvest_job is the box identity, already
stamped by the harvester.
--drift-fatal=required is kept as a local re-arm for reproducing the old behaviour by hand,
and it is now watched: no workflow may pass it, nor --drift-strict. "Wired to no caller" was
the honest state but not a safe one — nothing would have noticed a caller appearing, and an
unwatched second enforcement path beside a new verdict is how two controls start disagreeing.
tests/header_drift_window_unit.sh — 27 arms, 0 failed, 5.0s. Follows one fact from thestale nevertests/corpus_tier_budget_unit.sh — 135 passed, 0 failed, unchanged by the new prints.shellcheck -S warning and actionlint clean on every changed file.31437553333): 3 real jobs harvested with(no header_drift_wrong); verdictDRIFT UNDETERMINED. The absence rule is verified against genuine pre-carrier data, not only aRead off run 31437553333 on main rather than from a local run (a contended control-plane reading
runs ~45% high):
core/pristine 279 harnesses, 306s wall-clock, budget 300s (102%)
core/installed-host 279 harnesses, 385s (128%), confirm re-time 251s (83%)
Core is at its cap. CLAUDE.md ranks merge and retire ahead of demotion and neither applies — no
sibling to fold into, and the mechanism is new — but 5s of recurring cost on a tier at 102% would
red somebody else's PR on content they did not change. The cost cannot be engineered away: WRONG
is >=50% AND >=3s over the claim, so a fixture that provokes one must burn three wall-clock
seconds. That also makes the figure unusually stable across runners. changed-harnesses still runs
it at introduction whatever its tier.
The workflow has never executed, so the gh issue upsert step and the schedule trigger are unrun.
That is also why the rail lands on an artifact and an issue rather than gating anything.
Follow-up, raised by main on the gate and deliberately not in this diff: the verdict lands
durably and a dead rail is visibly dated, but nothing requires a human to look. If the existing
digest can pick the issue up, the rail acquires a reader for almost nothing and "durable" becomes
"seen".
Wiki: community/wiki/the-carrier-for-a-cross-job-verdict-is-the-log-line-not-the-report-field.md.
Added after the fact, and it is the strongest evidence the second decision above has — it arrived
by accident, out of a failure.
The first CI run of this branch went red for an unrelated reason (two corpus-contract violations in
the new harness, fixed in 0eacc974). Its log carries this line:
harness-budget[core/pristine]: HEADER DRIFT (DIVE-3188) files 0, wrong 0, policy off
That is a clean drift report printed on a run that failed. Every property the design argument
rests on is visible in one line from a real GitHub-hosted runner rather than from
tests/header_drift_window_unit.sh:
wrong 0 is a GRADED zero and not an absence;tier-cal-harvest.sh keys on, in the store the harvester actuallyA fixture can only ever show that the emitter can produce the line. This shows the line surviving
a real job, on a real runner, on the unhappy path.
The first push of this branch went red on tests/names_the_tree_contract_unit.sh and
tests/harness_rc_corpus_contract_unit.sh — four red checks from one root cause, both against
the harness this PR adds, neither reached by the touched-harness search that found
corpus_tier_budget_unit.sh.
The reason generalises and is not "I skipped a step": a search for the touched set finds harnesses
that reference what you changed, while corpus-contract harnesses name no diff and reference
nothing — they enumerate tests/ and assert a property of each member. So a diff that ADDS a
harness has two disjoint touched sets and only one is derivable from the diff.
0eacc974 sources tests/lib/grading_tree.sh (DIVE-2211) and carries the HARNESS-RC EXIT trap
(DIVE-2692), folded into the existing tempdir cleanup rather than registered beside it — bash keeps
only the LAST trap per signal, so a second registration would have silently replaced the cleanup and
leaked a tempdir per run. That variant would have passed both contracts, which is why the form
here is byte-identical to the one 208 harnesses in the corpus already use.
Now verified: header_drift_window 27/27, both contracts, plus harness_tree_guard,
harness_graded_union, harness_verdict_union, pack_cross_harness, type_map_registration, and
corpus_tier_budget 135/135.
Ticket changed by: lodar