Skip to content

ttysnap: drive the e2e runner via ttysnap.Harness (full dogfood convergence) #537

Description

@fentas

Follow-on to the spawn dedup (#534) and the wait/grid-helper dedup (this PR). Those shared the low-level spawn + the poll-until/grid-query loops. The DEEPER convergence remains: have the e2e runner drive a ttysnap.Harness directly instead of the bespoke Session, and express golden-compare + cast as ttysnap modules (snapshotter/cast_recorder already exist).

Why deferred (not auto-merged): it reworks the e2e golden machinery — the per-scenario grid.txt + grid.sgr compare/update/.actual logic lives in src/test/e2e/{runner,snapshot}.zig, and ttysnap's snapshotter would need to grow that format. That's a deliberate, reviewed refactor of the safety net, not a one-shot auto-merge.

Payoff: running atty's own 34-scenario suite through ttysnap is the strongest proof the framework is production-grade (true dogfooding), and it kills the last of the driver duplication (the two pumpMs + the Session/Harness lifecycle).

Sketch:

  • Extend ttysnap's snapshotter to the e2e golden format (txt + sgr, update mode) or add an e2e-specific golden module.
  • Make the runner build Harness(.{ golden_module, cast_module }) per scenario; map DSL verbs to Harness methods.
  • Keep all scenarios + goldens + per-scenario binary selection + the fragment knob green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions