Capture a step of a run and replay it on the laptop (#340) #343
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/replay-340"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For #340; the issue closes once a production capture is replayed on the laptop.
GET /api/steps/{id}/capsulereturns one attempt as a tar.gz: the entry checkpoint as a git bundle, the run's fields and frozen settings (no key files or addresses), the models that served each tier, and the transcript.POST /api/runstakesreplay: {start_at, only, checkpoint, head, pin}. Admission cuts the graph withloader.from_step, which keeps the dependency steps before the step, and lays the checkpoint over the worktree atheadas uncommitted changes. On Free,pinkeeps each tier to the models that served the capture.tools/replay.sh capture|scripted|freeturns a capsule into a sim scenario.scriptedplays the captured turns;freeruns inside Braid's image, built from the checkout with Docker, against the real router; only the router's container gets the keys from~/api_keys, never printed. The first Free replay ran on the laptop: the model opened Safari and left servers behind, and its shell could reach any of my files. Also--times,--pin,--through.docs/testing.mdcovers replaying a step and closing an issue on evidence from the laptop;CLAUDE.mdandsim/README.mdpoint to it.Checked locally: a sim's Visual check, captured over the API (0.2 s), replayed scripted (8 s, passed) and on Free in the image (5.5 min including the image build: the judge on Qwen 397B drove the browser and looked through Gemini Flash-Lite; passed). Also fixed: Chromium aborted on a socket path over 107 bytes under a long stack folder, so replays run under
/tmp/braid-sim-replay-…../tools/test.shpasses, and the sims are 76/76../tools/test.shpasses.🤖 Generated with Claude Code
Checking a fix meant waiting on a production run that takes hours. One attempt of one step can now be captured and replayed locally in minutes. - GET /api/steps/{id}/capsule: the attempt's entry checkpoint as a git bundle, the run's fields and frozen settings (no key files or addresses), the models that served each tier, and its transcript. - POST /api/runs takes `replay: {start_at, only, checkpoint, head, pin}`: admission cuts the graph to start at the step (loader.from_step, which keeps the dependency steps before it) and lays the checkpoint over the worktree at head as uncommitted changes. On Free, `pin` keeps each tier to the models that served the capture. - tools/replay.sh capture|scripted|free: a capsule as a sim scenario; scripted plays the captured turns, free runs it through the real router with the keys from ~/api_keys (never printed). --times, --pin, --through. - docs/testing.md and CLAUDE.md: replaying a step, and closing an issue on evidence from the laptop instead of a production run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>