Skip to content

feat(transport): FakeTransport.from_trace — replay captured sessions - #9

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/trace-replay
Jun 26, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/trace-replay

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Toward #4. Closes the capture→replay loop.

TracingTransport --log records a > tx / < rx trace; FakeTransport.from_trace(trace) parses it back into a transport that replays the device side (leading rx pre-fed, each tx returns its following rx lines). So a session captured against real hardware tomorrow becomes a hardware-free conformance fixture — drop traces into tests/ and they replay through MarlinHost.

Verification

ruff + pyright clean · 83 tests (2 new, incl. a capture→replay round-trip).

Parse a `> tx` / `< rx` trace (as written by TracingTransport --log) into a
FakeTransport that replays the device side: leading rx is pre-fed (e.g. the
`start` banner) and each tx returns the rx lines that followed it. This closes
the capture->replay loop — a session recorded against real hardware becomes a
hardware-free conformance fixture.

Toward #4 (hardware validation / corpus).
@CameronBrooks11
CameronBrooks11 merged commit f569311 into main Jun 26, 2026
5 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/trace-replay branch June 26, 2026 05:40
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