Skip to content

ci(conformance): gate INDEX_all_formats.json against the packs it summarises - #1578

Open
gHashTag wants to merge 1 commit into
masterfrom
gate/pack-index-consistency
Open

ci(conformance): gate INDEX_all_formats.json against the packs it summarises#1578
gHashTag wants to merge 1 commit into
masterfrom
gate/pack-index-consistency

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

INDEX_all_formats.json is the corpus's machine-readable summary — what consumers read, and what Paper B recomputes its coverage from. Nothing checked that it still agreed with the packs it summarises.

That gap has already cost a real regression. gen_all_formats.py hardcoded the tier for the six wide GoldenFloat rungs:

index.append({..., "kind": "bitexact_selfconsistent",
              "source": "... no independent second witness"})

That was correct when written. The six rungs then acquired independent second witnesses and were promoted in the pack files on 2026-07-05. The generator was never updated, so re-running it rewrote the index from 75/0/8 back to 69/6/8 — silently reverting an honesty-rule-#10 promotion the packs themselves record. It is fixed in #1576, but nothing would have caught the next one.

What the gate checks

  • A every index entry names a pack file that exists
  • B the recorded sha256 matches the file on disk
  • C kind agrees with the pack: bitexact + populated witnesses[]"bitexact"; a pack that is not bit-exact is not labelled otherwise
  • D the index witness count equals len(pack["witnesses"])
  • E header totals equal the entries actually present
  • F no pack file in the directory is missing from the index

Deliberately not checked: a bit-exact pack with an empty witnesses[]. That is the normal case, not a violation — the ~60 uncontested packs were bit-precise from the start, their independent reference codec being part of how the vectors were generated. witnesses[] records the packs whose promotion was contested. A check demanding a witness everywhere would fail the whole corpus and would misstate rule #10. The asymmetry is the point: a recorded witness must not be ignored, but its absence is not evidence of anything.

Also not treated as failure: five hand-curated packs (bfloat16, fp8_e4m3, fp8_e5m2, mxfp4, gf16) carry no bitexact key at all while the index labels them bit-exact. An absent flag is unknown, not false; reading silence as denial would make the gate assert something the pack never said. They are reported as notes.

Verification

Follows the wp18_selftest_gate.py convention — the gate proves itself falsifiable before it is trusted:

[PASS] A missing pack file is caught
[PASS] B digest drift is caught
[PASS] C witnessed pack demoted in index is caught
[PASS] D witness count mismatch is caught
[PASS] E header total drift is caught
[PASS] F pack absent from the index is caught
selftest OK: the gate is falsifiable.

And replayed against the live corpus — demoting the six rungs exactly as the old generator would:

failures: 6
  C gf48: pack is bitexact with 3 witness(es) but index says kind='bitexact_selfconsistent'
  ... (all six)
verdict: FAIL     gate exit code: 1

Clean on current master (failures: 0, 5 notes), so this stands alone and does not depend on #1576.

Closes #1577

…marises

The index is what consumers read and what Paper B recomputes its coverage from,
and nothing checked that it still agreed with the packs underneath it.

That gap already cost a regression. gen_all_formats.py hardcoded the tier for the
six wide GoldenFloat rungs -- correct when written, but the rungs later acquired
independent second witnesses and were promoted in the pack files. Re-running the
generator rewrote the index from 75/0/8 back to 69/6/8, silently reverting an
honesty-rule-#10 promotion the packs themselves record. #1576 fixes that instance;
this closes the class.

Checks: entry names a file that exists; recorded sha256 matches disk; kind agrees
with the pack's own bitexact + witnesses state; index witness count matches the
pack; header totals match the entries; no pack file missing from the index.

Two things are deliberately NOT failures. A bitexact pack with an empty
witnesses[] is the normal case -- the ~60 uncontested packs were bit-precise from
the start, and witnesses[] records the promotions that were CONTESTED; demanding a
witness everywhere would fail the whole corpus and misstate rule #10. And five
hand-curated packs carry no bitexact key at all while the index labels them
bitexact: an absent flag is unknown, not false, so reading silence as denial would
make the gate assert something the pack never said. Both are reported as notes.

Follows the wp18_selftest_gate.py convention -- --selftest plants a mutant per
check and fails if any survives, so the gate proves itself falsifiable before CI
trusts it. All six mutants are killed. Replayed against the live corpus by
demoting the six rungs exactly as the old generator would, the gate fails with
exit 1 and names each rung with its witness count. Clean on current master, so it
stands alone and does not depend on #1576.

Closes #1577
@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-07-31 10:16:27 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 41
PRs with All Checks Green 9
READY 1
FAILING 41
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=d6b51a3bcc20 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No gate checks that INDEX_all_formats.json agrees with the packs it summarises

1 participant