stepfork 0.1.0a6__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. {stepfork-0.1.0a6 → stepfork-0.2.1}/.gitignore +1 -0
  2. {stepfork-0.1.0a6 → stepfork-0.2.1}/CHANGELOG.md +108 -0
  3. {stepfork-0.1.0a6 → stepfork-0.2.1}/PKG-INFO +72 -26
  4. {stepfork-0.1.0a6 → stepfork-0.2.1}/README.md +71 -25
  5. stepfork-0.2.1/docs/cli.md +705 -0
  6. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/community/early-adopter-guide.md +3 -4
  7. stepfork-0.2.1/docs/fork.md +545 -0
  8. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/getting-started.md +8 -9
  9. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/hybrid.md +9 -3
  10. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/index.md +2 -2
  11. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/langgraph.md +138 -19
  12. stepfork-0.2.1/docs/minimize.md +266 -0
  13. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/pypi-publishing.md +7 -6
  14. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/pytest-export.md +87 -0
  15. stepfork-0.2.1/docs/real-llm-case-study.md +145 -0
  16. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/release-checklist.md +1 -1
  17. stepfork-0.2.1/docs/releases/v0.2.0.md +58 -0
  18. stepfork-0.2.1/examples/real-llm-case-study/.gitignore +13 -0
  19. stepfork-0.2.1/examples/real-llm-case-study/.python-version +1 -0
  20. stepfork-0.2.1/examples/real-llm-case-study/CASE_STUDY.md +348 -0
  21. stepfork-0.2.1/examples/real-llm-case-study/README.md +144 -0
  22. stepfork-0.2.1/examples/real-llm-case-study/RESULTS.md +160 -0
  23. stepfork-0.2.1/examples/real-llm-case-study/agent.py +292 -0
  24. stepfork-0.2.1/examples/real-llm-case-study/counters.py +19 -0
  25. stepfork-0.2.1/examples/real-llm-case-study/evidence/README.md +25 -0
  26. stepfork-0.2.1/examples/real-llm-case-study/evidence/clean_install_verification.txt +152 -0
  27. stepfork-0.2.1/examples/real-llm-case-study/evidence/divergence.txt +6 -0
  28. stepfork-0.2.1/examples/real-llm-case-study/evidence/fix.diff +30 -0
  29. stepfork-0.2.1/examples/real-llm-case-study/evidence/frozen_replay.txt +32 -0
  30. stepfork-0.2.1/examples/real-llm-case-study/evidence/full_suite.txt +2 -0
  31. stepfork-0.2.1/examples/real-llm-case-study/evidence/green_pass.txt +2 -0
  32. stepfork-0.2.1/examples/real-llm-case-study/evidence/hybrid_comparison.json +54 -0
  33. stepfork-0.2.1/examples/real-llm-case-study/evidence/red_failure.txt +110 -0
  34. stepfork-0.2.1/examples/real-llm-case-study/expected.json +20 -0
  35. stepfork-0.2.1/examples/real-llm-case-study/fix.diff +30 -0
  36. stepfork-0.2.1/examples/real-llm-case-study/fixtures/deployments.json +29 -0
  37. stepfork-0.2.1/examples/real-llm-case-study/fixtures/runbooks.json +16 -0
  38. stepfork-0.2.1/examples/real-llm-case-study/fixtures/services.json +44 -0
  39. stepfork-0.2.1/examples/real-llm-case-study/provider.py +147 -0
  40. stepfork-0.2.1/examples/real-llm-case-study/pyproject.toml +22 -0
  41. stepfork-0.2.1/examples/real-llm-case-study/scenario_a.py +32 -0
  42. stepfork-0.2.1/examples/real-llm-case-study/scenario_b.py +41 -0
  43. stepfork-0.2.1/examples/real-llm-case-study/scripts/hybrid_prompt_comparison.py +70 -0
  44. stepfork-0.2.1/examples/real-llm-case-study/scripts/record_incident.py +63 -0
  45. stepfork-0.2.1/examples/real-llm-case-study/scripts/verify_frozen.py +46 -0
  46. stepfork-0.2.1/examples/real-llm-case-study/snapshots/agent_buggy.py +299 -0
  47. stepfork-0.2.1/examples/real-llm-case-study/snapshots/agent_fixed.py +292 -0
  48. stepfork-0.2.1/examples/real-llm-case-study/tests/test_frozen_replay_guards.py +42 -0
  49. stepfork-0.2.1/examples/real-llm-case-study/tests/test_incident_regression.py +68 -0
  50. stepfork-0.2.1/examples/real-llm-case-study/tests/test_scenario_a_refactor.py +23 -0
  51. stepfork-0.2.1/examples/real-llm-case-study/tests/test_scenario_b_divergence.py +32 -0
  52. stepfork-0.2.1/examples/real-llm-case-study/traces/incident-triage.sftrace/events.jsonl +14 -0
  53. stepfork-0.2.1/examples/real-llm-case-study/traces/incident-triage.sftrace/integrity.json +9 -0
  54. stepfork-0.2.1/examples/real-llm-case-study/traces/incident-triage.sftrace/manifest.json +21 -0
  55. stepfork-0.2.1/examples/real-llm-case-study/uv.lock +636 -0
  56. {stepfork-0.1.0a6 → stepfork-0.2.1}/mkdocs.yml +4 -0
  57. {stepfork-0.1.0a6 → stepfork-0.2.1}/pyproject.toml +6 -0
  58. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/export.py +3 -10
  59. stepfork-0.2.1/src/stepfork/cli/fork.py +152 -0
  60. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/main.py +8 -0
  61. stepfork-0.2.1/src/stepfork/cli/minimize.py +239 -0
  62. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/replay.py +1 -0
  63. stepfork-0.2.1/src/stepfork/cli/run.py +141 -0
  64. stepfork-0.2.1/src/stepfork/cli/score.py +250 -0
  65. stepfork-0.2.1/src/stepfork/export/__init__.py +44 -0
  66. stepfork-0.2.1/src/stepfork/export/mutants.py +296 -0
  67. stepfork-0.2.1/src/stepfork/export/receipt.py +394 -0
  68. stepfork-0.2.1/src/stepfork/export/scoring.py +226 -0
  69. stepfork-0.2.1/src/stepfork/export/testfile.py +178 -0
  70. stepfork-0.2.1/src/stepfork/fork/__init__.py +25 -0
  71. stepfork-0.2.1/src/stepfork/fork/engine.py +258 -0
  72. stepfork-0.2.1/src/stepfork/fork/models.py +76 -0
  73. stepfork-0.2.1/src/stepfork/fork/overrides.py +186 -0
  74. stepfork-0.2.1/src/stepfork/minimize/__init__.py +27 -0
  75. stepfork-0.2.1/src/stepfork/minimize/delta_debug.py +251 -0
  76. stepfork-0.2.1/src/stepfork/minimize/engine.py +305 -0
  77. stepfork-0.2.1/src/stepfork/minimize/models.py +155 -0
  78. stepfork-0.2.1/src/stepfork/minimize/signature.py +309 -0
  79. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/version.py +1 -1
  80. stepfork-0.2.1/tests/golden/agents/__init__.py +20 -0
  81. stepfork-0.2.1/tests/golden/agents/crash_agent.py +80 -0
  82. stepfork-0.2.1/tests/golden/agents/fake_llm.py +41 -0
  83. stepfork-0.2.1/tests/golden/agents/triage_agent.py +85 -0
  84. stepfork-0.2.1/tests/golden/successful_run.sftrace/redactions.json +4 -0
  85. stepfork-0.2.1/tests/integration/.gitkeep +0 -0
  86. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_docs_assets.py +4 -3
  87. stepfork-0.2.1/tests/integration/test_docs_langgraph_example.py +110 -0
  88. stepfork-0.2.1/tests/integration/test_export_pytest_agent_fixtures.py +284 -0
  89. stepfork-0.2.1/tests/integration/test_fork_integration.py +169 -0
  90. stepfork-0.2.1/tests/integration/test_minimize_integration.py +193 -0
  91. stepfork-0.2.1/tests/property/.gitkeep +0 -0
  92. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_cli_export.py +32 -0
  93. stepfork-0.2.1/tests/unit/test_cli_minimize.py +400 -0
  94. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_cli_replay.py +22 -0
  95. stepfork-0.2.1/tests/unit/test_cli_run.py +194 -0
  96. stepfork-0.2.1/tests/unit/test_cli_score.py +149 -0
  97. stepfork-0.2.1/tests/unit/test_export_mutants.py +187 -0
  98. stepfork-0.2.1/tests/unit/test_export_scoring.py +194 -0
  99. stepfork-0.2.1/tests/unit/test_export_testfile.py +138 -0
  100. stepfork-0.2.1/tests/unit/test_fork_edge_cases.py +209 -0
  101. stepfork-0.2.1/tests/unit/test_fork_engine.py +214 -0
  102. stepfork-0.2.1/tests/unit/test_fork_overrides.py +212 -0
  103. stepfork-0.2.1/tests/unit/test_minimize_delta_debug.py +199 -0
  104. stepfork-0.2.1/tests/unit/test_minimize_mode_validation.py +141 -0
  105. stepfork-0.2.1/tests/unit/test_minimize_signature.py +180 -0
  106. stepfork-0.2.1/tests/unit/test_minimize_unreached_call.py +211 -0
  107. stepfork-0.2.1/tests/unit/test_replay_contract.py +112 -0
  108. stepfork-0.2.1/tests/unit/test_replay_contract_changed_args.py +39 -0
  109. stepfork-0.2.1/tests/unit/test_replay_contract_extra_calls.py +47 -0
  110. stepfork-0.1.0a6/docs/cli.md +0 -358
  111. stepfork-0.1.0a6/src/stepfork/export/__init__.py +0 -20
  112. stepfork-0.1.0a6/src/stepfork/fork/__init__.py +0 -4
  113. stepfork-0.1.0a6/src/stepfork/minimize/__init__.py +0 -4
  114. {stepfork-0.1.0a6 → stepfork-0.2.1}/CODE_OF_CONDUCT.md +0 -0
  115. {stepfork-0.1.0a6 → stepfork-0.2.1}/CONTRIBUTING.md +0 -0
  116. {stepfork-0.1.0a6 → stepfork-0.2.1}/LICENSE +0 -0
  117. {stepfork-0.1.0a6 → stepfork-0.2.1}/SECURITY.md +0 -0
  118. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/.gitkeep +0 -0
  119. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/architecture.md +0 -0
  120. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/assets/stepfork-logo.png +0 -0
  121. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/assets/stepfork-workflow.png +0 -0
  122. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/concepts.md +0 -0
  123. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/development.md +0 -0
  124. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/diff.md +0 -0
  125. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/examples.md +0 -0
  126. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/integrations.md +0 -0
  127. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/openai.md +0 -0
  128. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/recording.md +0 -0
  129. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/releases/v0.1.0a1.md +0 -0
  130. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/releases/v0.1.0a2.md +0 -0
  131. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/releases/v0.1.0a3.md +0 -0
  132. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/releases/v0.1.0a4.md +0 -0
  133. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/releases/v0.1.0a5.md +0 -0
  134. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/releases/v0.1.0a6.md +0 -0
  135. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/replay.md +0 -0
  136. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/security.md +0 -0
  137. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/trace-format.md +0 -0
  138. {stepfork-0.1.0a6 → stepfork-0.2.1}/docs/troubleshooting.md +0 -0
  139. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/__init__.py +0 -0
  140. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/booking_agent/__init__.py +0 -0
  141. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/booking_agent/agent.py +0 -0
  142. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/booking_agent/demo.py +0 -0
  143. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/booking_agent/expected.json +0 -0
  144. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/README.md +0 -0
  145. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/__init__.py +0 -0
  146. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/agent.py +0 -0
  147. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/demo.py +0 -0
  148. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/expected.json +0 -0
  149. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/regression/langgraph_failure.sftrace/events.jsonl +0 -0
  150. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/regression/langgraph_failure.sftrace/integrity.json +0 -0
  151. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/regression/langgraph_failure.sftrace/manifest.json +0 -0
  152. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/regression/langgraph_failure.sftrace/redactions.json +0 -0
  153. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/langgraph_agent/regression/test_langgraph_regression.py +0 -0
  154. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/model_decision/README.md +0 -0
  155. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/model_decision/__init__.py +0 -0
  156. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/model_decision/agent.py +0 -0
  157. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/model_decision/demo.py +0 -0
  158. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/openai_chat/README.md +0 -0
  159. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/openai_chat/__init__.py +0 -0
  160. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/openai_chat/agent.py +0 -0
  161. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/openai_chat/demo.py +0 -0
  162. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/openai_chat/expected.json +0 -0
  163. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/quickstart/README.md +0 -0
  164. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/quickstart/__init__.py +0 -0
  165. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/quickstart/agent.py +0 -0
  166. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/quickstart/demo.py +0 -0
  167. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/quickstart/expected.json +0 -0
  168. {stepfork-0.1.0a6/tests/golden/diff_baseline.sftrace → stepfork-0.2.1/examples/real-llm-case-study/traces/incident-triage.sftrace}/redactions.json +0 -0
  169. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/refund_agent/__init__.py +0 -0
  170. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/refund_agent/agent.py +0 -0
  171. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/refund_agent/demo.py +0 -0
  172. {stepfork-0.1.0a6 → stepfork-0.2.1}/examples/refund_agent/expected.json +0 -0
  173. {stepfork-0.1.0a6 → stepfork-0.2.1}/scripts/terminal-demo/README.md +0 -0
  174. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/__init__.py +0 -0
  175. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/__main__.py +0 -0
  176. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/assertions.py +0 -0
  177. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/__init__.py +0 -0
  178. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/diff.py +0 -0
  179. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/inspect.py +0 -0
  180. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/cli/validate.py +0 -0
  181. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/diff/__init__.py +0 -0
  182. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/diff/compare.py +0 -0
  183. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/diff/engine.py +0 -0
  184. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/diff/models.py +0 -0
  185. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/export/entrypoint.py +0 -0
  186. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/export/generator.py +0 -0
  187. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/export/runtime.py +0 -0
  188. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/inspect/__init__.py +0 -0
  189. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/inspect/inspector.py +0 -0
  190. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/inspect/models.py +0 -0
  191. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/integrations/__init__.py +0 -0
  192. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/integrations/langgraph.py +0 -0
  193. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/integrations/openai.py +0 -0
  194. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/py.typed +0 -0
  195. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/recorder/__init__.py +0 -0
  196. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/recorder/llm.py +0 -0
  197. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/recorder/session.py +0 -0
  198. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/recorder/tooling.py +0 -0
  199. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/replay/__init__.py +0 -0
  200. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/replay/exceptions.py +0 -0
  201. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/replay/plan.py +0 -0
  202. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/replay/session.py +0 -0
  203. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/__init__.py +0 -0
  204. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/canonical.py +0 -0
  205. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/hashing.py +0 -0
  206. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/integrity.py +0 -0
  207. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/jsonable.py +0 -0
  208. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/manifest.py +0 -0
  209. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/models.py +0 -0
  210. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/redaction.py +0 -0
  211. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/replay_policy.py +0 -0
  212. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/schema.py +0 -0
  213. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/storage.py +0 -0
  214. {stepfork-0.1.0a6 → stepfork-0.2.1}/src/stepfork/trace/validation.py +0 -0
  215. /stepfork-0.1.0a6/tests/golden/.gitkeep → /stepfork-0.2.1/tests/__init__.py +0 -0
  216. {stepfork-0.1.0a6/tests/integration → stepfork-0.2.1/tests/golden}/.gitkeep +0 -0
  217. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/README.md +0 -0
  218. /stepfork-0.1.0a6/tests/property/.gitkeep → /stepfork-0.2.1/tests/golden/__init__.py +0 -0
  219. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/build_fixtures.py +0 -0
  220. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/diff_baseline.sftrace/events.jsonl +0 -0
  221. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/diff_baseline.sftrace/integrity.json +0 -0
  222. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/diff_baseline.sftrace/manifest.json +0 -0
  223. {stepfork-0.1.0a6/tests/golden/diff_changed.sftrace → stepfork-0.2.1/tests/golden/diff_baseline.sftrace}/redactions.json +0 -0
  224. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/diff_changed.sftrace/events.jsonl +0 -0
  225. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/diff_changed.sftrace/integrity.json +0 -0
  226. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/diff_changed.sftrace/manifest.json +0 -0
  227. {stepfork-0.1.0a6/tests/golden/failed_llm_run.sftrace → stepfork-0.2.1/tests/golden/diff_changed.sftrace}/redactions.json +0 -0
  228. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_llm_run.sftrace/events.jsonl +0 -0
  229. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_llm_run.sftrace/integrity.json +0 -0
  230. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_llm_run.sftrace/manifest.json +0 -0
  231. {stepfork-0.1.0a6/tests/golden/legacy_v01.sftrace → stepfork-0.2.1/tests/golden/failed_llm_run.sftrace}/redactions.json +0 -0
  232. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_tool_run.sftrace/events.jsonl +0 -0
  233. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_tool_run.sftrace/integrity.json +0 -0
  234. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_tool_run.sftrace/manifest.json +0 -0
  235. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/failed_tool_run.sftrace/redactions.json +0 -0
  236. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/legacy_v01.sftrace/events.jsonl +0 -0
  237. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/legacy_v01.sftrace/manifest.json +0 -0
  238. {stepfork-0.1.0a6/tests/golden/partial_run.sftrace → stepfork-0.2.1/tests/golden/legacy_v01.sftrace}/redactions.json +0 -0
  239. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/partial_run.sftrace/events.jsonl +0 -0
  240. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/partial_run.sftrace/integrity.json +0 -0
  241. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/partial_run.sftrace/manifest.json +0 -0
  242. {stepfork-0.1.0a6/tests/golden/successful_run.sftrace → stepfork-0.2.1/tests/golden/partial_run.sftrace}/redactions.json +0 -0
  243. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/successful_run.sftrace/events.jsonl +0 -0
  244. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/successful_run.sftrace/integrity.json +0 -0
  245. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/golden/successful_run.sftrace/manifest.json +0 -0
  246. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_failure_to_test.py +0 -0
  247. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_golden_fixtures.py +0 -0
  248. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_langgraph_agent.py +0 -0
  249. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_model_decision_demo.py +0 -0
  250. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_quickstart_failure_to_test.py +0 -0
  251. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_refund_failure_to_test.py +0 -0
  252. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_secure_trace_roundtrip.py +0 -0
  253. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_trace_infrastructure_flow.py +0 -0
  254. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/integration/test_trace_roundtrip.py +0 -0
  255. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/property/test_trace_properties.py +0 -0
  256. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_assertions.py +0 -0
  257. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_async_boundaries.py +0 -0
  258. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_canonical.py +0 -0
  259. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_cli.py +0 -0
  260. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_cli_diff.py +0 -0
  261. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_cli_inspect.py +0 -0
  262. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_cli_validate.py +0 -0
  263. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_diff.py +0 -0
  264. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_export.py +0 -0
  265. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_hashing.py +0 -0
  266. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_hybrid_replay.py +0 -0
  267. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_inspector.py +0 -0
  268. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_integrity.py +0 -0
  269. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_invalid_bundles.py +0 -0
  270. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_jsonable.py +0 -0
  271. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_langgraph_integration.py +0 -0
  272. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_live_tool_authorization.py +0 -0
  273. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_llm_request.py +0 -0
  274. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_manifest.py +0 -0
  275. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_openai_integration.py +0 -0
  276. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_recording_session.py +0 -0
  277. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_redaction.py +0 -0
  278. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_replay_plan.py +0 -0
  279. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_replay_tool.py +0 -0
  280. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_schema.py +0 -0
  281. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_storage.py +0 -0
  282. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_trace_models.py +0 -0
  283. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_trace_tool.py +0 -0
  284. {stepfork-0.1.0a6 → stepfork-0.2.1}/tests/unit/test_validation.py +0 -0
@@ -60,3 +60,4 @@ examples/model_decision/.artifacts/
60
60
 
61
61
  # Quickstart demo artifacts
62
62
  examples/quickstart/.artifacts/
63
+ research_langgraph.py
@@ -4,6 +4,114 @@ All notable changes to Stepfork are recorded here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.2.1] - 2026-10-20
8
+
9
+ Minimization correctness fixes, tri-state regression verdicts, and expectation
10
+ scoring on top of v0.2.0. No `.sftrace` format change.
11
+
12
+ ### Added
13
+
14
+ - **`stepfork run`** executes an exported pytest regression test and writes a
15
+ machine-readable receipt. It reports a tri-state verdict (`passed`, `failed`,
16
+ or `could_not_execute`), so a check that never ran (for example, a missing
17
+ bundle) is not reported as a detected regression. Exit status is 0 for a
18
+ pass, 1 for a failure, and 2 for `could_not_execute`.
19
+ - **`stepfork score`** scores an exported expectation against a mutant battery
20
+ derived from both the recorded run and the claim, reporting whether the
21
+ expectation is claim-pinned (rejects the recorded run) or run-pinned.
22
+ - Claim-drawn mutant battery and expectation scoring internals
23
+ (`export/mutants.py`, `export/scoring.py`, `export/testfile.py`).
24
+ - Receipt writer owned by the runner (`export/receipt.py`) that records the
25
+ bundle digest, test hash, counts, and verdict outside the tree under test.
26
+ - Integration agent fixtures for the export-to-pytest path
27
+ (`tests/golden/agents/{triage_agent,crash_agent,fake_llm}.py`) plus 12
28
+ end-to-end tests covering changed-argument and extra-call divergence and
29
+ secret redaction.
30
+ - Regression test proving minimized failed traces retain `run_end` when
31
+ minimization keeps a non-contiguous event subset.
32
+
33
+ ### Fixed
34
+
35
+ - `minimize` now validates `--mode` up front and rejects invalid modes with
36
+ exit 2 instead of silently minimizing a failure that never existed.
37
+ - `minimize` refuses failure signatures produced by Stepfork's own errors
38
+ (for example `ReplayPolicyError`) and by a replay that never reached the
39
+ recorded call, rather than treating them as the failure under test.
40
+ - `minimize` no longer drops `run_end` from a minimized failed trace; the CLI
41
+ saves the events the engine actually kept instead of slicing the original
42
+ trace by index.
43
+ - `minimize` no longer prints `Minimal: No` beside an "already minimal"
44
+ warning; a successfully minimized trace reports `Minimal: Yes`.
45
+ - `replay` and `export` accept the `-e` short flag for `--entrypoint`, matching
46
+ `minimize`.
47
+
48
+ ### Changed
49
+
50
+ - Export scoring no longer reports a fix-side test as a claim-pinned oracle by
51
+ construction; the verdict describes where the bundle came from.
52
+ - Replay extra-call tests are pinned to `ReplayExhaustedError`.
53
+
54
+ ### Documentation
55
+
56
+ - State the frozen-replay export boundary in `docs/pytest-export.md` and add
57
+ divergence troubleshooting.
58
+ - Drop leftover `pip install --pre stepfork` instructions and note the
59
+ fix-side score verdict.
60
+ - Document `stepfork run` and its exit codes.
61
+
62
+ ### Limitations
63
+
64
+ - The minimization, fork, and verdict limitations listed under v0.2.0 still
65
+ apply.
66
+
67
+ ## [0.2.0] - 2026-10-12
68
+
69
+ Automatic failure minimization and fork-at-step debugging with optional overrides.
70
+
71
+ ### Added
72
+
73
+ - **Failure minimization** via `stepfork minimize` command that automatically
74
+ finds the smallest reproducible trace preserving the original failure.
75
+ - Dependency-aware delta debugging algorithm that respects parent-child event
76
+ relationships and structural integrity.
77
+ - Failure signature detection supporting exception-based, replay-divergence,
78
+ and output-mismatch failures.
79
+ - Minimization orchestrator with timeout handling, nondeterminism detection,
80
+ and iteration limits.
81
+ - Comprehensive unit tests, integration tests, and CLI tests for minimization.
82
+ - Complete documentation in `docs/minimize.md` and updated CLI reference.
83
+ - **Fork-at-step** debugging via `stepfork fork` command that creates new traces
84
+ at specific execution points while preserving all valid history before the fork.
85
+ - Fork points can be specified by step number (`--at-step N`) or event ID
86
+ (`--at-event ID`).
87
+ - Typed override system (Python API only) to modify tool_result and llm_response
88
+ outputs in forked traces via `OverrideSpec`.
89
+ - Provenance tracking with `ForkInfo` metadata linking forked traces to parent
90
+ trace, fork point, timestamp, and applied overrides.
91
+ - Structural validation ensures no broken parent dependencies and maintains
92
+ trace integrity.
93
+ - 43 fork-specific tests covering fork engine, overrides, edge cases, and
94
+ integration scenarios.
95
+ - Complete documentation in `docs/fork.md` with CLI and Python API examples.
96
+
97
+ ### Changed
98
+
99
+ - README roadmap updated to reflect v0.2 implementation status.
100
+
101
+ ### Limitations
102
+
103
+ - Minimization requires replay to fail consistently. Highly nondeterministic
104
+ failures may not minimize reliably.
105
+ - Delta debugging uses binary search with dependency preservation. Very large
106
+ traces (1000+ events) may require significant replay attempts.
107
+ - Timeout handling uses SIGALRM on Unix systems; Windows support is limited.
108
+ - Fork-at-step overrides are only available via Python API, not CLI.
109
+ - Fork creates modified traces but does not automatically continue execution from
110
+ the fork point; replay must be invoked separately.
111
+ - Overrides can only modify outputs (tool_result, llm_response), not inputs
112
+ (tool_call arguments or llm_request prompts).
113
+ - No automatic divergence detection when replaying forked traces with overrides.
114
+
7
115
  ## [0.1.0a6] - 2026-10-10
8
116
 
9
117
  Behavioral assertions and selective live-model evaluation, with no trace
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: stepfork
3
- Version: 0.1.0a6
3
+ Version: 0.2.1
4
4
  Summary: Behavioral regression testing for AI agents.
5
5
  Project-URL: Homepage, https://github.com/utsab345/stepfork
6
6
  Project-URL: Repository, https://github.com/utsab345/stepfork
@@ -43,6 +43,16 @@ Description-Content-Type: text/markdown
43
43
  Local-first behavioral regression testing for AI agents.
44
44
  </p>
45
45
 
46
+ ## Who is this for?
47
+
48
+ Stepfork is for developers building AI agents who need to:
49
+ - Turn production failures into reproducible regression tests
50
+ - Debug multi-step agent behaviors without re-running live services
51
+ - Prevent behavioral regressions when fixing bugs or refactoring code
52
+ - Minimize complex failures to their essential reproduction steps
53
+
54
+ If you're writing evals, Stepfork complements them: evals measure model quality across datasets, Stepfork tests that specific agent behaviors don't break.
55
+
46
56
  <p align="center">
47
57
  <a href="https://pypi.org/project/stepfork/"><img alt="PyPI" src="https://img.shields.io/pypi/v/stepfork?include_prereleases&label=PyPI&color=blue"></a>
48
58
  <a href="https://github.com/utsab345/stepfork/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/utsab345/stepfork/actions/workflows/ci.yml/badge.svg"></a>
@@ -52,7 +62,7 @@ Description-Content-Type: text/markdown
52
62
  </p>
53
63
 
54
64
  <p align="center">
55
- Install the alpha: <code>pip install --pre stepfork</code>
65
+ Install the current release: <code>pip install stepfork</code>
56
66
  </p>
57
67
 
58
68
  Product goal:
@@ -73,6 +83,12 @@ regression test that asserts the corrected behavior. The test fails on the
73
83
  buggy code and passes on the fix, using the recorded responses instead of live
74
84
  services.
75
85
 
86
+ ## See It In Action
87
+
88
+ This terminal recording runs the complete failure-to-test flow:
89
+
90
+ ![Stepfork terminal demo](scripts/terminal-demo/stepfork-demo.gif)
91
+
76
92
  ## How Stepfork Works
77
93
 
78
94
  Stepfork turns a failed AI-agent execution into a reproducible pytest
@@ -93,6 +109,10 @@ Compare → Define Expected Behavior → Export pytest → Verify Fix
93
109
  you want frozen with `@trace_tool` or `llm_request`.
94
110
  - **Behavioral diff** compares a buggy run against a corrected run and reports
95
111
  exactly which behaviors changed.
112
+ - **Failure minimization** automatically finds the smallest trace that still
113
+ reproduces a failure via dependency-aware delta debugging.
114
+ - **Fork-at-step** creates new traces at specific execution points with optional
115
+ output overrides for "what-if" debugging scenarios.
96
116
  - **pytest export** turns a recorded failure into a regression test that
97
117
  asserts the corrected behavior.
98
118
  - **Best-effort redaction** of known credential-shaped values at record time.
@@ -128,21 +148,20 @@ change an external system; the allowlist does not sandbox it. See
128
148
 
129
149
  ## Installation
130
150
 
131
- Stepfork is published on PyPI. Install the current alpha with:
151
+ Stepfork is published on PyPI. Install the current release with:
132
152
 
133
153
  ```bash
134
154
  # pip
135
- pip install --pre stepfork
155
+ pip install stepfork
136
156
 
137
157
  # uv
138
- uv pip install --pre stepfork
158
+ uv pip install stepfork
139
159
  ```
140
160
 
141
- The `--pre` flag is required while Stepfork is a pre-release. You can also
142
- install from the tagged GitHub repository:
161
+ You can also install from source or a tagged release:
143
162
 
144
163
  ```bash
145
- pip install "git+https://github.com/utsab345/stepfork.git@v0.1.0a6"
164
+ pip install "git+https://github.com/utsab345/stepfork.git@v0.2.1"
146
165
  ```
147
166
 
148
167
  Requires Python 3.11, 3.12, or 3.13. This installs the `stepfork` CLI and the
@@ -262,12 +281,7 @@ python -m pytest -q test_notify_fixed.py # 1 passed
262
281
  That regression test reproduces the exact failure you started with, and now
263
282
  pins the corrected behavior.
264
283
 
265
- ## Real Demonstration
266
-
267
- This terminal recording runs the complete failure-to-test flow using the
268
- minimal example agent:
269
-
270
- ![Stepfork terminal demo](scripts/terminal-demo/stepfork-demo.gif)
284
+ ## Runnable Examples
271
285
 
272
286
  Six runnable demo agents ship in this repository (all fully offline, with a
273
287
  fake provider standing in for a real model):
@@ -303,15 +317,50 @@ shows the limit of frozen replay and a selected live LLM in hybrid replay.
303
317
  The demos print real results from real subprocesses; they never fabricate
304
318
  output.
305
319
 
320
+ ## Real-LLM Case Study: The Model Was Right, the Agent Was Wrong
321
+
322
+ A complete, offline-reproducible example of Stepfork in practice. A real Google
323
+ Gemini 2.5 Flash request (`gemini-2.5-flash` through the OpenAI SDK adapter)
324
+ correctly classified a synthetic production checkout incident as **P0**. A
325
+ deliberately introduced three-line Python postprocessing bug then downgraded
326
+ that to **P1** and disabled escalation. Stepfork recorded the LLM interaction
327
+ and the instrumented tool calls, and a generated pytest regression test failed
328
+ against the buggy logic and passed after the fix - using the same recorded
329
+ trace.
330
+
331
+ Frozen replay made **zero** additional model requests and executed **zero**
332
+ instrumented tool bodies.
333
+
334
+ ```text
335
+ Real Gemini response: P0
336
+ Buggy application: P1, escalation=false
337
+ Regression test: FAILED
338
+
339
+ Fixed application: P0, escalation=true
340
+ Same regression test: PASSED
341
+
342
+ Additional LLM calls during frozen replay: 0
343
+ ```
344
+
345
+ Start with the example
346
+ [README](examples/real-llm-case-study/README.md) or read the full
347
+ [CASE_STUDY.md](examples/real-llm-case-study/CASE_STUDY.md). The incident and
348
+ operational data are synthetic and the application bug was introduced on
349
+ purpose; only the model request was real. Stepfork does not know the correct
350
+ business outcome - it lives in `expected.json`, defined by a human.
351
+
306
352
  ## CLI Reference
307
353
 
308
354
  | Command | Purpose |
309
355
  |---|---|
310
356
  | `stepfork validate [PATH] [--partial] [--verify-integrity]` | Check a `.sftrace` bundle structurally (and its integrity). |
311
357
  | `stepfork inspect [PATH] [--json] [--events] [--errors-only] [--step N]` | Review a bundle locally. |
312
- | `stepfork replay [PATH] --entrypoint MODULE:FUNCTION [--mode M]` | Rerun the entrypoint with dependencies answered from the trace. |
358
+ | `stepfork replay [PATH] --entrypoint MODULE:FUNCTION [--mode M] [--allow-live-tool NAME] [--verbose]` | Rerun the entrypoint with dependencies answered from the trace. |
359
+ | `stepfork minimize [PATH] --entrypoint MODULE:FUNCTION [--expect-output FILE] [--mode M] [--output PATH] [--overwrite] [--timeout SECONDS] [--attempts N]` | Minimize a failing trace to the smallest reproducible subset. |
360
+ | `stepfork fork [PATH] [--at-step N \| --at-event ID] [--output PATH] [--overwrite]` | Fork a trace at a specific step (Python API for overrides). |
361
+ | `stepfork score [TEST] [--expect-output PATH] [--bundle PATH] [--json]` | Score an exported expectation against a mutant battery. |
313
362
  | `stepfork diff [BASELINE] [CANDIDATE] [--json]` | Compare the behavior of two runs. |
314
- | `stepfork export [PATH] --pytest --entrypoint MODULE:FUNCTION [--expect-output JSON] [--expect-trajectory JSON] [--output FILE] [--overwrite]` | Generate an executable pytest regression test. |
363
+ | `stepfork export [PATH] --pytest --entrypoint MODULE:FUNCTION [--expect-output JSON] [--expect-trajectory JSON] [--output FILE] [--overwrite] [--mode M] [--allow-live-tool NAME]` | Generate an executable pytest regression test. |
315
364
 
316
365
  The full reference (arguments, examples, expected output, and common errors)
317
366
  is in [docs/cli.md](docs/cli.md).
@@ -363,7 +412,7 @@ sources live in `docs/`.
363
412
  - [Release checklist](docs/release-checklist.md)
364
413
  - [PyPI publishing checklist](docs/pypi-publishing.md)
365
414
  - [Early adopter guide](docs/community/early-adopter-guide.md)
366
- - [Latest release notes (v0.1.0a6)](docs/releases/v0.1.0a6.md)
415
+ - [Release notes (v0.2.0)](docs/releases/v0.2.0.md)
367
416
  - [Changelog](CHANGELOG.md)
368
417
 
369
418
  ## Security and Limitations
@@ -371,11 +420,8 @@ sources live in `docs/`.
371
420
  Stepfork is experimental. The API, CLI, and `.sftrace` trace format may change
372
421
  before v1.0.
373
422
 
374
- - **Alpha on PyPI.** `pip install --pre stepfork` installs the current
375
- pre-release; the API and trace format may still change.
376
- - **No automatic failure minimization.** The exported regression test uses the
377
- recorded steps. Reducing it to the smallest failing subset and fork-at-step
378
- are planned work, not automatic behavior.
423
+ - **Beta status.** `pip install stepfork` installs the current release; the API
424
+ and trace format may still change before v1.0.
379
425
  - **Limited integrations.** Optional adapters cover the OpenAI Python SDK
380
426
  (synchronous and asynchronous, non-streaming `chat.completions.create`) and
381
427
  LangGraph (synchronous and asynchronous `BaseChatModel` generation and
@@ -421,11 +467,11 @@ bundles, are in [docs/security.md](docs/security.md).
421
467
  - Offline examples for both adapters
422
468
  - Example GitHub Actions regression workflow
423
469
 
424
- ### v0.2
470
+ ### v0.2 (Current)
425
471
 
426
- - Failure minimization
427
- - Fork-at-step
428
- - Baselines
472
+ - **Failure minimization** - Automatic delta debugging to find minimal traces ([docs/minimize.md](docs/minimize.md))
473
+ - **Fork-at-step** - Create new traces at specific execution points with optional overrides ([docs/fork.md](docs/fork.md))
474
+ - Baselines (planned)
429
475
 
430
476
  ### v0.3
431
477
 
@@ -12,6 +12,16 @@
12
12
  Local-first behavioral regression testing for AI agents.
13
13
  </p>
14
14
 
15
+ ## Who is this for?
16
+
17
+ Stepfork is for developers building AI agents who need to:
18
+ - Turn production failures into reproducible regression tests
19
+ - Debug multi-step agent behaviors without re-running live services
20
+ - Prevent behavioral regressions when fixing bugs or refactoring code
21
+ - Minimize complex failures to their essential reproduction steps
22
+
23
+ If you're writing evals, Stepfork complements them: evals measure model quality across datasets, Stepfork tests that specific agent behaviors don't break.
24
+
15
25
  <p align="center">
16
26
  <a href="https://pypi.org/project/stepfork/"><img alt="PyPI" src="https://img.shields.io/pypi/v/stepfork?include_prereleases&label=PyPI&color=blue"></a>
17
27
  <a href="https://github.com/utsab345/stepfork/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/utsab345/stepfork/actions/workflows/ci.yml/badge.svg"></a>
@@ -21,7 +31,7 @@
21
31
  </p>
22
32
 
23
33
  <p align="center">
24
- Install the alpha: <code>pip install --pre stepfork</code>
34
+ Install the current release: <code>pip install stepfork</code>
25
35
  </p>
26
36
 
27
37
  Product goal:
@@ -42,6 +52,12 @@ regression test that asserts the corrected behavior. The test fails on the
42
52
  buggy code and passes on the fix, using the recorded responses instead of live
43
53
  services.
44
54
 
55
+ ## See It In Action
56
+
57
+ This terminal recording runs the complete failure-to-test flow:
58
+
59
+ ![Stepfork terminal demo](scripts/terminal-demo/stepfork-demo.gif)
60
+
45
61
  ## How Stepfork Works
46
62
 
47
63
  Stepfork turns a failed AI-agent execution into a reproducible pytest
@@ -62,6 +78,10 @@ Compare → Define Expected Behavior → Export pytest → Verify Fix
62
78
  you want frozen with `@trace_tool` or `llm_request`.
63
79
  - **Behavioral diff** compares a buggy run against a corrected run and reports
64
80
  exactly which behaviors changed.
81
+ - **Failure minimization** automatically finds the smallest trace that still
82
+ reproduces a failure via dependency-aware delta debugging.
83
+ - **Fork-at-step** creates new traces at specific execution points with optional
84
+ output overrides for "what-if" debugging scenarios.
65
85
  - **pytest export** turns a recorded failure into a regression test that
66
86
  asserts the corrected behavior.
67
87
  - **Best-effort redaction** of known credential-shaped values at record time.
@@ -97,21 +117,20 @@ change an external system; the allowlist does not sandbox it. See
97
117
 
98
118
  ## Installation
99
119
 
100
- Stepfork is published on PyPI. Install the current alpha with:
120
+ Stepfork is published on PyPI. Install the current release with:
101
121
 
102
122
  ```bash
103
123
  # pip
104
- pip install --pre stepfork
124
+ pip install stepfork
105
125
 
106
126
  # uv
107
- uv pip install --pre stepfork
127
+ uv pip install stepfork
108
128
  ```
109
129
 
110
- The `--pre` flag is required while Stepfork is a pre-release. You can also
111
- install from the tagged GitHub repository:
130
+ You can also install from source or a tagged release:
112
131
 
113
132
  ```bash
114
- pip install "git+https://github.com/utsab345/stepfork.git@v0.1.0a6"
133
+ pip install "git+https://github.com/utsab345/stepfork.git@v0.2.1"
115
134
  ```
116
135
 
117
136
  Requires Python 3.11, 3.12, or 3.13. This installs the `stepfork` CLI and the
@@ -231,12 +250,7 @@ python -m pytest -q test_notify_fixed.py # 1 passed
231
250
  That regression test reproduces the exact failure you started with, and now
232
251
  pins the corrected behavior.
233
252
 
234
- ## Real Demonstration
235
-
236
- This terminal recording runs the complete failure-to-test flow using the
237
- minimal example agent:
238
-
239
- ![Stepfork terminal demo](scripts/terminal-demo/stepfork-demo.gif)
253
+ ## Runnable Examples
240
254
 
241
255
  Six runnable demo agents ship in this repository (all fully offline, with a
242
256
  fake provider standing in for a real model):
@@ -272,15 +286,50 @@ shows the limit of frozen replay and a selected live LLM in hybrid replay.
272
286
  The demos print real results from real subprocesses; they never fabricate
273
287
  output.
274
288
 
289
+ ## Real-LLM Case Study: The Model Was Right, the Agent Was Wrong
290
+
291
+ A complete, offline-reproducible example of Stepfork in practice. A real Google
292
+ Gemini 2.5 Flash request (`gemini-2.5-flash` through the OpenAI SDK adapter)
293
+ correctly classified a synthetic production checkout incident as **P0**. A
294
+ deliberately introduced three-line Python postprocessing bug then downgraded
295
+ that to **P1** and disabled escalation. Stepfork recorded the LLM interaction
296
+ and the instrumented tool calls, and a generated pytest regression test failed
297
+ against the buggy logic and passed after the fix - using the same recorded
298
+ trace.
299
+
300
+ Frozen replay made **zero** additional model requests and executed **zero**
301
+ instrumented tool bodies.
302
+
303
+ ```text
304
+ Real Gemini response: P0
305
+ Buggy application: P1, escalation=false
306
+ Regression test: FAILED
307
+
308
+ Fixed application: P0, escalation=true
309
+ Same regression test: PASSED
310
+
311
+ Additional LLM calls during frozen replay: 0
312
+ ```
313
+
314
+ Start with the example
315
+ [README](examples/real-llm-case-study/README.md) or read the full
316
+ [CASE_STUDY.md](examples/real-llm-case-study/CASE_STUDY.md). The incident and
317
+ operational data are synthetic and the application bug was introduced on
318
+ purpose; only the model request was real. Stepfork does not know the correct
319
+ business outcome - it lives in `expected.json`, defined by a human.
320
+
275
321
  ## CLI Reference
276
322
 
277
323
  | Command | Purpose |
278
324
  |---|---|
279
325
  | `stepfork validate [PATH] [--partial] [--verify-integrity]` | Check a `.sftrace` bundle structurally (and its integrity). |
280
326
  | `stepfork inspect [PATH] [--json] [--events] [--errors-only] [--step N]` | Review a bundle locally. |
281
- | `stepfork replay [PATH] --entrypoint MODULE:FUNCTION [--mode M]` | Rerun the entrypoint with dependencies answered from the trace. |
327
+ | `stepfork replay [PATH] --entrypoint MODULE:FUNCTION [--mode M] [--allow-live-tool NAME] [--verbose]` | Rerun the entrypoint with dependencies answered from the trace. |
328
+ | `stepfork minimize [PATH] --entrypoint MODULE:FUNCTION [--expect-output FILE] [--mode M] [--output PATH] [--overwrite] [--timeout SECONDS] [--attempts N]` | Minimize a failing trace to the smallest reproducible subset. |
329
+ | `stepfork fork [PATH] [--at-step N \| --at-event ID] [--output PATH] [--overwrite]` | Fork a trace at a specific step (Python API for overrides). |
330
+ | `stepfork score [TEST] [--expect-output PATH] [--bundle PATH] [--json]` | Score an exported expectation against a mutant battery. |
282
331
  | `stepfork diff [BASELINE] [CANDIDATE] [--json]` | Compare the behavior of two runs. |
283
- | `stepfork export [PATH] --pytest --entrypoint MODULE:FUNCTION [--expect-output JSON] [--expect-trajectory JSON] [--output FILE] [--overwrite]` | Generate an executable pytest regression test. |
332
+ | `stepfork export [PATH] --pytest --entrypoint MODULE:FUNCTION [--expect-output JSON] [--expect-trajectory JSON] [--output FILE] [--overwrite] [--mode M] [--allow-live-tool NAME]` | Generate an executable pytest regression test. |
284
333
 
285
334
  The full reference (arguments, examples, expected output, and common errors)
286
335
  is in [docs/cli.md](docs/cli.md).
@@ -332,7 +381,7 @@ sources live in `docs/`.
332
381
  - [Release checklist](docs/release-checklist.md)
333
382
  - [PyPI publishing checklist](docs/pypi-publishing.md)
334
383
  - [Early adopter guide](docs/community/early-adopter-guide.md)
335
- - [Latest release notes (v0.1.0a6)](docs/releases/v0.1.0a6.md)
384
+ - [Release notes (v0.2.0)](docs/releases/v0.2.0.md)
336
385
  - [Changelog](CHANGELOG.md)
337
386
 
338
387
  ## Security and Limitations
@@ -340,11 +389,8 @@ sources live in `docs/`.
340
389
  Stepfork is experimental. The API, CLI, and `.sftrace` trace format may change
341
390
  before v1.0.
342
391
 
343
- - **Alpha on PyPI.** `pip install --pre stepfork` installs the current
344
- pre-release; the API and trace format may still change.
345
- - **No automatic failure minimization.** The exported regression test uses the
346
- recorded steps. Reducing it to the smallest failing subset and fork-at-step
347
- are planned work, not automatic behavior.
392
+ - **Beta status.** `pip install stepfork` installs the current release; the API
393
+ and trace format may still change before v1.0.
348
394
  - **Limited integrations.** Optional adapters cover the OpenAI Python SDK
349
395
  (synchronous and asynchronous, non-streaming `chat.completions.create`) and
350
396
  LangGraph (synchronous and asynchronous `BaseChatModel` generation and
@@ -390,11 +436,11 @@ bundles, are in [docs/security.md](docs/security.md).
390
436
  - Offline examples for both adapters
391
437
  - Example GitHub Actions regression workflow
392
438
 
393
- ### v0.2
439
+ ### v0.2 (Current)
394
440
 
395
- - Failure minimization
396
- - Fork-at-step
397
- - Baselines
441
+ - **Failure minimization** - Automatic delta debugging to find minimal traces ([docs/minimize.md](docs/minimize.md))
442
+ - **Fork-at-step** - Create new traces at specific execution points with optional overrides ([docs/fork.md](docs/fork.md))
443
+ - Baselines (planned)
398
444
 
399
445
  ### v0.3
400
446