Files
deepseek-harness/packages/ui/acp/snapshot-replay.md
T
2026-07-06 00:52:06 +08:00

1.2 KiB

ACP Snapshot Replay

This graph explains what a snapshot scenario proves: recorded real-model session logs are replayed keylessly, ACP stdout is normalized and diffed, and scenario workspaces preserve tool side effects that the UI stream alone cannot prove.

sequenceDiagram
  participant Recorder as Real API recording
  participant Fixture as snapshot fixture
  participant Workspace
  participant Replay as llm-replay adapter
  participant ACP as acp-agent subprocess
  participant Golden as stdout golden
  Recorder->>Fixture: session.jsonl + workspace inputs
  Fixture->>Workspace: seed files and hook configs
  Fixture->>Replay: recorded StreamChunk script
  Replay->>ACP: deterministic <code>llm/stream</code> chunks
  ACP->>Workspace: bash, fs, and hook side effects
  ACP->>Golden: normalized sessionUpdate stream
  Golden-->>ACP: diff must be empty

The fs and hook snapshot matrix is valuable because it proves world state, hook decisions, and failed tool-card rendering, not just that replay returns text.

Maintenance mode: curated Mermaid sequence based on the snapshot test harness.