ledger-runtime 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.gitignore +14 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/.gitignore +9 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/045c5b8bfa9d08b0 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/130939a9b290eb86 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/17b2a42bc250703b +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/19385964bfa00342 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/1b6b46edf347bee7 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/22f98938f097890d +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/2380c842448c9036 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/27252550bb8a62a8 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/291257dbbaf400e6 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/2f06915db8ed3eb2 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/3931e14293312db1 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/3af856d166056b90 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/3d063b1e7823d7f2 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/3e142e006ebb3948 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/401dbd2c404808f7 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/44090d43c892b4c2 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/4b487e90d56e9088 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/4f091398077f795e +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/4ffe52adfa67f0ea +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/511db4de49646ddf +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/5ce938862c7fe8cc +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/67d2875016b4f708 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/760c48f5d9521e29 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/7e57f3fa33af8c82 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/a7247ddfeb2d7758 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/a727a8d7f3bba19b +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/a92f3099a724f797 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/aac6c6592b34c5c1 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/ac6bc0789867706f +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/ad6fc6960bf2717d +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/ade9dc7043c6fa85 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/b17129c9c3a6ebe0 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/c598dc0618bc79a2 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/cd6aa50ed3310212 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/da39a3ee5e6b4b0d +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/dc4ae0495cd11fad +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/ddfd69265590ac13 +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/e05bfe74da9fb60a +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/e13fe2ce8861833c +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.hypothesis/constants/e5e2ed0cb117619a +4 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/.python-version +1 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/Ledger Detailed Build Plan.md +275 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/README.md +530 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/blame_eval.py +655 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/overhead.py +198 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/replay_fidelity.py +521 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/blame-noisy.json +372 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/blame-orders.json +180 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/blame.json +593 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/overhead.json +95 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/replay_fidelity.json +5479 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/who_and_when-ground-truth.json +1786 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/results/who_and_when.json +1786 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/bench/who_and_when.py +458 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/chaos/__init__.py +1 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/chaos/docker-compose.yml +51 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/chaos/harness.py +446 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/chaos/invariants.py +116 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/chaos/results/docker.json +99 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/chaos/worker.py +198 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/deploy/Dockerfile +17 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/deploy/docker-compose.yml +76 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/examples/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/examples/order_pipeline.py +213 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/examples/refund_agent.py +295 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/examples/toy_pipeline.py +218 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/__init__.py +81 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/__main__.py +7 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/_proto/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/_proto/events_pb2.py +65 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/_proto/events_pb2.pyi +216 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/blame/__init__.py +22 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/blame/budget.py +88 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/blame/delta.py +335 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/cli.py +474 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/blobs.py +108 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/clock.py +96 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/events.py +88 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/normalize.py +111 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/session.py +280 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/core/store.py +246 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/effects/__init__.py +7 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/effects/idempotency.py +26 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/effects/manager.py +410 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/effects/saga.py +129 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/intercept/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/intercept/_common.py +171 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/intercept/langgraph.py +98 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/intercept/llm.py +160 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/intercept/tools.py +119 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/engine.py +612 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/fork.py +185 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/resume.py +135 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/__init__.py +0 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/fake_llm.py +173 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/fake_stripe.py +355 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/faults.py +137 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/proto/events.proto +220 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/pyproject.toml +40 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/scripts/gen_proto.sh +11 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/cli_targets.py +41 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/conftest.py +96 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_bench.py +127 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_blame.py +216 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_blobs.py +123 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_chaos.py +138 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_cli.py +238 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_clock.py +92 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_divergence.py +293 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_effects.py +244 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_events.py +22 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_faults.py +94 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_fork.py +200 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_normalize.py +138 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_order_pipeline.py +156 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_properties.py +352 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_refund_agent.py +280 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_replay_errors.py +212 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_replay_gate.py +70 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_resume.py +166 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_saga.py +238 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_store.py +103 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/tests/test_who_and_when.py +227 -0
- ledger_runtime-0.0.1/.claude/worktrees/wonderful-lamport-67e018/uv.lock +1313 -0
- ledger_runtime-0.0.1/.gitignore +14 -0
- ledger_runtime-0.0.1/.hypothesis/.gitignore +9 -0
- ledger_runtime-0.0.1/.hypothesis/constants/0185cac035cddd4d +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/0228fc9934d76b0d +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/09fae91c837e01e1 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/0bc38c157f8b1ab2 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/0e93a103d9480c61 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/130939a9b290eb86 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/1469e5c186b048ff +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/17b2a42bc250703b +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/19385964bfa00342 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/19574acb8a4bda15 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/19e6e7dfc7e8a83a +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/1a847c6402823065 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/1b6b46edf347bee7 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/1fa24c7c87ee2db7 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/201637da9828eb0a +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/21592a75dea6b2a9 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/22f98938f097890d +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/2380c842448c9036 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/27252550bb8a62a8 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/285bd0a0a7e446fe +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/2f06915db8ed3eb2 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/2fd6f811ed8b0166 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/314513863a50fcb6 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/31aaf9a8248d12d7 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3308d07cf4effca9 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3351e9ffaa8738af +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/33a2e5f34e2a43c6 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3931e14293312db1 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3aa90232b333d864 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3af856d166056b90 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3d063b1e7823d7f2 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/3e142e006ebb3948 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/401dbd2c404808f7 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/41dc289cc13e536f +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/4272d38a1b0fa7f8 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/44090d43c892b4c2 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/442d88be1e6320ce +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/454d5e189ea4b3ef +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/4b487e90d56e9088 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/4dc8f1726e62a3e6 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/4f091398077f795e +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/4ffe52adfa67f0ea +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/511db4de49646ddf +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/5642cba7da4a4d17 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/59330c9fc4cc8dab +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/5c0216a346a038ee +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/5caccceede1da864 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/5ce938862c7fe8cc +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/67d2875016b4f708 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/69dd9948fec9d22c +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/73adf601573bc084 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/760c48f5d9521e29 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/79495d8cfa7d317d +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/79c58af6502480da +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/7ca60b3facd00884 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/7e57f3fa33af8c82 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/82acecd05019d4e5 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/8445e286e0dfa324 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/8b67fbae5fa5a627 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/8f26d89b3e6f8c07 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/90d4bf40aee405ae +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/945e56a79d106c2f +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/95dd72eb32b5aa34 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/98e8bf067b2165b0 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/9c2c1512f9229d81 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/a7247ddfeb2d7758 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/a727a8d7f3bba19b +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/aac6c6592b34c5c1 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/ac6bc0789867706f +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/ad6fc6960bf2717d +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/ade9dc7043c6fa85 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/b17129c9c3a6ebe0 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/b50c4f0e5749847b +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/b98733d9312634ed +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/b9a6a79f608b8956 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/bdf16814a3849299 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/bec8509feb3d6d8b +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/c10b8a4e96c6c580 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/c22674fd2da1f3f8 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/c458487dd2f0d33b +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/c598dc0618bc79a2 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/c64e0d8ae8aae3ab +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/cd6aa50ed3310212 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/d0ea2b238e44f346 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/d1bcb22aea94fdfe +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/d1f2d9e44d03166a +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/d6d6a92fe17b1b57 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/da39a3ee5e6b4b0d +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/dc4ae0495cd11fad +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/ddfd69265590ac13 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/df31bc1440122207 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e05bfe74da9fb60a +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e13fe2ce8861833c +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e2b70044483a337e +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e5e2ed0cb117619a +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e624452fe7f28dc2 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e65c209fc5421984 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e9373ee2fe907025 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/e9def3bbf66d05ad +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/edf80d5ddbd488cd +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/ee8567900e72abea +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/f36dd4bec2b80689 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/f46e03c6362ba686 +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/f5870c8d157252ce +4 -0
- ledger_runtime-0.0.1/.hypothesis/constants/f98eb9b0eb40b834 +4 -0
- ledger_runtime-0.0.1/.python-version +1 -0
- ledger_runtime-0.0.1/Ledger Detailed Build Plan.md +275 -0
- ledger_runtime-0.0.1/PKG-INFO +540 -0
- ledger_runtime-0.0.1/README.md +530 -0
- ledger_runtime-0.0.1/bench/__init__.py +0 -0
- ledger_runtime-0.0.1/bench/blame_eval.py +647 -0
- ledger_runtime-0.0.1/bench/overhead.py +198 -0
- ledger_runtime-0.0.1/bench/replay_fidelity.py +521 -0
- ledger_runtime-0.0.1/bench/results/blame-noisy.json +372 -0
- ledger_runtime-0.0.1/bench/results/blame-orders.json +180 -0
- ledger_runtime-0.0.1/bench/results/blame.json +593 -0
- ledger_runtime-0.0.1/bench/results/overhead.json +95 -0
- ledger_runtime-0.0.1/bench/results/replay_fidelity.json +5479 -0
- ledger_runtime-0.0.1/bench/results/who_and_when-ground-truth.json +1786 -0
- ledger_runtime-0.0.1/bench/results/who_and_when.json +1786 -0
- ledger_runtime-0.0.1/bench/who_and_when.py +458 -0
- ledger_runtime-0.0.1/chaos/__init__.py +1 -0
- ledger_runtime-0.0.1/chaos/docker-compose.yml +51 -0
- ledger_runtime-0.0.1/chaos/harness.py +446 -0
- ledger_runtime-0.0.1/chaos/invariants.py +116 -0
- ledger_runtime-0.0.1/chaos/results/docker.json +99 -0
- ledger_runtime-0.0.1/chaos/worker.py +198 -0
- ledger_runtime-0.0.1/deploy/Dockerfile +17 -0
- ledger_runtime-0.0.1/deploy/docker-compose.yml +76 -0
- ledger_runtime-0.0.1/examples/__init__.py +0 -0
- ledger_runtime-0.0.1/examples/order_pipeline.py +213 -0
- ledger_runtime-0.0.1/examples/refund_agent.py +295 -0
- ledger_runtime-0.0.1/examples/toy_pipeline.py +218 -0
- ledger_runtime-0.0.1/ledger/__init__.py +81 -0
- ledger_runtime-0.0.1/ledger/__main__.py +7 -0
- ledger_runtime-0.0.1/ledger/_proto/__init__.py +0 -0
- ledger_runtime-0.0.1/ledger/_proto/events_pb2.py +65 -0
- ledger_runtime-0.0.1/ledger/_proto/events_pb2.pyi +216 -0
- ledger_runtime-0.0.1/ledger/blame/__init__.py +22 -0
- ledger_runtime-0.0.1/ledger/blame/budget.py +88 -0
- ledger_runtime-0.0.1/ledger/blame/delta.py +335 -0
- ledger_runtime-0.0.1/ledger/cli.py +474 -0
- ledger_runtime-0.0.1/ledger/core/__init__.py +0 -0
- ledger_runtime-0.0.1/ledger/core/blobs.py +108 -0
- ledger_runtime-0.0.1/ledger/core/clock.py +96 -0
- ledger_runtime-0.0.1/ledger/core/events.py +88 -0
- ledger_runtime-0.0.1/ledger/core/normalize.py +111 -0
- ledger_runtime-0.0.1/ledger/core/session.py +280 -0
- ledger_runtime-0.0.1/ledger/core/store.py +246 -0
- ledger_runtime-0.0.1/ledger/effects/__init__.py +7 -0
- ledger_runtime-0.0.1/ledger/effects/idempotency.py +26 -0
- ledger_runtime-0.0.1/ledger/effects/manager.py +410 -0
- ledger_runtime-0.0.1/ledger/effects/saga.py +129 -0
- ledger_runtime-0.0.1/ledger/intercept/__init__.py +0 -0
- ledger_runtime-0.0.1/ledger/intercept/_common.py +171 -0
- ledger_runtime-0.0.1/ledger/intercept/langgraph.py +98 -0
- ledger_runtime-0.0.1/ledger/intercept/llm.py +160 -0
- ledger_runtime-0.0.1/ledger/intercept/tools.py +119 -0
- ledger_runtime-0.0.1/ledger/replay/__init__.py +0 -0
- ledger_runtime-0.0.1/ledger/replay/engine.py +612 -0
- ledger_runtime-0.0.1/ledger/replay/fork.py +185 -0
- ledger_runtime-0.0.1/ledger/replay/resume.py +135 -0
- ledger_runtime-0.0.1/ledger/testing/__init__.py +0 -0
- ledger_runtime-0.0.1/ledger/testing/fake_llm.py +173 -0
- ledger_runtime-0.0.1/ledger/testing/fake_stripe.py +355 -0
- ledger_runtime-0.0.1/ledger/testing/faults.py +137 -0
- ledger_runtime-0.0.1/proto/events.proto +220 -0
- ledger_runtime-0.0.1/pyproject.toml +40 -0
- ledger_runtime-0.0.1/scripts/gen_proto.sh +11 -0
- ledger_runtime-0.0.1/tests/cli_targets.py +41 -0
- ledger_runtime-0.0.1/tests/conftest.py +96 -0
- ledger_runtime-0.0.1/tests/test_bench.py +127 -0
- ledger_runtime-0.0.1/tests/test_blame.py +216 -0
- ledger_runtime-0.0.1/tests/test_blobs.py +123 -0
- ledger_runtime-0.0.1/tests/test_chaos.py +138 -0
- ledger_runtime-0.0.1/tests/test_cli.py +238 -0
- ledger_runtime-0.0.1/tests/test_clock.py +92 -0
- ledger_runtime-0.0.1/tests/test_divergence.py +293 -0
- ledger_runtime-0.0.1/tests/test_effects.py +244 -0
- ledger_runtime-0.0.1/tests/test_events.py +22 -0
- ledger_runtime-0.0.1/tests/test_faults.py +94 -0
- ledger_runtime-0.0.1/tests/test_fork.py +200 -0
- ledger_runtime-0.0.1/tests/test_normalize.py +138 -0
- ledger_runtime-0.0.1/tests/test_order_pipeline.py +148 -0
- ledger_runtime-0.0.1/tests/test_properties.py +352 -0
- ledger_runtime-0.0.1/tests/test_refund_agent.py +280 -0
- ledger_runtime-0.0.1/tests/test_replay_errors.py +212 -0
- ledger_runtime-0.0.1/tests/test_replay_gate.py +70 -0
- ledger_runtime-0.0.1/tests/test_resume.py +166 -0
- ledger_runtime-0.0.1/tests/test_saga.py +238 -0
- ledger_runtime-0.0.1/tests/test_store.py +103 -0
- ledger_runtime-0.0.1/tests/test_who_and_when.py +227 -0
- ledger_runtime-0.0.1/uv.lock +1313 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# This .gitignore file was automatically created by Hypothesis. Hypothesis gitignores
|
|
2
|
+
# .hypothesis by default, because we generally recommend that .hypothesis not be checked
|
|
3
|
+
# into version control.
|
|
4
|
+
#
|
|
5
|
+
# If you *would* like to check .hypothesis into version control, you should delete this
|
|
6
|
+
# file. Hypothesis will not re-create this .gitignore unless .hypothesis is deleted (and
|
|
7
|
+
# if it does, that's a bug - please report it!)
|
|
8
|
+
|
|
9
|
+
*
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/bench/blame_eval.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.5, 100, 200, 400, 3000, ' BAD', '\'"', ',', ', ', '-', '--base-url', '--flake', '--judge-base-url', '--judge-model', '--judge-price', '--judge-temperature', '--max-dollars', '--max-forks', '--methods', '--model', '--out', '--price', '--reasoning-effort', '--recur', '--repeats', '--runs', '--seed', '--store', '--threshold', '--workers', '--workloads', '.env', '=', 'BAD', 'CORRUPT', 'CORRUPT ', 'IN', 'LEDGER_JUDGE_API_KEY', 'OPENAI_API_KEY', 'OUT', '\\{.*\\}', '__main__', 'agent', 'agent_accuracy', 'attempted', 'bench', 'bench.blame_eval', 'benchmark', 'blame', 'blame.json', 'budget', 'budget per diagnosis', 'chain-', 'choices', 'ci95', 'clean_failed', 'client', 'content', 'date', 'dollars', 'done', 'draft', 'fake', 'fake-model', 'fault_masked', 'faulted', 'flake', 'forks', 'judge', 'ledger', 'ledger-blame-', 'ledger.db', 'live', 'live_calls', 'llm_call', 'low', 'machine', 'max_dollars', 'mean', 'message', 'messages', 'methods', 'model', 'node', 'noise', 'none', 'notes', 'options', 'orders', 'plan', 'platform', 'pricing', 'python', 'random', 'rate', 'reasoning_effort', 'record', 'recur', 'repeats', 'reply', 'request', 'results', 'role', 'run_started', 'runs', 'scan', 'seconds', 'seed', 'skipped', 'stage', 'status', 'step', 'step_accuracy', 'temperature', 'threshold', 'tool_call', 'topic', 'total', 'toy', 'trail', 'trial', 'trials', 'trials run at once', 'user', 'value', 'wall_s', 'workers', 'workloads']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/resume.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['RunAlreadyFinished', 'builtins.SystemExit', 'effect', 'error', 'ok', 'pending_effects', 'resumable_runs', 'resume', 'run_finished', 'run_resumed', 'run_started', 'run_status', 'unfinished']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/bench/overhead.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[1000, 1024, '-', '--data', '--latency-ms', '--out', '--runs', '--warmup', '__main__', 'added', 'bench', 'bench.overhead', 'benchmark', 'calls', 'calls_per_run', 'date', 'events', 'events_per_run', 'fake', 'fake-model', 'latency_ms', 'ledger-overhead-', 'ledger.db', 'log_kb', 'machine', 'ms', 'not_identical', 'off', 'overhead', 'overhead.json', 'p50', 'p95', 'per_call_ms', 'per_step_ms', 'platform', 'processor', 'python', 'record', 'replay', 'results', 'run_ms', 'runs', 'seconds', 'steps_per_run', 'summary', 'timed runs per mode', 'topic', 'warmup']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/_proto/events_pb2.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[148, 150, 189, 191, 263, 265, 381, 383, 454, 456, 538, 541, 751, 754, 919, 921, 980, 983, 1259, 1347, 1349, 1452, 1455, 1943, 1945, 2022, 2025, 2251, '_DIVERGED', '_DIVERGENCEREASON', '_EFFECTCALL', '_EFFECTCALL_PHASE', '_ERROR', '_EVENT', '_LLMCALL', '_MODE', '_NONDET', '_PAYLOAD', '_RUNFINISHED', '_RUNRESUMED', '_RUNSTARTED', '_STEPREF', '_TOOLCALL', 'events.proto', 'events_pb2']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/__init__.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['0.0.1', 'Diagnosis', 'DivergencePoint', 'DivergenceReason', 'EXACT', 'EffectInDoubt', 'EventStore', 'LiveEffectRefused', 'Mode', 'Normalizer', 'RERUN', 'ReplayDivergence', 'ReplayMismatch', 'ReplayedError', 'RunAlreadyFinished', 'RunNotFailed', 'SagaIncomplete', 'Session', 'StepInfo', 'current_session', 'diagnose', 'effect', 'fork', 'instrument', 'now', 'record', 'replay', 'resumable_runs', 'resume', 'rng', 'steps', 'time', 'tool', 'uuid4', 'wrap']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/core/events.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[',', ':', '__bytes_hex__', '__dataclass_fields__', 'body', 'body_kind', 'canonical_json', 'json', 'load_payload', 'make_error', 'make_payload', 'model_dump', 'new_event', 'pb', 'utf-8']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/core/session.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['(', ')', ',', ':', 'F', 'Mode', 'Session', 'SessionStats', 'T', '__root__', 'current_session', 'fork', 'langgraph_node', 'langgraph_path', 'langgraph_step', 'ledger_session', 'llm_call', 'metadata', 'new_run_id', 'nondet', 'record', 'replay', 'resume', 'task_coordinates', '|']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/effects/manager.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.25, 0.5, 1.0, 1000, 'Compensation', 'EffectInDoubt', 'F', 'LiveEffectRefused', 'Policy', 'args', 'compensate', 'effect', 'idempotency_key', 'kwargs', 'reconcile', 'undoes', 'unreachable']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/core/normalize.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['<timestamp>', '<uuid>', 'DEFAULT', 'EXACT', 'LLM_DEFAULT', 'Normalizer', 'TIMESTAMP', 'UUID', 'UUID4_HEX', 'extra_headers', 'timeout']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/examples/order_pipeline.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.04, 0.05, 0.06, 0.0625, 0.065, 0.0725, 1.15, 1.6, 4.75, 7.3, 9.99, 12.5, 15.4, 18.25, 38.0, 64.0, 100, ' (total $0.01)', ' and ', ',', ', ', '.', '0.01', 'California', 'Can I get', 'Florida', 'New York', 'Oregon', 'SAVE10', 'SAVE20', 'Texas', 'WELCOME5', 'Washington', '\\d+(?:\\.\\d+)?', '\\{.*\\}', 'accountant', 'backpack', 'blue mug', 'choices', 'code', 'content', 'coupon', 'desk lamp', 'error', 'intake', 'item', 'items', 'lookup_price', 'low', 'name', 'not in the catalog', 'notebook', 'order', 'pen set', 'percent_off', 'phone stand', 'pricing', 'qty', 'rate', 'reasoning_effort', 'reply', 'request', 'role', 'state', 'subtotal', 'tax', 'tax_rate', 'total', 'unit_price', 'user', 'water bottle', 'wool socks', 'writer']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/faults.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['Fault', 'choices', 'content', 'inject', 'kind', 'llm_call', 'message', 'node', 'nondet', 'replace_text', 'seq', 'step', 'superstep', 'tool_call']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/examples/refund_agent.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.05, 0.3, 100, 4200, 50000, '\'"', '.env', '=', 'LEDGER_MODEL', 'OPENAI_API_KEY', 'OPENAI_BASE_URL', 'POST', 'STRIPE_API_BASE', 'STRIPE_SECRET_KEY', 'T-1001', '__main__', 'amount', 'amount_refunded', 'api', 'base_addresses', 'charge', 'charge_id', 'content', 'decide', 'decision', 'duplicate', 'export ', 'fake', 'fake-model', 'fraudulent', 'id', 'idempotency_key', 'ledger_key', 'limit', 'lookup', 'max_network_retries', 'message', 'metadata', 'reason', 'refund', 'refund_claim', 'reply', 'rk_test_', 'role', 'sk_test_', 'sk_test_fake', 'status', 'stripe.charges.claim', 'succeeded', 'system', 'ticket_id', 'user', 'why', 'within policy']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/fake_stripe.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[b'{}', 200, 400, 401, 404, 500, 5000, 12111, '*', '--host', '--port', '--verbose', '-v', '/', '/_charges', '/_faults', '/_state', '/healthz', '/v1/charges/', '/v1/refunds', '127.0.0.1', 'Authorization', 'Bearer sk_test_', 'Content-Length', 'Content-Type', 'FakeStripeServer', 'HTTP/1.1', 'Idempotency-Key', 'Idempotent-Replayed', 'No such charge', 'Request-Id', '[', ']', '__main__', 'amount', 'amount_refunded', 'amount_too_large', 'api_error', 'application/json', 'charge', 'charges', 'code', 'count', 'created', 'created_seq', 'currency', 'data', 'drop_after', 'drop_before', 'error', 'error_500', 'faults_pending', 'has_more', 'id', 'idempotency_error', 'list', 'main', 'message', 'metadata', 'mode', 'object', 'ok', 'param', 'path', 'reason', 'refund', 'refunded', 'refunds', 'requests', 'resource_missing', 'status', 'store_true', 'succeeded', 'true', 'type', 'url', 'usd']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/blame/delta.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.5, ', ', 'CANDIDATE_KINDS', 'Counterfactual', 'Diagnosis', 'RunNotFailed', 'budget', 'diagnose', 'found', 'inconsistent', 'invoke', 'live', 'llm_call', 'no step', 'no_step', 'nondet', 'only ', 'output', 'run_finished', 'run_started', 'tool_call']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/core/store.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[4096, '.blobs', ':memory:', 'BEGIN IMMEDIATE', 'COMMIT', 'LEDGER_DB', 'ROLLBACK', 'args', 'effect', 'input', 'ledger.db', 'llm_call', 'nondet', 'output', 'request', 'response', 'result', 'run_finished', 'run_started', 'step', 'tool_call', 'value', '\U0010ffff']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/chaos/harness.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.03, 0.1, 0.5, 0.95, 1.5, 4.0, 200, 500, 40000, 60000, 90000, 100000, '"resumed"', '-', '--build', '--data', '--fault-rate', '--keep', '--kill-after', '--max-restarts', '--mode', '--name', '--out', '--runs', '--seed', '--system', '--toxicity', '--wait', '-d', '-f', '-m', '-p', '-v', '.work', '/v1/charges/*', '/v1/refunds', '0.0.0.0:22220', 'Content-Type', 'DELETE', 'GET', 'MAX', 'MIN', 'OPENAI_API_KEY', 'OPENAI_BASE_URL', 'POST', 'STRIPE_API_BASE', 'STRIPE_SECRET_KEY', '__main__', 'amount', 'application/json', 'args', 'attributes', 'benchmark', 'both', 'chaos', 'chaos.harness', 'chaos.worker', 'charge_id', 'compose', 'count', 'date', 'docker', 'docker-compose.yml', 'down', 'downstream', 'drop_after', 'drop_before', 'enabled', 'error_500', 'exactly_once_chaos', 'examples', 'fake', 'fakellm', 'fakestripe', 'fakestripe:12111', 'false', 'faults_pending', 'id', 'inf', 'inspect', 'kill', 'langgraph', 'ledger', 'ledger-chaos', 'ledger.db', 'listen', 'local', 'max', 'mean', 'message', 'mode', 'name', 'ok', 'out', 'p50', 'p95', 'path', 'phantom', 'python', 'reason', 'results', 'resume_seconds', 'resumes', 'rm', 'run', 'seconds', 'sessions', 'start', 'stop', 'store_true', 'stream', 'stripe', 'systems', 't', 'ticket_id', 'tickets per system', 'tickets.json', 'timeout', 'toxicity', 'toxiproxy', 'type', 'unfinished', 'unlogged', 'up', 'upstream', 'worker']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/chaos/worker.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['--data', '--passes', '--system', '.tmp', '__main__', 'a', 'builtins.SystemExit', 'chaos.worker', 'configurable', 'done', 'event', 'langgraph', 'langgraph.db', 'ledger', 'ledger.db', 'ok', 'pid', 'resumed', 'since_start', 'start', 'sync', 't', 'thread_id', 'ticket_id', 'tickets.json', 'unfinished']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/bench/blame_eval.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.5, 100, 200, 400, 3000, ' BAD', '\'"', ',', ', ', '-', '--base-url', '--flake', '--judge-base-url', '--judge-model', '--judge-price', '--judge-temperature', '--max-dollars', '--max-forks', '--methods', '--model', '--out', '--price', '--reasoning-effort', '--recur', '--repeats', '--runs', '--seed', '--store', '--threshold', '--workers', '--workloads', '.env', '=', 'BAD', 'CORRUPT', 'CORRUPT ', 'IN', 'LEDGER_JUDGE_API_KEY', 'OPENAI_API_KEY', 'OUT', '\\{.*\\}', '__main__', 'agent', 'agent_accuracy', 'attempted', 'bench', 'bench.blame_eval', 'benchmark', 'blame', 'blame.json', 'budget', 'budget per diagnosis', 'chain-', 'choices', 'ci95', 'clean_failed', 'client', 'content', 'date', 'dollars', 'done', 'draft', 'fake', 'fake-model', 'fault_masked', 'faulted', 'flake', 'forks', 'judge', 'ledger', 'ledger-blame-', 'ledger.db', 'live', 'live_calls', 'llm_call', 'low', 'machine', 'max_dollars', 'mean', 'message', 'messages', 'methods', 'model', 'node', 'noise', 'none', 'notes', 'options', 'orders', 'plan', 'platform', 'pricing', 'python', 'random', 'rate', 'reasoning_effort', 'record', 'recur', 'repeats', 'reply', 'request', 'results', 'role', 'run_started', 'runs', 'scan', 'seconds', 'seed', 'skipped', 'stage', 'status', 'step', 'step_accuracy', 'temperature', 'threshold', 'tool_call', 'topic', 'total', 'toy', 'trail', 'trial', 'trials', 'trials run at once', 'user', 'value', 'wall_s', 'workers', 'workloads']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/intercept/_common.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[1000, 'GO_LIVE', 'args', 'args_key', 'effect', 'error', 'llm_call', 'nondet', 'request', 'request_key', 'response', 'result', 'tool_call', 'value']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/fork.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['RERUN', 'Step', 'StepInfo', 'choices', 'content', 'effect', 'error', 'fork', 'in doubt', 'llm_call', 'message', 'nondet', 'raise', 'steps', 'tool_call', '…']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/blame/budget.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[1.0, 1.96, 1000000.0, 'Budget', 'OutOfBudget', 'Pricing', 'Spend', 'completion_tokens', 'error', 'llm_call', 'prompt_tokens', 'usage', 'wilson']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/testing/fake_llm.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[b'{}', 200, 400, 404, 1000, 8787, '--host', '--max-latency-ms', '--min-latency-ms', '--port', '--verbose', '-v', '/healthz', '/stats', '/tools/search', '/v1/chat/completions', '127.0.0.1', 'Content-Length', 'Content-Type', 'FakeLLMServer', '__main__', 'application/json', 'assistant', 'chat', 'chat.completion', 'choices', 'completion_tokens', 'content', 'created', 'error', 'fake-model', 'finish_reason', 'id', 'index', 'main', 'message', 'messages', 'model', 'not found', 'object', 'ok', 'prompt_tokens', 'q', 'query', 'results', 'role', 'search', 'stop', 'store_true', 'stream', 'total_tokens', 'usage']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/bench/who_and_when.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[300, '*.json', ',', '--data', '--judge-base-url', '--judge-model', '--judge-price', '--judge-temperature', '--limit', '--max-chars', '--max-dollars', '--methods', '--out', '--subset', '--with-ground-truth', '..', '.json', 'Algorithm-Generated', 'Hand-Crafted', 'IN', 'OUT', 'README.md', 'REVISION', 'Who&When/', '[^0-9a-z]', '\\s*\\(.*\\)\\s*$', '\\{.*\\}', '__main__', 'agent', 'agent_accuracy', 'agents_per_log', 'algorithm-generated', 'all', 'answers', 'append', 'base_url', 'bench', 'bench.who_and_when', 'benchmark', 'cases', 'ci95', 'cmd', 'content', 'data', 'date', 'dollars', 'download', 'error', 'est_tokens_full_logs', 'file', 'ground_truth', 'groundtruth', 'hand-crafted', 'history', 'human', 'id', 'judge', 'max', 'max_chars', 'methods', 'min', 'mistake_agent', 'mistake_reason', 'mistake_step', 'model', 'name', 'none', 'p50', 'path', 'question', 'random', 'random,judge', 'rate', 'reasoning_effort', 'results', 'revision', 'role', 'run', 'seconds', 'stats', 'step', 'step_accuracy', 'steps', 'store_true', 'subset', 'temperature', 'tokens_in', 'tokens_out', 'truth', 'type', 'unanswered', 'user', 'wall_s', 'who_and_when', 'who_and_when.json', 'with_ground_truth']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/cli.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[' (from log)', '*', '-', '--all', '--db', '--edit', '--edit-json', '--graph', '--input', '--input-file', '--live', '--mode', '--node', '--rerun', '--runs', '--show-output', '-g', '.', ':', '=', '?', 'COMMAND', 'DIFF', 'LEDGER_GRAPH', 'OK ', 'RUN_ID', 'RunInfo', 'STEP', 'STEP=JSON', 'STEP=TEXT', '__main__', 'append', 'cmd', 'diverged', 'effect', 'fork', 'invoke', 'ledger', "list a run's calls", 'list_runs', 'live', 'llm_call', 'load_graph', 'main', 'nothing to resume', 'raise', 'record', 'replay', 'resume', 'run_id', 'run_ids', 'run_resumed', 'run_started', 'runs', 'steps', 'store_true', 'tool_call', 'utf-8']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/examples/toy_pipeline.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.7, '*', '--all', '--runs', '--topic', '; ', 'FAIL', 'LEDGER_MODEL', 'OK ', 'OPENAI_API_KEY', 'OPENAI_BASE_URL', 'TOOLS_URL', '__main__', 'brief', 'cmd', 'code', 'consistent hashing', 'content', 'delta debugging', 'detailed', 'docs', 'draft', 'fake', 'fake-model', 'fencing tokens', 'idempotency keys', 'list', 'list recorded runs', 'notes', 'plan', 'q', 'record', 'replay', 'results', 'role', 'run_ids', 'run_started', 'saga compensation', 'search', 'skeptical', 'store_true', 'topic', 'toy_pipeline', 'user', 'vector clocks', 'web', 'write', 'write-ahead logging']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/bench/replay_fidelity.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
[0.5, 0.95, 120, 200, 1000, 1024, ' at ', ' in ', '--data', '--fresh', '--out', '--require-offline', '--runs', '--seed', ':', ';', '; ', 'HOST:PORT', 'LEDGER_MODEL', 'OPENAI_API_KEY', 'OPENAI_BASE_URL', 'TOOLS_URL', '__main__', 'benchmark', 'cmd', 'configurable', 'date', 'error', 'failures', 'fake', 'fake-model', 'gate', 'http://', 'langgraph', 'langgraph.db', 'langgraph_network_on', 'langgraph_online', 'ledger', 'ledger-bench-', 'ledger.db', 'llm_call', 'max', 'mean', 'network', 'nondet', 'not checked', 'output differs', 'p50', 'p95', 'passed', 'platform', 'record', 'record langgraph', 'record ledger', 'record.json', 'record_seconds', 'replay', 'replay langgraph', 'replay ledger', 'replay_fidelity', 'replay_fidelity.json', 'replay_ms', 'response', 'result', 'results', 'run', 'runs', 'seconds', 'seed', 'step', 'storage_kb', 'store_true', 'summary', 'thread_id', 'tool_call', 'topic', 'topics', 'value', 'workload']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /Users/aman/Projects/Ledger/.claude/worktrees/wonderful-lamport-67e018/ledger/replay/engine.py
|
|
2
|
+
# hypothesis_version: 6.170.16
|
|
3
|
+
|
|
4
|
+
['.', 'DivergencePoint', 'DivergenceReason', 'RERUN', 'ReplayDivergence', 'ReplayIndex', 'ReplayMismatch', 'ReplayedError', '__ledger_replayed__', '__ledger_text__', '__module__', '__qualname__', '__str__', 'args', 'changed_kind', 'changed_request', 'choices', 'content', 'edited', 'effect', 'error', 'is_downstream', 'live', 'llm_call', 'message', 'nondet', 'output', 'raise', 'replay', 'replayed_exception', 'rerun', 'response', 'result', 'run_finished', 'run_started', 'skipped_call', 'tool_call', 'unrecorded_call', 'value']
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Ledger: Detailed Build Plan
|
|
2
|
+
|
|
3
|
+
Nov 11, 2026 · @Aman Sriven
|
|
4
|
+
|
|
5
|
+
Ledger is a Python runtime under LangGraph that makes agent runs replayable, crash-safe and self-diagnosing. At about 15 hours a week it is resume-worthy after roughly 5 weeks and complete after roughly 8. This plan expands the build plan into components, weekly tasks, gates and measurements.
|
|
6
|
+
|
|
7
|
+
## At a glance
|
|
8
|
+
|
|
9
|
+
[embedded content: Ledger phases by week · 6 phases, each with a gate\]
|
|
10
|
+
|
|
11
|
+
Replay and exactly-once effects fill weeks 1 to 5 and make the project resume-worthy. Blame and the launch take weeks 6 to 8, and the AWS stretch can start any time after M2.
|
|
12
|
+
|
|
13
|
+
## Goals
|
|
14
|
+
|
|
15
|
+
Ledger has to prove each guarantee with a number measured against the tool people would use today. The targets below are set; none has been measured yet.
|
|
16
|
+
|
|
17
|
+
| Guarantee | Metric | Target | Baseline |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| Deterministic replay | Recorded runs that replay identically with the network off | 100% of 200 runs | LangGraph's built-in checkpoint replay |
|
|
20
|
+
| Exactly-once effects | Duplicate and missing charges per 10,000 crash-injected runs | 0 | Stock LangGraph checkpointer with naive retry |
|
|
21
|
+
| Automatic blame | Agent-level and step-level attribution accuracy on injected faults | Beat the LLM-judge baseline | Random pick; LLM judge over the full trace; AgenTracer-8B if it runs |
|
|
22
|
+
| Overhead | Added latency per step at p50 and p95 | A few ms | The same run with Ledger off |
|
|
23
|
+
| Distributed exactly-once (stretch) | Duplicate and missing charges across 3 or more workers | 0 | Stock LangGraph with a shared Postgres checkpointer |
|
|
24
|
+
|
|
25
|
+
The project is resume-worthy once replay and exactly-once effects pass their gates (end of week 5). Blame and the launch come next because they make it stand out. The minimum version leaves out the UI, blame, speculation and multi-machine runs.
|
|
26
|
+
|
|
27
|
+
## Components
|
|
28
|
+
|
|
29
|
+
Every LLM call, tool call and source of randomness passes through one interceptor, and every other part is built on the log it writes. The LangGraph agent, the LLM APIs and Stripe stay unchanged; the parts below are what you build.
|
|
30
|
+
|
|
31
|
+
### Interceptor
|
|
32
|
+
|
|
33
|
+
Wraps the LLM client, tool functions, the clock and random, so the agent code does not change.
|
|
34
|
+
|
|
35
|
+
- In record mode it sends each call live and appends the request and response to the event log. In replay mode it answers from the log.
|
|
36
|
+
- All model calls go through one OpenAI-compatible client, so Nemotron on NVIDIA NIM or any other provider plugs in the same way.
|
|
37
|
+
- A two-line LangGraph integration hooks it into an existing graph.
|
|
38
|
+
- Repo: `ledger/intercept/` (`llm.py`, `tools.py`, `langgraph.py`). Built in M0.
|
|
39
|
+
|
|
40
|
+
### Event log
|
|
41
|
+
|
|
42
|
+
An append-only record of every call, input and output in each run.
|
|
43
|
+
|
|
44
|
+
- SQLite in WAL mode first, Postgres later. Large payloads live on disk as blobs keyed by SHA-256.
|
|
45
|
+
- Events are Protobuf schemas in `proto/events.proto`, shared by the runtime, the Go server and the UI.
|
|
46
|
+
- Crash-safe from day one: a write lands whole or not at all.
|
|
47
|
+
- Repo: `ledger/core/` (`events.py`, `store.py`). Built in M0, made content-addressed in M1.
|
|
48
|
+
|
|
49
|
+
### Nondeterminism shims
|
|
50
|
+
|
|
51
|
+
Context-scoped replacements for time, random and uuid, plus the recorded completion order of parallel branches.
|
|
52
|
+
|
|
53
|
+
- Every value read during record is logged and served back in the same order during replay.
|
|
54
|
+
- Parallel branches that finish in a different order produce different state, so their completion order is recorded and enforced.
|
|
55
|
+
- Repo: `ledger/core/clock.py`. Built in M1.
|
|
56
|
+
|
|
57
|
+
### Replay engine
|
|
58
|
+
|
|
59
|
+
Re-executes a recorded run step for step with zero live API calls.
|
|
60
|
+
|
|
61
|
+
- Requests are normalized before hashing (timestamps, ids, dict ordering), so the same request finds its log entry.
|
|
62
|
+
- It detects the first step where a call no longer matches the log and switches to live calls from there.
|
|
63
|
+
- Fork reuses that mechanism: start at any step with edited state, replay the prefix, run the rest live.
|
|
64
|
+
- Repo: `ledger/replay/` (`engine.py`, `fork.py`, `diverge.py`). Built in M1.
|
|
65
|
+
|
|
66
|
+
### Effect manager
|
|
67
|
+
|
|
68
|
+
Makes tool calls with side effects happen effectively once, even across crashes.
|
|
69
|
+
|
|
70
|
+
- Idempotency keys come from the run id and step id, so a retried Stripe call is a no-op.
|
|
71
|
+
- A write-ahead record marks each effect pending, then confirmed. On resume, pending effects are reconciled against the API.
|
|
72
|
+
- Saga compensation undoes earlier effects when a later step fails for good.
|
|
73
|
+
- The first class of tool is payments and refunds against Stripe in test mode.
|
|
74
|
+
- Repo: `ledger/effects/` (`manager.py`, `idempotency.py`, `saga.py`). Built in M2.
|
|
75
|
+
|
|
76
|
+
### Chaos harness
|
|
77
|
+
|
|
78
|
+
Attacks the whole runtime from outside with real failures, not simulated exceptions.
|
|
79
|
+
|
|
80
|
+
- Kills the worker container with `docker kill` at a random step, then restarts it.
|
|
81
|
+
- Uses Toxiproxy to drop, delay and duplicate network traffic.
|
|
82
|
+
- After each run, checks the invariants: the Stripe test-mode ledger matches the event log, with no duplicate or missing charges.
|
|
83
|
+
- Repo: `chaos/` (`harness.py`, `invariants.py`). Built in M2.
|
|
84
|
+
|
|
85
|
+
### Blame engine
|
|
86
|
+
|
|
87
|
+
Names the step that caused a failed run by rerunning counterfactual versions of it.
|
|
88
|
+
|
|
89
|
+
- Delta debugging over forked replays: change a step's output, rerun from there, and check whether the run now succeeds.
|
|
90
|
+
- Binary search over steps keeps reruns growing with the log of the step count. The recorded prefix is replayed, not paid for again.
|
|
91
|
+
- Each counterfactual runs several times and reports a success rate with a confidence interval.
|
|
92
|
+
- A budget caps reruns and dollars per diagnosis.
|
|
93
|
+
- Repo: `ledger/blame/` (`delta.py`, `budget.py`). Built in M3.
|
|
94
|
+
|
|
95
|
+
### Trace server and UI
|
|
96
|
+
|
|
97
|
+
A Go server streams events over Connect (gRPC) to a SvelteKit front end.
|
|
98
|
+
|
|
99
|
+
- Views: a live timeline, a run diff, and blame with the guilty step highlighted.
|
|
100
|
+
- Repo: `server/`, `ui/`, `proto/trace_service.proto`. Built in M4.
|
|
101
|
+
|
|
102
|
+
### CLI, containers and tests
|
|
103
|
+
|
|
104
|
+
- Three commands: `ledger record`, `ledger replay`, `ledger fork`.
|
|
105
|
+
- Docker Compose starts the worker, Go server, UI, Postgres and Toxiproxy with one command. Code-running tools get throwaway containers, so replays never touch the host.
|
|
106
|
+
- pytest plus Hypothesis property tests check the invariants.
|
|
107
|
+
- Repo: `ledger/cli.py`, `deploy/docker-compose.yml`.
|
|
108
|
+
|
|
109
|
+
## Phase plan
|
|
110
|
+
|
|
111
|
+
The five phases run about 8 weeks at roughly 15 hours a week, with multi-worker AWS chaos as a stretch phase. Don't start a phase until the gate before it holds.
|
|
112
|
+
|
|
113
|
+
### M0 · Spike (week 1)
|
|
114
|
+
|
|
115
|
+
Get one run recorded and replayed end to end, however crudely.
|
|
116
|
+
|
|
117
|
+
- [ ] Build a toy 5-node LangGraph pipeline with a parallel fan-out, so ordering problems show up from the start
|
|
118
|
+
- [ ] Write the first Protobuf event types (LLM call, tool call) in `proto/events.proto`
|
|
119
|
+
- [ ] Interceptor v0: wrap the OpenAI-compatible client and the tool functions, append every call to SQLite in WAL mode
|
|
120
|
+
- [ ] Naive replay that serves logged responses in order
|
|
121
|
+
- [ ] Docker Compose file for the services in use so far
|
|
122
|
+
|
|
123
|
+
**Gate:** one run replays with zero live API calls, checked with the network off.
|
|
124
|
+
|
|
125
|
+
### M1 · Deterministic replay (weeks 2 to 3)
|
|
126
|
+
|
|
127
|
+
Make replay exact for every run, not just the easy one.
|
|
128
|
+
|
|
129
|
+
Week 2:
|
|
130
|
+
|
|
131
|
+
- [ ] Content-addressed blob store keyed by SHA-256
|
|
132
|
+
- [ ] Request normalization before hashing: strip timestamps and ids, sort dict keys
|
|
133
|
+
- [ ] Shims for time, random and uuid
|
|
134
|
+
- [ ] Record and enforce the completion order of parallel branches
|
|
135
|
+
|
|
136
|
+
Week 3:
|
|
137
|
+
|
|
138
|
+
- [ ] Divergence detector that switches to live calls at the first mismatch
|
|
139
|
+
- [ ] `ledger record`, `ledger replay` and `ledger fork` (fork from any step with edited state)
|
|
140
|
+
- [ ] Hypothesis property test: a replayed run produces the same events as its recording
|
|
141
|
+
- [ ] Replay-fidelity benchmark: record 200 runs, replay each with the network off, log storage per run
|
|
142
|
+
|
|
143
|
+
**Gate:** 100% identical replay on 200 recorded runs.
|
|
144
|
+
|
|
145
|
+
### M2 · Exactly-once effects (weeks 4 to 5)
|
|
146
|
+
|
|
147
|
+
Prove that a crash in the middle of a refund never charges twice. The project is resume-worthy when this gate passes.
|
|
148
|
+
|
|
149
|
+
Week 4:
|
|
150
|
+
|
|
151
|
+
- [ ] Example refund agent against Stripe in test mode
|
|
152
|
+
- [ ] Effect manager: idempotency keys from run id and step id, plus a pending/confirmed write-ahead record
|
|
153
|
+
- [ ] Resume after a crash: reload the log, replay the prefix, reconcile pending effects against Stripe
|
|
154
|
+
- [ ] Saga compensation for the refund flow
|
|
155
|
+
|
|
156
|
+
Week 5:
|
|
157
|
+
|
|
158
|
+
- [ ] Chaos harness: `docker kill` the worker at a random step, restart it; Toxiproxy for network faults
|
|
159
|
+
- [ ] Invariant checker that reconciles the event log against the Stripe test-mode ledger
|
|
160
|
+
- [ ] Same faults against the baseline: stock LangGraph checkpointer with naive retry
|
|
161
|
+
- [ ] 10,000 crash-injected runs for each; record duplicates, missing charges and time to resume
|
|
162
|
+
- [ ] Overhead microbenchmark at p50 and p95
|
|
163
|
+
|
|
164
|
+
**Gate:** 0 duplicate charges in 10,000 chaos runs. Fill in the first and third resume bullets with the measured numbers.
|
|
165
|
+
|
|
166
|
+
### M3 · Counterfactual blame (weeks 6 to 7)
|
|
167
|
+
|
|
168
|
+
Turn deterministic replay into a diagnosis: which step broke this run.
|
|
169
|
+
|
|
170
|
+
Week 6:
|
|
171
|
+
|
|
172
|
+
- [ ] Read AgenTracer and the spectrum-based methods; write one sentence on what Ledger does that they don't
|
|
173
|
+
- [ ] Fault injector for your own pipelines that records the guilty step as ground truth
|
|
174
|
+
- [ ] Delta debugging over forked replays, with binary search over steps
|
|
175
|
+
|
|
176
|
+
Week 7:
|
|
177
|
+
|
|
178
|
+
- [ ] Rerun budget per diagnosis; repeat each counterfactual and report a success rate with a confidence interval
|
|
179
|
+
- [ ] Baselines: random pick, LLM judge over the full trace, AgenTracer-8B if it runs
|
|
180
|
+
- [ ] Compare log-only methods head to head on Who&When
|
|
181
|
+
- [ ] Measure agent-level and step-level accuracy, reruns and dollars per diagnosis
|
|
182
|
+
|
|
183
|
+
**Gate:** beats the LLM-judge baseline on attribution accuracy.
|
|
184
|
+
|
|
185
|
+
### M4 · UI and launch (week 8)
|
|
186
|
+
|
|
187
|
+
Ship it so a stranger can install it in two lines and see the guarantees for themselves.
|
|
188
|
+
|
|
189
|
+
- [ ] Go trace server streaming events over Connect (gRPC)
|
|
190
|
+
- [ ] SvelteKit UI: live timeline, run diff, blame view
|
|
191
|
+
- [ ] PyPI release with the two-line LangGraph integration and the example refund agent
|
|
192
|
+
- [ ] 90-second demo video
|
|
193
|
+
- [ ] Read-only hosted UI with recorded runs on one small EC2 or Lightsail instance
|
|
194
|
+
- [ ] Writeup posts, one per guarantee
|
|
195
|
+
|
|
196
|
+
**Gate:** writeup live and a first outside user.
|
|
197
|
+
|
|
198
|
+
### M5 · Multi-worker chaos on AWS (stretch, any time after M2)
|
|
199
|
+
|
|
200
|
+
Show that exactly-once holds when several workers share one log.
|
|
201
|
+
|
|
202
|
+
- [ ] Move the event log to Postgres on RDS
|
|
203
|
+
- [ ] Per-run lease with a fencing token; reject writes that carry a stale token
|
|
204
|
+
- [ ] 3 or more ECS Fargate workers; random task kills and network faults between them
|
|
205
|
+
- [ ] Baseline: stock LangGraph with a shared Postgres checkpointer
|
|
206
|
+
- [ ] Scripted setup and teardown so nothing runs between benchmark sessions
|
|
207
|
+
|
|
208
|
+
**Gate:** 0 duplicate charges across 3 workers.
|
|
209
|
+
|
|
210
|
+
Further stretch ideas, in no order: speculative tool execution, a TLA+ spec of the effect protocol, and OpenTelemetry export.
|
|
211
|
+
|
|
212
|
+
## Testing and benchmarks
|
|
213
|
+
|
|
214
|
+
Each benchmark runs Ledger and its baseline (see Goals) on the same workload and the same faults, from one script anyone can rerun with Docker Compose.
|
|
215
|
+
|
|
216
|
+
| Benchmark | Workload | Faults | Reported as | Script |
|
|
217
|
+
| --- | --- | --- | --- | --- |
|
|
218
|
+
| Replay fidelity | 200 recorded runs of the 5-node pipeline | None; replay with the network off | Share replayed identically; storage per run in KB | `bench/replay_fidelity.py` |
|
|
219
|
+
| Exactly-once effects | Refund agent, 10,000 runs per system | Worker killed at a random step; Toxiproxy network faults | Duplicate and missing charges; time to resume | `bench/exactly_once.py` |
|
|
220
|
+
| Blame | Your own pipelines with injected faults; Who&When logs | One injected fault per run, guilty step known | Agent-level and step-level accuracy with confidence intervals; reruns and dollars per diagnosis | `bench/blame_eval.py` |
|
|
221
|
+
| Overhead | Microbenchmark on the 5-node pipeline | None | Added latency per step at p50 and p95; log size | `bench/overhead.py` |
|
|
222
|
+
| Distributed exactly-once (stretch) | ECS Fargate workers sharing one RDS event log | Random task kills; network faults between workers | Duplicate and missing charges; resume time after a lost task | To add with M5 |
|
|
223
|
+
| Speculation (stretch) | Multi-hop tasks with read-only tools | None | End-to-end p50 and p95 latency; hit rate; wasted calls | To add if built |
|
|
224
|
+
|
|
225
|
+
The blame bar is low and documented. On [Who&When](https://arxiv.org/abs/2505.00212), failure logs from 127 multi-agent systems, the best method in the original paper found the responsible agent 53.5% of the time but the decisive step only 14.2% of the time. Who&When holds recorded logs, not runnable systems, so counterfactual reruns can't run on it. The main blame result comes from your own pipelines; Who&When is where log-only methods are compared head to head.
|
|
226
|
+
|
|
227
|
+
Alongside the benchmarks, pytest and Hypothesis property tests run on every change: replay matches the recording, no effect is confirmed twice, and every pending effect is either confirmed or compensated after resume.
|
|
228
|
+
|
|
229
|
+
## Risks
|
|
230
|
+
|
|
231
|
+
The hardest parts are nondeterminism in replay and being honest about "exactly once". The parallel fan-out in the week-1 pipeline brings both out early.
|
|
232
|
+
|
|
233
|
+
| Risk | How it shows up | Mitigation | Phase |
|
|
234
|
+
| --- | --- | --- | --- |
|
|
235
|
+
| Parallel ordering | Runs that look identical drift on replay because branches finished in a different order | Record the completion order and enforce it on replay | M0 to M1 |
|
|
236
|
+
| Cache keys | Replay misses the log because prompts carry timestamps, ids and dict orderings | Normalize before hashing; define explicitly what counts as "the same request" | M1 |
|
|
237
|
+
| Divergence after a code change | After a node is edited, later calls no longer match the log | Detect the first mismatch and go live from there; fork uses the same code | M1 |
|
|
238
|
+
| Overclaiming "exactly once" | Infra reviewers point out that external APIs only allow effectively-once | Idempotency keys where the API supports them, a pending/confirmed record and reconciliation where it doesn't; say so plainly in the writeup | M2 |
|
|
239
|
+
| Blame cost | Each counterfactual rerun spends LLM calls | Replay the recorded prefix, binary-search over steps, cap the budget per diagnosis | M3 |
|
|
240
|
+
| Sampling noise in blame | One successful rerun turns out to be luck | Run each counterfactual several times; report a success rate with a confidence interval | M3 |
|
|
241
|
+
| Prior work on blame | Ledger looks like a copy of AgenTracer or spectrum-based methods | Read them before week 6; state the difference: online, built into the runtime, on executable systems | M3 |
|
|
242
|
+
| Ownership across workers | Two workers both claim a step after a task dies | Per-run lease with a fencing token in Postgres; reject writes with a stale token | M5 |
|
|
243
|
+
| Cloud cost | Fargate and RDS left running burn credits | Scripted setup and teardown; run only during benchmark sessions | M5 |
|
|
244
|
+
|
|
245
|
+
## Launch
|
|
246
|
+
|
|
247
|
+
Ship Ledger as something a stranger can install in two lines, then let the measured numbers make the case.
|
|
248
|
+
|
|
249
|
+
- **Demo, 90 seconds:** an agent crashes mid-refund and restarts, and the Stripe dashboard shows exactly one charge. Then a failing run opens in the UI with the guilty step highlighted.
|
|
250
|
+
- **Hosted UI:** a read-only copy with recorded runs on one small EC2 or Lightsail instance, so recruiters can click through without installing anything.
|
|
251
|
+
- **Writeup:** one post per guarantee, each with its chart, its baseline and one thing that broke along the way.
|
|
252
|
+
- **Distribution:** `pip install`, a two-line LangGraph integration, the example refund agent in the repo, and a post wherever LangGraph users gather.
|
|
253
|
+
|
|
254
|
+
The pitch lands differently by audience: Stripe will recognize idempotency keys and ledger invariants under failure, Databricks the tracing and evaluation work, NVIDIA a runtime serving Nemotron, and big-tech infra teams durable execution, chaos testing and delta debugging.
|
|
255
|
+
|
|
256
|
+
Resume bullets (fill the brackets with measured numbers only):
|
|
257
|
+
|
|
258
|
+
- Built Ledger, a durable Python runtime for LLM agents with deterministic record/replay and exactly-once side effects; 0 duplicate charges across \[10,000\] crash-injected runs vs \[N\] with stock LangGraph checkpointing.
|
|
259
|
+
- Designed counterfactual failure attribution via delta debugging over replayed traces; located the failure-causing step in \[X\]% of injected-fault runs vs \[Y\]% for an LLM-judge baseline, using \[Z\] reruns per diagnosis.
|
|
260
|
+
- Kept overhead to \[A\] ms p50 per step while replaying \[200\] recorded runs with 100% fidelity.
|
|
261
|
+
|
|
262
|
+
## Open questions
|
|
263
|
+
|
|
264
|
+
- [ ] Week 8 holds the Go server, the SvelteKit UI, the PyPI release, the demo and the writeup. Is that one week, or should M4 get two?
|
|
265
|
+
- [ ] Do Stripe's test-mode rate limits allow 10,000 runs per system in one week-5 session, or does the benchmark need to be spread out?
|
|
266
|
+
- [ ] Which model records the 200 runs and serves as the LLM judge, and what is the dollar budget for recording and blame reruns?
|
|
267
|
+
- [ ] Can AgenTracer-8B run on hardware you have, or is the baseline limited to random pick and the LLM judge?
|
|
268
|
+
- [ ] Does M5 start straight after M2 or after the launch?
|
|
269
|
+
- [ ] Is "Ledger" the final name, and is it free on PyPI?
|
|
270
|
+
|
|
271
|
+
## Sources
|
|
272
|
+
|
|
273
|
+
- [Durable Agent Runtime: Build Plan](https://claude.ai/artifact/CxGGZYzPx6y3zwaQ5tx4wG), the plan this one expands
|
|
274
|
+
- [Which Agent Causes Task Failures and When? (Who&When), arXiv 2505.00212](https://arxiv.org/abs/2505.00212)
|
|
275
|
+
- [AgenTracer: Who Is Inducing Failure in the LLM Agentic Systems?, ICLR 2026](https://iclr.cc/virtual/2026/poster/10007726)
|