Skip to content

Event-stream differential — Slice 2: extend to JSONTestSuite + LALR wild #596

Description

@okalldal

Part of #594. Follows Slice 1 (#595), which lands the generic tracer + event-stream
differential over the LALR compliance bank.

Context

Slice 1 establishes the machinery (grammar-agnostic tracer on both sides, event-stream
oracle, parse_into replay, XFAIL + freshness gates) over compliance/bank.json. This
slice points the same machinery at the two other LALR-drivable corpora so the whole
LALR suite runs through the event path.

Done-when

  • The Slice 1 event-stream differential is extended to:
    • JSONTestSuite (293 inputs, JSON grammar under LALR) — accepted inputs replayed
      through parse_into with the event-logging builder, byte-identical to Python's
      embedded event stream.
    • LALR wild projects (tests/wild/, the projects whose upstream options use LALR —
      e.g. lark_lark, poetry_*, pyquil, tartiflette; excluding Earley/dynamic projects
      like mistql, which have no embedded oracle).
  • Same XFAIL-burndown discipline and oracle-freshness gate as Slice 1 and the existing
    banks; no silent skips.
  • Large event streams are digest-compared (mirror tests/test_wild.rs's big-tree
    digest handling) so the fixtures stay small.

Priority

prio:later — the compliance bank (Slice 1) already covers the bulk of grammar shapes;
this widens the corpus but is incremental once the machinery exists.

Files

  • tools/generate_transformer_oracles.py / tools/generate_wild_oracles.py (event-stream
    emission for the two corpora)
  • tests/fixtures/oracles/transformer/ + tests/fixtures/oracles/wild/ (event-stream
    fixtures / digests)
  • tests/test_transform_event_stream.rs (extend the replay to the two corpora)

Notes

  • Only LALR-config wild projects — an Earley/dynamic-lexer project has no embedded
    transformer oracle (Python restricts transformer= to LALR), so it is out of scope by
    construction, exactly as in Slice 1.
  • JSONTestSuite's i_/n_ (implementation-defined / reject) inputs follow the same
    accepted-subset rule: only inputs Python accepts (and transforms) are differenced.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions