Skip to content

feat(transport,cli): --replay runs commands against a recorded trace - #21

Merged
JoeeDeveloper merged 2 commits into
mainfrom
feat/log-replay
Nov 24, 2026
Merged

JoeeDeveloper merged 2 commits into
mainfrom
feat/log-replay

Conversation

@JoeeDeveloper

Copy link
Copy Markdown
Owner

Summary

  • New TraceEcu transport: answers requests from a recorded trace by content (forward from the last match, then from the start), so a capture stands in for the module.
  • --replay FILE on every vehicle command (scan, dtc read, log, report, serve), for UDS, KW1281 (--slow-init) and KWP2000 (--fast-init).
  • Requests that were never recorded fail with an error naming them; nothing is guessed.
  • Replay is always read-only: dtc clear and adaptation set are refused before they plan a change or take a backup.
  • Docs in docs/replay.md.

Related to #7. Logging to CSV already existed for KW1281 and BMW; this adds the no-hardware replay side. The live-values dashboard in serve is a follow-up.

Not covered

  • BMW ENET/HSFZ (TCP, not this transport).
  • Values that change on a live car repeat their recorded value.
  • Replaying a simulator recording only proves the code agrees with itself.

Test plan

  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace
  • Record-then-replay gives identical output for scan and dtc read on UDS, KW1281 and KWP2000, and for a KW1281 live-data log
  • Repeated requests, unrecorded request error, write refusal and no backup file on refusal, flag conflicts

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xe1HmJJjhbWaBGaF6FKosA

TraceEcu answers requests from a recording by content, so scan, dtc read, log and serve run with no hardware. Unrecorded requests are an error naming them; replay is always read-only and refuses dtc clear and adaptation set before anything is planned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xe1HmJJjhbWaBGaF6FKosA
@JoeeDeveloper JoeeDeveloper added this to the Phase 3 - Read-only MVP milestone Nov 24, 2026
@JoeeDeveloper JoeeDeveloper added enhancement New feature or request area:transport Transport drivers and simulator area:cli Command line interface labels Nov 24, 2026
@JoeeDeveloper
JoeeDeveloper merged commit a04672e into main Nov 24, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Command line interface area:transport Transport drivers and simulator enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant