@tangle-network/agent-eval 0.203.0 → 0.203.2

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 (301) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/adapters/http.d.ts +10 -4
  3. package/dist/adapters/http.d.ts.map +1 -1
  4. package/dist/adapters/http.js +43 -38
  5. package/dist/adapters/http.js.map +1 -1
  6. package/dist/{agent-profile-DDfIjdyS.d.ts → agent-profile-EpO0HURy.d.ts} +4 -4
  7. package/dist/{agent-profile-DDfIjdyS.d.ts.map → agent-profile-EpO0HURy.d.ts.map} +1 -1
  8. package/dist/analyst/index.d.ts +12 -12
  9. package/dist/analyst/index.d.ts.map +1 -1
  10. package/dist/analyst/index.js +6 -6
  11. package/dist/{analyze-runs-CPiKLJFs.d.ts → analyze-runs-Q74o4Hfj.d.ts} +2 -2
  12. package/dist/{analyze-runs-CPiKLJFs.d.ts.map → analyze-runs-Q74o4Hfj.d.ts.map} +1 -1
  13. package/dist/{benchmark-command-DFs_i62N.js → benchmark-command-6OBcB0sG.js} +7 -6
  14. package/dist/benchmark-command-6OBcB0sG.js.map +1 -0
  15. package/dist/benchmarks/index.d.ts +4 -4
  16. package/dist/benchmarks/index.js +3 -3
  17. package/dist/campaign/index.d.ts +6 -6
  18. package/dist/campaign/index.js +4 -4
  19. package/dist/{campaign-Btk1yFfw.js → campaign-DYhg4SjN.js} +6 -6
  20. package/dist/{campaign-Btk1yFfw.js.map → campaign-DYhg4SjN.js.map} +1 -1
  21. package/dist/{chat-client-DUhWNQQS.js → chat-client-5LLl4Ctl.js} +2 -2
  22. package/dist/{chat-client-DUhWNQQS.js.map → chat-client-5LLl4Ctl.js.map} +1 -1
  23. package/dist/{chat-json-call-Dx_sHzqm.js → chat-json-call-Digk-pfF.js} +2 -2
  24. package/dist/{chat-json-call-Dx_sHzqm.js.map → chat-json-call-Digk-pfF.js.map} +1 -1
  25. package/dist/cli.js +3 -3
  26. package/dist/contract/index.d.ts +10 -10
  27. package/dist/contract/index.js +7 -7
  28. package/dist/{default-registry-B-utjsmX.d.ts → default-registry-BHEfZHQd.d.ts} +6 -6
  29. package/dist/{default-registry-B-utjsmX.d.ts.map → default-registry-BHEfZHQd.d.ts.map} +1 -1
  30. package/dist/{default-registry-CpswV_S2.js → default-registry-wInsQWlQ.js} +2 -2
  31. package/dist/{default-registry-CpswV_S2.js.map → default-registry-wInsQWlQ.js.map} +1 -1
  32. package/dist/{define-agent-eval-CJN9dTQw.js → define-agent-eval-B25Cc3ki.js} +3 -3
  33. package/dist/{define-agent-eval-CJN9dTQw.js.map → define-agent-eval-B25Cc3ki.js.map} +1 -1
  34. package/dist/{define-agent-eval-MAc6BQrq.d.ts → define-agent-eval-D8bPoBM5.d.ts} +7 -7
  35. package/dist/{define-agent-eval-MAc6BQrq.d.ts.map → define-agent-eval-D8bPoBM5.d.ts.map} +1 -1
  36. package/dist/diagnosis/index.d.ts +2 -2
  37. package/dist/{dspy-rlm-engine-US8YsYGq.js → dspy-rlm-engine-D0h-P2Mz.js} +2 -2
  38. package/dist/{dspy-rlm-engine-US8YsYGq.js.map → dspy-rlm-engine-D0h-P2Mz.js.map} +1 -1
  39. package/dist/{engine-4_Q4oujc.d.ts → engine-F_PvwesR.d.ts} +4 -4
  40. package/dist/{engine-4_Q4oujc.d.ts.map → engine-F_PvwesR.d.ts.map} +1 -1
  41. package/dist/evaluation.d.ts +2 -2
  42. package/dist/{exact-types-KGxBWH4b.d.ts → exact-types-BBMMYk3g.d.ts} +2 -2
  43. package/dist/{exact-types-KGxBWH4b.d.ts.map → exact-types-BBMMYk3g.d.ts.map} +1 -1
  44. package/dist/experiment/index.d.ts +1 -1
  45. package/dist/{external-optimizer-process-KLcw0Vnc.js → external-optimizer-process-CIV4EqiT.js} +2 -2
  46. package/dist/{external-optimizer-process-KLcw0Vnc.js.map → external-optimizer-process-CIV4EqiT.js.map} +1 -1
  47. package/dist/{external-optimizer-subprocess-CkyUUV7h.js → external-optimizer-subprocess-BmKtH3T6.js} +2 -2
  48. package/dist/{external-optimizer-subprocess-CkyUUV7h.js.map → external-optimizer-subprocess-BmKtH3T6.js.map} +1 -1
  49. package/dist/{extract-usage-DFATEuWW.js → extract-usage-BrnzRJ6H.js} +4 -3
  50. package/dist/extract-usage-BrnzRJ6H.js.map +1 -0
  51. package/dist/{feedback-trajectory-BXCGTRkz.d.ts → feedback-trajectory-C6NJxXEa.d.ts} +3 -3
  52. package/dist/{feedback-trajectory-BXCGTRkz.d.ts.map → feedback-trajectory-C6NJxXEa.d.ts.map} +1 -1
  53. package/dist/{index-CAtNOBQY.d.ts → index-B8n12TR2.d.ts} +12 -14
  54. package/dist/index-B8n12TR2.d.ts.map +1 -0
  55. package/dist/{index-DBk_4UPs.d.ts → index-C9l_-23M.d.ts} +7 -7
  56. package/dist/{index-DBk_4UPs.d.ts.map → index-C9l_-23M.d.ts.map} +1 -1
  57. package/dist/{index-Cuhxk05B.d.ts → index-CG7mtu_G.d.ts} +8 -8
  58. package/dist/{index-Cuhxk05B.d.ts.map → index-CG7mtu_G.d.ts.map} +1 -1
  59. package/dist/index.d.ts +19 -19
  60. package/dist/index.js +11 -11
  61. package/dist/{integrity-CaeNeusS.d.ts → integrity-BWO6RPxv.d.ts} +2 -2
  62. package/dist/{integrity-CaeNeusS.d.ts.map → integrity-BWO6RPxv.d.ts.map} +1 -1
  63. package/dist/{jev-review-DX6MI_jq.d.ts → jev-review-Cw06AKuF.d.ts} +2 -2
  64. package/dist/{jev-review-DX6MI_jq.d.ts.map → jev-review-Cw06AKuF.d.ts.map} +1 -1
  65. package/dist/jev.d.ts +3 -3
  66. package/dist/{llm-client-Bhqoglar.js → llm-client-DmCNzrc9.js} +77 -60
  67. package/dist/llm-client-DmCNzrc9.js.map +1 -0
  68. package/dist/{llm-judge-C-0P1WiT.js → llm-judge-DyZdrp6I.js} +57 -15
  69. package/dist/llm-judge-DyZdrp6I.js.map +1 -0
  70. package/dist/{matrix-BucOjLF1.d.ts → matrix-W1lbSx72.d.ts} +2 -2
  71. package/dist/{matrix-BucOjLF1.d.ts.map → matrix-W1lbSx72.d.ts.map} +1 -1
  72. package/dist/meta-eval/index.d.ts +1 -1
  73. package/dist/multishot/golden/index.d.ts +1 -1
  74. package/dist/multishot/index.d.ts +2 -2
  75. package/dist/openapi.json +1 -1
  76. package/dist/{prime-protocol-T0i6xcAs.d.ts → prime-protocol-IoN4Qb6c.d.ts} +2 -2
  77. package/dist/{prime-protocol-T0i6xcAs.d.ts.map → prime-protocol-IoN4Qb6c.d.ts.map} +1 -1
  78. package/dist/{produced-state-CR2tAPLf.js → produced-state-DLToUXrD.js} +3 -3
  79. package/dist/{produced-state-CR2tAPLf.js.map → produced-state-DLToUXrD.js.map} +1 -1
  80. package/dist/{abort-signal-CtzAM_sJ.js → proposal-findings-CXblsskH.js} +2 -11
  81. package/dist/proposal-findings-CXblsskH.js.map +1 -0
  82. package/dist/{registry-Bu3lNole.d.ts → registry-CT-hMSkR.d.ts} +4 -4
  83. package/dist/{registry-Bu3lNole.d.ts.map → registry-CT-hMSkR.d.ts.map} +1 -1
  84. package/dist/{researcher-DojEMb7E.d.ts → researcher-zTpxNJBy.d.ts} +3 -3
  85. package/dist/{researcher-DojEMb7E.d.ts.map → researcher-zTpxNJBy.d.ts.map} +1 -1
  86. package/dist/rl.d.ts +4 -4
  87. package/dist/search/index.d.ts +2 -2
  88. package/dist/{search-kernel-B8RC6BlK.d.ts → search-kernel-DNpsHb8P.d.ts} +2 -2
  89. package/dist/{search-kernel-B8RC6BlK.d.ts.map → search-kernel-DNpsHb8P.d.ts.map} +1 -1
  90. package/dist/{semantic-concept-judge-BcjYg37z.js → semantic-concept-judge-BgWxa4L_.js} +4 -4
  91. package/dist/{semantic-concept-judge-BcjYg37z.js.map → semantic-concept-judge-BgWxa4L_.js.map} +1 -1
  92. package/dist/{series-convergence-DY7ha0kx.d.ts → series-convergence-DLy0bQMV.d.ts} +2 -2
  93. package/dist/{series-convergence-DY7ha0kx.d.ts.map → series-convergence-DLy0bQMV.d.ts.map} +1 -1
  94. package/dist/{server-B4jMhqQn.js → server-CoBZO1fj.js} +2 -2
  95. package/dist/{server-B4jMhqQn.js.map → server-CoBZO1fj.js.map} +1 -1
  96. package/dist/{skillopt-optimization-method-Bls9t-G_.js → skillopt-optimization-method-Dz5CGZb8.js} +5 -5
  97. package/dist/{skillopt-optimization-method-Bls9t-G_.js.map → skillopt-optimization-method-Dz5CGZb8.js.map} +1 -1
  98. package/dist/{statistical-heldout-DJtQAUZB.d.ts → statistical-heldout-Dq3pnmxd.d.ts} +2 -2
  99. package/dist/{statistical-heldout-DJtQAUZB.d.ts.map → statistical-heldout-Dq3pnmxd.d.ts.map} +1 -1
  100. package/dist/{store-tool-spans-fkNF7Q9Y.d.ts → store-tool-spans-CAF3T-BS.d.ts} +5 -5
  101. package/dist/{store-tool-spans-fkNF7Q9Y.d.ts.map → store-tool-spans-CAF3T-BS.d.ts.map} +1 -1
  102. package/dist/{store-tool-spans-Biio4_Nw.js → store-tool-spans-D5kOU0mr.js} +2 -2
  103. package/dist/{store-tool-spans-Biio4_Nw.js.map → store-tool-spans-D5kOU0mr.js.map} +1 -1
  104. package/dist/{tool-groups-Zm84Pqpk.d.ts → tool-groups-B7_jUPHp.d.ts} +3 -3
  105. package/dist/tool-groups-B7_jUPHp.d.ts.map +1 -0
  106. package/dist/{trace-questions--lnJTaou.d.ts → trace-questions-Dd3AMf-U.d.ts} +3 -3
  107. package/dist/{trace-questions--lnJTaou.d.ts.map → trace-questions-Dd3AMf-U.d.ts.map} +1 -1
  108. package/dist/trace-repair/index.d.ts +1 -1
  109. package/dist/traces.d.ts +5 -5
  110. package/dist/traces.js +2 -2
  111. package/dist/{types-CeDfCRXp.d.ts → types-6VEehmEg.d.ts} +2 -2
  112. package/dist/{types-CeDfCRXp.d.ts.map → types-6VEehmEg.d.ts.map} +1 -1
  113. package/dist/{types-C0bWoSKC.d.ts → types-DLxe96rp.d.ts} +2 -2
  114. package/dist/{types-C0bWoSKC.d.ts.map → types-DLxe96rp.d.ts.map} +1 -1
  115. package/dist/{types-B6JadxWL.d.ts → types-DZQpUJse.d.ts} +2 -2
  116. package/dist/{types-B6JadxWL.d.ts.map → types-DZQpUJse.d.ts.map} +1 -1
  117. package/dist/{types-khIUQ0O5.d.ts → types-ZUy5HGY5.d.ts} +11 -5
  118. package/dist/{types-khIUQ0O5.d.ts.map → types-ZUy5HGY5.d.ts.map} +1 -1
  119. package/dist/wire/index.d.ts +2 -2
  120. package/dist/wire/index.js +1 -1
  121. package/docs/changes/llm-physical-attempts.md +30 -0
  122. package/docs/changes/shared-model-request-lifetime.md +30 -0
  123. package/docs/concepts.md +8 -0
  124. package/docs/eval-surface-map.md +12 -2
  125. package/docs/http-dispatch.md +33 -0
  126. package/docs/proofs/campaign-attempt-retention-20261001/README.md +70 -0
  127. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/artifacts/capture.json +3 -0
  128. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/identity.json +10 -0
  129. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/result.json +1 -0
  130. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/trace/spans.jsonl +0 -0
  131. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/cached-result.json +1 -0
  132. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/latest-attempt.json +1 -0
  133. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/artifacts/captured-response.json +4 -0
  134. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/identity.json +10 -0
  135. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/result.json +1 -0
  136. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/trace/spans.jsonl +1 -0
  137. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/cached-result.json +1 -0
  138. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/captured-response.json +6 -0
  139. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/failure-receipt.json +58 -0
  140. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/latest-attempt.json +1 -0
  141. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/spans.jsonl +1 -0
  142. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/artifacts/captured-response.json +4 -0
  143. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/identity.json +10 -0
  144. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/result.json +1 -0
  145. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/trace/spans.jsonl +1 -0
  146. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/cached-result.json +1 -0
  147. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/latest-attempt.json +1 -0
  148. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/artifacts/captured-response.json +4 -0
  149. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/failure-receipt.json +62 -0
  150. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/identity.json +10 -0
  151. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/result.json +1 -0
  152. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/trace/spans.jsonl +1 -0
  153. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/latest-attempt.json +1 -0
  154. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/artifacts/captured-response.json +4 -0
  155. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/identity.json +10 -0
  156. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/result.json +1 -0
  157. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/trace/spans.jsonl +1 -0
  158. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/cached-result.json +1 -0
  159. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/latest-attempt.json +1 -0
  160. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/first-interruption.json +38 -0
  161. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/19147243d263e55b1eaf1c940691947382a7cce17c5f49e4a4da765a473d2a55.json +1 -0
  162. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/5dd0d871d559d1c55b2ac04b3fbd26d62f7c9e25d7632d4542502cd292818fc0.json +1 -0
  163. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/5de45d632937e75ff90fec9f1f2ec425904d3632da71f6b26f83b1e1eb8cde5a.json +1 -0
  164. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/6caba627806e499aa3d9e156aec9d5a731a3ef30e29756d343b85b7217c77c11.json +1 -0
  165. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/ce2770851b3b7651f27cedcbad0372b9191e9a9b016665987e3ddd2ad53012b5.json +1 -0
  166. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/d8ac4ba8d9844afb4defa5cd277fe3cb944d99e58cf41c07d3ae199b6f467966.json +1 -0
  167. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/f59a02035fe96ea2f5582dd715d2e3ad8c184ae959310978962f1ac0780753bd.json +1 -0
  168. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/ledger.jsonl +23 -0
  169. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/ledger.jsonl.head +1 -0
  170. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/artifacts/capture.json +3 -0
  171. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/identity.json +10 -0
  172. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/result.json +1 -0
  173. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/trace/spans.jsonl +0 -0
  174. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/cached-result.json +1 -0
  175. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/latest-attempt.json +1 -0
  176. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/artifacts/captured-response.json +6 -0
  177. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/failure-receipt.json +81 -0
  178. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/identity.json +10 -0
  179. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/result.json +1 -0
  180. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/trace/spans.jsonl +2 -0
  181. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/artifacts/captured-response.json +6 -0
  182. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/identity.json +10 -0
  183. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/result.json +1 -0
  184. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/trace/spans.jsonl +2 -0
  185. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/cached-result.json +1 -0
  186. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/latest-attempt.json +1 -0
  187. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/observation.json +608 -0
  188. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/artifacts/captured-response.json +6 -0
  189. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/failure-receipt.json +81 -0
  190. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/identity.json +10 -0
  191. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/result.json +1 -0
  192. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/trace/spans.jsonl +2 -0
  193. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/artifacts/captured-response.json +6 -0
  194. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/identity.json +10 -0
  195. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/result.json +1 -0
  196. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/trace/spans.jsonl +2 -0
  197. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/cached-result.json +1 -0
  198. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/latest-attempt.json +1 -0
  199. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/observation.json +514 -0
  200. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-summary.json +1853 -0
  201. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/judge-attribution.json +140 -0
  202. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/qualification.log +1 -0
  203. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/qualify.mjs +165 -0
  204. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduce.mjs +39 -0
  205. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/cached-result.json +1 -0
  206. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/captured-response.json +5 -0
  207. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/failure-receipt.json +58 -0
  208. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/spans.jsonl +1 -0
  209. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/observer-retained-captures.json +20 -0
  210. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/cached-result.json +1 -0
  211. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/captured-response.json +5 -0
  212. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/failure-receipt.attempt-1.json +58 -0
  213. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/spans.jsonl +1 -0
  214. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/observer-retained-captures.json +20 -0
  215. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-summary.json +315 -0
  216. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction.log +1 -0
  217. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/source-and-build.json +2409 -0
  218. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/typecheck.log +1 -0
  219. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/verify-package.log +340 -0
  220. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/artifacts/captured-response.json +4 -0
  221. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/identity.json +10 -0
  222. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/result.json +1 -0
  223. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/trace/spans.jsonl +1 -0
  224. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/cached-result.json +1 -0
  225. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/captured-response.json +6 -0
  226. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/failure-receipt.json +58 -0
  227. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/latest-attempt.json +1 -0
  228. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/spans.jsonl +1 -0
  229. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/artifacts/captured-response.json +4 -0
  230. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/identity.json +10 -0
  231. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/result.json +1 -0
  232. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/trace/spans.jsonl +1 -0
  233. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/cached-result.json +1 -0
  234. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/latest-attempt.json +1 -0
  235. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/first-interruption.json +5 -0
  236. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/blobs/5de45d632937e75ff90fec9f1f2ec425904d3632da71f6b26f83b1e1eb8cde5a.json +1 -0
  237. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/ledger.jsonl +7 -0
  238. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/ledger.jsonl.head +1 -0
  239. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/artifacts/capture.json +3 -0
  240. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/identity.json +10 -0
  241. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/result.json +1 -0
  242. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/trace/spans.jsonl +0 -0
  243. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/cached-result.json +1 -0
  244. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/latest-attempt.json +1 -0
  245. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/artifacts/captured-response.json +6 -0
  246. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/failure-receipt.json +62 -0
  247. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/identity.json +10 -0
  248. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/result.json +1 -0
  249. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/trace/spans.jsonl +1 -0
  250. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/artifacts/captured-response.json +6 -0
  251. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/identity.json +10 -0
  252. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/result.json +1 -0
  253. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/trace/spans.jsonl +1 -0
  254. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/cached-result.json +1 -0
  255. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/latest-attempt.json +1 -0
  256. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/observation.json +458 -0
  257. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/artifacts/captured-response.json +6 -0
  258. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/failure-receipt.json +62 -0
  259. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/identity.json +10 -0
  260. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/result.json +1 -0
  261. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/trace/spans.jsonl +1 -0
  262. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/artifacts/captured-response.json +6 -0
  263. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/identity.json +10 -0
  264. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/result.json +1 -0
  265. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/trace/spans.jsonl +1 -0
  266. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/cached-result.json +1 -0
  267. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/latest-attempt.json +1 -0
  268. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/observation.json +380 -0
  269. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/cached-result.json +1 -0
  270. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/captured-response.json +6 -0
  271. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/failure-receipt.json +58 -0
  272. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/spans.jsonl +1 -0
  273. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/observation.json +198 -0
  274. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/cached-result.json +1 -0
  275. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/captured-response.json +6 -0
  276. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/failure-receipt.attempt-1.json +58 -0
  277. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/spans.jsonl +1 -0
  278. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/observation.json +121 -0
  279. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-summary.json +321 -0
  280. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.attribution.log +491 -0
  281. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.final.log +491 -0
  282. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.log +495 -0
  283. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualification.log +18 -0
  284. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualification.wrong-root.log +9 -0
  285. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualify.mjs +148 -0
  286. package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualify.wrong-root.mjs +148 -0
  287. package/docs/proofs/campaign-attempt-retention-20261001/manifest.json +808 -0
  288. package/docs/proofs/router-cache-usage-20261001/after.json +2058 -0
  289. package/docs/proofs/router-cache-usage-20261001/component-projections.json +584 -0
  290. package/docs/proofs/router-cache-usage-20261001/component-projections.nested-only.json +306 -0
  291. package/docs/proofs/router-cache-usage-20261001/manifest.json +32 -0
  292. package/docs/proofs/router-cache-usage-20261001/summary.json +49 -0
  293. package/docs/proofs/router-cache-usage-20261001/summary.nested-only.json +29 -0
  294. package/package.json +1 -1
  295. package/dist/abort-signal-CtzAM_sJ.js.map +0 -1
  296. package/dist/benchmark-command-DFs_i62N.js.map +0 -1
  297. package/dist/extract-usage-DFATEuWW.js.map +0 -1
  298. package/dist/index-CAtNOBQY.d.ts.map +0 -1
  299. package/dist/llm-client-Bhqoglar.js.map +0 -1
  300. package/dist/llm-judge-C-0P1WiT.js.map +0 -1
  301. package/dist/tool-groups-Zm84Pqpk.d.ts.map +0 -1
@@ -0,0 +1,148 @@
1
+ import { createHash } from 'node:crypto'
2
+ import { readFileSync, writeFileSync, readdirSync, mkdirSync } from 'node:fs'
3
+ import { dirname, join, relative } from 'node:path'
4
+ import { pathToFileURL } from 'node:url'
5
+ import assert from 'node:assert/strict'
6
+
7
+ const root = process.env.PROOF_ROOT
8
+ const modulePath = process.env.EVAL_MODULE
9
+ if (!root || !modulePath) throw new Error('PROOF_ROOT and EVAL_MODULE are required')
10
+ const { runEval, runOptimization } = await import(pathToFileURL(modulePath).href)
11
+ const hash = data => createHash('sha256').update(data).digest('hex')
12
+ const json = path => JSON.parse(readFileSync(path, 'utf8'))
13
+ const save = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n')
14
+ const scenarios = [{ id: 'capture-retention', kind: 'operational', scenarioDigest: 'sha256:' + hash('attempt-artifact-retention') }]
15
+ const base = { scenarios, reps: 1, seed: 42, expectUsage: 'off', labeledStore: 'off', dispatchRef: 'operational-attempt-retention-v1', maxConcurrency: 1 }
16
+ const interruption = 'Operational interruption after native artifact capture'
17
+
18
+ async function qualify(mode) {
19
+ const runDir = join(root, 'after-' + mode)
20
+ const observed = []
21
+ let invocations = 0
22
+ const opts = { ...base, runDir, dispatch: async (_scenario, ctx) => {
23
+ const invocation = ++invocations
24
+ const value = { cellId: ctx.cellId, runAttemptId: ctx.runAttemptId, invocation, content: 'Actual filesystem capture from invocation ' + invocation }
25
+ ctx.trace.span('native.callback.capture', { invocation, runAttemptId: ctx.runAttemptId }).end()
26
+ const path = await ctx.artifacts.writeJson('captured-response.json', value)
27
+ observed.push({ invocation, path, sha256: hash(readFileSync(path)), value })
28
+ if (invocation === 1) throw new Error(interruption)
29
+ return value
30
+ }}
31
+ const reports = []
32
+ if (mode === 'retry') reports.push(await runEval({ ...opts, cellRetry: { attempts: 2, retryable: f => f.error.message === interruption } }))
33
+ else {
34
+ reports.push(await runEval(opts))
35
+ reports.push(await runEval(opts))
36
+ }
37
+ assert.equal(invocations, 2)
38
+ assert.notEqual(observed[0].path, observed[1].path)
39
+ const attempts = observed.map(item => {
40
+ assert.equal(hash(readFileSync(item.path)), item.sha256)
41
+ const attemptDir = dirname(dirname(item.path))
42
+ const identity = json(join(attemptDir, 'identity.json'))
43
+ const result = json(join(attemptDir, 'result.json'))
44
+ const trace = readFileSync(join(attemptDir, 'trace/spans.jsonl'), 'utf8').split('\n').filter(Boolean).map(JSON.parse)
45
+ assert.equal(identity.runAttemptId, item.value.runAttemptId)
46
+ assert.deepEqual(result.attempt, { runAttemptId: identity.runAttemptId, number: identity.number })
47
+ assert.equal(identity.cellId, item.value.cellId)
48
+ assert.equal(identity.manifestHash, result.manifestHash)
49
+ assert.equal(trace[0].invocation, item.invocation)
50
+ return { identity, result, trace, path: relative(root, attemptDir) }
51
+ })
52
+ const cellDir = dirname(dirname(dirname(dirname(dirname(observed[1].path)))))
53
+ const pointer = json(join(cellDir, 'latest-attempt.json'))
54
+ assert.deepEqual(pointer, reports.at(-1).cells[0].attempt)
55
+ assert.equal(attempts[0].identity.number, 1)
56
+ assert.equal(attempts[1].identity.number, mode === 'retry' ? 2 : 1)
57
+ assert.equal(attempts[0].identity.runAttemptId === attempts[1].identity.runAttemptId, mode === 'retry')
58
+ const receipt = json(join(root, attempts[0].path, 'failure-receipt.json'))
59
+ assert.equal(receipt.failure.error.message, interruption)
60
+ assert.deepEqual(receipt.cell.attempt, attempts[0].result.attempt)
61
+ const reused = await runEval(opts)
62
+ assert.equal(invocations, 2)
63
+ assert.equal(reused.cells[0].cached, true)
64
+ assert.deepEqual(reused.cells[0].attempt, pointer)
65
+ const result = { invocations, observed, attempts, receipt, pointer, reports, cacheReuse: reused, firstContentStillPresent: true, modelInference: false, researchUnits: 0 }
66
+ save(join(runDir, 'observation.json'), result)
67
+ return result
68
+ }
69
+
70
+ const summary = { module: { path: modulePath, sha256: hash(readFileSync(modulePath)) }, retry: await qualify('retry'), resume: await qualify('resume') }
71
+
72
+ // Use a copied historical cell to prove new execution never writes its legacy capture paths.
73
+ const legacyRun = join(root, 'after-legacy')
74
+ const legacyCell = join(legacyRun, 'capture-retention_0')
75
+ mkdirSync(legacyCell, { recursive: true })
76
+ const originalCell = join(root, 'before-resume/capture-retention_0')
77
+ const legacySnapshot = {}
78
+ for (const name of readdirSync(originalCell)) {
79
+ const bytes = readFileSync(join(originalCell, name))
80
+ writeFileSync(join(legacyCell, name), bytes)
81
+ legacySnapshot[name] = hash(bytes)
82
+ }
83
+ const legacyReport = await runEval({ ...base, runDir: legacyRun, resumable: false, dispatch: async (_scenario, ctx) => {
84
+ await ctx.artifacts.writeJson('captured-response.json', { continuation: true, runAttemptId: ctx.runAttemptId })
85
+ ctx.trace.span('legacy.continuation').end()
86
+ return { continuation: true }
87
+ }})
88
+ for (const [name, sha] of Object.entries(legacySnapshot)) assert.equal(hash(readFileSync(join(legacyCell, name))), sha)
89
+ summary.legacy = { originalCell, legacySnapshot, report: legacyReport, allHistoricalCellFilesUnchanged: true }
90
+
91
+ // Exercise the public artifact scope while a real attempt identity exists.
92
+ const guardRun = join(root, 'after-path-guard')
93
+ let guard
94
+ const guardReport = await runEval({ ...base, runDir: guardRun, dispatch: async (_scenario, ctx) => {
95
+ const own = await ctx.artifacts.writeJson('capture.json', { own: true })
96
+ const identityPath = join(dirname(dirname(own)), 'identity.json')
97
+ const before = hash(readFileSync(identityPath))
98
+ let rejection
99
+ try { await ctx.artifacts.writeJson('../identity.json', { overwritten: true }) }
100
+ catch (error) { rejection = error.message }
101
+ const after = hash(readFileSync(identityPath))
102
+ assert.equal(rejection, 'Artifact path must remain inside this execution attempt')
103
+ assert.equal(before, after)
104
+ guard = { rejection, identityBefore: before, identityAfter: after }
105
+ return guard
106
+ }})
107
+ summary.pathGuard = { ...guard, report: guardReport }
108
+
109
+ // Interrupt after a failed candidate settles. Reopen the native search ledger,
110
+ // then observe its prior candidate through runOptimization's stored-cell reader.
111
+ const optimizationDir = join(root, 'after-optimization')
112
+ let proposals = 0
113
+ const histories = []
114
+ const optimizationOpts = {
115
+ ...base, runDir: optimizationDir, baselineSurface: 'baseline', populationSize: 1, maxGenerations: 2,
116
+ dispatchWithSurface: async (surface, _scenario, ctx) => {
117
+ await ctx.artifacts.writeJson('captured-response.json', { surface, runAttemptId: ctx.runAttemptId })
118
+ ctx.trace.span('native.optimization.capture', { surface }).end()
119
+ if (surface === 'failed-candidate') throw new Error('Operational candidate interruption')
120
+ return { surface }
121
+ },
122
+ proposer: {
123
+ kind: 'operational-retention-qualification',
124
+ async propose(ctx) {
125
+ proposals++
126
+ histories.push({ proposal: proposals, history: ctx.history })
127
+ if (proposals === 1) return ['failed-candidate']
128
+ if (proposals === 2) throw new Error('Operational stop after candidate settlement')
129
+ return ['resumed-candidate']
130
+ },
131
+ },
132
+ }
133
+ let firstError
134
+ try { await runOptimization(optimizationOpts) }
135
+ catch (error) { firstError = error.message }
136
+ save(join(optimizationDir, 'first-interruption.json'), { firstError, proposals, histories })
137
+ assert.match(firstError ?? '', /Operational stop after candidate settlement/)
138
+ const optimized = await runOptimization(optimizationOpts)
139
+ const resumedHistory = histories.find(h => h.proposal === 3)?.history
140
+ assert.ok(resumedHistory)
141
+ const failed = resumedHistory.flatMap(g => g.candidates).find(c => c.coverage?.unscorableCells?.length)
142
+ assert.ok(failed, 'Reopened optimization must retain its failed candidate')
143
+ assert.equal(failed.coverage.expectedCells, 1)
144
+ assert.equal(failed.coverage.scorableCells, 0)
145
+ assert.match(JSON.stringify(failed.coverage.unscorableCells), /Operational candidate interruption/)
146
+ summary.optimization = { firstError, proposals, histories, failedCandidateRecovered: true, optimized }
147
+ save(join(root, 'after-summary.json'), summary)
148
+ console.log(JSON.stringify({ module: summary.module, retryRetained: summary.retry.firstContentStillPresent, resumeRetained: summary.resume.firstContentStillPresent, legacyFilesPreserved: Object.keys(legacySnapshot).length, pathGuard: guard.rejection, optimizationFailedCandidateRecovered: true, paidCalls: 0, researchUnits: 0 }))
@@ -0,0 +1,148 @@
1
+ import { createHash } from 'node:crypto'
2
+ import { readFileSync, writeFileSync, readdirSync, mkdirSync } from 'node:fs'
3
+ import { dirname, join, relative } from 'node:path'
4
+ import { pathToFileURL } from 'node:url'
5
+ import assert from 'node:assert/strict'
6
+
7
+ const root = process.env.PROOF_ROOT
8
+ const modulePath = process.env.EVAL_MODULE
9
+ if (!root || !modulePath) throw new Error('PROOF_ROOT and EVAL_MODULE are required')
10
+ const { runEval, runOptimization } = await import(pathToFileURL(modulePath).href)
11
+ const hash = data => createHash('sha256').update(data).digest('hex')
12
+ const json = path => JSON.parse(readFileSync(path, 'utf8'))
13
+ const save = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n')
14
+ const scenarios = [{ id: 'capture-retention', kind: 'operational', scenarioDigest: 'sha256:' + hash('attempt-artifact-retention') }]
15
+ const base = { scenarios, reps: 1, seed: 42, expectUsage: 'off', labeledStore: 'off', dispatchRef: 'operational-attempt-retention-v1', maxConcurrency: 1 }
16
+ const interruption = 'Operational interruption after native artifact capture'
17
+
18
+ async function qualify(mode) {
19
+ const runDir = join(root, 'after-' + mode)
20
+ const observed = []
21
+ let invocations = 0
22
+ const opts = { ...base, runDir, dispatch: async (_scenario, ctx) => {
23
+ const invocation = ++invocations
24
+ const value = { cellId: ctx.cellId, runAttemptId: ctx.runAttemptId, invocation, content: 'Actual filesystem capture from invocation ' + invocation }
25
+ ctx.trace.span('native.callback.capture', { invocation, runAttemptId: ctx.runAttemptId }).end()
26
+ const path = await ctx.artifacts.writeJson('captured-response.json', value)
27
+ observed.push({ invocation, path, sha256: hash(readFileSync(path)), value })
28
+ if (invocation === 1) throw new Error(interruption)
29
+ return value
30
+ }}
31
+ const reports = []
32
+ if (mode === 'retry') reports.push(await runEval({ ...opts, cellRetry: { attempts: 2, retryable: f => f.error.message === interruption } }))
33
+ else {
34
+ reports.push(await runEval(opts))
35
+ reports.push(await runEval(opts))
36
+ }
37
+ assert.equal(invocations, 2)
38
+ assert.notEqual(observed[0].path, observed[1].path)
39
+ const attempts = observed.map(item => {
40
+ assert.equal(hash(readFileSync(item.path)), item.sha256)
41
+ const attemptDir = dirname(dirname(item.path))
42
+ const identity = json(join(attemptDir, 'identity.json'))
43
+ const result = json(join(attemptDir, 'result.json'))
44
+ const trace = readFileSync(join(attemptDir, 'trace/spans.jsonl'), 'utf8').split('\n').filter(Boolean).map(JSON.parse)
45
+ assert.equal(identity.runAttemptId, item.value.runAttemptId)
46
+ assert.deepEqual(result.attempt, { runAttemptId: identity.runAttemptId, number: identity.number })
47
+ assert.equal(identity.cellId, item.value.cellId)
48
+ assert.equal(identity.manifestHash, result.manifestHash)
49
+ assert.equal(trace[0].invocation, item.invocation)
50
+ return { identity, result, trace, path: relative(root, attemptDir) }
51
+ })
52
+ const cellDir = dirname(dirname(dirname(dirname(observed[1].path))))
53
+ const pointer = json(join(cellDir, 'latest-attempt.json'))
54
+ assert.deepEqual(pointer, reports.at(-1).cells[0].attempt)
55
+ assert.equal(attempts[0].identity.number, 1)
56
+ assert.equal(attempts[1].identity.number, mode === 'retry' ? 2 : 1)
57
+ assert.equal(attempts[0].identity.runAttemptId === attempts[1].identity.runAttemptId, mode === 'retry')
58
+ const receipt = json(join(root, attempts[0].path, 'failure-receipt.json'))
59
+ assert.equal(receipt.failure.error.message, interruption)
60
+ assert.deepEqual(receipt.cell.attempt, attempts[0].result.attempt)
61
+ const reused = await runEval(opts)
62
+ assert.equal(invocations, 2)
63
+ assert.equal(reused.cells[0].cached, true)
64
+ assert.deepEqual(reused.cells[0].attempt, pointer)
65
+ const result = { invocations, observed, attempts, receipt, pointer, reports, cacheReuse: reused, firstContentStillPresent: true, modelInference: false, researchUnits: 0 }
66
+ save(join(runDir, 'observation.json'), result)
67
+ return result
68
+ }
69
+
70
+ const summary = { module: { path: modulePath, sha256: hash(readFileSync(modulePath)) }, retry: await qualify('retry'), resume: await qualify('resume') }
71
+
72
+ // Use a copied historical cell to prove new execution never writes its legacy capture paths.
73
+ const legacyRun = join(root, 'after-legacy')
74
+ const legacyCell = join(legacyRun, 'capture-retention_0')
75
+ mkdirSync(legacyCell, { recursive: true })
76
+ const originalCell = join(root, 'before-resume/capture-retention_0')
77
+ const legacySnapshot = {}
78
+ for (const name of readdirSync(originalCell)) {
79
+ const bytes = readFileSync(join(originalCell, name))
80
+ writeFileSync(join(legacyCell, name), bytes)
81
+ legacySnapshot[name] = hash(bytes)
82
+ }
83
+ const legacyReport = await runEval({ ...base, runDir: legacyRun, resumable: false, dispatch: async (_scenario, ctx) => {
84
+ await ctx.artifacts.writeJson('captured-response.json', { continuation: true, runAttemptId: ctx.runAttemptId })
85
+ ctx.trace.span('legacy.continuation').end()
86
+ return { continuation: true }
87
+ }})
88
+ for (const [name, sha] of Object.entries(legacySnapshot)) assert.equal(hash(readFileSync(join(legacyCell, name))), sha)
89
+ summary.legacy = { originalCell, legacySnapshot, report: legacyReport, allHistoricalCellFilesUnchanged: true }
90
+
91
+ // Exercise the public artifact scope while a real attempt identity exists.
92
+ const guardRun = join(root, 'after-path-guard')
93
+ let guard
94
+ const guardReport = await runEval({ ...base, runDir: guardRun, dispatch: async (_scenario, ctx) => {
95
+ const own = await ctx.artifacts.writeJson('capture.json', { own: true })
96
+ const identityPath = join(dirname(dirname(own)), 'identity.json')
97
+ const before = hash(readFileSync(identityPath))
98
+ let rejection
99
+ try { await ctx.artifacts.writeJson('../identity.json', { overwritten: true }) }
100
+ catch (error) { rejection = error.message }
101
+ const after = hash(readFileSync(identityPath))
102
+ assert.equal(rejection, 'Artifact path must remain inside this execution attempt')
103
+ assert.equal(before, after)
104
+ guard = { rejection, identityBefore: before, identityAfter: after }
105
+ return guard
106
+ }})
107
+ summary.pathGuard = { ...guard, report: guardReport }
108
+
109
+ // Interrupt after a failed candidate settles. Reopen the native search ledger,
110
+ // then observe its prior candidate through runOptimization's stored-cell reader.
111
+ const optimizationDir = join(root, 'after-optimization')
112
+ let proposals = 0
113
+ const histories = []
114
+ const optimizationOpts = {
115
+ ...base, runDir: optimizationDir, baselineSurface: 'baseline', populationSize: 1, maxGenerations: 2,
116
+ dispatchWithSurface: async (surface, _scenario, ctx) => {
117
+ await ctx.artifacts.writeJson('captured-response.json', { surface, runAttemptId: ctx.runAttemptId })
118
+ ctx.trace.span('native.optimization.capture', { surface }).end()
119
+ if (surface === 'failed-candidate') throw new Error('Operational candidate interruption')
120
+ return { surface }
121
+ },
122
+ proposer: {
123
+ kind: 'operational-retention-qualification',
124
+ async propose(ctx) {
125
+ proposals++
126
+ histories.push({ proposal: proposals, history: ctx.history })
127
+ if (proposals === 1) return ['failed-candidate']
128
+ if (proposals === 2) throw new Error('Operational stop after candidate settlement')
129
+ return ['resumed-candidate']
130
+ },
131
+ },
132
+ }
133
+ let firstError
134
+ try { await runOptimization(optimizationOpts) }
135
+ catch (error) { firstError = error.message }
136
+ save(join(optimizationDir, 'first-interruption.json'), { firstError, proposals, histories })
137
+ assert.match(firstError ?? '', /Operational stop after candidate settlement/)
138
+ const optimized = await runOptimization(optimizationOpts)
139
+ const resumedHistory = histories.find(h => h.proposal === 3)?.history
140
+ assert.ok(resumedHistory)
141
+ const failed = resumedHistory.flatMap(g => g.candidates).find(c => c.coverage?.unscorableCells?.length)
142
+ assert.ok(failed, 'Reopened optimization must retain its failed candidate')
143
+ assert.equal(failed.coverage.expectedCells, 1)
144
+ assert.equal(failed.coverage.scorableCells, 0)
145
+ assert.match(JSON.stringify(failed.coverage.unscorableCells), /Operational candidate interruption/)
146
+ summary.optimization = { firstError, proposals, histories, failedCandidateRecovered: true, optimized }
147
+ save(join(root, 'after-summary.json'), summary)
148
+ console.log(JSON.stringify({ module: summary.module, retryRetained: summary.retry.firstContentStillPresent, resumeRetained: summary.resume.firstContentStillPresent, legacyFilesPreserved: Object.keys(legacySnapshot).length, pathGuard: guard.rejection, optimizationFailedCandidateRecovered: true, paidCalls: 0, researchUnits: 0 }))