Skip to content

feat(m3.7): trace and replay (tron trace / tron replay)#34

Merged
ralyodio merged 1 commit into
mainfrom
worktree-m3.7-trace
Jul 4, 2026
Merged

feat(m3.7): trace and replay (tron trace / tron replay)#34
ralyodio merged 1 commit into
mainfrom
worktree-m3.7-trace

Conversation

@ralyodio

@ralyodio ralyodio commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Implements M3.7 — trace & replay (PRD §19). Base main.

tron trace start ./run.trontrace   # begin recording (path optional)
tron snapshot ; tron click @e3 ; tron fill @e4 "hi@x.com"
tron trace stop                    # finalize
tron replay ./run.trontrace        # replay recorded commands

What's here

  • browser-core/automation/trace.ts — the .trontrace bundle format: metadata.json, commands.jsonl (values redacted), snapshots/NNNN.json, errors.jsonl. Recording is cross-process via an active-trace pointer under the data dir (each tron command is its own process).
  • automate-clitrace (start/stop/status) and replay commands; snapshot/click/fill now append to the active trace with a fresh snapshot per command. Form values redacted by default (fill/type"[redacted]", valueRedacted: true).
  • replay re-runs clicks and non-redacted fills in order, skips redacted fills and snapshots, and stops at the first failing command with its seq.
  • install.sh routes tron trace / tron replay.

Acceptance criteria (PRD §22)

  • ✅ Traces include commands, snapshots, actions, and errors.
  • ✅ Sensitive values redacted by default.
  • ✅ Basic deterministic flows can be replayed.

Verification — +10 tests

  • Trace library (start/record/stop/read, redaction, errors, pointer) and the CLI trace/replay flow (record between start/stop, redaction persisted, status, replay clicks + skip redacted fills).
  • End-to-end via a WS CDP stub: recorded snapshot/click/fill → finalized bundle (3 commands, per-command snapshots) → replay re-ran the click and skipped the redacted fill.
  • Full workspace suite green in CI order from clean.

Scope

tron run --trace (M3.4) writes a simpler SDK trace. Network/console summaries (§19) need a persistent session listener and are a follow-up — the command/snapshot/error core is here. See docs/trace-replay.md.

🤖 Generated with Claude Code

Records automation commands into a .trontrace bundle and replays them (PRD §19).

  tron trace start [path]   tron trace stop   tron trace status
  tron replay <bundle>

- browser-core/automation/trace.ts: the bundle format — metadata.json,
  commands.jsonl (values redacted), snapshots/NNNN.json, errors.jsonl. Recording
  is cross-process via an active-trace pointer under the data dir.
- automate-cli: `trace` (start/stop/status) and `replay` commands; snapshot/
  click/fill now append to the active trace (a fresh snapshot per command).
  Form values are redacted by default (fill/type -> "[redacted]").
- replay re-runs clicks and non-redacted fills in order, skips redacted fills
  and snapshots, and stops at the first failing command with its seq.
- install.sh routes `tron trace` / `tron replay` to the automation runtime.

Tests (+10): the trace library (start/record/stop/read, redaction, errors) and
the CLI trace/replay flow (record between start/stop, redaction persisted,
status, replay clicks + skip redacted fills). Verified end-to-end via a WS CDP
stub: recorded snapshot/click/fill, finalized bundle with per-command snapshots,
replayed the click and skipped the redacted fill. Full workspace suite green.

Network/console summaries (§19) need a persistent listener and are a follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio ralyodio marked this pull request as ready for review July 4, 2026 17:30
@ralyodio ralyodio merged commit b6d5e98 into main Jul 4, 2026
6 checks passed
@ralyodio ralyodio deleted the worktree-m3.7-trace branch July 4, 2026 17:30
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