fix(conformance): make the pack generator runnable from a clean checkout - #1576
Open
gHashTag wants to merge 1 commit into
Open
fix(conformance): make the pack generator runnable from a clean checkout#1576gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
gen_all_formats.py read its catalog from a hardcoded /tmp/catalog_lines.txt that was never committed, so on a fresh clone it raised FileNotFoundError before producing anything: the 83-pack corpus could be read but not regenerated. The catalog was never actually missing. specs/numeric/formats_catalog.t27 carries all 83 rows as trailing `// CATALOG: id=... ` comments -- the same lines catalog-count-gate.yml counts for the 83-format invariant, already in the format parse_catalog expects. The /tmp file was a second, unversioned copy of data the repository holds. The generator now reads the SSOT, and parse_catalog accepts the comment prefix while still taking a bare `id=` line. Two problems surfaced while fixing that. Re-running the generator silently reverted the 2026-07-05 promotions. The SELFCONSISTENT branch hardcoded kind bitexact_selfconsistent with the comment "NOT promoted to bitexact (no independent second witness)" -- true when written, but the six wide rungs since acquired independent second witnesses and were promoted in the pack files. A regeneration would have rewritten the index back to 69/6/8, undoing an honesty-rule-#10 promotion the packs themselves record. The tier now derives from the pack, which is the artefact of record for its own status, so a future promotion flows into the index by itself. The hand-written promotion rationales are kept verbatim in a PROMOTION_SOURCE registry rather than flattened to a generic string. The index also exposed no witness information: a consumer of INDEX_all_formats.json could not tell which packs carry a witness record without opening all 83 files. Each entry now carries a witnesses count, with a top-level witnessed_packs. verify_regeneration.py is added as the falsifiable half: it regenerates and compares against the digests recorded at HEAD. packs compared: 83 digests unchanged : 83 digests changed : 0 tier changed : 0 Index changes are strictly additive -- 0 entry fields changed or removed. Both gates pass: wp18_selftest_gate.py all PASS, wp18_conformance_gate.py CLEAN with no failures. Closes #1575
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This was referenced Jul 31, 2026
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
conformance/vectors/gen_all_formats.py— the script that produces all 83 conformance packs — reads its catalog from a hardcoded path:That file is not in the repository. On a clean checkout the generator raises
FileNotFoundErrorinparse_catalog()before producing anything, so the corpus can be read but not regenerated. For an artifact whose stated contribution is reproducible bit-exact conformance vectors, the generator not running from a fresh clone is the weakest link in the chain.The catalog itself was never missing.
specs/numeric/formats_catalog.t27carries all 83 rows as trailing// CATALOG: id=... name=... bits=...comments — the same linescatalog-count-gate.ymlcounts to enforce the 83-format invariant, in exactly the formatparse_catalogexpects. The/tmpfile was a second, unversioned copy of data the repository already holds.Two further problems surfaced while fixing this.
Re-running the generator silently reverted the 2026-07-05 promotions. The
SELFCONSISTENTbranch hardcoded"kind": "bitexact_selfconsistent"with the comment "NOT promoted to bitexact (no independent second witness)". That was true when written, but the six wide rungs acquired independent second witnesses and were promoted in the pack files. A regeneration would have rewritten the index back to 69/6/8, undoing an honesty-rule-#10 promotion that the packs themselves record. The tier now derives from the pack, which is the artefact of record for its own status.The index exposed no witness information. Fields were
file, id, kind, n_vectors, sha256, source— so a consumer ofINDEX_all_formats.json, the corpus's machine-readable summary, could not tell which packs carry a witness record without opening all 83 files. The data was already in the packs.Verification
conformance/vectors/verify_regeneration.py(new) checks the corpus against the digests recorded at HEAD:Index changes are strictly additive — 0 entry fields changed, 0 removed; added
witnessesandn_vectorsper entry plus a top-levelwitnessed_packs: 10. Both existing gates pass:wp18_selftest_gate.pyall PASS,wp18_conformance_gate.pyverdictCLEAN, failures[].Closes #1575