letitloop 0.6.0__tar.gz → 0.7.2__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 (406) hide show
  1. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/ci.yml +2 -2
  2. {letitloop-0.6.0 → letitloop-0.7.2}/CHANGELOG.md +49 -0
  3. letitloop-0.7.2/PKG-INFO +251 -0
  4. letitloop-0.7.2/README.md +208 -0
  5. letitloop-0.7.2/docs/ARCHITECTURE_AND_TRADE_OFFS.md +45 -0
  6. letitloop-0.7.2/docs/adr/README.md +4 -0
  7. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/__init__.py +1 -1
  8. letitloop-0.7.2/letitloop/adapters/__init__.py +71 -0
  9. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/adapters/autogen.py +6 -13
  10. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/adapters/crewai.py +6 -8
  11. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/adapters/fastapi.py +3 -7
  12. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/adapters/langgraph.py +26 -37
  13. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/adapters/smolagents.py +17 -11
  14. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/atomic_wal_adapter.py +1 -1
  15. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/in_memory_adapter.py +1 -1
  16. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/snapshot_graph_adapter.py +1 -1
  17. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/harness/runner.py +11 -9
  18. letitloop-0.7.2/letitloop.egg-info/PKG-INFO +251 -0
  19. letitloop-0.7.2/letitloop.egg-info/SOURCES.txt +102 -0
  20. letitloop-0.7.2/letitloop.egg-info/requires.txt +18 -0
  21. letitloop-0.7.2/letitloop.egg-info/top_level.txt +2 -0
  22. letitloop-0.7.2/orchestrator/__init__.py +59 -0
  23. letitloop-0.7.2/orchestrator/cli.py +359 -0
  24. letitloop-0.7.2/orchestrator/codecs.py +210 -0
  25. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/decorators.py +169 -60
  26. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/lock.py +52 -22
  27. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/state.py +122 -30
  28. letitloop-0.7.2/orchestrator/supervisor/__init__.py +15 -0
  29. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/supervisor/liveness.py +37 -11
  30. {letitloop-0.6.0 → letitloop-0.7.2}/pyproject.toml +21 -49
  31. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/test_adapters_init.py +14 -0
  32. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/test_langgraph.py +8 -2
  33. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/test_smolagents.py +21 -0
  34. letitloop-0.7.2/tests/test_atomic_marker_concurrency.py +142 -0
  35. letitloop-0.7.2/tests/test_codecs.py +234 -0
  36. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_cookbooks.py +48 -0
  37. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_durable_async.py +25 -0
  38. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_durable_decorator.py +123 -0
  39. letitloop-0.7.2/tests/test_interactive_demo.py +146 -0
  40. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_lock.py +46 -55
  41. letitloop-0.7.2/tests/test_playwright_scraper_cookbook.py +138 -0
  42. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_process_guard.py +0 -51
  43. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_state.py +78 -0
  44. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_supervise.py +51 -0
  45. letitloop-0.6.0/.github/workflows/all-contributors.yml +0 -23
  46. letitloop-0.6.0/.github/workflows/issue-claim.yml +0 -123
  47. letitloop-0.6.0/.github/workflows/stale.yml +0 -29
  48. letitloop-0.6.0/PKG-INFO +0 -335
  49. letitloop-0.6.0/README.md +0 -268
  50. letitloop-0.6.0/conformance/adapters/atomic_wal_adapter.py +0 -101
  51. letitloop-0.6.0/conformance/adapters/autogen_adapter.py +0 -32
  52. letitloop-0.6.0/conformance/adapters/base.py +0 -22
  53. letitloop-0.6.0/conformance/adapters/crewai_adapter.py +0 -31
  54. letitloop-0.6.0/conformance/adapters/in_memory_adapter.py +0 -82
  55. letitloop-0.6.0/conformance/adapters/langgraph_adapter.py +0 -43
  56. letitloop-0.6.0/conformance/adapters/letitloop_adapter.py +0 -9
  57. letitloop-0.6.0/conformance/adapters/raw_python_adapter.py +0 -30
  58. letitloop-0.6.0/conformance/adapters/snapshot_graph_adapter.py +0 -98
  59. letitloop-0.6.0/conformance/adapters/unmanaged_script_adapter.py +0 -80
  60. letitloop-0.6.0/conformance/harness/injector.py +0 -90
  61. letitloop-0.6.0/conformance/harness/runner.py +0 -286
  62. letitloop-0.6.0/conformance/harness/schema.py +0 -31
  63. letitloop-0.6.0/conformance/harness/synthetic_engine.py +0 -88
  64. letitloop-0.6.0/docs/MCP_GUIDE.md +0 -179
  65. letitloop-0.6.0/docs/MCP_SETUP.md +0 -78
  66. letitloop-0.6.0/docs/SKILL_GUIDE.md +0 -81
  67. letitloop-0.6.0/docs/V033_SCORECARD.md +0 -184
  68. letitloop-0.6.0/docs/adr/0002-deterministic-verifiers.md +0 -41
  69. letitloop-0.6.0/docs/adr/0003-headless-cli-adapters.md +0 -45
  70. letitloop-0.6.0/docs/adr/0004-format-aware-acceptance-checks.md +0 -27
  71. letitloop-0.6.0/docs/adr/README.md +0 -21
  72. letitloop-0.6.0/docs/auto_healing.md +0 -92
  73. letitloop-0.6.0/letitloop/adapters/__init__.py +0 -50
  74. letitloop-0.6.0/letitloop/conformance/__init__.py +0 -1
  75. letitloop-0.6.0/letitloop/conformance/harness/__init__.py +0 -5
  76. letitloop-0.6.0/letitloop/conformance/scenarios/__init__.py +0 -40
  77. letitloop-0.6.0/letitloop/mcp/__init__.py +0 -33
  78. letitloop-0.6.0/letitloop/mcp/__main__.py +0 -6
  79. letitloop-0.6.0/letitloop-action/scripts/verify_ast.py +0 -140
  80. letitloop-0.6.0/letitloop.egg-info/PKG-INFO +0 -335
  81. letitloop-0.6.0/letitloop.egg-info/SOURCES.txt +0 -387
  82. letitloop-0.6.0/letitloop.egg-info/requires.txt +0 -47
  83. letitloop-0.6.0/letitloop.egg-info/top_level.txt +0 -4
  84. letitloop-0.6.0/orchestrator/SKILL.md +0 -292
  85. letitloop-0.6.0/orchestrator/__init__.py +0 -147
  86. letitloop-0.6.0/orchestrator/anti_ouroboros.py +0 -95
  87. letitloop-0.6.0/orchestrator/ast_node_splicer.py +0 -125
  88. letitloop-0.6.0/orchestrator/ast_splicer.py +0 -94
  89. letitloop-0.6.0/orchestrator/audit.py +0 -94
  90. letitloop-0.6.0/orchestrator/auto_healer.py +0 -207
  91. letitloop-0.6.0/orchestrator/budget.py +0 -195
  92. letitloop-0.6.0/orchestrator/checkpoint.py +0 -251
  93. letitloop-0.6.0/orchestrator/cli.py +0 -2622
  94. letitloop-0.6.0/orchestrator/cloud_watchdog.py +0 -149
  95. letitloop-0.6.0/orchestrator/codebase_introspector.py +0 -66
  96. letitloop-0.6.0/orchestrator/component_slicer.py +0 -185
  97. letitloop-0.6.0/orchestrator/config.py +0 -152
  98. letitloop-0.6.0/orchestrator/contract.py +0 -404
  99. letitloop-0.6.0/orchestrator/crypto.py +0 -213
  100. letitloop-0.6.0/orchestrator/dag_validator.py +0 -172
  101. letitloop-0.6.0/orchestrator/dashboard_bridge.py +0 -120
  102. letitloop-0.6.0/orchestrator/env_doctor.py +0 -178
  103. letitloop-0.6.0/orchestrator/errors.py +0 -211
  104. letitloop-0.6.0/orchestrator/events.py +0 -120
  105. letitloop-0.6.0/orchestrator/evidence.py +0 -203
  106. letitloop-0.6.0/orchestrator/failure.py +0 -226
  107. letitloop-0.6.0/orchestrator/fast_sandbox.py +0 -126
  108. letitloop-0.6.0/orchestrator/feasibility_gate.py +0 -115
  109. letitloop-0.6.0/orchestrator/feedback.py +0 -302
  110. letitloop-0.6.0/orchestrator/fixtures/example_contract.json +0 -50
  111. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-cli-run-test-step-1.json +0 -47
  112. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-cli-run-test-step-2.json +0 -47
  113. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-inject-test-a.json +0 -47
  114. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-inject-test-b.json +0 -47
  115. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-inject-test-c.json +0 -47
  116. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-json-test-a.json +0 -47
  117. letitloop-0.6.0/orchestrator/fixtures/generated/evidence-json-test-b.json +0 -47
  118. letitloop-0.6.0/orchestrator/fixtures/generated/fail-report-fail-task-1.json +0 -47
  119. letitloop-0.6.0/orchestrator/fixtures/generated/fail-report-json-task-1.json +0 -47
  120. letitloop-0.6.0/orchestrator/fixtures/generated/fail-report-success-task-1.json +0 -47
  121. letitloop-0.6.0/orchestrator/fixtures/generated/fuzz-engine-design.json +0 -63
  122. letitloop-0.6.0/orchestrator/fixtures/generated/fuzz-engine-impl.json +0 -62
  123. letitloop-0.6.0/orchestrator/fixtures/generated/fuzz-engine-tests.json +0 -62
  124. letitloop-0.6.0/orchestrator/fixtures/generated/fuzz-engine-verify.json +0 -62
  125. letitloop-0.6.0/orchestrator/fixtures/generated/goal-orch-step-1.json +0 -63
  126. letitloop-0.6.0/orchestrator/fixtures/generated/goal-orch-step-2.json +0 -62
  127. letitloop-0.6.0/orchestrator/fixtures/generated/goal-orch-step-3.json +0 -62
  128. letitloop-0.6.0/orchestrator/fixtures/generated/goal-orch-step-4.json +0 -62
  129. letitloop-0.6.0/orchestrator/fixtures/generated/goal-orch-step-5.json +0 -62
  130. letitloop-0.6.0/orchestrator/fixtures/generated/goal-orch-step-6.json +0 -63
  131. letitloop-0.6.0/orchestrator/fixtures/generated/implement-a-thread-safe-token-bucket-rat-task-1.json +0 -53
  132. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-checkpoint-rollback-3.json +0 -63
  133. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-checkpoint-rollback.json +0 -62
  134. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-live-telemetry-2.json +0 -62
  135. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-live-telemetry.json +0 -62
  136. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-spec-synthesis-1.json +0 -62
  137. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-spec-synthesis.json +0 -62
  138. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-test-verification-4.json +0 -62
  139. letitloop-0.6.0/orchestrator/fixtures/generated/orchestrator-test-verification.json +0 -62
  140. letitloop-0.6.0/orchestrator/fixtures/generated/perf-step-1.json +0 -61
  141. letitloop-0.6.0/orchestrator/fixtures/generated/perf-step-2.json +0 -62
  142. letitloop-0.6.0/orchestrator/fixtures/generated/perf-step-3.json +0 -62
  143. letitloop-0.6.0/orchestrator/fixtures/generated/perf-step-4.json +0 -62
  144. letitloop-0.6.0/orchestrator/fixtures/generated/perf-step-5.json +0 -63
  145. letitloop-0.6.0/orchestrator/fixtures/generated/phase2-proof-two-step-step-1.json +0 -47
  146. letitloop-0.6.0/orchestrator/fixtures/generated/phase2-proof-two-step-step-2.json +0 -47
  147. letitloop-0.6.0/orchestrator/fixtures/generated/planner-spec-synthesis-impl.json +0 -59
  148. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-ast-formatter.json +0 -69
  149. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-checkpoint-rollback.json +0 -70
  150. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-spec-synthesis.json +0 -70
  151. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-step-1.json +0 -70
  152. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-step-2.json +0 -70
  153. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-step-3.json +0 -70
  154. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-step-4.json +0 -70
  155. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-step-5.json +0 -65
  156. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-telemetry.json +0 -70
  157. letitloop-0.6.0/orchestrator/fixtures/generated/self-evolution-tests.json +0 -71
  158. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-research-design.json +0 -64
  159. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-step-1.json +0 -62
  160. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-step-2.json +0 -62
  161. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-step-3.json +0 -62
  162. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-step-4.json +0 -62
  163. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-step-5.json +0 -62
  164. letitloop-0.6.0/orchestrator/fixtures/generated/spec-telemetry-verification.json +0 -58
  165. letitloop-0.6.0/orchestrator/fixtures/generated/token-bucket-impl.json +0 -69
  166. letitloop-0.6.0/orchestrator/fixtures/generated/token-bucket-step-1.json +0 -70
  167. letitloop-0.6.0/orchestrator/fixtures/generated/token-bucket-step-2.json +0 -70
  168. letitloop-0.6.0/orchestrator/fixtures/generated/token-bucket-step-3.json +0 -60
  169. letitloop-0.6.0/orchestrator/fixtures/generated/token-bucket-tests.json +0 -70
  170. letitloop-0.6.0/orchestrator/fixtures/generated/token-bucket-verify.json +0 -61
  171. letitloop-0.6.0/orchestrator/fixtures/generated/trace-ux-tests-step-1.json +0 -64
  172. letitloop-0.6.0/orchestrator/fixtures/generated/trace-ux-tests-step-2.json +0 -64
  173. letitloop-0.6.0/orchestrator/fixtures/generated/trace-ux-tests-step-3.json +0 -62
  174. letitloop-0.6.0/orchestrator/fixtures/generated/tui-live-telemetry-impl.json +0 -59
  175. letitloop-0.6.0/orchestrator/fixtures/phase1_proof_escalation_contract.json +0 -41
  176. letitloop-0.6.0/orchestrator/fixtures/phase1_proof_happy_path_contract.json +0 -83
  177. letitloop-0.6.0/orchestrator/fixtures/phase1_proof_qc_contract.json +0 -41
  178. letitloop-0.6.0/orchestrator/fixtures/phase1_proof_repair_contract.json +0 -41
  179. letitloop-0.6.0/orchestrator/fixtures/phase2_proof_two_step_goal.json +0 -15
  180. letitloop-0.6.0/orchestrator/fixtures/run_proofs.py +0 -299
  181. letitloop-0.6.0/orchestrator/fixtures/test_normalizer.py +0 -16
  182. letitloop-0.6.0/orchestrator/gate.py +0 -221
  183. letitloop-0.6.0/orchestrator/generator.py +0 -239
  184. letitloop-0.6.0/orchestrator/goal.py +0 -245
  185. letitloop-0.6.0/orchestrator/handoff.py +0 -86
  186. letitloop-0.6.0/orchestrator/hybrid_worker.py +0 -840
  187. letitloop-0.6.0/orchestrator/impossibility.py +0 -162
  188. letitloop-0.6.0/orchestrator/limits.py +0 -60
  189. letitloop-0.6.0/orchestrator/llm.py +0 -324
  190. letitloop-0.6.0/orchestrator/local_tool_calling.py +0 -285
  191. letitloop-0.6.0/orchestrator/mcp_client.py +0 -571
  192. letitloop-0.6.0/orchestrator/mcp_server.py +0 -524
  193. letitloop-0.6.0/orchestrator/memory_bridge.py +0 -182
  194. letitloop-0.6.0/orchestrator/metrics.py +0 -159
  195. letitloop-0.6.0/orchestrator/models.py +0 -350
  196. letitloop-0.6.0/orchestrator/parsing.py +0 -237
  197. letitloop-0.6.0/orchestrator/patch_applier.py +0 -154
  198. letitloop-0.6.0/orchestrator/plan_preview.py +0 -138
  199. letitloop-0.6.0/orchestrator/plan_quality.py +0 -357
  200. letitloop-0.6.0/orchestrator/planner.py +0 -802
  201. letitloop-0.6.0/orchestrator/preferences.py +0 -115
  202. letitloop-0.6.0/orchestrator/preflight.py +0 -141
  203. letitloop-0.6.0/orchestrator/prompts.py +0 -275
  204. letitloop-0.6.0/orchestrator/proposal_ledger.py +0 -194
  205. letitloop-0.6.0/orchestrator/provider_scheduler.py +0 -394
  206. letitloop-0.6.0/orchestrator/qc/__init__.py +0 -153
  207. letitloop-0.6.0/orchestrator/qc/aggregator.py +0 -330
  208. letitloop-0.6.0/orchestrator/qc/parsing.py +0 -287
  209. letitloop-0.6.0/orchestrator/qc/personas.py +0 -242
  210. letitloop-0.6.0/orchestrator/qc/runner.py +0 -569
  211. letitloop-0.6.0/orchestrator/qc_overrule.py +0 -87
  212. letitloop-0.6.0/orchestrator/qc_review.py +0 -282
  213. letitloop-0.6.0/orchestrator/quality_lenses.py +0 -314
  214. letitloop-0.6.0/orchestrator/quality_plan.py +0 -449
  215. letitloop-0.6.0/orchestrator/quality_plane.py +0 -103
  216. letitloop-0.6.0/orchestrator/receipts.py +0 -71
  217. letitloop-0.6.0/orchestrator/reconcile.py +0 -191
  218. letitloop-0.6.0/orchestrator/remediate.py +0 -373
  219. letitloop-0.6.0/orchestrator/replanner.py +0 -433
  220. letitloop-0.6.0/orchestrator/research.py +0 -176
  221. letitloop-0.6.0/orchestrator/review_artifact.py +0 -672
  222. letitloop-0.6.0/orchestrator/safety.py +0 -413
  223. letitloop-0.6.0/orchestrator/sbom.py +0 -136
  224. letitloop-0.6.0/orchestrator/schemas.py +0 -174
  225. letitloop-0.6.0/orchestrator/scope.py +0 -476
  226. letitloop-0.6.0/orchestrator/scrubber.py +0 -98
  227. letitloop-0.6.0/orchestrator/sse_server.py +0 -160
  228. letitloop-0.6.0/orchestrator/subprocess_helper.py +0 -131
  229. letitloop-0.6.0/orchestrator/supervisor/__init__.py +0 -213
  230. letitloop-0.6.0/orchestrator/supervisor/_shared.py +0 -164
  231. letitloop-0.6.0/orchestrator/supervisor/cleanup.py +0 -185
  232. letitloop-0.6.0/orchestrator/supervisor/core.py +0 -1698
  233. letitloop-0.6.0/orchestrator/supervisor/recovery.py +0 -370
  234. letitloop-0.6.0/orchestrator/supervisor/reporting.py +0 -251
  235. letitloop-0.6.0/orchestrator/telemetry.py +0 -109
  236. letitloop-0.6.0/orchestrator/verifier.py +0 -1255
  237. letitloop-0.6.0/orchestrator/webhooks.py +0 -168
  238. letitloop-0.6.0/orchestrator/worker.py +0 -469
  239. letitloop-0.6.0/orchestrator/worker_adapters.py +0 -766
  240. letitloop-0.6.0/orchestrator/worker_pool.py +0 -121
  241. letitloop-0.6.0/orchestrator/worktree.py +0 -393
  242. letitloop-0.6.0/tests/__init__.py +0 -0
  243. letitloop-0.6.0/tests/fault_injection.py +0 -148
  244. letitloop-0.6.0/tests/test_adversarial_audit.py +0 -328
  245. letitloop-0.6.0/tests/test_agent_loop_profiles.py +0 -171
  246. letitloop-0.6.0/tests/test_anti_ouroboros.py +0 -38
  247. letitloop-0.6.0/tests/test_ast_comment_retention.py +0 -64
  248. letitloop-0.6.0/tests/test_ast_node_splicer.py +0 -101
  249. letitloop-0.6.0/tests/test_audit.py +0 -151
  250. letitloop-0.6.0/tests/test_auto_healer.py +0 -101
  251. letitloop-0.6.0/tests/test_benchmarks.py +0 -197
  252. letitloop-0.6.0/tests/test_budget.py +0 -131
  253. letitloop-0.6.0/tests/test_budget_enforcement_e2e.py +0 -62
  254. letitloop-0.6.0/tests/test_checkpoint.py +0 -193
  255. letitloop-0.6.0/tests/test_checkpoint_apply_e2e.py +0 -94
  256. letitloop-0.6.0/tests/test_cli.py +0 -583
  257. letitloop-0.6.0/tests/test_cli_doctor.py +0 -106
  258. letitloop-0.6.0/tests/test_cli_failure_report.py +0 -106
  259. letitloop-0.6.0/tests/test_cloud_watchdog.py +0 -64
  260. letitloop-0.6.0/tests/test_codebase_introspector.py +0 -29
  261. letitloop-0.6.0/tests/test_component_slicer.py +0 -411
  262. letitloop-0.6.0/tests/test_config.py +0 -152
  263. letitloop-0.6.0/tests/test_conformance_sandbox.py +0 -44
  264. letitloop-0.6.0/tests/test_contract.py +0 -303
  265. letitloop-0.6.0/tests/test_crypto.py +0 -53
  266. letitloop-0.6.0/tests/test_dag_validator.py +0 -251
  267. letitloop-0.6.0/tests/test_docker_sandbox.py +0 -157
  268. letitloop-0.6.0/tests/test_dryrun.py +0 -110
  269. letitloop-0.6.0/tests/test_engine_improvements.py +0 -270
  270. letitloop-0.6.0/tests/test_errors.py +0 -145
  271. letitloop-0.6.0/tests/test_event_wiring.py +0 -311
  272. letitloop-0.6.0/tests/test_evidence_flow.py +0 -133
  273. letitloop-0.6.0/tests/test_evidence_ledger.py +0 -92
  274. letitloop-0.6.0/tests/test_exception_containment.py +0 -170
  275. letitloop-0.6.0/tests/test_failure.py +0 -59
  276. letitloop-0.6.0/tests/test_fast_sandbox.py +0 -68
  277. letitloop-0.6.0/tests/test_fault_injection.py +0 -180
  278. letitloop-0.6.0/tests/test_fault_injection_adversarial.py +0 -452
  279. letitloop-0.6.0/tests/test_feasibility_gate.py +0 -109
  280. letitloop-0.6.0/tests/test_feedback.py +0 -186
  281. letitloop-0.6.0/tests/test_framework_examples.py +0 -61
  282. letitloop-0.6.0/tests/test_gate.py +0 -115
  283. letitloop-0.6.0/tests/test_generator.py +0 -95
  284. letitloop-0.6.0/tests/test_goal.py +0 -90
  285. letitloop-0.6.0/tests/test_handoff.py +0 -132
  286. letitloop-0.6.0/tests/test_hardening_batch3.py +0 -298
  287. letitloop-0.6.0/tests/test_hybrid_worker.py +0 -420
  288. letitloop-0.6.0/tests/test_impossibility.py +0 -108
  289. letitloop-0.6.0/tests/test_integration.py +0 -212
  290. letitloop-0.6.0/tests/test_limits.py +0 -108
  291. letitloop-0.6.0/tests/test_live_proofs.py +0 -316
  292. letitloop-0.6.0/tests/test_live_smoke.py +0 -128
  293. letitloop-0.6.0/tests/test_local_tool_calling.py +0 -318
  294. letitloop-0.6.0/tests/test_mcp_client.py +0 -341
  295. letitloop-0.6.0/tests/test_mcp_concurrency.py +0 -52
  296. letitloop-0.6.0/tests/test_mcp_security.py +0 -82
  297. letitloop-0.6.0/tests/test_mcp_server.py +0 -174
  298. letitloop-0.6.0/tests/test_memory_bridge.py +0 -197
  299. letitloop-0.6.0/tests/test_metrics.py +0 -152
  300. letitloop-0.6.0/tests/test_operator_controls.py +0 -177
  301. letitloop-0.6.0/tests/test_parsing.py +0 -211
  302. letitloop-0.6.0/tests/test_patch_applier.py +0 -92
  303. letitloop-0.6.0/tests/test_performance_and_trace.py +0 -138
  304. letitloop-0.6.0/tests/test_plan_gate.py +0 -312
  305. letitloop-0.6.0/tests/test_plan_quality.py +0 -303
  306. letitloop-0.6.0/tests/test_planner.py +0 -132
  307. letitloop-0.6.0/tests/test_pr_verification_scenarios.py +0 -58
  308. letitloop-0.6.0/tests/test_preflight.py +0 -109
  309. letitloop-0.6.0/tests/test_prompts.py +0 -193
  310. letitloop-0.6.0/tests/test_proof_receipt.py +0 -61
  311. letitloop-0.6.0/tests/test_provider_scheduler.py +0 -387
  312. letitloop-0.6.0/tests/test_qc_overrule.py +0 -321
  313. letitloop-0.6.0/tests/test_qc_paths.py +0 -414
  314. letitloop-0.6.0/tests/test_qplane_fail_closed.py +0 -1397
  315. letitloop-0.6.0/tests/test_quality_plan.py +0 -380
  316. letitloop-0.6.0/tests/test_quality_plane.py +0 -1144
  317. letitloop-0.6.0/tests/test_quality_spec_propagation.py +0 -169
  318. letitloop-0.6.0/tests/test_recipes.py +0 -108
  319. letitloop-0.6.0/tests/test_reconcile.py +0 -177
  320. letitloop-0.6.0/tests/test_remediate.py +0 -147
  321. letitloop-0.6.0/tests/test_replan_evidence.py +0 -158
  322. letitloop-0.6.0/tests/test_replanner.py +0 -119
  323. letitloop-0.6.0/tests/test_replanner_integration_e2e.py +0 -50
  324. letitloop-0.6.0/tests/test_research_providers.py +0 -111
  325. letitloop-0.6.0/tests/test_retry_metadata.py +0 -144
  326. letitloop-0.6.0/tests/test_review_artifact.py +0 -369
  327. letitloop-0.6.0/tests/test_safety.py +0 -183
  328. letitloop-0.6.0/tests/test_schemas.py +0 -55
  329. letitloop-0.6.0/tests/test_scope.py +0 -178
  330. letitloop-0.6.0/tests/test_sprint7_adapters.py +0 -181
  331. letitloop-0.6.0/tests/test_state_coverage_expansion.py +0 -598
  332. letitloop-0.6.0/tests/test_subprocess_helper.py +0 -82
  333. letitloop-0.6.0/tests/test_telemetry.py +0 -50
  334. letitloop-0.6.0/tests/test_unit_expansion.py +0 -359
  335. letitloop-0.6.0/tests/test_v032_remediation.py +0 -111
  336. letitloop-0.6.0/tests/test_verifier.py +0 -617
  337. letitloop-0.6.0/tests/test_verifier_ast_fuzz.py +0 -71
  338. letitloop-0.6.0/tests/test_verifier_hardening.py +0 -140
  339. letitloop-0.6.0/tests/test_webhooks.py +0 -419
  340. letitloop-0.6.0/tests/test_worker.py +0 -237
  341. letitloop-0.6.0/tests/test_worker_adapters.py +0 -128
  342. letitloop-0.6.0/tests/test_worker_adapters_extended.py +0 -134
  343. letitloop-0.6.0/tests/test_worker_escaping.py +0 -82
  344. letitloop-0.6.0/tests/test_worker_pool.py +0 -193
  345. letitloop-0.6.0/tests/test_worktree.py +0 -69
  346. letitloop-0.6.0/tests/test_worktree_sandbox.py +0 -307
  347. {letitloop-0.6.0 → letitloop-0.7.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  348. {letitloop-0.6.0 → letitloop-0.7.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  349. {letitloop-0.6.0 → letitloop-0.7.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  350. {letitloop-0.6.0 → letitloop-0.7.2}/.github/dependabot.yml +0 -0
  351. {letitloop-0.6.0 → letitloop-0.7.2}/.github/release-drafter.config.yml +0 -0
  352. {letitloop-0.6.0 → letitloop-0.7.2}/.github/release-drafter.yml +0 -0
  353. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/codeql.yml +0 -0
  354. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/dependency-review.yml +0 -0
  355. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/pages.yml +0 -0
  356. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/pr-health-guard.yml +0 -0
  357. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/release-drafter.yml +0 -0
  358. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/release-pypi.yml +0 -0
  359. {letitloop-0.6.0 → letitloop-0.7.2}/.github/workflows/scorecard.yml +0 -0
  360. {letitloop-0.6.0 → letitloop-0.7.2}/LICENSE +0 -0
  361. {letitloop-0.6.0 → letitloop-0.7.2}/MANIFEST.in +0 -0
  362. {letitloop-0.6.0 → letitloop-0.7.2}/docs/adapters.md +0 -0
  363. {letitloop-0.6.0 → letitloop-0.7.2}/docs/adr/0001-write-ahead-logging.md +0 -0
  364. {letitloop-0.6.0 → letitloop-0.7.2}/docs/adr/template.md +0 -0
  365. {letitloop-0.6.0 → letitloop-0.7.2}/docs/state_machine.md +0 -0
  366. {letitloop-0.6.0 → letitloop-0.7.2/letitloop}/conformance/__init__.py +0 -0
  367. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/__init__.py +0 -0
  368. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/_durable_mixin.py +0 -0
  369. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/autogen_adapter.py +0 -0
  370. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/base.py +0 -0
  371. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/crewai_adapter.py +0 -0
  372. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/json_checkpoint_adapter.py +0 -0
  373. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/langgraph_adapter.py +0 -0
  374. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/letitloop_adapter.py +0 -0
  375. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/llamaindex_adapter.py +0 -0
  376. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/raw_python_adapter.py +0 -0
  377. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/sqlite_wal_adapter.py +0 -0
  378. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/swarm_adapter.py +0 -0
  379. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/adapters/unmanaged_script_adapter.py +0 -0
  380. {letitloop-0.6.0 → letitloop-0.7.2/letitloop}/conformance/harness/__init__.py +0 -0
  381. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/harness/injector.py +0 -0
  382. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/harness/schema.py +0 -0
  383. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/harness/synthetic_engine.py +0 -0
  384. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop/conformance/reporter.py +0 -0
  385. {letitloop-0.6.0 → letitloop-0.7.2/letitloop}/conformance/scenarios/__init__.py +0 -0
  386. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop.egg-info/dependency_links.txt +0 -0
  387. {letitloop-0.6.0 → letitloop-0.7.2}/letitloop.egg-info/entry_points.txt +0 -0
  388. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/exceptions.py +0 -0
  389. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/process_guard.py +0 -0
  390. {letitloop-0.6.0 → letitloop-0.7.2}/orchestrator/token_gate.py +0 -0
  391. {letitloop-0.6.0 → letitloop-0.7.2}/pytest.ini +0 -0
  392. {letitloop-0.6.0 → letitloop-0.7.2}/requirements-ci.txt +0 -0
  393. {letitloop-0.6.0 → letitloop-0.7.2}/setup.cfg +0 -0
  394. {letitloop-0.6.0/orchestrator/fixtures → letitloop-0.7.2/tests}/__init__.py +0 -0
  395. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/__init__.py +0 -0
  396. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/test_autogen.py +0 -0
  397. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/test_crewai.py +0 -0
  398. {letitloop-0.6.0 → letitloop-0.7.2}/tests/adapters/test_fastapi.py +0 -0
  399. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_browser_use_cookbook.py +0 -0
  400. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_cli_watch.py +0 -0
  401. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_conformance_benchmark.py +0 -0
  402. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_fuzz_wal_corruptions.py +0 -0
  403. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_step_failclosed.py +0 -0
  404. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_token_gate.py +0 -0
  405. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_wal_corruption_recovery.py +0 -0
  406. {letitloop-0.6.0 → letitloop-0.7.2}/tests/test_wal_v2_checksums.py +0 -0
@@ -45,7 +45,7 @@ jobs:
45
45
 
46
46
  - name: Run unit tests
47
47
  run: |
48
- pytest tests -q --ignore=tests/test_integration.py --ignore=tests/test_benchmarks.py --cov=orchestrator --cov-report=xml
48
+ pytest tests -q -m "not integration" --ignore=tests/test_benchmarks.py --cov=orchestrator --cov-report=xml
49
49
 
50
50
  - name: Upload coverage to Codecov
51
51
  if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
@@ -78,7 +78,7 @@ jobs:
78
78
 
79
79
  - name: Run integration tests (blocking)
80
80
  run: |
81
- pytest tests/test_integration.py -v
81
+ pytest -m integration -v
82
82
 
83
83
  security:
84
84
  runs-on: ubuntu-latest
@@ -3,6 +3,55 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [0.7.2] - 2026-11-23
7
+
8
+ ### 🔒 Kernel Correctness Fixes, Async Parallelism & Protocol Hardening
9
+ - **True `asyncio.gather()` Concurrency (`orchestrator/decorators.py`)**: Scoped `DurableAsyncContext._lock` strictly to WAL commit and cache mutation rather than holding the lock across `await async_fn(...)`, allowing parallel `async_step()` calls in `asyncio.gather()` to execute concurrently.
10
+ - **WAL Key Deletion Replay Fix (`orchestrator/state.py`)**: Fixed `_apply_event` sentinel comparison (`v == _DELETE_SENTINEL` instead of object identity `is`), preventing deleted state keys from resurrecting after JSON deserialization on WAL replay.
11
+ - **$O(1)$ In-Memory Delta Rollback (`orchestrator/state.py`)**: Eliminated per-step `copy.deepcopy(self.data)` and `copy.deepcopy(self.events)` on `DATA_PATCH` events, preserving $O(1)$ per-step memory and CPU overhead for multi-hundred-step pipelines.
12
+ - **Nested `@durable` Context Preservation (`orchestrator/decorators.py`)**: Restores prior active thread-local context on exit instead of unconditionally resetting to `None`.
13
+ - **Live Process Lock Preservation (`orchestrator/lock.py`)**: Prevents `_lock_is_stale` and `FileLock._lock_file_is_stale` from stealing locks held by a demonstrably live local process with a matching OS process start token after 300 seconds.
14
+ - **Orphaned `.pending.<pid>` Reclamation & NTFS Retry (`orchestrator/decorators.py`)**: `atomic_marker` now sweeps orphaned `.pending.<dead_pid>` files left by `SIGKILL` crashes and applies a 6-attempt exponential backoff around `os.replace` on Windows NTFS.
15
+ - **Recursive Custom Codec Hydration (`orchestrator/codecs.py`)**: Custom codecs registered via `register_codec()` now recursively encode and hydrate nested built-in types (`datetime`, `uuid.UUID`, `pathlib.Path`, `tuple`) with full cycle detection.
16
+ - **Adapter Hardening & Lazy Spec Detection (`letitloop/adapters/*`)**:
17
+ - Replaced eager package imports in `get_available_adapters()` with `importlib.util.find_spec()`, reducing availability detection overhead from ~40s to <1ms.
18
+ - Updated `LetItLoopCheckpointSaver` (`langgraph.py`) to use `DurableCodecRegistry` instead of `pickle`, yield an async iterator from `alist()`, support `task_path` in `put_writes()`/`aput_writes()`, and preserve `parent_checkpoint_id=None` on root checkpoints.
19
+ - Updated `SmolagentsWALCallback.wrap_agent()` (`smolagents.py`) to register with `smolagents 1.26+` `CallbackRegistry` objects without overwriting them with a raw list.
20
+ - Added `LILWAL02` CRC32 frame verification to `lil inspect` (`orchestrator/cli.py`).
21
+ - **Bounded SHA-256 Markers (`SEC-PROTO-01` & `SEC-PROTO-02`)**: Replaced regex identifier sanitization with canonical SHA-256 digest filenames (`m-{sha256[:32]}`). Eliminates identifier collisions (`stripe/charge` vs `stripe_charge`), path traversal attempts (`../../`), and Windows NTFS `MAX_PATH` (>260 char) crashes.
22
+ - **Strict Directory Jailing**: Legacy marker compatibility lookups now strictly verify containment within `markers_dir` via `os.path.commonpath`, preventing path hijacking.
23
+ - **Split-Brain Elimination in `FileLock.release()` (`SEC-PROTO-03`)**: Added CAS-style lock ownership token (`process_start_token` + PID) verification before unlinking lock files. Prevents stolen or replaced locks from being blindly deleted by slow contender processes.
24
+ - **Codec Recursion & Cycle Protection**: Added in-flight visited object cycle detection and maximum recursion depth (256) guards to `DurableCodecRegistry.encode()`, failing closed with `DurableCodecError` instead of leaking raw unhandled `RecursionError`.
25
+ - **Safe Hydration Exception Handling**: Wrapped tagged payload hydration in `DurableCodecRegistry.decode()` to catch malformed payload data (invalid tuple iterables, malformed datetime/uuid strings) and fail closed with `DurableCodecError`.
26
+ - **Timestamp Sanity & Replay Preservation**: Added ISO-8601 parsing validation and clock-drift bounds on live appends, while maintaining clean backward compatibility for offline replay of historical WAL files.
27
+ - **Durability Contract Boundary Transparency**: Formally clarified in documentation that `atomic_marker` guarantees serialized execution and durable local completion records; recommended upstream `Idempotency-Key` headers for remote non-idempotent HTTP API side-effects.
28
+
29
+ ---
30
+
31
+ ## [0.7.1] - 2026-10-12
32
+
33
+ ### 🛡️ Concurrency Mutex, O(N) WAL Compaction & Type Preservation
34
+ - **2-Tier `atomic_marker` Mutex**: Upgraded atomic step markers with process-local `threading.Lock` and cross-process `FileLock` mutual exclusion, moving `.committed` checks inside the acquired lock and publishing markers via atomic tempfile `os.replace` (`os.fsync` + atomic rename) to eliminate multi-process and multi-thread race conditions.
35
+ - **Elimination of $O(N^2)$ Write Amplification**: Replaced full-dictionary serialization in `step()` and `async_step()` with discrete subkey delta patching under `step_outputs`. Compresses WAL size by 168x (from 83.2 MB down to 378 KB for 1,000 steps) and accelerates replay recovery by 17.6x (down to 72.39 $\mu$s/step).
36
+ - **Safe Type Preservation (`DurableCodecRegistry`)**: Introduced safe, extensible codec registry for standard Python objects (`datetime`, `uuid.UUID`, `pathlib.Path`, `tuple`, dataclasses, and Pydantic models). Enforces zero dynamic import execution and fails closed with `DurableSerializationError` on unhandled types.
37
+ - **Conformance Transparency (DCP-2.0)**: Added explicit `adapter_kind` (`native_kernel` vs `simulated_archetype`) and `framework_executed` flags to DCP-2.0 conformance receipts to distinguish native micro-kernel executions from simulated baseline archetypes.
38
+
39
+ ---
40
+
41
+ ## [0.7.0] - 2026-10-07
42
+
43
+ ### ⚡ The SQLite of Durable Execution (Micro-Kernel Architecture)
44
+ - **Radical Micro-Kernel Consolidation**: Amputated 70+ legacy coding-agent files, consolidating `letitloop` into an ultra-lean in-process persistence engine exporting `@durable`, `step`, `atomic_marker`, `supervise`, `LivenessSupervisor`, `State`, and `lock`.
45
+ - **Correctness & Corruption Resilience Patches**:
46
+ - **Line-0 Torn Tail Recovery**: Patched LILWAL02 replay to safely truncate interrupted partial writes at line 0 without crashing.
47
+ - **Zero Quadratic Write Amplification**: Decoupled full snapshot serialization from hot `step()` and `async_step()` loops (periodic snapshot every 50 steps or on clean close), reducing disk I/O overhead by up to 98% in long-running pipelines.
48
+ - **Crash-Resilient 2-Phase `atomic_marker`**: Upgraded atomic step markers to a 2-phase commit lifecycle (`.pending.<pid>` $\to$ `.committed`) that cleans up uncommitted locks from dead PIDs.
49
+ - **Fail-Closed State Verification**: Enforced fail-closed corruption handling across state snapshots and WAL journals.
50
+ - **Unified Lean CLI**: Redesigned command-line interface supporting `lil watch`, `lil inspect`, `lil demo`, `lil bench`, and `lil version`.
51
+ - **Zero-Daemon Ecosystem Integration**: Turnkey durable workflows and recipes for `browser-use`, `pydantic-ai`, and `dspy`.
52
+
53
+ ---
54
+
6
55
  ## [0.6.0] - 2026-10-04
7
56
 
8
57
  ### 🌐 Ecosystem Cookbooks & Resilience Hardening
@@ -0,0 +1,251 @@
1
+ Metadata-Version: 2.4
2
+ Name: letitloop
3
+ Version: 0.7.2
4
+ Summary: The SQLite of Durable Execution — Zero-daemon in-process durability and process supervisor for Python functions & AI agents.
5
+ Author-email: sdageltc <sdageltc@users.noreply.github.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://sdageltc.github.io/letitloop/
8
+ Project-URL: Documentation, https://github.com/sdageltc/letitloop#readme
9
+ Project-URL: Repository, https://github.com/sdageltc/letitloop
10
+ Project-URL: Bug Tracker, https://github.com/sdageltc/letitloop/issues
11
+ Project-URL: Discussions, https://github.com/sdageltc/letitloop/discussions
12
+ Keywords: durable-execution,wal,crash-resilience,agentic-ai,supervisor,langgraph,browser-use,pydantic-ai,dspy,zero-daemon
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: psutil>=5.9.0
28
+ Provides-Extra: adapters
29
+ Requires-Dist: fastapi>=0.100.0; extra == "adapters"
30
+ Requires-Dist: langgraph<2,>=1.2; extra == "adapters"
31
+ Provides-Extra: financial-agent
32
+ Requires-Dist: langgraph<2,>=1.2; extra == "financial-agent"
33
+ Requires-Dist: yfinance>=0.2.40; extra == "financial-agent"
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest>=7.0; extra == "dev"
36
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
37
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
38
+ Requires-Dist: pytest-xdist>=3.0; extra == "dev"
39
+ Requires-Dist: hypothesis>=6.100.0; extra == "dev"
40
+ Requires-Dist: langgraph<2,>=1.2; extra == "dev"
41
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
42
+ Dynamic: license-file
43
+
44
+ <p align="center">
45
+ <img src="assets/logo.png" alt="let it loop (LIL)" width="320" style="border-radius: 20px;">
46
+ </p>
47
+
48
+ <div align="center">
49
+
50
+ # let it loop (LIL)
51
+
52
+ **Single-Process Local Write-Ahead Log (`LILWAL02`) & Process Supervisor for Python Scripts (`v0.7.2`)**
53
+
54
+ [![Official Website](https://img.shields.io/badge/Website-LetItLoop-0284c7?logo=googlechrome&logoColor=white)](https://sdageltc.github.io/letitloop/)
55
+ [![PyPI version](https://img.shields.io/pypi/v/letitloop.svg?color=blue)](https://pypi.org/project/letitloop/)
56
+ [![CI Matrix](https://github.com/sdageltc/letitloop/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sdageltc/letitloop/actions/workflows/ci.yml)
57
+ [![GitHub Action v2](https://img.shields.io/badge/Action-LetItLoop_v2-blue?logo=github)](https://github.com/sdageltc/letitloop-action)
58
+ [![Benchmark](https://img.shields.io/badge/Harness-DCP--2.0-blue)](https://sdageltc.github.io/agent-durability-bench/)
59
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](https://www.python.org/downloads/)
60
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
61
+
62
+ **[Official Website](https://sdageltc.github.io/letitloop/)** • **[Architecture & Trade-Offs](docs/ARCHITECTURE_AND_TRADE_OFFS.md)** • **[DCP-2.0 Simulation Harness](https://sdageltc.github.io/agent-durability-bench/)** • **[PyPI Package](https://pypi.org/project/letitloop/)**
63
+
64
+ </div>
65
+
66
+ ---
67
+
68
+ > **Status & Scope**: `letitloop` is a single-maintainer, single-writer local filesystem Write-Ahead Log (`LILWAL02`) and process supervisor (`lil watch` / `@supervise`) for Python functions, scrapers, and batch scripts. It requires only `psutil>=5.9.0` and stores state in human-readable, CRC32-framed JSONL files.
69
+
70
+ ---
71
+
72
+ <p align="center">
73
+ <img src="docs/assets/crash_recovery_demo.gif" alt="LetItLoop Process Crash & WAL Recovery Demo" width="100%">
74
+ </p>
75
+
76
+ ## ⚡ Quickstart
77
+
78
+ ```python
79
+ from letitloop import atomic_marker, durable, step
80
+
81
+
82
+ @durable(goal_id="customer_sync", wal_dir=".durable_wal")
83
+ def sync_workflow():
84
+ # If this process crashes or receives SIGKILL midway,
85
+ # completed steps are skipped from the local WAL on restart.
86
+ user = step("fetch_user", fetch_crm_record, user_id=123)
87
+ summary = step("summarize", call_llm_model, user)
88
+
89
+ # Guard local side effects with a 2-phase file marker
90
+ with atomic_marker("slack_notification") as should_execute:
91
+ if should_execute:
92
+ step("notify", send_slack, summary)
93
+
94
+ return summary
95
+
96
+
97
+ if __name__ == "__main__":
98
+ sync_workflow()
99
+ ```
100
+
101
+ ```bash
102
+ pip install letitloop
103
+ ```
104
+
105
+ For asynchronous pipelines, use `@durable_async` and `await async_step(...)` with `ContextVar` isolation across `asyncio.gather()`.
106
+
107
+ ### Interactive Crash-Recovery Visualizer
108
+
109
+ Run the local Streamlit visualizer (uses deterministic local steps, zero external API calls):
110
+
111
+ ```bash
112
+ python -m pip install -e .
113
+ python -m pip install -r examples/interactive_demo/requirements.txt
114
+ streamlit run examples/interactive_demo/app.py
115
+ ```
116
+
117
+ ---
118
+
119
+ ## 🧭 When to Use LetItLoop (and When Not To)
120
+
121
+ | Workload / Requirement | Recommended Tool | Why |
122
+ |---|---|---|
123
+ | **Single-writer local Python script, scraper, or CLI job** | **LetItLoop (`@durable` + `lil watch`)** | Zero external daemon, human-readable JSONL WAL (`LILWAL02`) with CRC32 + SHA-256 hash chain, and built-in subprocess crash supervision (`lil watch`). |
124
+ | **SQLite / PostgreSQL transactional workflows with durable `sleep` & queues** | **[DBOS (`dbos`)](https://github.com/dbos-inc/dbos-transact-py)** | Runs in-process on SQLite by default with a production PostgreSQL upgrade path and official PydanticAI / OpenAI Agents SDK integrations. |
125
+ | **LangGraph graph or `@entrypoint` / `@task` pipelines** | **[LangGraph `SqliteSaver`](https://pypi.org/project/langgraph-checkpoint-sqlite/)** | Native checkpointer maintained by the LangGraph core team. |
126
+ | **Data engineering DAGs & scheduled flows** | **[Prefect](https://github.com/PrefectHQ/prefect)** | Mature Python `@flow` / `@task` engine with ephemeral local SQLite mode and observability UI. |
127
+ | **Multi-node distributed microservices & multi-day timers** | **[Temporal](https://github.com/temporalio/sdk-python)** or **[Restate](https://github.com/restatedev/sdk-python)** | Dedicated workflow server clusters with distributed event histories and multi-language workers. |
128
+
129
+ See [docs/ARCHITECTURE_AND_TRADE_OFFS.md](docs/ARCHITECTURE_AND_TRADE_OFFS.md) for a detailed architectural analysis and contract boundaries.
130
+
131
+ ---
132
+
133
+ ## 🔄 Process Liveness: Auto-Supervision & CLI Watcher
134
+
135
+ LetItLoop pairs **State Durability** (saving step outputs to disk) with **Process Liveness** (restarting a script after `SIGKILL 137` or an unhandled crash):
136
+
137
+ ### 1. Terminal Watcher (`lil watch`)
138
+ Supervise any Python script with sliding-window rapid-failure circuit breaking and clean signal forwarding:
139
+
140
+ ```bash
141
+ lil watch agent_pipeline.py --max-restarts 10 --backoff 1.0
142
+ ```
143
+
144
+ ### 2. Entrypoint Decorator (`@supervise`)
145
+ ```python
146
+ from letitloop import durable, step, supervise
147
+
148
+
149
+ @supervise(max_restarts=5, backoff=1.0)
150
+ @durable(goal_id="equity_analyst", wal_dir=".equity_wal")
151
+ def run_pipeline():
152
+ user = step("fetch_data", fetch_financials)
153
+ report = step("generate_report", analyze, user)
154
+ return report
155
+
156
+
157
+ if __name__ == "__main__":
158
+ run_pipeline()
159
+ ```
160
+
161
+ ---
162
+
163
+ ## 💎 Core Design Guarantees & Contract Boundaries
164
+
165
+ 1. **CRC32-Framed Append-Only WAL (`LILWAL02`)**:
166
+ Each step delta is framed as `\nLILWAL02:<byte_len_hex>:<crc32_hex>:<canonical_json>\n` and linked via a sequential SHA-256 hash chain (`prev_hash` -> `event_hash`). Torn tail writes from mid-append power loss or `SIGKILL` are truncated back to the last valid frame on replay, while mid-file corruption fails closed with `StateError`.
167
+ 2. **$O(1)$ Delta Patching & Atomic Snapshots**:
168
+ Step outputs append discrete delta patches under `step_outputs` and write periodic atomic snapshots (`state.json` via tempfile + `os.fsync` + 6-attempt Windows NTFS `os.replace` retry + POSIX directory fsync).
169
+ 3. **2-Tier Mutex (`atomic_marker`)**:
170
+ Combines a process-local `threading.Lock` and a cross-process `FileLock` (with PID start-time token verification to prevent PID-reuse lock false positives) and sweeps orphaned `.pending.<dead_pid>` markers on recovery.
171
+ > **External API Boundary**: No local filesystem marker can prevent duplicate execution if `SIGKILL` strikes after an HTTP request leaves the host NIC but before the response is committed to disk. For non-idempotent remote APIs (e.g. Stripe charges), pass an upstream `Idempotency-Key` header derived from `f"{goal_id}:{marker_id}"`.
172
+ 4. **Allowlist-Only Type Hydration (`DurableCodecRegistry`)**:
173
+ Preserves `datetime`, `uuid.UUID`, `pathlib.Path`, `tuple`, and custom types registered via `register_codec()` across initial execution and WAL replay without using `pickle` or dynamic code imports.
174
+
175
+ ---
176
+
177
+ ## 🍳 Runnable Examples & Cookbooks
178
+
179
+ Self-contained examples in [`examples/`](examples/):
180
+
181
+ | Target | Example / Cookbook | Description |
182
+ |---|---|---|
183
+ | **Playwright** | [`examples/cookbooks/playwright_scraper.py`](examples/cookbooks/playwright_scraper.py) | Multi-page scraper with `@durable_async` checkpointing that skips already-scraped pages on resume |
184
+ | **Streamlit UI** | [`examples/interactive_demo/app.py`](examples/interactive_demo/README.md) | Local crash injection and WAL replay visualizer |
185
+ | **Browser-Use** | [`examples/cookbooks/browser_use_durable.py`](examples/cookbooks/browser_use_durable.py) | Release digest workflow with step-level crash recovery |
186
+ | **LangGraph** | [`examples/cookbooks/langgraph_financial_analyst.py`](examples/cookbooks/langgraph_financial_analyst.py) | 4-step financial analyst pipeline with offline and live DeepSeek modes |
187
+ | **DSPy** | [`examples/cookbooks/dspy_durable_optimize.py`](examples/cookbooks/dspy_durable_optimize.py) | Prompt optimizer pipeline with step-level checkpointing |
188
+ | **Pydantic AI** | [`examples/cookbooks/pydantic_ai_durable.py`](examples/cookbooks/pydantic_ai_durable.py) | Type-safe agent workflow wrapped with LetItLoop step persistence |
189
+ | **FastAPI** | [`examples/fastapi_durable_background.py`](examples/fastapi_durable_background.py) | Single-worker durable background task queue backed by local WAL |
190
+ | **CrewAI / LlamaIndex** | [`examples/crewai_durable_tools.py`](examples/crewai_durable_tools.py) • [`examples/llamaindex_durable_workflow.py`](examples/llamaindex_durable_workflow.py) | Tool-call and step wrapper examples |
191
+
192
+ Run the financial analyst cookbook offline without API keys:
193
+
194
+ ```bash
195
+ python -m pip install -e ".[financial-agent]"
196
+ python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --offline
197
+ python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --offline --demo
198
+ ```
199
+
200
+ ---
201
+
202
+ ## 🛡️ GitHub Action CI Gate (`letitloop-action@v2`)
203
+
204
+ Verify `LILWAL02` frame checksums and Python AST syntax in GitHub Actions:
205
+
206
+ ```yaml
207
+ name: Verify WAL & Python AST
208
+ on: [pull_request]
209
+
210
+ jobs:
211
+ verify:
212
+ runs-on: ubuntu-latest
213
+ steps:
214
+ - uses: actions/checkout@v4
215
+ - uses: sdageltc/letitloop-action@v2
216
+ with:
217
+ token: ${{ secrets.GITHUB_TOKEN }}
218
+ mode: 'gate'
219
+ wal-dir: '.bench_wal'
220
+ workspace: '.'
221
+ ```
222
+
223
+ ---
224
+
225
+ ## 📜 Architecture Documentation
226
+
227
+ - [**Architecture & Trade-Offs**](docs/ARCHITECTURE_AND_TRADE_OFFS.md): Single-writer design contract, failure modes, and comparison with DBOS, LangGraph, and Temporal.
228
+ - [**ADR-0001**](docs/adr/0001-write-ahead-logging.md): Write-Ahead Logging (`LILWAL02`) & Torn-Tail Recovery.
229
+ - [**State Machine Specification**](docs/state_machine.md): Event-sourced state transitions and replay rules.
230
+ - [**Adapter Reference**](docs/adapters.md): Optional adapter shims under `letitloop.adapters`.
231
+
232
+ ---
233
+
234
+ ## 👥 Contributors
235
+
236
+ <table>
237
+ <tbody>
238
+ <tr>
239
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/sdageltc"><img src="https://avatars.githubusercontent.com/u/268154463?v=4" width="100px;" alt="sdageltc"/><br /><sub><b>sdageltc</b></sub></a></td>
240
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/h4syy"><img src="https://avatars.githubusercontent.com/u/59239840?v=4" width="100px;" alt="Yash Paudel"/><br /><sub><b>Yash Paudel</b></sub></a></td>
241
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/wangshen-tech"><img src="https://avatars.githubusercontent.com/u/190895315?v=4" width="100px;" alt="wangshen-tech"/><br /><sub><b>wangshen-tech</b></sub></a></td>
242
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/MagMueller"><img src="https://github.com/MagMueller.png" width="100px;" alt="MagMueller"/><br /><sub><b>MagMueller</b></sub></a></td>
243
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/darkseidpaul"><img src="https://github.com/darkseidpaul.png" width="100px;" alt="darkseidpaul"/><br /><sub><b>darkseidpaul</b></sub></a></td>
244
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Aaqibhafeezkhan"><img src="https://github.com/Aaqibhafeezkhan.png" width="100px;" alt="Aaqibhafeezkhan"/><br /><sub><b>Aaqibhafeezkhan</b></sub></a></td>
245
+ </tr>
246
+ </tbody>
247
+ </table>
248
+
249
+ ## License
250
+
251
+ Distributed under the MIT License. Copyright (c) 2026 sdageltc. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,208 @@
1
+ <p align="center">
2
+ <img src="assets/logo.png" alt="let it loop (LIL)" width="320" style="border-radius: 20px;">
3
+ </p>
4
+
5
+ <div align="center">
6
+
7
+ # let it loop (LIL)
8
+
9
+ **Single-Process Local Write-Ahead Log (`LILWAL02`) & Process Supervisor for Python Scripts (`v0.7.2`)**
10
+
11
+ [![Official Website](https://img.shields.io/badge/Website-LetItLoop-0284c7?logo=googlechrome&logoColor=white)](https://sdageltc.github.io/letitloop/)
12
+ [![PyPI version](https://img.shields.io/pypi/v/letitloop.svg?color=blue)](https://pypi.org/project/letitloop/)
13
+ [![CI Matrix](https://github.com/sdageltc/letitloop/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sdageltc/letitloop/actions/workflows/ci.yml)
14
+ [![GitHub Action v2](https://img.shields.io/badge/Action-LetItLoop_v2-blue?logo=github)](https://github.com/sdageltc/letitloop-action)
15
+ [![Benchmark](https://img.shields.io/badge/Harness-DCP--2.0-blue)](https://sdageltc.github.io/agent-durability-bench/)
16
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](https://www.python.org/downloads/)
17
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
18
+
19
+ **[Official Website](https://sdageltc.github.io/letitloop/)** • **[Architecture & Trade-Offs](docs/ARCHITECTURE_AND_TRADE_OFFS.md)** • **[DCP-2.0 Simulation Harness](https://sdageltc.github.io/agent-durability-bench/)** • **[PyPI Package](https://pypi.org/project/letitloop/)**
20
+
21
+ </div>
22
+
23
+ ---
24
+
25
+ > **Status & Scope**: `letitloop` is a single-maintainer, single-writer local filesystem Write-Ahead Log (`LILWAL02`) and process supervisor (`lil watch` / `@supervise`) for Python functions, scrapers, and batch scripts. It requires only `psutil>=5.9.0` and stores state in human-readable, CRC32-framed JSONL files.
26
+
27
+ ---
28
+
29
+ <p align="center">
30
+ <img src="docs/assets/crash_recovery_demo.gif" alt="LetItLoop Process Crash & WAL Recovery Demo" width="100%">
31
+ </p>
32
+
33
+ ## ⚡ Quickstart
34
+
35
+ ```python
36
+ from letitloop import atomic_marker, durable, step
37
+
38
+
39
+ @durable(goal_id="customer_sync", wal_dir=".durable_wal")
40
+ def sync_workflow():
41
+ # If this process crashes or receives SIGKILL midway,
42
+ # completed steps are skipped from the local WAL on restart.
43
+ user = step("fetch_user", fetch_crm_record, user_id=123)
44
+ summary = step("summarize", call_llm_model, user)
45
+
46
+ # Guard local side effects with a 2-phase file marker
47
+ with atomic_marker("slack_notification") as should_execute:
48
+ if should_execute:
49
+ step("notify", send_slack, summary)
50
+
51
+ return summary
52
+
53
+
54
+ if __name__ == "__main__":
55
+ sync_workflow()
56
+ ```
57
+
58
+ ```bash
59
+ pip install letitloop
60
+ ```
61
+
62
+ For asynchronous pipelines, use `@durable_async` and `await async_step(...)` with `ContextVar` isolation across `asyncio.gather()`.
63
+
64
+ ### Interactive Crash-Recovery Visualizer
65
+
66
+ Run the local Streamlit visualizer (uses deterministic local steps, zero external API calls):
67
+
68
+ ```bash
69
+ python -m pip install -e .
70
+ python -m pip install -r examples/interactive_demo/requirements.txt
71
+ streamlit run examples/interactive_demo/app.py
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 🧭 When to Use LetItLoop (and When Not To)
77
+
78
+ | Workload / Requirement | Recommended Tool | Why |
79
+ |---|---|---|
80
+ | **Single-writer local Python script, scraper, or CLI job** | **LetItLoop (`@durable` + `lil watch`)** | Zero external daemon, human-readable JSONL WAL (`LILWAL02`) with CRC32 + SHA-256 hash chain, and built-in subprocess crash supervision (`lil watch`). |
81
+ | **SQLite / PostgreSQL transactional workflows with durable `sleep` & queues** | **[DBOS (`dbos`)](https://github.com/dbos-inc/dbos-transact-py)** | Runs in-process on SQLite by default with a production PostgreSQL upgrade path and official PydanticAI / OpenAI Agents SDK integrations. |
82
+ | **LangGraph graph or `@entrypoint` / `@task` pipelines** | **[LangGraph `SqliteSaver`](https://pypi.org/project/langgraph-checkpoint-sqlite/)** | Native checkpointer maintained by the LangGraph core team. |
83
+ | **Data engineering DAGs & scheduled flows** | **[Prefect](https://github.com/PrefectHQ/prefect)** | Mature Python `@flow` / `@task` engine with ephemeral local SQLite mode and observability UI. |
84
+ | **Multi-node distributed microservices & multi-day timers** | **[Temporal](https://github.com/temporalio/sdk-python)** or **[Restate](https://github.com/restatedev/sdk-python)** | Dedicated workflow server clusters with distributed event histories and multi-language workers. |
85
+
86
+ See [docs/ARCHITECTURE_AND_TRADE_OFFS.md](docs/ARCHITECTURE_AND_TRADE_OFFS.md) for a detailed architectural analysis and contract boundaries.
87
+
88
+ ---
89
+
90
+ ## 🔄 Process Liveness: Auto-Supervision & CLI Watcher
91
+
92
+ LetItLoop pairs **State Durability** (saving step outputs to disk) with **Process Liveness** (restarting a script after `SIGKILL 137` or an unhandled crash):
93
+
94
+ ### 1. Terminal Watcher (`lil watch`)
95
+ Supervise any Python script with sliding-window rapid-failure circuit breaking and clean signal forwarding:
96
+
97
+ ```bash
98
+ lil watch agent_pipeline.py --max-restarts 10 --backoff 1.0
99
+ ```
100
+
101
+ ### 2. Entrypoint Decorator (`@supervise`)
102
+ ```python
103
+ from letitloop import durable, step, supervise
104
+
105
+
106
+ @supervise(max_restarts=5, backoff=1.0)
107
+ @durable(goal_id="equity_analyst", wal_dir=".equity_wal")
108
+ def run_pipeline():
109
+ user = step("fetch_data", fetch_financials)
110
+ report = step("generate_report", analyze, user)
111
+ return report
112
+
113
+
114
+ if __name__ == "__main__":
115
+ run_pipeline()
116
+ ```
117
+
118
+ ---
119
+
120
+ ## 💎 Core Design Guarantees & Contract Boundaries
121
+
122
+ 1. **CRC32-Framed Append-Only WAL (`LILWAL02`)**:
123
+ Each step delta is framed as `\nLILWAL02:<byte_len_hex>:<crc32_hex>:<canonical_json>\n` and linked via a sequential SHA-256 hash chain (`prev_hash` -> `event_hash`). Torn tail writes from mid-append power loss or `SIGKILL` are truncated back to the last valid frame on replay, while mid-file corruption fails closed with `StateError`.
124
+ 2. **$O(1)$ Delta Patching & Atomic Snapshots**:
125
+ Step outputs append discrete delta patches under `step_outputs` and write periodic atomic snapshots (`state.json` via tempfile + `os.fsync` + 6-attempt Windows NTFS `os.replace` retry + POSIX directory fsync).
126
+ 3. **2-Tier Mutex (`atomic_marker`)**:
127
+ Combines a process-local `threading.Lock` and a cross-process `FileLock` (with PID start-time token verification to prevent PID-reuse lock false positives) and sweeps orphaned `.pending.<dead_pid>` markers on recovery.
128
+ > **External API Boundary**: No local filesystem marker can prevent duplicate execution if `SIGKILL` strikes after an HTTP request leaves the host NIC but before the response is committed to disk. For non-idempotent remote APIs (e.g. Stripe charges), pass an upstream `Idempotency-Key` header derived from `f"{goal_id}:{marker_id}"`.
129
+ 4. **Allowlist-Only Type Hydration (`DurableCodecRegistry`)**:
130
+ Preserves `datetime`, `uuid.UUID`, `pathlib.Path`, `tuple`, and custom types registered via `register_codec()` across initial execution and WAL replay without using `pickle` or dynamic code imports.
131
+
132
+ ---
133
+
134
+ ## 🍳 Runnable Examples & Cookbooks
135
+
136
+ Self-contained examples in [`examples/`](examples/):
137
+
138
+ | Target | Example / Cookbook | Description |
139
+ |---|---|---|
140
+ | **Playwright** | [`examples/cookbooks/playwright_scraper.py`](examples/cookbooks/playwright_scraper.py) | Multi-page scraper with `@durable_async` checkpointing that skips already-scraped pages on resume |
141
+ | **Streamlit UI** | [`examples/interactive_demo/app.py`](examples/interactive_demo/README.md) | Local crash injection and WAL replay visualizer |
142
+ | **Browser-Use** | [`examples/cookbooks/browser_use_durable.py`](examples/cookbooks/browser_use_durable.py) | Release digest workflow with step-level crash recovery |
143
+ | **LangGraph** | [`examples/cookbooks/langgraph_financial_analyst.py`](examples/cookbooks/langgraph_financial_analyst.py) | 4-step financial analyst pipeline with offline and live DeepSeek modes |
144
+ | **DSPy** | [`examples/cookbooks/dspy_durable_optimize.py`](examples/cookbooks/dspy_durable_optimize.py) | Prompt optimizer pipeline with step-level checkpointing |
145
+ | **Pydantic AI** | [`examples/cookbooks/pydantic_ai_durable.py`](examples/cookbooks/pydantic_ai_durable.py) | Type-safe agent workflow wrapped with LetItLoop step persistence |
146
+ | **FastAPI** | [`examples/fastapi_durable_background.py`](examples/fastapi_durable_background.py) | Single-worker durable background task queue backed by local WAL |
147
+ | **CrewAI / LlamaIndex** | [`examples/crewai_durable_tools.py`](examples/crewai_durable_tools.py) • [`examples/llamaindex_durable_workflow.py`](examples/llamaindex_durable_workflow.py) | Tool-call and step wrapper examples |
148
+
149
+ Run the financial analyst cookbook offline without API keys:
150
+
151
+ ```bash
152
+ python -m pip install -e ".[financial-agent]"
153
+ python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --offline
154
+ python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --offline --demo
155
+ ```
156
+
157
+ ---
158
+
159
+ ## 🛡️ GitHub Action CI Gate (`letitloop-action@v2`)
160
+
161
+ Verify `LILWAL02` frame checksums and Python AST syntax in GitHub Actions:
162
+
163
+ ```yaml
164
+ name: Verify WAL & Python AST
165
+ on: [pull_request]
166
+
167
+ jobs:
168
+ verify:
169
+ runs-on: ubuntu-latest
170
+ steps:
171
+ - uses: actions/checkout@v4
172
+ - uses: sdageltc/letitloop-action@v2
173
+ with:
174
+ token: ${{ secrets.GITHUB_TOKEN }}
175
+ mode: 'gate'
176
+ wal-dir: '.bench_wal'
177
+ workspace: '.'
178
+ ```
179
+
180
+ ---
181
+
182
+ ## 📜 Architecture Documentation
183
+
184
+ - [**Architecture & Trade-Offs**](docs/ARCHITECTURE_AND_TRADE_OFFS.md): Single-writer design contract, failure modes, and comparison with DBOS, LangGraph, and Temporal.
185
+ - [**ADR-0001**](docs/adr/0001-write-ahead-logging.md): Write-Ahead Logging (`LILWAL02`) & Torn-Tail Recovery.
186
+ - [**State Machine Specification**](docs/state_machine.md): Event-sourced state transitions and replay rules.
187
+ - [**Adapter Reference**](docs/adapters.md): Optional adapter shims under `letitloop.adapters`.
188
+
189
+ ---
190
+
191
+ ## 👥 Contributors
192
+
193
+ <table>
194
+ <tbody>
195
+ <tr>
196
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/sdageltc"><img src="https://avatars.githubusercontent.com/u/268154463?v=4" width="100px;" alt="sdageltc"/><br /><sub><b>sdageltc</b></sub></a></td>
197
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/h4syy"><img src="https://avatars.githubusercontent.com/u/59239840?v=4" width="100px;" alt="Yash Paudel"/><br /><sub><b>Yash Paudel</b></sub></a></td>
198
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/wangshen-tech"><img src="https://avatars.githubusercontent.com/u/190895315?v=4" width="100px;" alt="wangshen-tech"/><br /><sub><b>wangshen-tech</b></sub></a></td>
199
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/MagMueller"><img src="https://github.com/MagMueller.png" width="100px;" alt="MagMueller"/><br /><sub><b>MagMueller</b></sub></a></td>
200
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/darkseidpaul"><img src="https://github.com/darkseidpaul.png" width="100px;" alt="darkseidpaul"/><br /><sub><b>darkseidpaul</b></sub></a></td>
201
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Aaqibhafeezkhan"><img src="https://github.com/Aaqibhafeezkhan.png" width="100px;" alt="Aaqibhafeezkhan"/><br /><sub><b>Aaqibhafeezkhan</b></sub></a></td>
202
+ </tr>
203
+ </tbody>
204
+ </table>
205
+
206
+ ## License
207
+
208
+ Distributed under the MIT License. Copyright (c) 2026 sdageltc. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,45 @@
1
+ # Architectural Design, Contract Boundaries & Trade-Offs (`v0.7.2`)
2
+
3
+ This document specifies what `letitloop` guarantees, where its single-process local filesystem model stops, and when you should use an established database-backed workflow engine instead.
4
+
5
+ ---
6
+
7
+ ## 1. Core Mechanism (`LILWAL02`)
8
+
9
+ `letitloop` persists step execution state in a local directory (`wal_dir`, defaulting to `.durable_wal`):
10
+ - **Write-Ahead Log (`state.wal.jsonl`)**: Every completed `step()` or `async_step()` appends an event record encoded in `LILWAL02` framing:
11
+ ```text
12
+ \nLILWAL02:<byte_len_hex>:<crc32_hex>:<canonical_json_payload>\n
13
+ ```
14
+ Each event includes a monotonic sequence number (`seq >= 1`, starting with `INIT`) and an unkeyed SHA-256 hash chain (`prev_hash` -> `event_hash`) followed by `f.flush()` and `os.fsync()`.
15
+ - **Periodic Atomic Snapshots (`state.json`)**: Every 50 steps and on clean context exit (`close()`), the projected state is written to a PID/timestamped temporary file in the same directory, flushed with `os.fsync()`, atomically swapped into `state.json` via `os.replace()` (with a 6-attempt exponential backoff loop on Windows NTFS to survive transient antivirus/indexer handles), and followed by a parent directory `fsync` on POSIX.
16
+ - **Crash Recovery**: On restart, `load_state()` reads `state.wal.jsonl`. If the final frame was torn mid-write by `SIGKILL` or power loss, the corrupt tail is truncated back to the last valid byte offset (`good_end`). Any corruption *prior* to the final frame raises `StateError` (fail-closed).
17
+
18
+ ---
19
+
20
+ ## 2. Explicit Contract Boundaries & Limitations
21
+
22
+ 1. **Single-Writer Local Filesystem Contract**:
23
+ - `letitloop` is designed for a **single active process per `wal_dir`** on a local POSIX or Windows NTFS volume.
24
+ - Do not place `wal_dir` on network filesystems (NFS, SMB, cloud-synced FUSE mounts) where `O_CREAT | O_EXCL` or `os.replace()` atomicity is not guaranteed.
25
+ 2. **Step Identity (`step_id`)**:
26
+ - `step(step_id, fn, *args, **kwargs)` keys completed outputs strictly by `step_id` within `wal_dir`.
27
+ - Inside loops, assign a distinct `step_id` per iteration (for example, `step(f"scrape_page_{i}", scrape, url)`).
28
+ - To run a completed workflow again from scratch with new inputs, either pass a distinct `wal_dir` per run ID (`wal_dir=f".wal/{run_id}"`) or remove the prior `wal_dir`.
29
+ 3. **Integrity vs. Cryptographic Authentication**:
30
+ - `LILWAL02` uses **CRC32** frame checksums and an **unkeyed SHA-256 hash chain** to detect accidental disk corruption and torn writes. It does not perform keyed HMAC authentication on WAL frames; any local process with write permissions to `wal_dir` can rewrite the file.
31
+ 4. **External Side Effects (`atomic_marker`)**:
32
+ - `atomic_marker(marker_id)` serializes local execution via a two-tier lock (thread lock + `FileLock` with OS process start-time token verification) and records `.pending.<pid>` before yielding and `.committed` after the block succeeds.
33
+ - If `SIGKILL` strikes *after* an outbound HTTP request leaves the machine but *before* `.committed` is written, the block will yield `True` again on restart. Always pair non-idempotent remote HTTP calls with an upstream `Idempotency-Key` header.
34
+
35
+ ---
36
+
37
+ ## 3. Why We Narrowed Scope (November 2026 Landscape Note)
38
+
39
+ `letitloop` began in 2024 as a 70-file autonomous coding-agent harness before being stripped down in October 2026 (`v0.7.0`) into a single-dependency (`psutil`) local durability kernel.
40
+
41
+ By late 2026, two major shifts occurred across the Python AI ecosystem:
42
+ 1. **In-process SQLite workflow engines matured**: **DBOS (`dbos`)** runs zero-daemon on embedded SQLite by default with `@DBOS.workflow()` / `@DBOS.step()`, durable timers (`DBOS.sleep`), queues, a zero-code upgrade path to PostgreSQL, and official integrations with PydanticAI and the OpenAI Agents SDK. **Prefect** similarly offers an ephemeral local SQLite mode.
43
+ 2. **Agent frameworks shipped native local checkpointers**: **LangGraph** (`SqliteSaver` + `@entrypoint` / `@task`), **CrewAI** (`@persist` Flows on SQLite), **Google ADK** (`DatabaseSessionService`), **OpenAI Agents SDK** (`SQLiteSession`), and **LlamaIndex** (`WorkflowCheckpointer`) all provide built-in state persistence.
44
+
45
+ Consequently, `letitloop` does not attempt to compete with DBOS, Temporal, or native framework savers. It remains a compact, auditable reference implementation (~2,000 lines of core Python in `orchestrator/`) for developers who want a zero-SQLite, human-readable JSONL Write-Ahead Log and a cross-platform CLI crash supervisor (`lil watch`) with one dependency.
@@ -0,0 +1,4 @@
1
+ # Architecture Decision Records (ADRs)
2
+
3
+ - [ADR-0001: Write-Ahead Logging (`LILWAL02`) & Torn-Tail Recovery](0001-write-ahead-logging.md)
4
+ - [Architecture, Contract Boundaries & Trade-Offs (`v0.7.2`)](../ARCHITECTURE_AND_TRADE_OFFS.md)
@@ -1,6 +1,6 @@
1
1
  """LetItLoop — Deterministic durability kernel and crash-resilient execution gate."""
2
2
 
3
- __version__ = "0.6.0"
3
+ __version__ = "0.7.2"
4
4
 
5
5
  from orchestrator.decorators import (
6
6
  DurableSerializationError,