Skip to content

Standardize dataset storage on JSONL manifests - #19

Merged
tadamcz merged 14 commits into
mainfrom
jsonl-manifests
Aug 11, 2026
Merged

Standardize dataset storage on JSONL manifests#19
tadamcz merged 14 commits into
mainfrom
jsonl-manifests

Conversation

@tadamcz

@tadamcz tadamcz commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Format

Every dataset under apn/data/<ds>/ has the same shape:

  • samples.jsonl — the membership source of truth, one row per sample: id, source (vendored file path), optional excluded (reason inline; only dataset/harness-intrinsic reasons), optional statement (spec-path override), plus dataset extras (oeis_id, erdos_number, category_at_pin, answer_form).
  • Isolated/<id>.lean — the shipped specs.
  • Sources/ — vendored Lean, verbatim, one name across datasets; each tree carries a README recording the exact upstream pin.
  • subsets/<name>.json{description, ids}; every id must exist in the manifest; derivation stories (upstream lists, seeds, renames) are prose in description. All datasets share the mechanism and the subset task arg.
  • metadata/ (oeis, erdos) — data about the problems (scrape snapshots, derived provenance/citations), with its own READMEs.
  • NOTICE.md — the dataset-level story; no repeated pins.

Vendoring rule: verbatim only when CI must read the bytes (Lean sources) or the upstream is not durably addressable (scrapes). Upstream control files are transcribed rather than vendored — oeis THEOREM_MAPPING.txt, fc100open FC100OpenSet1.lean, the erdos attempt lists — with their sha256 at the pinned commits recorded in the NOTICEs / subset descriptions; each transcription was verified byte-verbatim against the pinned clones.

apn/dataset.py collapses to one loader (load_manifest / load_subset / build_dataset); Sample.metadata is built from an explicit whitelist so manifest-only fields (category_at_pin, answer_form — the recorded verdict in machine-readable form) never reach the agent.

Datasets

  • oeis (492 samples): lite, tsoukalas_proved_38, tsoukalas_unproved_40 ship as subsets/*.json; the multi-formalization metadata key is now other_sources. metadata/ holds the OEIS/OpenAlex scrape snapshots and derived provenance/citation tables.
  • fc100open (100 rows = 86 runnable + 14 value-typed answer(sorry) excluded): membership transcribed from the paper's frozen FC100OpenSet1.lean. The NOTICE records tag-vs-pin comparability: of the 88 problem files, exactly three differ between bench-v1-lean4.27.0 and the pin — two doc-comment-only, one whose two defs moved verbatim into FormalConjecturesForMathlib.
  • erdos (350 samples): the Tsoukalas paper's canonical attempted set (arXiv 2605.22763), unchanged as a task. Rows carry erdos_number / category_at_pin / answer_form for tooling; subsets/tsoukalas_attempted.json names the same 350 ids — the canonical replication invocation (the 353→350 derivation, upstream commit and hash live in its description) — and bare apn_erdos runs them all. The NOTICE documents the answer-key hygiene mechanism (certified answer(...) ↔ rewrite; category/verdict-prose strip) and flags the three members whose doc comments still carry resolution material (Erdos1141.erdos_1141, Erdos318.erdos_318.parts.ii, Erdos997.erdos_997), shipped as-is. The committed manifest is curated: generate_erdos_isolated.py censuses every research-category statement in Sources/, and the manifest keeps the attempted subset of that census.

Continuity guarantees (verified)

  • All 928 sample inputs (492 oeis + 86 fc100 + 350 erdos) are byte-identical to main (checked via a worktree dump comparison).
  • Every subset resolves to exactly the same ids, in the same order, as the .txt list it replaces (lite, proved_38, unproved_40, and the attempted 350 vs MAPPING.txt).
  • mypy and the fast dataset suites pass; the isolation suites (re-extraction certificates and the compile gate over all 928 committed specs) are for CI to confirm.

tadamcz added 6 commits August 8, 2026 14:03
One SampleRow schema and one loader across the three datasets: samples.jsonl
(id, vendored source path, optional exclusion reason, dataset extras) replaces
the per-dataset mapping/membership txt parsers, and subsets/<name>.json
replaces the OEIS-only txt subsets. Sample.metadata is built from an explicit
whitelist so manifest-only fields (recorded-verdict material) never reach the
agent. Data conversion of the three datasets follows.
Auto/ becomes Sources/ (uniform vendored-tree name; its README records the
upstream pin), samples.jsonl transcribes upstream's THEOREM_MAPPING.txt
(deleted; sha256 recorded in NOTICE.md, transcription verified byte-verbatim
against the pinned clone), oeis_id is materialized per row, and the three
subsets become subsets/<name>.json with their rationale as descriptions --
lite's id set is unchanged by construction (seeded draw over sorted ids,
asserted at conversion).
samples.jsonl carries all 100 members of the paper's frozen subset -- the 14
value-typed answer(sorry) members as excluded rows with the reason inline --
replacing FC100OpenSet1.lean + MAPPING.txt + EXCLUDED.txt (membership file's
sha256 recorded in NOTICE.md; transcription verified byte-verbatim against
the pinned clone). The 12 source files hosting only excluded targets are now
vendored so every row's source resolves, and the generator re-verifies each
exclusion against the elaborated statement (sorryAx in its type).
The dataset is now defined by FC, not by the Tsoukalas paper: samples.jsonl
censuses every research-category statement in the vendored ErdosProblems tree
at the pin (1124 rows; Sources/ grows 236 -> 420 files), and the paper's
canonical 350-statement attempted set becomes subsets/tsoukalas_attempted.json
(ATTEMPTED/EXCLUDED/RENAMED/MAPPING.txt deleted; upstream hash and the
353->350 derivation live in the subset description; resolution verified
identical to the old mapping, and the previously shipped 350 specs are
byte-identical after regeneration).

Universe rows record erdos_number, category_at_pin, and answer_form (kept out
of sample metadata -- they encode the recorded verdict). 103 members ship as
excluded rows: 79 value-typed answer(sorry) (sorryAx in the statement type)
and 24 whose complete formal proof is in the source file. The answer(...) <->
machinery gains the filled-RHS forms 198.lean introduced (rhs_true/rhs_false),
the sorry allowlist becomes file-scoped (295/633/697/961/1055 keep a sorry'd
helper their definitions need), and one case-insensitive filename collision
(889's V1/v1 variants) is carried by an explicit per-row statement path.

A six-agent leak audit of the 671 new specs extended the verdict-prose strip
with the DeepMind/AlphaProof channel; the broader cleanup of resolution prose
on post-paper solved members is deferred and documented in NOTICE.md.
The oeis/fc100 fast suites and all three isolation suites enumerate from
samples.jsonl instead of the deleted mapping files (the erdos structural gate
also cross-checks each row's recorded answer_form against the source's
re-detected form), and the OEIS analysis/fetch scripts read their sequence
universe from the manifest.
raw/ said nothing about what the directory meant, and the OEIS enrichment
tables sat loose at the dataset root, indistinguishable from the dataset
proper. Each dataset now has one metadata/ tree for data *about* the members
(analysis-only; a README notes none of it reaches Sample.metadata):
snapshots/ for captures of external sources (unreproducible, read-only
evidence -- the old raw/) and derived/ for tables our scripts compute
(provenance and the two citations files, prefixes dropped now that the
directory carries the context). The distinguishing axis is snapshot vs
derived, not fetched vs computed: the OpenAlex citations are also fetched,
but they are our query-and-join synthesis, not a capture.
@tadamcz

tadamcz commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

@codex

tadamcz added 8 commits August 8, 2026 16:10
CI's isolation gate caught three new-member specs broken by constructs the
dependency cut cannot see: type_of% splices a sibling's elaborated *type*, so
the sibling never appears in the extractor's deps and the cut removed the
statement being referenced (11.variants.granville_soundararajan,
392.variants.implication), and 683.lean/1145.lean import another problem
file, whose olean the sandbox images do not build -- 1145's importer is its
@[category test] sibling, which the cross-file reference makes entirely
invisible to the extractor, so it survived the cut as gap trivia.

HARDCODED_ISOLATION applies exact per-member text replacements at generation:
the referenced sibling statements are inlined verbatim where type_of% stood
(hypotheses, not sorry'd theorems -- SafeVerify would otherwise demand their
proofs), and the dead cross-file imports (plus 1145's invisible sibling and
683's namespace open) are dropped. Generation now also rejects any spec that
imports a problem module or type_of%-references a declaration outside itself,
so the failure modes cannot recur silently. All seven re-verified in the
container: re-extraction, the type certificate (which checks the hand-inlined
types against Lean's own elaboration of the source), and the compile gate.
The full-FC-universe expansion brought in members the isolation pipeline
cannot ship without hand-editing: cross-problem-file imports (683, 1145),
type_of% statement splices (11, 392), one member the extractor cannot see
at all (1135's type_of% on an imported sorry'd theorem never reaches the
env diff), and a census miss for 509's doc-comment-glued research
attribute. Rather than hand-isolating or excluding them piecemeal, the
universe returns to the Tsoukalas paper's canonical 350 attempted
statements: samples.jsonl is filtered to the tsoukalas_attempted ids (pure
row deletion; every kept row and all 350 specs byte-identical), Sources/
returns to the 236 hosting files (exactly main's vendored set), and there
are no excluded rows. The manifest format, subsets mechanism, and
metadata/ are unchanged.

generate_erdos_isolated.py remains the vendor-time bootstrap; it censuses
all of Sources/, so the committed manifest is now explicitly curated
(NOTICE.md documents this and the three attempted members still carrying
resolution material: Erdos1141 and Erdos318.parts.ii state their recorded
verdict and link the published solution, Erdos997 keeps the solution
paper's reference line -- shipped as-is for now). The fc100open NOTICE's
tag-vs-pin paragraph is corrected: exactly three of the 88 problem files
differ, and the moved defs belong to Equidistribution.lean, not
GraphConjecture316.lean (byte-identical at both).
PR #20's files land in this branch's metadata/ layout: the wiki-page scrape
under metadata/snapshots/, the derived profiles under metadata/derived/;
scripts/extract_proposers.py's paths follow (incl. conjecture_provenance.jsonl
-> metadata/derived/provenance.jsonl) and the metadata README lists the new
files.
@tadamcz tadamcz changed the title Standardize dataset storage on JSONL manifests; expand erdos to the full FC universe Standardize dataset storage on JSONL manifests Aug 11, 2026
@tadamcz
tadamcz merged commit 070e1ac into main Aug 11, 2026
5 checks passed
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.

1 participant