Skip to content

[6-1] Pair dataset schema, builder skeleton, and split logic#98

Open
duckyquang wants to merge 5 commits into
mainfrom
issue/6-1-pair-dataset-spec
Open

[6-1] Pair dataset schema, builder skeleton, and split logic#98
duckyquang wants to merge 5 commits into
mainfrom
issue/6-1-pair-dataset-spec

Conversation

@duckyquang

Copy link
Copy Markdown
Member

Summary

Partial start on [6-1]. The full build needs 1-8, 4-4/4-5 and 2-6, none of which are merged, so what's here is everything that doesn't: the pair record schema, the builder control flow with its failure accounting, the hard-negative matching, and all the split/leakage/OOD bookkeeping.

The e-graph engine and the verifier come in as protocols instead of imports, so nothing on this branch depends on an unmerged module. Swapping the fakes for the real objects when 4-4/4-5 and 2-6 land shouldn't need changes here.

Only touches 6-1's owned paths, and they're all new files, so this shouldn't collide with anything in flight.

Result

14 new tests, full suite 106 passing on a fresh clone:

PYTHONPATH=src python3 -m pytest tests/data/test_pairs.py -v
PYTHONPATH=src python3 -m pytest

Notes

  • I added left_signature to PairRecord and signature to SourceExpression while writing [7-0]. Without a starting state you can't replay step 0, so the trace is unusable. Flagging it because it's a schema field other people will consume.
  • group_id falls back to the expression id until 4-2 gives us e-class ids. That fallback can't see that two ids are e-class relatives, so a clean find_leaks under it is weaker evidence than it looks — the real build has to run with eclass_id populated. Documented in the spec.
  • @Sisigoks the SaturationEngine / Equivalent shape in generate.py is my read of what 4-2–4-5 will hand back (equivalent id, size, depth, full rule sequence). If that's not what saturation will actually produce, tell me now and I'll change it rather than making you work around it later.
  • @sahilsinghthefirst same question for Verifier.verify(left, right, rule_sequence) -> Verification against 2-6 — I've got tiers as egraph_proof / symbolic / numeric and statuses as verified / refuted / unsupported. Negatives need a positive refuted, not just "couldn't prove equal", so I want to be sure 2-6 can give me that.

duckyquang and others added 5 commits July 23, 2026 14:01
…audit

[3-5] audit direct vs post-hoc EML-DAG equivalence
[3-6] goal 3 metrics pipeline: checkpoint/resume, atomic writes, coun…
[3-7] goal 3 analysis: stratification, reuse metrics, compression-vs-…
[3-8] frozen EML-DAG cost interface for goal 4, Goal 3 summary docs
Schema + control flow for the equivalence-pair build, with the e-graph
engine and the verifier injected as protocols so nothing imports 4-4/4-5
or 2-6 while those are unmerged. Split/leakage/OOD logic is finished
rather than stubbed - it needs nothing from other branches.

Production >=50k/5k/5k build still waits on 1-8, 4-4/4-5 and 2-6.
@duckyquang duckyquang added partial-start Spec/skeleton landed ahead of its blocked prerequisites goal:6 Goal 6 — equivalence learning grid type:spec Frozen contracts and specifications labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:6 Goal 6 — equivalence learning grid partial-start Spec/skeleton landed ahead of its blocked prerequisites type:spec Frozen contracts and specifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant