stepledger 0.1.0__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.
Files changed (168) hide show
  1. stepledger-0.1.0/.github/workflows/ci.yml +72 -0
  2. stepledger-0.1.0/.gitignore +28 -0
  3. stepledger-0.1.0/.gitmodules +3 -0
  4. stepledger-0.1.0/.python-version +1 -0
  5. stepledger-0.1.0/LICENSE +201 -0
  6. stepledger-0.1.0/PKG-INFO +165 -0
  7. stepledger-0.1.0/README.md +135 -0
  8. stepledger-0.1.0/RESULTS.md +111 -0
  9. stepledger-0.1.0/bench/__init__.py +0 -0
  10. stepledger-0.1.0/bench/adversarial/__init__.py +0 -0
  11. stepledger-0.1.0/bench/adversarial/attack_activity_reset.py +116 -0
  12. stepledger-0.1.0/bench/adversarial/attack_clock_skew.py +96 -0
  13. stepledger-0.1.0/bench/adversarial/attack_effect_no_idempotency.py +102 -0
  14. stepledger-0.1.0/bench/adversarial/attack_encryption.py +96 -0
  15. stepledger-0.1.0/bench/adversarial/attack_non_json.py +81 -0
  16. stepledger-0.1.0/bench/adversarial/attack_short_retention.py +38 -0
  17. stepledger-0.1.0/bench/adversarial/attack_workflow_reset.py +66 -0
  18. stepledger-0.1.0/bench/adversarial/attack_workflow_side.py +54 -0
  19. stepledger-0.1.0/bench/adversarial/common.py +54 -0
  20. stepledger-0.1.0/bench/adversarial/run_attacks.py +74 -0
  21. stepledger-0.1.0/bench/agents/__init__.py +0 -0
  22. stepledger-0.1.0/bench/agents/_nodes_generated.py +553 -0
  23. stepledger-0.1.0/bench/agents/gen_nodes.py +46 -0
  24. stepledger-0.1.0/bench/agents/investigator.py +280 -0
  25. stepledger-0.1.0/bench/agents/messages_graph.py +58 -0
  26. stepledger-0.1.0/bench/agents/sinks.py +139 -0
  27. stepledger-0.1.0/bench/agents/variants.py +72 -0
  28. stepledger-0.1.0/bench/agents/workflows.py +71 -0
  29. stepledger-0.1.0/bench/baselines.py +58 -0
  30. stepledger-0.1.0/bench/chaos.py +318 -0
  31. stepledger-0.1.0/bench/chaos_worker.py +88 -0
  32. stepledger-0.1.0/bench/check_numbers.py +93 -0
  33. stepledger-0.1.0/bench/cliff.py +207 -0
  34. stepledger-0.1.0/bench/common.py +226 -0
  35. stepledger-0.1.0/bench/cost.py +183 -0
  36. stepledger-0.1.0/bench/demo.py +65 -0
  37. stepledger-0.1.0/bench/growth.py +126 -0
  38. stepledger-0.1.0/bench/history_overhead.py +75 -0
  39. stepledger-0.1.0/bench/ledger_stats.py +58 -0
  40. stepledger-0.1.0/bench/materialize.py +208 -0
  41. stepledger-0.1.0/bench/metrics.py +221 -0
  42. stepledger-0.1.0/bench/number_allowlist.txt +4 -0
  43. stepledger-0.1.0/bench/outage.py +136 -0
  44. stepledger-0.1.0/bench/overhead.py +121 -0
  45. stepledger-0.1.0/bench/plots/__init__.py +0 -0
  46. stepledger-0.1.0/bench/plots/history-dark.png +0 -0
  47. stepledger-0.1.0/bench/plots/history-light.png +0 -0
  48. stepledger-0.1.0/bench/plots/make_plots.py +300 -0
  49. stepledger-0.1.0/bench/plots/storage-dark.png +0 -0
  50. stepledger-0.1.0/bench/plots/storage-light.png +0 -0
  51. stepledger-0.1.0/bench/report.py +631 -0
  52. stepledger-0.1.0/bench/results/attacks.json +177 -0
  53. stepledger-0.1.0/bench/results/chaos.json +1009 -0
  54. stepledger-0.1.0/bench/results/cliff.json +225 -0
  55. stepledger-0.1.0/bench/results/cost.json +59 -0
  56. stepledger-0.1.0/bench/results/growth.json +1635 -0
  57. stepledger-0.1.0/bench/results/growth_problem.json +411 -0
  58. stepledger-0.1.0/bench/results/history_overhead.json +44 -0
  59. stepledger-0.1.0/bench/results/materialize.json +907 -0
  60. stepledger-0.1.0/bench/results/outage.json +94 -0
  61. stepledger-0.1.0/bench/results/overhead.json +220 -0
  62. stepledger-0.1.0/bench/results/summary.json +82 -0
  63. stepledger-0.1.0/bench/results/threshold.json +149 -0
  64. stepledger-0.1.0/bench/threshold_sweep.py +102 -0
  65. stepledger-0.1.0/docker-compose.yml +19 -0
  66. stepledger-0.1.0/docs/effects.md +94 -0
  67. stepledger-0.1.0/docs/how-it-works.md +163 -0
  68. stepledger-0.1.0/docs/keys-and-fencing.md +83 -0
  69. stepledger-0.1.0/docs/limitations.md +61 -0
  70. stepledger-0.1.0/docs/sdk-facts.md +100 -0
  71. stepledger-0.1.0/docs/storage-and-gc.md +92 -0
  72. stepledger-0.1.0/examples/investigator/README.md +13 -0
  73. stepledger-0.1.0/examples/investigator/run.py +42 -0
  74. stepledger-0.1.0/examples/quickstart/quickstart_graph.py +57 -0
  75. stepledger-0.1.0/examples/quickstart/run.py +51 -0
  76. stepledger-0.1.0/pyproject.toml +97 -0
  77. stepledger-0.1.0/scripts/dev.sh +100 -0
  78. stepledger-0.1.0/src/stepledger/__init__.py +25 -0
  79. stepledger-0.1.0/src/stepledger/__main__.py +5 -0
  80. stepledger-0.1.0/src/stepledger/_compat.py +49 -0
  81. stepledger-0.1.0/src/stepledger/_hooks.py +22 -0
  82. stepledger-0.1.0/src/stepledger/canonical.py +53 -0
  83. stepledger-0.1.0/src/stepledger/cli.py +261 -0
  84. stepledger-0.1.0/src/stepledger/config.py +108 -0
  85. stepledger-0.1.0/src/stepledger/effects/__init__.py +1 -0
  86. stepledger-0.1.0/src/stepledger/effects/once.py +159 -0
  87. stepledger-0.1.0/src/stepledger/errors.py +64 -0
  88. stepledger-0.1.0/src/stepledger/headers.py +72 -0
  89. stepledger-0.1.0/src/stepledger/keys.py +54 -0
  90. stepledger-0.1.0/src/stepledger/ledger/__init__.py +1 -0
  91. stepledger-0.1.0/src/stepledger/ledger/activity_interceptor.py +201 -0
  92. stepledger-0.1.0/src/stepledger/ledger/context.py +38 -0
  93. stepledger-0.1.0/src/stepledger/ledger/history.py +88 -0
  94. stepledger-0.1.0/src/stepledger/ledger/reconcile.py +255 -0
  95. stepledger-0.1.0/src/stepledger/ledger/schema.sql +82 -0
  96. stepledger-0.1.0/src/stepledger/ledger/seal.py +40 -0
  97. stepledger-0.1.0/src/stepledger/ledger/store.py +417 -0
  98. stepledger-0.1.0/src/stepledger/ledger/workflow_interceptor.py +174 -0
  99. stepledger-0.1.0/src/stepledger/llm/__init__.py +2 -0
  100. stepledger-0.1.0/src/stepledger/llm/journal.py +162 -0
  101. stepledger-0.1.0/src/stepledger/llm/meter.py +114 -0
  102. stepledger-0.1.0/src/stepledger/plugin.py +150 -0
  103. stepledger-0.1.0/src/stepledger/py.typed +0 -0
  104. stepledger-0.1.0/src/stepledger/read/__init__.py +1 -0
  105. stepledger-0.1.0/src/stepledger/read/ledger.py +105 -0
  106. stepledger-0.1.0/src/stepledger/read/materialize.py +246 -0
  107. stepledger-0.1.0/src/stepledger/read/views.sql +62 -0
  108. stepledger-0.1.0/src/stepledger/storage/__init__.py +29 -0
  109. stepledger-0.1.0/src/stepledger/storage/backends.py +259 -0
  110. stepledger-0.1.0/src/stepledger/storage/chunking.py +30 -0
  111. stepledger-0.1.0/src/stepledger/storage/driver.py +114 -0
  112. stepledger-0.1.0/src/stepledger/storage/gc.py +191 -0
  113. stepledger-0.1.0/src/stepledger/testing/__init__.py +4 -0
  114. stepledger-0.1.0/src/stepledger/testing/fake_llm.py +92 -0
  115. stepledger-0.1.0/src/stepledger/testing/faults.py +208 -0
  116. stepledger-0.1.0/src/stepledger/testing/history.py +164 -0
  117. stepledger-0.1.0/stepledger.yaml.example +22 -0
  118. stepledger-0.1.0/tests/__init__.py +0 -0
  119. stepledger-0.1.0/tests/_honesty.py +76 -0
  120. stepledger-0.1.0/tests/chaos/__init__.py +0 -0
  121. stepledger-0.1.0/tests/conftest.py +35 -0
  122. stepledger-0.1.0/tests/histories/__init__.py +0 -0
  123. stepledger-0.1.0/tests/histories/record.py +138 -0
  124. stepledger-0.1.0/tests/histories/with_plugin/cancel_late.json +682 -0
  125. stepledger-0.1.0/tests/histories/with_plugin/carrier_fail.json +940 -0
  126. stepledger-0.1.0/tests/histories/with_plugin/client_cancel.json +511 -0
  127. stepledger-0.1.0/tests/histories/with_plugin/continue_as_new-run0.json +549 -0
  128. stepledger-0.1.0/tests/histories/with_plugin/continue_as_new-run1.json +552 -0
  129. stepledger-0.1.0/tests/histories/with_plugin/fail.json +537 -0
  130. stepledger-0.1.0/tests/histories/with_plugin/inner_cancel.json +523 -0
  131. stepledger-0.1.0/tests/histories/with_plugin/investigate30.json +4254 -0
  132. stepledger-0.1.0/tests/histories/with_plugin/investigate_interrupt.json +2214 -0
  133. stepledger-0.1.0/tests/histories/with_plugin/lin5.json +1067 -0
  134. stepledger-0.1.0/tests/histories/without_plugin/cancel_late.json +495 -0
  135. stepledger-0.1.0/tests/histories/without_plugin/carrier_fail.json +702 -0
  136. stepledger-0.1.0/tests/histories/without_plugin/client_cancel.json +324 -0
  137. stepledger-0.1.0/tests/histories/without_plugin/continue_as_new-run0.json +362 -0
  138. stepledger-0.1.0/tests/histories/without_plugin/continue_as_new-run1.json +365 -0
  139. stepledger-0.1.0/tests/histories/without_plugin/fail.json +350 -0
  140. stepledger-0.1.0/tests/histories/without_plugin/inner_cancel.json +336 -0
  141. stepledger-0.1.0/tests/histories/without_plugin/investigate30.json +3647 -0
  142. stepledger-0.1.0/tests/histories/without_plugin/investigate_interrupt.json +1832 -0
  143. stepledger-0.1.0/tests/histories/without_plugin/lin5.json +835 -0
  144. stepledger-0.1.0/tests/integration/__init__.py +0 -0
  145. stepledger-0.1.0/tests/integration/conftest.py +56 -0
  146. stepledger-0.1.0/tests/integration/gc_workflows.py +50 -0
  147. stepledger-0.1.0/tests/integration/test_checker.py +66 -0
  148. stepledger-0.1.0/tests/integration/test_gc.py +245 -0
  149. stepledger-0.1.0/tests/integration/test_history_overhead.py +18 -0
  150. stepledger-0.1.0/tests/integration/test_journal.py +123 -0
  151. stepledger-0.1.0/tests/integration/test_ledger.py +246 -0
  152. stepledger-0.1.0/tests/integration/test_materialize_fold.py +161 -0
  153. stepledger-0.1.0/tests/integration/test_once.py +150 -0
  154. stepledger-0.1.0/tests/integration/test_reconcile.py +134 -0
  155. stepledger-0.1.0/tests/integration/test_storage.py +175 -0
  156. stepledger-0.1.0/tests/integration/workflows.py +186 -0
  157. stepledger-0.1.0/tests/property/__init__.py +0 -0
  158. stepledger-0.1.0/tests/property/test_chunking.py +56 -0
  159. stepledger-0.1.0/tests/property/test_keys_headers.py +86 -0
  160. stepledger-0.1.0/tests/property/test_store_fencing.py +151 -0
  161. stepledger-0.1.0/tests/test_materialize_equals_result.py +37 -0
  162. stepledger-0.1.0/tests/test_no_duplicate_no_divergence.py +52 -0
  163. stepledger-0.1.0/tests/test_no_llm_in_control_path.py +43 -0
  164. stepledger-0.1.0/tests/test_numbers_traceable.py +37 -0
  165. stepledger-0.1.0/tests/test_replay_determinism.py +157 -0
  166. stepledger-0.1.0/tests/test_vocabulary.py +45 -0
  167. stepledger-0.1.0/tests/unit/__init__.py +0 -0
  168. stepledger-0.1.0/uv.lock +2796 -0
@@ -0,0 +1,72 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ lint:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: astral-sh/setup-uv@v5
14
+ with:
15
+ python-version: "3.11"
16
+ - run: uv sync --all-groups
17
+ - run: uv run ruff check .
18
+ - run: uv run ruff format --check .
19
+ - run: uv run mypy
20
+
21
+ unit:
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ python-version: ["3.11", "3.12", "3.13"]
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: astral-sh/setup-uv@v5
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ - run: uv sync --all-groups
33
+ - run: uv run pytest -m "not integration and not chaos" -q
34
+ - name: wheel installs and runs
35
+ run: |
36
+ uv build
37
+ uv venv /tmp/wheelcheck --python ${{ matrix.python-version }}
38
+ uv pip install --python /tmp/wheelcheck dist/*.whl
39
+ /tmp/wheelcheck/bin/stepledger --version
40
+
41
+ integration:
42
+ runs-on: ubuntu-latest
43
+ services:
44
+ postgres:
45
+ image: postgres:16
46
+ env:
47
+ POSTGRES_USER: stepledger
48
+ POSTGRES_PASSWORD: stepledger
49
+ POSTGRES_DB: stepledger
50
+ ports: ["5432:5432"]
51
+ options: >-
52
+ --health-cmd "pg_isready -U stepledger"
53
+ --health-interval 2s --health-timeout 5s --health-retries 30
54
+ env:
55
+ STEPLEDGER_DSN: postgresql://stepledger:stepledger@localhost:5432/stepledger
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ with:
59
+ submodules: true
60
+ - uses: astral-sh/setup-uv@v5
61
+ with:
62
+ python-version: "3.11"
63
+ - name: install Temporal CLI
64
+ run: |
65
+ curl -sSf https://temporal.download/cli.sh | sh
66
+ echo "$HOME/.temporalio/bin" >> "$GITHUB_PATH"
67
+ - run: uv sync --all-groups
68
+ - name: start Temporal dev server
69
+ run: scripts/dev.sh temporal-bg
70
+ - run: uv run stepledger init-db
71
+ - name: integration, chaos and never-skip suites
72
+ run: uv run pytest -m "integration or chaos or never_skip" -q -rs
@@ -0,0 +1,28 @@
1
+ # Private planning docs: never commit or push
2
+ build_solution.md
3
+ Stepledger_Design_Document.pdf
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.py[cod]
8
+ *.egg-info/
9
+ .venv/
10
+ dist/
11
+ build/
12
+ .mypy_cache/
13
+ .ruff_cache/
14
+ .pytest_cache/
15
+ .hypothesis/
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # Local runtime state
20
+ .temporal/
21
+ .pgdata/
22
+ .env
23
+ stepledger.yaml
24
+
25
+ # OS / editor
26
+ .DS_Store
27
+ .vscode/
28
+ .idea/
@@ -0,0 +1,3 @@
1
+ [submodule "third_party/sdk-python"]
2
+ path = third_party/sdk-python
3
+ url = https://github.com/temporalio/sdk-python
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,165 @@
1
+ Metadata-Version: 2.5
2
+ Name: stepledger
3
+ Version: 0.1.0
4
+ Summary: A Temporal plugin that records every LangGraph node exactly once per Activity execution in Postgres, fenced and committed against Temporal's history, with a deduplicating External Storage driver for large state.
5
+ Project-URL: Homepage, https://github.com/Poojan6216/stepledger
6
+ Project-URL: Issues, https://github.com/Poojan6216/stepledger/issues
7
+ Author: Poojan Patel
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: agents,external-storage,langgraph,ledger,postgres,temporal
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Database
18
+ Classifier: Topic :: System :: Distributed Computing
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: fastcdc>=1.7
22
+ Requires-Dist: langgraph<1.3,>=1.2
23
+ Requires-Dist: psycopg[binary,pool]>=3.2
24
+ Requires-Dist: pydantic-settings>=2.3
25
+ Requires-Dist: pydantic<3,>=2.7
26
+ Requires-Dist: pyyaml>=6
27
+ Requires-Dist: temporalio[langgraph]<2,>=1.33
28
+ Requires-Dist: typer>=0.12
29
+ Description-Content-Type: text/markdown
30
+
31
+ <!-- Generated by `uv run python -m bench.report` from bench/results/*.json. Edit bench/report.py, not this file. -->
32
+
33
+ # Stepledger
34
+
35
+ **Every LangGraph node running on Temporal, recorded once per Activity execution in your own Postgres, at any state size.**
36
+
37
+ Stepledger is one Temporal plugin that sits next to Temporal's `LangGraphPlugin`. It writes one fenced Postgres row per node Activity execution, commits it only once the workflow has accepted that result, and checks itself against Temporal's own history. Its deduplicating External Storage driver keeps accumulating agent state under Temporal's payload and history limits. It changes no graph code and does not modify the LangGraph plugin. It was built in response to [temporalio/sdk-python#1894](https://github.com/temporalio/sdk-python/issues/1894).
38
+
39
+ ## The problem, measured
40
+
41
+ The LangGraph plugin sends each node's whole input state as its Activity input, and Temporal records every Activity input in history. For an agent whose state accumulates:
42
+
43
+ - **Persisting once at the end fails.** The final state is the first payload over the 2 MiB limit: the run gets stuck (SDK default) or the server terminates it (the #1894 error).
44
+ - **Writing each node's delta from its Activity moves the failure, it does not remove it.** At 60 KiB of new output per node the run still stops at node 35, because that node's own input crosses 2 MiB; history is already 35.42 MiB. With smaller outputs the 50 MiB history limit comes first.
45
+ - **Per-node writes are at-least-once.** Under injected crashes, a plain insert produced 17 duplicate and 13 divergent rows in 20 runs; an upsert still produced 5 divergent rows (a zombie attempt overwriting the accepted answer) and 4 duplicate side effects.
46
+ - **External Storage fixes history, but storage then grows with the square of the run:** one object per payload, and every node input is a slightly longer copy of the last.
47
+
48
+ ## Integration
49
+
50
+ ```python
51
+ from datetime import timedelta
52
+ import os
53
+ from temporalio.client import Client
54
+ from temporalio.contrib.langgraph import LangGraphPlugin
55
+ from temporalio.worker import Worker
56
+ from stepledger import StepledgerPlugin
57
+
58
+ lg = LangGraphPlugin(
59
+ graphs={"investigate": build_graph()},
60
+ default_activity_options={"start_to_close_timeout": timedelta(minutes=2)},
61
+ )
62
+ sl = StepledgerPlugin(dsn=os.environ["STEPLEDGER_DSN"], langgraph=lg)
63
+ client = await Client.connect("localhost:7233", plugins=[sl])
64
+ worker = Worker(client, task_queue="agents", workflows=[InvestigateWorkflow], plugins=[lg])
65
+ ```
66
+
67
+ Then `stepledger init-db` once. Workers built from the client inherit the plugin.
68
+
69
+ ## What beats it
70
+
71
+ | id | attack | measured | expected |
72
+ |---|---|---|---|
73
+ | 7.4 | Encrypted payloads | dedupe 11.0x plaintext vs 1.0x encrypted | dedupe is defeated (about 1x); the ledger stays correct; payloads counted as opaque |
74
+ | 7.6 | Effect whose tool ignores the key; crash before its record | direct: 3 duplicate tickets / 0 needed a person, once_blind: 0 duplicate tickets / 3 needed a person, once: 0 duplicate tickets / 0 needed a person | duplicates only without once(); blind once() stops for a person |
75
+ | 7.8 | Workflow reset (new run ID) | 6 duplicate effects across 3 resets | effects repeat unless the tool's own key dedupes |
76
+
77
+ - With the journal on, 17 billed model calls were still wasted: the worker died between the provider call and the journal write.
78
+ - With `on_ledger_error="warn"`, a database outage leaves rows missing until `stepledger reconcile` repairs them from history.
79
+ - History still grows, linearly; unbounded runs still need continue-as-new.
80
+
81
+ See [docs/limitations.md](docs/limitations.md) and [RESULTS.md](RESULTS.md).
82
+
83
+ ## What it does, measured
84
+
85
+ - **One row per node Activity execution, fenced and committed against history.** Across 20 crash-injected runs (the worker killed at fault points F1 to F5, and zombie attempts writing late at F6), Stepledger had 0 duplicate, 0 divergent, 0 lost and 0 orphan rows, and 0 duplicate side effects, each checked against the result Temporal recorded.
86
+ - **Past the wall.** With the dedup driver the 40-node run that stops B1 completes; the largest payload left in history is 63.9 KB and history is 2.5 MiB.
87
+ - **Linear storage.** At 80 nodes x 100 KiB per node: 342.97 MB as one object per payload, 12.15 MB as dedup chunks (28.2x less).
88
+ - **The view equals the truth.** Over 100 seeded runs, `materialize()` rebuilt 80 runs EXACT and equal to the workflow's result, declared 20 gaps (workflow-side nodes, task-cache hits), and gave 0 wrong answers.
89
+ - **The retry bill.** With the LLM journal, money wasted on attempts Temporal did not accept fell from USD 1.452 to USD 0.204 (86% less) under the same seeded crash plan.
90
+ - **Small overhead.** Ledger write p95 6.109 ms; 1.387 ms of wall clock per node; about 101 bytes of history per node, constant as runs grow.
91
+
92
+ All numbers come from `bench/results/*.json` via the commands in [RESULTS.md](RESULTS.md).
93
+
94
+ ## The five demos
95
+
96
+ Each runs with one command against the local dev environment (`scripts/dev.sh up && uv run stepledger init-db`):
97
+
98
+ ```bash
99
+ uv run python bench/demo.py --demo cliff # reproduce #1894, and get past it
100
+ uv run python bench/demo.py --demo chaos # pull the plug
101
+ uv run python bench/demo.py --demo growth # the quiet quadratic
102
+ uv run python bench/demo.py --demo materialize # the view equals the truth
103
+ uv run python bench/demo.py --demo cost # the retry bill
104
+ ```
105
+
106
+ ### Demo 1: the cliff
107
+
108
+ | config | nodes | SDK default | payload check disabled | largest payload (bytes) | history (MiB) | events |
109
+ |---|---|---|---|---|---|---|
110
+ | B0 bulk persist at end | 36 | STUCK at persist_all (PAYLOADS_TOO_LARGE) | TERMINATED at persist_all (BAD_SCHEDULE_ACTIVITY_ATTRIBUTES) | 2,067,993 | 39.37 | 218 |
111
+ | B1 naive per-node write | 40 | STUCK at node 35 (PAYLOADS_TOO_LARGE) | TERMINATED at node 35 (BAD_SCHEDULE_ACTIVITY_ATTRIBUTES) | 2,067,894 | 35.42 | 206 |
112
+ | B2 stepledger (no ext storage) | 40 | STUCK at node 35 (PAYLOADS_TOO_LARGE) | TERMINATED at node 35 (BAD_SCHEDULE_ACTIVITY_ATTRIBUTES) | 2,067,894 | 35.43 | 206 |
113
+ | B3 stepledger + whole-blob storage | 40 | COMPLETED | COMPLETED | 63,872 | 2.50 | 250 |
114
+ | B4 stepledger + dedup storage | 40 | COMPLETED | COMPLETED | 63,873 | 2.50 | 250 |
115
+
116
+ ### Demo 2: pull the plug
117
+
118
+ | config | runs | faults injected | duplicate rows | divergent rows | lost rows | orphan rows | duplicate side effects |
119
+ |---|---|---|---|---|---|---|---|
120
+ | B1 naive per-node write | 20 | 20 | 17 | 13 | 0 | 0 | 7 |
121
+ | B1u naive upsert | 20 | 20 | 0 | 5 | 0 | 0 | 4 |
122
+ | Stepledger | 20 | 20 | 0 | 0 | 0 | 0 | 0 |
123
+
124
+ ### Demo 3: the quiet quadratic
125
+
126
+ <picture>
127
+ <source media="(prefers-color-scheme: dark)" srcset="bench/plots/history-dark.png">
128
+ <img alt="Workflow history size against node count with and without External Storage" src="bench/plots/history-light.png">
129
+ </picture>
130
+
131
+ <picture>
132
+ <source media="(prefers-color-scheme: dark)" srcset="bench/plots/storage-dark.png">
133
+ <img alt="External store bytes per run: one object per payload against dedup chunks" src="bench/plots/storage-light.png">
134
+ </picture>
135
+
136
+ ## What this is not
137
+
138
+ - Not a LangGraph checkpointer, and not a replacement for Temporal's durability: Temporal stays the source of truth and the ledger is a projection of it.
139
+ - Not exactly-once for external effects: `once()` is at-least-once delivery with dedupe, and an unknown outcome stops for a person.
140
+ - Not a hosted service, a UI, or a new agent framework.
141
+
142
+ ## Docs
143
+
144
+ - [How it works](docs/how-it-works.md): one step's life, commits, seal, reconcile, the read side
145
+ - [Keys and fencing](docs/keys-and-fencing.md)
146
+ - [Storage and GC](docs/storage-and-gc.md)
147
+ - [Effects, the LLM journal and the retry bill](docs/effects.md)
148
+ - [Limitations](docs/limitations.md)
149
+ - [SDK facts](docs/sdk-facts.md): every SDK behavior relied on, with file and line
150
+
151
+ ## Prior art, and where each stops
152
+
153
+ - **Temporal's LangGraph plugin** (`temporalio.contrib.langgraph`) runs nodes as Activities and caches task results across continue-as-new. It keeps no per-node record outside Temporal. Stepledger composes with it and never modifies it.
154
+ - **LangGraph checkpointers** (`PostgresSaver`) persist each superstep in-process; behind the Activity boundary they are bypassed.
155
+ - **Temporal External Storage and its S3 driver** are the claim-check pattern built into the SDK. The driver stores one object per payload; Stepledger adds a deduplicating Postgres driver and does not replace the mechanism.
156
+ - **DataDog's `temporal-large-payload-codec`** does claim-check as a codec plus a service, whole-blob.
157
+ - **Temporal's idempotency guidance** (key on the run ID plus the Activity ID) is guidance, not a mechanism; it does not cover divergent retries, zombies or commit visibility.
158
+ - **Fencing tokens** (Martin Kleppmann, "How to do distributed locking") are the idea behind the attempt fence.
159
+ - **The transactional outbox** is the pattern behind committing on the next node's transaction.
160
+ - **FastCDC** (Xia et al., USENIX ATC 2016), as used by restic and borg, through the `fastcdc` Python package.
161
+ - **SpecuNode**, the author's earlier project, for journal-before-use and idempotency keys for agent effects.
162
+
163
+ ## License
164
+
165
+ Apache-2.0.
@@ -0,0 +1,135 @@
1
+ <!-- Generated by `uv run python -m bench.report` from bench/results/*.json. Edit bench/report.py, not this file. -->
2
+
3
+ # Stepledger
4
+
5
+ **Every LangGraph node running on Temporal, recorded once per Activity execution in your own Postgres, at any state size.**
6
+
7
+ Stepledger is one Temporal plugin that sits next to Temporal's `LangGraphPlugin`. It writes one fenced Postgres row per node Activity execution, commits it only once the workflow has accepted that result, and checks itself against Temporal's own history. Its deduplicating External Storage driver keeps accumulating agent state under Temporal's payload and history limits. It changes no graph code and does not modify the LangGraph plugin. It was built in response to [temporalio/sdk-python#1894](https://github.com/temporalio/sdk-python/issues/1894).
8
+
9
+ ## The problem, measured
10
+
11
+ The LangGraph plugin sends each node's whole input state as its Activity input, and Temporal records every Activity input in history. For an agent whose state accumulates:
12
+
13
+ - **Persisting once at the end fails.** The final state is the first payload over the 2 MiB limit: the run gets stuck (SDK default) or the server terminates it (the #1894 error).
14
+ - **Writing each node's delta from its Activity moves the failure, it does not remove it.** At 60 KiB of new output per node the run still stops at node 35, because that node's own input crosses 2 MiB; history is already 35.42 MiB. With smaller outputs the 50 MiB history limit comes first.
15
+ - **Per-node writes are at-least-once.** Under injected crashes, a plain insert produced 17 duplicate and 13 divergent rows in 20 runs; an upsert still produced 5 divergent rows (a zombie attempt overwriting the accepted answer) and 4 duplicate side effects.
16
+ - **External Storage fixes history, but storage then grows with the square of the run:** one object per payload, and every node input is a slightly longer copy of the last.
17
+
18
+ ## Integration
19
+
20
+ ```python
21
+ from datetime import timedelta
22
+ import os
23
+ from temporalio.client import Client
24
+ from temporalio.contrib.langgraph import LangGraphPlugin
25
+ from temporalio.worker import Worker
26
+ from stepledger import StepledgerPlugin
27
+
28
+ lg = LangGraphPlugin(
29
+ graphs={"investigate": build_graph()},
30
+ default_activity_options={"start_to_close_timeout": timedelta(minutes=2)},
31
+ )
32
+ sl = StepledgerPlugin(dsn=os.environ["STEPLEDGER_DSN"], langgraph=lg)
33
+ client = await Client.connect("localhost:7233", plugins=[sl])
34
+ worker = Worker(client, task_queue="agents", workflows=[InvestigateWorkflow], plugins=[lg])
35
+ ```
36
+
37
+ Then `stepledger init-db` once. Workers built from the client inherit the plugin.
38
+
39
+ ## What beats it
40
+
41
+ | id | attack | measured | expected |
42
+ |---|---|---|---|
43
+ | 7.4 | Encrypted payloads | dedupe 11.0x plaintext vs 1.0x encrypted | dedupe is defeated (about 1x); the ledger stays correct; payloads counted as opaque |
44
+ | 7.6 | Effect whose tool ignores the key; crash before its record | direct: 3 duplicate tickets / 0 needed a person, once_blind: 0 duplicate tickets / 3 needed a person, once: 0 duplicate tickets / 0 needed a person | duplicates only without once(); blind once() stops for a person |
45
+ | 7.8 | Workflow reset (new run ID) | 6 duplicate effects across 3 resets | effects repeat unless the tool's own key dedupes |
46
+
47
+ - With the journal on, 17 billed model calls were still wasted: the worker died between the provider call and the journal write.
48
+ - With `on_ledger_error="warn"`, a database outage leaves rows missing until `stepledger reconcile` repairs them from history.
49
+ - History still grows, linearly; unbounded runs still need continue-as-new.
50
+
51
+ See [docs/limitations.md](docs/limitations.md) and [RESULTS.md](RESULTS.md).
52
+
53
+ ## What it does, measured
54
+
55
+ - **One row per node Activity execution, fenced and committed against history.** Across 20 crash-injected runs (the worker killed at fault points F1 to F5, and zombie attempts writing late at F6), Stepledger had 0 duplicate, 0 divergent, 0 lost and 0 orphan rows, and 0 duplicate side effects, each checked against the result Temporal recorded.
56
+ - **Past the wall.** With the dedup driver the 40-node run that stops B1 completes; the largest payload left in history is 63.9 KB and history is 2.5 MiB.
57
+ - **Linear storage.** At 80 nodes x 100 KiB per node: 342.97 MB as one object per payload, 12.15 MB as dedup chunks (28.2x less).
58
+ - **The view equals the truth.** Over 100 seeded runs, `materialize()` rebuilt 80 runs EXACT and equal to the workflow's result, declared 20 gaps (workflow-side nodes, task-cache hits), and gave 0 wrong answers.
59
+ - **The retry bill.** With the LLM journal, money wasted on attempts Temporal did not accept fell from USD 1.452 to USD 0.204 (86% less) under the same seeded crash plan.
60
+ - **Small overhead.** Ledger write p95 6.109 ms; 1.387 ms of wall clock per node; about 101 bytes of history per node, constant as runs grow.
61
+
62
+ All numbers come from `bench/results/*.json` via the commands in [RESULTS.md](RESULTS.md).
63
+
64
+ ## The five demos
65
+
66
+ Each runs with one command against the local dev environment (`scripts/dev.sh up && uv run stepledger init-db`):
67
+
68
+ ```bash
69
+ uv run python bench/demo.py --demo cliff # reproduce #1894, and get past it
70
+ uv run python bench/demo.py --demo chaos # pull the plug
71
+ uv run python bench/demo.py --demo growth # the quiet quadratic
72
+ uv run python bench/demo.py --demo materialize # the view equals the truth
73
+ uv run python bench/demo.py --demo cost # the retry bill
74
+ ```
75
+
76
+ ### Demo 1: the cliff
77
+
78
+ | config | nodes | SDK default | payload check disabled | largest payload (bytes) | history (MiB) | events |
79
+ |---|---|---|---|---|---|---|
80
+ | B0 bulk persist at end | 36 | STUCK at persist_all (PAYLOADS_TOO_LARGE) | TERMINATED at persist_all (BAD_SCHEDULE_ACTIVITY_ATTRIBUTES) | 2,067,993 | 39.37 | 218 |
81
+ | B1 naive per-node write | 40 | STUCK at node 35 (PAYLOADS_TOO_LARGE) | TERMINATED at node 35 (BAD_SCHEDULE_ACTIVITY_ATTRIBUTES) | 2,067,894 | 35.42 | 206 |
82
+ | B2 stepledger (no ext storage) | 40 | STUCK at node 35 (PAYLOADS_TOO_LARGE) | TERMINATED at node 35 (BAD_SCHEDULE_ACTIVITY_ATTRIBUTES) | 2,067,894 | 35.43 | 206 |
83
+ | B3 stepledger + whole-blob storage | 40 | COMPLETED | COMPLETED | 63,872 | 2.50 | 250 |
84
+ | B4 stepledger + dedup storage | 40 | COMPLETED | COMPLETED | 63,873 | 2.50 | 250 |
85
+
86
+ ### Demo 2: pull the plug
87
+
88
+ | config | runs | faults injected | duplicate rows | divergent rows | lost rows | orphan rows | duplicate side effects |
89
+ |---|---|---|---|---|---|---|---|
90
+ | B1 naive per-node write | 20 | 20 | 17 | 13 | 0 | 0 | 7 |
91
+ | B1u naive upsert | 20 | 20 | 0 | 5 | 0 | 0 | 4 |
92
+ | Stepledger | 20 | 20 | 0 | 0 | 0 | 0 | 0 |
93
+
94
+ ### Demo 3: the quiet quadratic
95
+
96
+ <picture>
97
+ <source media="(prefers-color-scheme: dark)" srcset="bench/plots/history-dark.png">
98
+ <img alt="Workflow history size against node count with and without External Storage" src="bench/plots/history-light.png">
99
+ </picture>
100
+
101
+ <picture>
102
+ <source media="(prefers-color-scheme: dark)" srcset="bench/plots/storage-dark.png">
103
+ <img alt="External store bytes per run: one object per payload against dedup chunks" src="bench/plots/storage-light.png">
104
+ </picture>
105
+
106
+ ## What this is not
107
+
108
+ - Not a LangGraph checkpointer, and not a replacement for Temporal's durability: Temporal stays the source of truth and the ledger is a projection of it.
109
+ - Not exactly-once for external effects: `once()` is at-least-once delivery with dedupe, and an unknown outcome stops for a person.
110
+ - Not a hosted service, a UI, or a new agent framework.
111
+
112
+ ## Docs
113
+
114
+ - [How it works](docs/how-it-works.md): one step's life, commits, seal, reconcile, the read side
115
+ - [Keys and fencing](docs/keys-and-fencing.md)
116
+ - [Storage and GC](docs/storage-and-gc.md)
117
+ - [Effects, the LLM journal and the retry bill](docs/effects.md)
118
+ - [Limitations](docs/limitations.md)
119
+ - [SDK facts](docs/sdk-facts.md): every SDK behavior relied on, with file and line
120
+
121
+ ## Prior art, and where each stops
122
+
123
+ - **Temporal's LangGraph plugin** (`temporalio.contrib.langgraph`) runs nodes as Activities and caches task results across continue-as-new. It keeps no per-node record outside Temporal. Stepledger composes with it and never modifies it.
124
+ - **LangGraph checkpointers** (`PostgresSaver`) persist each superstep in-process; behind the Activity boundary they are bypassed.
125
+ - **Temporal External Storage and its S3 driver** are the claim-check pattern built into the SDK. The driver stores one object per payload; Stepledger adds a deduplicating Postgres driver and does not replace the mechanism.
126
+ - **DataDog's `temporal-large-payload-codec`** does claim-check as a codec plus a service, whole-blob.
127
+ - **Temporal's idempotency guidance** (key on the run ID plus the Activity ID) is guidance, not a mechanism; it does not cover divergent retries, zombies or commit visibility.
128
+ - **Fencing tokens** (Martin Kleppmann, "How to do distributed locking") are the idea behind the attempt fence.
129
+ - **The transactional outbox** is the pattern behind committing on the next node's transaction.
130
+ - **FastCDC** (Xia et al., USENIX ATC 2016), as used by restic and borg, through the `fastcdc` Python package.
131
+ - **SpecuNode**, the author's earlier project, for journal-before-use and idempotency keys for agent effects.
132
+
133
+ ## License
134
+
135
+ Apache-2.0.