feat(m3.7): trace and replay (tron trace / tron replay)#34
Merged
Conversation
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>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements M3.7 — trace & replay (PRD §19). Base
main.What's here
browser-core/automation/trace.ts— the.trontracebundle 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 (eachtroncommand is its own process).automate-cli—trace(start/stop/status) andreplaycommands;snapshot/click/fillnow append to the active trace with a fresh snapshot per command. Form values redacted by default (fill/type→"[redacted]",valueRedacted: true).replayre-runs clicks and non-redacted fills in order, skips redacted fills and snapshots, and stops at the first failing command with itsseq.install.shroutestron trace/tron replay.Acceptance criteria (PRD §22)
Verification — +10 tests
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. Seedocs/trace-replay.md.🤖 Generated with Claude Code