Lesson 05
Every sealed entry stores seq, txId, stepId, prevEntrySha256, agentReasoningHash, toolName, sanitizedInput, the pre and post state pointers, compensationStatus, state, and entryHash. The hash is SHA-256 of the canonical body. The first previous hash is 64 zero characters. The raw reasoning text is never stored, only its hash.
Values whose keys match password, secret, token, authorization, api key, ssn, card, cvv, or credential are replaced with [REDACTED] before the entry is sealed.
MATCH — the anchor equals the tip of a valid chain.HEALED — the anchor is a prefix, or a non-empty chain has no anchor yet. That is the crash window between the frame fsync and the anchor write. Recovery writes the anchor forward.AtpLedgerTampered.java -jar mcp-tx-proxy/target/tx-engine.jar replay \ --tx cli-tx --wal-dir ./data --sandbox --up-to-step 3
--sandbox is mandatory. Without it the command refuses, because live replay is not permitted. --up-to-step is 1-based. Zero means the whole transaction. A positive limit stops before compensation entries and before steps past the cutoff. Replay checks that each recorded state edge is legal. It does not call tools. An illegal edge is AtpReplayDivergence (−31806).
The harness runs one plan under HTTP 500, HTTP 429, a timeout before the handler, a timeout after the handler, and a missing-argument hallucination.
java -jar mcp-tx-proxy/target/tx-engine.jar chaos --out chaos-bench/out/results.csv
Columns are mode,fault,step,recovered,orphaned,mttr_nanos,final_state. The engine column is a real saga. The other column is a simulated executor that does not compensate, so the CSV can compare orphan rates. It is not a second live agent. A 500 rolls back with no orphan. A single 429 or timeout is retried, because forwardRetries is 2 and the fault fires once, and the plan can still commit.