kei-replay <dna> parses DNA, looks up ledger row, loads task.toml from worktree, re-runs compose_prompt, recomputes body hash, reports match/drift. kei-replay diff <dna-1> <dna-2> flags every changed facet between two DNAs. 6 cubes (main/lib/replay/diff/ledger_lookup), all ≤114 LOC. Direct SQLite access in ledger_lookup.rs (kei-ledger has no lib.rs). v4 schema-compatible (reads id/dna/worktree_path/spec_sha). Tests: 6/6 (≥4 required): happy path, missing DNA, drift detection, diff differing bodies, diff identical, explicit --task override. Workspace Cargo.toml: +kei-replay member. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
30 lines
673 B
TOML
30 lines
673 B
TOML
[package]
|
|
name = "kei-replay"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
description = "Reconstruct agent spawn from DNA — reads ledger row + task.toml, re-composes, detects drift"
|
|
|
|
[[bin]]
|
|
name = "kei-replay"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "kei_replay"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
kei-agent-runtime = { path = "../kei-agent-runtime" }
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
clap = { workspace = true }
|
|
anyhow = "1"
|
|
thiserror = "1"
|
|
sha2 = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
toml = "0.8"
|
|
|
|
[package.metadata.keisei]
|
|
backend = "none"
|
|
description = "Reconstruct agent spawn from DNA — replay / verify / diff"
|