devlyn-cli 3.2.1 → 3.3.1

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 (423) hide show
  1. package/AGENTS.md +2 -2
  2. package/CLAUDE.md +2 -2
  3. package/README.md +12 -102
  4. package/bin/devlyn.js +13 -225
  5. package/bin/instruction-templates.json +8 -0
  6. package/config/skills/_shared/adapters/grok.md +1 -2
  7. package/config/skills/_shared/archive_run.py +15 -3
  8. package/config/skills/_shared/judge-role-evidence.py +21 -1
  9. package/config/skills/_shared/runtime-principles.md +1 -1
  10. package/config/skills/_shared/spec-verify-check.py +0 -653
  11. package/config/skills/_shared/state-phase-write.py +351 -25
  12. package/config/skills/_shared/task-complete.py +660 -150
  13. package/config/skills/_shared/terminal-claim-check.py +229 -4
  14. package/config/skills/_shared/verify-merge-findings.py +93 -2
  15. package/config/skills/devlyn:ideate/SKILL.md +3 -4
  16. package/config/skills/devlyn:ideate/references/elicitation.md +2 -35
  17. package/config/skills/devlyn:ideate/references/from-spec-mode.md +3 -18
  18. package/config/skills/devlyn:ideate/references/project-mode.md +1 -16
  19. package/config/skills/devlyn:ideate/references/spec-template.md +0 -2
  20. package/config/skills/devlyn:queue/SKILL.md +6 -4
  21. package/config/skills/devlyn:resolve/SKILL.md +16 -25
  22. package/config/skills/devlyn:resolve/references/free-form-mode.md +0 -14
  23. package/config/skills/devlyn:resolve/references/outer-loop.md +1 -1
  24. package/config/skills/devlyn:resolve/references/phases/build-gate.md +1 -1
  25. package/config/skills/devlyn:resolve/references/phases/cleanup.md +3 -3
  26. package/config/skills/devlyn:resolve/references/phases/implement.md +1 -1
  27. package/config/skills/devlyn:resolve/references/phases/probe-derive.md +1 -16
  28. package/config/skills/devlyn:resolve/references/phases/verify.md +4 -9
  29. package/config/skills/devlyn:resolve/references/state-schema.md +9 -7
  30. package/config/skills/devlyn:resolve/references/task-completion.md +47 -38
  31. package/{config/skills → optional-skills}/code-health-standards/SKILL.md +4 -13
  32. package/{config/skills → optional-skills}/code-review-standards/SKILL.md +4 -12
  33. package/{config/skills → optional-skills}/root-cause-analysis/SKILL.md +4 -12
  34. package/{config/skills → optional-skills}/ui-implementation-standards/SKILL.md +4 -14
  35. package/package.json +1 -57
  36. package/benchmark/auto-resolve/BENCHMARK-DESIGN.md +0 -289
  37. package/benchmark/auto-resolve/BENCHMARK-RESULTS.md +0 -341
  38. package/benchmark/auto-resolve/README.md +0 -696
  39. package/benchmark/auto-resolve/RUBRIC.md +0 -177
  40. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/NOTES.md +0 -34
  41. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/expected.json +0 -68
  42. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/metadata.json +0 -10
  43. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/setup.sh +0 -4
  44. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/spec.md +0 -44
  45. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/task.ko.txt +0 -8
  46. package/benchmark/auto-resolve/fixtures/F1-cli-trivial-flag/task.txt +0 -8
  47. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/NOTES.md +0 -68
  48. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/expected.json +0 -60
  49. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/metadata.json +0 -10
  50. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/setup.sh +0 -17
  51. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/spec.md +0 -51
  52. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/task.txt +0 -9
  53. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/verifiers/invalid.js +0 -29
  54. package/benchmark/auto-resolve/fixtures/F10-persist-write-collision/verifiers/parallel.js +0 -50
  55. package/benchmark/auto-resolve/fixtures/F11-batch-import-all-or-nothing/NOTES.md +0 -75
  56. package/benchmark/auto-resolve/fixtures/F11-batch-import-all-or-nothing/expected.json +0 -52
  57. package/benchmark/auto-resolve/fixtures/F11-batch-import-all-or-nothing/metadata.json +0 -10
  58. package/benchmark/auto-resolve/fixtures/F11-batch-import-all-or-nothing/setup.sh +0 -171
  59. package/benchmark/auto-resolve/fixtures/F11-batch-import-all-or-nothing/spec.md +0 -50
  60. package/benchmark/auto-resolve/fixtures/F11-batch-import-all-or-nothing/task.txt +0 -9
  61. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/NOTES.md +0 -89
  62. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/expected.json +0 -74
  63. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/metadata.json +0 -10
  64. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/setup.sh +0 -251
  65. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/spec.md +0 -57
  66. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/task.txt +0 -13
  67. package/benchmark/auto-resolve/fixtures/F12-webhook-raw-body-signature/verifiers/replay-malformed-body.js +0 -64
  68. package/benchmark/auto-resolve/fixtures/F15-frozen-diff-race-review/NOTES.md +0 -104
  69. package/benchmark/auto-resolve/fixtures/F15-frozen-diff-race-review/expected.json +0 -46
  70. package/benchmark/auto-resolve/fixtures/F15-frozen-diff-race-review/metadata.json +0 -10
  71. package/benchmark/auto-resolve/fixtures/F15-frozen-diff-race-review/setup.sh +0 -336
  72. package/benchmark/auto-resolve/fixtures/F15-frozen-diff-race-review/spec.md +0 -51
  73. package/benchmark/auto-resolve/fixtures/F15-frozen-diff-race-review/task.txt +0 -9
  74. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/NOTES.md +0 -38
  75. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/expected.json +0 -64
  76. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/metadata.json +0 -10
  77. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/setup.sh +0 -32
  78. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/spec.md +0 -63
  79. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/task.txt +0 -7
  80. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/verifiers/exact-success.js +0 -54
  81. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/verifiers/no-hardcoded-pricing.js +0 -47
  82. package/benchmark/auto-resolve/fixtures/F16-cli-quote-tax-rules/verifiers/stock-error.js +0 -45
  83. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/NOTES.md +0 -57
  84. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/expected-pair-plan-registry.json +0 -170
  85. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/expected.json +0 -84
  86. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/metadata.json +0 -21
  87. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/pair-plan.sample-fail.json +0 -214
  88. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/pair-plan.sample-pass.json +0 -223
  89. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/setup.sh +0 -5
  90. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/spec.md +0 -55
  91. package/benchmark/auto-resolve/fixtures/F2-cli-medium-subcommand/task.txt +0 -14
  92. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/NOTES.md +0 -39
  93. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/expected.json +0 -62
  94. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/metadata.json +0 -10
  95. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/setup.sh +0 -2
  96. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/spec.md +0 -67
  97. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/task.txt +0 -7
  98. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/verifiers/error-order.js +0 -55
  99. package/benchmark/auto-resolve/fixtures/F21-cli-scheduler-priority/verifiers/priority-blocked.js +0 -48
  100. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/NOTES.md +0 -35
  101. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/expected.json +0 -56
  102. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/metadata.json +0 -10
  103. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/setup.sh +0 -2
  104. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/spec.md +0 -64
  105. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/task.txt +0 -7
  106. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/verifiers/conflicting-duplicate.js +0 -34
  107. package/benchmark/auto-resolve/fixtures/F22-cli-ledger-close/verifiers/idempotent-close.js +0 -41
  108. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/NOTES.md +0 -39
  109. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/expected.json +0 -56
  110. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/metadata.json +0 -10
  111. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/setup.sh +0 -2
  112. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/spec.md +0 -76
  113. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/task.txt +0 -7
  114. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/verifiers/priority-rollback.js +0 -64
  115. package/benchmark/auto-resolve/fixtures/F23-cli-fulfillment-wave/verifiers/single-warehouse-fefo.js +0 -66
  116. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/NOTES.md +0 -40
  117. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/expected.json +0 -66
  118. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/metadata.json +0 -10
  119. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/setup.sh +0 -36
  120. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/spec.md +0 -71
  121. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/task.txt +0 -7
  122. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/verifiers/catalog-source.js +0 -57
  123. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/verifiers/exact-success.js +0 -63
  124. package/benchmark/auto-resolve/fixtures/F25-cli-cart-promotion-rules/verifiers/stock-error.js +0 -34
  125. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/NOTES.md +0 -31
  126. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/expected.json +0 -68
  127. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/metadata.json +0 -10
  128. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/setup.sh +0 -17
  129. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/spec.md +0 -68
  130. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/task.txt +0 -7
  131. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/verifiers/conflicting-duplicate.js +0 -29
  132. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/verifiers/exact-payout.js +0 -58
  133. package/benchmark/auto-resolve/fixtures/F26-cli-payout-ledger-rules/verifiers/rules-source.js +0 -56
  134. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/NOTES.md +0 -35
  135. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/expected-pair-plan-registry.json +0 -162
  136. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/expected.json +0 -67
  137. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/metadata.json +0 -19
  138. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/setup.sh +0 -4
  139. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/spec.md +0 -55
  140. package/benchmark/auto-resolve/fixtures/F3-backend-contract-risk/task.txt +0 -9
  141. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/NOTES.md +0 -34
  142. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/expected.json +0 -57
  143. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/metadata.json +0 -10
  144. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/setup.sh +0 -2
  145. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/spec.md +0 -67
  146. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/task.txt +0 -7
  147. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/verifiers/duplicate-event-error.js +0 -35
  148. package/benchmark/auto-resolve/fixtures/F31-cli-seat-rebalance/verifiers/priority-transfer-rollback.js +0 -53
  149. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/NOTES.md +0 -38
  150. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/expected.json +0 -57
  151. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/metadata.json +0 -10
  152. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/setup.sh +0 -2
  153. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/spec.md +0 -70
  154. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/task.txt +0 -3
  155. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/verifiers/duplicate-renewal-error.js +0 -42
  156. package/benchmark/auto-resolve/fixtures/F32-cli-subscription-renewal/verifiers/priority-credit-rollback.js +0 -70
  157. package/benchmark/auto-resolve/fixtures/F4-web-browser-design/NOTES.md +0 -47
  158. package/benchmark/auto-resolve/fixtures/F4-web-browser-design/expected.json +0 -57
  159. package/benchmark/auto-resolve/fixtures/F4-web-browser-design/metadata.json +0 -10
  160. package/benchmark/auto-resolve/fixtures/F4-web-browser-design/setup.sh +0 -6
  161. package/benchmark/auto-resolve/fixtures/F4-web-browser-design/spec.md +0 -48
  162. package/benchmark/auto-resolve/fixtures/F4-web-browser-design/task.txt +0 -9
  163. package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/NOTES.md +0 -45
  164. package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/expected.json +0 -65
  165. package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/metadata.json +0 -10
  166. package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/setup.sh +0 -55
  167. package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/spec.md +0 -48
  168. package/benchmark/auto-resolve/fixtures/F5-fix-loop-red-green/task.txt +0 -7
  169. package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/NOTES.md +0 -43
  170. package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/expected.json +0 -77
  171. package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/metadata.json +0 -10
  172. package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/setup.sh +0 -4
  173. package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/spec.md +0 -48
  174. package/benchmark/auto-resolve/fixtures/F6-dep-audit-native-module/task.txt +0 -10
  175. package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/NOTES.md +0 -57
  176. package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/expected.json +0 -76
  177. package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/metadata.json +0 -10
  178. package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/setup.sh +0 -36
  179. package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/spec.md +0 -45
  180. package/benchmark/auto-resolve/fixtures/F7-out-of-scope-trap/task.txt +0 -7
  181. package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/NOTES.md +0 -53
  182. package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/expected.json +0 -63
  183. package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/metadata.json +0 -10
  184. package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/setup.sh +0 -4
  185. package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/spec.md +0 -48
  186. package/benchmark/auto-resolve/fixtures/F8-known-limit-ambiguous/task.txt +0 -1
  187. package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/NOTES.md +0 -105
  188. package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/expected.json +0 -74
  189. package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/metadata.json +0 -10
  190. package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/setup.sh +0 -28
  191. package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/spec.md +0 -59
  192. package/benchmark/auto-resolve/fixtures/F9-e2e-ideate-to-resolve/task.txt +0 -5
  193. package/benchmark/auto-resolve/fixtures/SCHEMA.md +0 -188
  194. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/NOTES.md +0 -37
  195. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/RETIRED.md +0 -13
  196. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/expected.json +0 -56
  197. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/metadata.json +0 -10
  198. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/setup.sh +0 -18
  199. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/spec.md +0 -69
  200. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/task.txt +0 -7
  201. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/verifiers/exact-proration.js +0 -48
  202. package/benchmark/auto-resolve/fixtures/retired/F27-cli-subscription-proration/verifiers/rules-source-and-conflict.js +0 -79
  203. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/NOTES.md +0 -54
  204. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/RETIRED.md +0 -7
  205. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/expected.json +0 -67
  206. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/metadata.json +0 -10
  207. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/setup.sh +0 -2
  208. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/spec.md +0 -67
  209. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/task.txt +0 -5
  210. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/verifiers/policy-precedence.js +0 -72
  211. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/verifiers/validation-and-immutability.js +0 -43
  212. package/benchmark/auto-resolve/fixtures/retired/F28-cli-return-authorization/verifiers/validation-boundary.js +0 -116
  213. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/NOTES.md +0 -35
  214. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/RETIRED.md +0 -12
  215. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/expected.json +0 -58
  216. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/metadata.json +0 -10
  217. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/setup.sh +0 -2
  218. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/spec.md +0 -73
  219. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/task.txt +0 -17
  220. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/verifiers/mixed-idempotent-settlement.js +0 -53
  221. package/benchmark/auto-resolve/fixtures/retired/F30-cli-credit-hold-settlement/verifiers/rejection-boundaries.js +0 -74
  222. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/NOTES.md +0 -28
  223. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/RETIRED.md +0 -15
  224. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/expected.json +0 -57
  225. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/metadata.json +0 -10
  226. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/setup.sh +0 -50
  227. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/spec.md +0 -59
  228. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/task.txt +0 -9
  229. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/verifiers/ordered-settlement.js +0 -88
  230. package/benchmark/auto-resolve/fixtures/retired/F34-cli-settle-inflight/verifiers/reject-invalid.js +0 -45
  231. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/NOTES.md +0 -30
  232. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/RETIRED.md +0 -16
  233. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/expected.json +0 -64
  234. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/metadata.json +0 -10
  235. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/setup.sh +0 -21
  236. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/spec.md +0 -58
  237. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/task.txt +0 -9
  238. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/verifiers/dup-op.js +0 -54
  239. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/verifiers/priority-apply.js +0 -82
  240. package/benchmark/auto-resolve/fixtures/retired/F35-cli-apply-journal/verifiers/rollback.js +0 -77
  241. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/NOTES.md +0 -99
  242. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/RETIRED.md +0 -18
  243. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/expected.json +0 -64
  244. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/metadata.json +0 -10
  245. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/setup.sh +0 -4
  246. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/spec.md +0 -61
  247. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/task.txt +0 -9
  248. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/verifiers/correctness-small.js +0 -135
  249. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/verifiers/scale.js +0 -100
  250. package/benchmark/auto-resolve/fixtures/retired/F36-cli-session-admission/verifiers/validation.js +0 -75
  251. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/NOTES.md +0 -93
  252. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/RETIRED.md +0 -16
  253. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/expected.json +0 -65
  254. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/metadata.json +0 -10
  255. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/setup.sh +0 -18
  256. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/spec.md +0 -66
  257. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/task.txt +0 -9
  258. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/verifiers/correctness-small.js +0 -84
  259. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/verifiers/scale.js +0 -184
  260. package/benchmark/auto-resolve/fixtures/retired/F37-cli-rule-lookup/verifiers/validation.js +0 -74
  261. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/NOTES.md +0 -60
  262. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/RETIRED.md +0 -29
  263. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/expected.json +0 -73
  264. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/metadata.json +0 -10
  265. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/setup.sh +0 -28
  266. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/spec.md +0 -58
  267. package/benchmark/auto-resolve/fixtures/retired/F9-e2e-ideate-to-preflight/task.txt +0 -5
  268. package/benchmark/auto-resolve/fixtures/test-repo/README.md +0 -12
  269. package/benchmark/auto-resolve/fixtures/test-repo/bin/cli.js +0 -63
  270. package/benchmark/auto-resolve/fixtures/test-repo/package-lock.json +0 -823
  271. package/benchmark/auto-resolve/fixtures/test-repo/package.json +0 -22
  272. package/benchmark/auto-resolve/fixtures/test-repo/playwright.config.js +0 -17
  273. package/benchmark/auto-resolve/fixtures/test-repo/server/index.js +0 -37
  274. package/benchmark/auto-resolve/fixtures/test-repo/tests/cli.test.js +0 -25
  275. package/benchmark/auto-resolve/fixtures/test-repo/tests/server.test.js +0 -58
  276. package/benchmark/auto-resolve/fixtures/test-repo/web/index.html +0 -37
  277. package/benchmark/auto-resolve/results/20260507-f10-f11-tier1-full-pipeline/headroom-gate.json +0 -25
  278. package/benchmark/auto-resolve/results/20260507-f10-f11-tier1-full-pipeline/headroom-gate.md +0 -10
  279. package/benchmark/auto-resolve/results/20260508-f22-exact-error-headroom/headroom-gate.json +0 -18
  280. package/benchmark/auto-resolve/results/20260508-f22-exact-error-headroom/headroom-gate.md +0 -9
  281. package/benchmark/auto-resolve/results/20260508-f26-headroom/headroom-gate.json +0 -18
  282. package/benchmark/auto-resolve/results/20260508-f26-headroom/headroom-gate.md +0 -9
  283. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/F16-cli-quote-tax-rules/l2_risk_probes/result.json +0 -28
  284. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/F23-cli-fulfillment-wave/l2_risk_probes/result.json +0 -28
  285. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/F25-cli-cart-promotion-rules/l2_risk_probes/result.json +0 -30
  286. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/full-pipeline-pair-gate.json +0 -82
  287. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/full-pipeline-pair-gate.md +0 -18
  288. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/headroom-gate.json +0 -46
  289. package/benchmark/auto-resolve/results/20260510-f16-f23-f25-combined-proof/headroom-gate.md +0 -17
  290. package/benchmark/auto-resolve/results/20260511-f12-webhook-headroom/headroom-gate.json +0 -28
  291. package/benchmark/auto-resolve/results/20260511-f12-webhook-headroom/headroom-gate.md +0 -15
  292. package/benchmark/auto-resolve/results/20260511-f15-concurrency-headroom/headroom-gate.json +0 -28
  293. package/benchmark/auto-resolve/results/20260511-f15-concurrency-headroom/headroom-gate.md +0 -15
  294. package/benchmark/auto-resolve/results/20260511-f21-current-riskprobes-v1/F21-cli-scheduler-priority/l2_risk_probes/result.json +0 -32
  295. package/benchmark/auto-resolve/results/20260511-f21-current-riskprobes-v1/full-pipeline-pair-gate.json +0 -44
  296. package/benchmark/auto-resolve/results/20260511-f21-current-riskprobes-v1/full-pipeline-pair-gate.md +0 -16
  297. package/benchmark/auto-resolve/results/20260511-f21-current-riskprobes-v1/headroom-gate.json +0 -18
  298. package/benchmark/auto-resolve/results/20260511-f21-current-riskprobes-v1/headroom-gate.md +0 -9
  299. package/benchmark/auto-resolve/results/20260511-f3-http-error-headroom/headroom-gate.json +0 -28
  300. package/benchmark/auto-resolve/results/20260511-f3-http-error-headroom/headroom-gate.md +0 -15
  301. package/benchmark/auto-resolve/results/20260512-f2-medium-headroom/headroom-gate.json +0 -28
  302. package/benchmark/auto-resolve/results/20260512-f2-medium-headroom/headroom-gate.md +0 -15
  303. package/benchmark/auto-resolve/results/20260512-f31-seat-rebalance-headroom/headroom-gate.json +0 -28
  304. package/benchmark/auto-resolve/results/20260512-f31-seat-rebalance-headroom/headroom-gate.md +0 -15
  305. package/benchmark/auto-resolve/results/20260512-f32-subscription-renewal-headroom/headroom-gate.json +0 -28
  306. package/benchmark/auto-resolve/results/20260512-f32-subscription-renewal-headroom/headroom-gate.md +0 -15
  307. package/benchmark/auto-resolve/results/20260512-f4-web-headroom/headroom-gate.json +0 -28
  308. package/benchmark/auto-resolve/results/20260512-f4-web-headroom/headroom-gate.md +0 -15
  309. package/benchmark/auto-resolve/results/20260512-f5-fixloop-headroom/headroom-gate.json +0 -28
  310. package/benchmark/auto-resolve/results/20260512-f5-fixloop-headroom/headroom-gate.md +0 -15
  311. package/benchmark/auto-resolve/results/20260512-f6-checksum-headroom/headroom-gate.json +0 -28
  312. package/benchmark/auto-resolve/results/20260512-f6-checksum-headroom/headroom-gate.md +0 -15
  313. package/benchmark/auto-resolve/results/20260512-f7-scope-headroom/headroom-gate.json +0 -28
  314. package/benchmark/auto-resolve/results/20260512-f7-scope-headroom/headroom-gate.md +0 -15
  315. package/benchmark/auto-resolve/results/20260512-f9-e2e-headroom/headroom-gate.json +0 -28
  316. package/benchmark/auto-resolve/results/20260512-f9-e2e-headroom/headroom-gate.md +0 -15
  317. package/benchmark/auto-resolve/run-real-benchmark.md +0 -303
  318. package/benchmark/auto-resolve/scripts/audit-headroom-rejections.py +0 -441
  319. package/benchmark/auto-resolve/scripts/audit-pair-evidence.py +0 -1256
  320. package/benchmark/auto-resolve/scripts/build-pair-eligible-manifest.py +0 -306
  321. package/benchmark/auto-resolve/scripts/check-f9-artifacts.py +0 -268
  322. package/benchmark/auto-resolve/scripts/collect-swebench-predictions.py +0 -108
  323. package/benchmark/auto-resolve/scripts/compile-report.py +0 -493
  324. package/benchmark/auto-resolve/scripts/fetch-swebench-instances.py +0 -129
  325. package/benchmark/auto-resolve/scripts/frozen-verify-gate.py +0 -434
  326. package/benchmark/auto-resolve/scripts/full-pipeline-pair-gate.py +0 -612
  327. package/benchmark/auto-resolve/scripts/headroom-gate.py +0 -378
  328. package/benchmark/auto-resolve/scripts/iter-0033c-compare.py +0 -683
  329. package/benchmark/auto-resolve/scripts/iter-0033c-l1-summary.py +0 -97
  330. package/benchmark/auto-resolve/scripts/judge-opus-pass.sh +0 -542
  331. package/benchmark/auto-resolve/scripts/judge.sh +0 -565
  332. package/benchmark/auto-resolve/scripts/oracle-scope-tier-a.py +0 -256
  333. package/benchmark/auto-resolve/scripts/oracle-scope-tier-b.py +0 -287
  334. package/benchmark/auto-resolve/scripts/oracle-test-fidelity.py +0 -328
  335. package/benchmark/auto-resolve/scripts/pair-candidate-frontier.py +0 -469
  336. package/benchmark/auto-resolve/scripts/pair-plan-idgen.py +0 -401
  337. package/benchmark/auto-resolve/scripts/pair-plan-lint.py +0 -475
  338. package/benchmark/auto-resolve/scripts/pair-rejected-fixtures.sh +0 -103
  339. package/benchmark/auto-resolve/scripts/pair_evidence_contract.py +0 -270
  340. package/benchmark/auto-resolve/scripts/prepare-swebench-frozen-case.py +0 -273
  341. package/benchmark/auto-resolve/scripts/prepare-swebench-frozen-corpus.py +0 -148
  342. package/benchmark/auto-resolve/scripts/prepare-swebench-solver-worktree.py +0 -210
  343. package/benchmark/auto-resolve/scripts/recent-benchmark-summary.py +0 -232
  344. package/benchmark/auto-resolve/scripts/run-fixture.sh +0 -1024
  345. package/benchmark/auto-resolve/scripts/run-frozen-verify-pair.sh +0 -683
  346. package/benchmark/auto-resolve/scripts/run-full-pipeline-pair-candidate.sh +0 -458
  347. package/benchmark/auto-resolve/scripts/run-headroom-candidate.sh +0 -336
  348. package/benchmark/auto-resolve/scripts/run-iter-0033c.sh +0 -208
  349. package/benchmark/auto-resolve/scripts/run-suite.sh +0 -251
  350. package/benchmark/auto-resolve/scripts/run-swebench-frozen-corpus.sh +0 -310
  351. package/benchmark/auto-resolve/scripts/run-swebench-solver-batch.sh +0 -257
  352. package/benchmark/auto-resolve/scripts/ship-gate.py +0 -391
  353. package/benchmark/auto-resolve/scripts/solo-ceiling-avoidance.py +0 -53
  354. package/benchmark/auto-resolve/scripts/solo-headroom-hypothesis.py +0 -77
  355. package/benchmark/auto-resolve/scripts/swebench-frozen-matrix.py +0 -478
  356. package/benchmark/auto-resolve/scripts/test-audit-headroom-rejections.sh +0 -288
  357. package/benchmark/auto-resolve/scripts/test-audit-pair-evidence.sh +0 -1672
  358. package/benchmark/auto-resolve/scripts/test-benchmark-arg-parsing.sh +0 -1015
  359. package/benchmark/auto-resolve/scripts/test-build-pair-eligible-manifest.sh +0 -491
  360. package/benchmark/auto-resolve/scripts/test-check-f9-artifacts.sh +0 -91
  361. package/benchmark/auto-resolve/scripts/test-frozen-verify-gate.sh +0 -517
  362. package/benchmark/auto-resolve/scripts/test-full-pipeline-pair-gate.sh +0 -610
  363. package/benchmark/auto-resolve/scripts/test-headroom-gate.sh +0 -401
  364. package/benchmark/auto-resolve/scripts/test-iter-0033c-compare.sh +0 -525
  365. package/benchmark/auto-resolve/scripts/test-iter-0033c-l1-summary.sh +0 -254
  366. package/benchmark/auto-resolve/scripts/test-lint-fixtures.sh +0 -580
  367. package/benchmark/auto-resolve/scripts/test-pair-candidate-frontier.sh +0 -591
  368. package/benchmark/auto-resolve/scripts/test-run-full-pipeline-pair-candidate.sh +0 -497
  369. package/benchmark/auto-resolve/scripts/test-run-headroom-candidate.sh +0 -401
  370. package/benchmark/auto-resolve/scripts/test-run-swebench-solver-batch.sh +0 -111
  371. package/benchmark/auto-resolve/scripts/test-ship-gate.sh +0 -1189
  372. package/benchmark/auto-resolve/scripts/test-swebench-frozen-case.sh +0 -1221
  373. package/benchmark/auto-resolve/shadow-fixtures/S1-cli-lang-flag/NOTES.md +0 -28
  374. package/benchmark/auto-resolve/shadow-fixtures/S1-cli-lang-flag/expected.json +0 -63
  375. package/benchmark/auto-resolve/shadow-fixtures/S1-cli-lang-flag/metadata.json +0 -10
  376. package/benchmark/auto-resolve/shadow-fixtures/S1-cli-lang-flag/setup.sh +0 -3
  377. package/benchmark/auto-resolve/shadow-fixtures/S1-cli-lang-flag/spec.md +0 -47
  378. package/benchmark/auto-resolve/shadow-fixtures/S1-cli-lang-flag/task.txt +0 -1
  379. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/NOTES.md +0 -34
  380. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/expected.json +0 -53
  381. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/metadata.json +0 -10
  382. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/setup.sh +0 -3
  383. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/spec.md +0 -50
  384. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/task.txt +0 -1
  385. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/verifiers/duplicate-order-error.js +0 -27
  386. package/benchmark/auto-resolve/shadow-fixtures/S2-cli-inventory-reservation/verifiers/priority-stock-reservation.js +0 -44
  387. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/NOTES.md +0 -34
  388. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/expected.json +0 -55
  389. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/metadata.json +0 -10
  390. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/setup.sh +0 -3
  391. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/spec.md +0 -52
  392. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/task.txt +0 -1
  393. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/verifiers/duplicate-ticket-error.js +0 -29
  394. package/benchmark/auto-resolve/shadow-fixtures/S3-cli-ticket-assignment/verifiers/priority-agent-assignment.js +0 -48
  395. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/NOTES.md +0 -34
  396. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/expected.json +0 -55
  397. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/metadata.json +0 -10
  398. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/setup.sh +0 -3
  399. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/spec.md +0 -55
  400. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/task.txt +0 -1
  401. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/verifiers/duplicate-return-error.js +0 -43
  402. package/benchmark/auto-resolve/shadow-fixtures/S4-cli-return-routing/verifiers/priority-return-routing.js +0 -70
  403. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/NOTES.md +0 -37
  404. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/expected.json +0 -54
  405. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/metadata.json +0 -10
  406. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/setup.sh +0 -3
  407. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/spec.md +0 -59
  408. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/task.txt +0 -1
  409. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/verifiers/credit-ledger-priority.js +0 -98
  410. package/benchmark/auto-resolve/shadow-fixtures/S5-cli-credit-grant-ledger/verifiers/duplicate-charge-error.js +0 -38
  411. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/NOTES.md +0 -36
  412. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/expected.json +0 -56
  413. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/metadata.json +0 -10
  414. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/setup.sh +0 -3
  415. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/spec.md +0 -59
  416. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/task.txt +0 -1
  417. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/verifiers/duplicate-refund-error.js +0 -41
  418. package/benchmark/auto-resolve/shadow-fixtures/S6-cli-refund-window-ledger/verifiers/priority-refund-ledger.js +0 -65
  419. package/config/skills/_shared/pair-plan-schema.md +0 -298
  420. package/scripts/lint-fixtures.sh +0 -352
  421. package/scripts/lint-shadow-fixtures.sh +0 -58
  422. package/scripts/lint-skills.sh +0 -4265
  423. package/scripts/test-owner-phases.py +0 -238
@@ -1,116 +0,0 @@
1
- 'use strict';
2
-
3
- const assert = require('node:assert');
4
- const { spawnSync } = require('node:child_process');
5
- const fs = require('node:fs');
6
- const os = require('node:os');
7
- const path = require('node:path');
8
-
9
- const work = process.env.BENCH_WORKDIR || process.cwd();
10
- const cli = path.join(work, 'bin', 'cli.js');
11
-
12
- function runCase(name, payload) {
13
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), `f28-return-${name}-`));
14
- const input = path.join(tmp, 'return.json');
15
- fs.writeFileSync(input, JSON.stringify(payload, null, 2), 'utf8');
16
- return spawnSync('node', [cli, 'authorize-return', '--input', input], {
17
- cwd: work,
18
- encoding: 'utf8'
19
- });
20
- }
21
-
22
- function assertJsonError(result, label) {
23
- assert.strictEqual(result.status, 2, `${label}: expected exit 2`);
24
- assert.strictEqual(result.stdout, '', `${label}: expected empty stdout`);
25
- const parsed = JSON.parse(result.stderr);
26
- assert.strictEqual(typeof parsed.error, 'string', `${label}: error must be a string`);
27
- assert.notStrictEqual(parsed.error.length, 0, `${label}: error must not be empty`);
28
- }
29
-
30
- function clone(value) {
31
- return JSON.parse(JSON.stringify(value));
32
- }
33
-
34
- const boundary = runCase('boundary', {
35
- today: '2026-05-20',
36
- order: {
37
- id: 'O-BORDER',
38
- purchased_at: '2026-05-01',
39
- items: [
40
- { sku: 'MUG', qty: 1, unit_cents: 1000, return_window_days: 19, restocking_fee_percent: 25 }
41
- ]
42
- },
43
- request: {
44
- id: 'R-BORDER',
45
- lines: [
46
- { sku: 'MUG', qty: 1, reason: 'changed_mind', condition: 'sealed', resolution: 'refund' }
47
- ]
48
- }
49
- });
50
-
51
- assert.strictEqual(boundary.status, 0);
52
- assert.strictEqual(boundary.stderr, '');
53
- assert.deepStrictEqual(JSON.parse(boundary.stdout), {
54
- request_id: 'R-BORDER',
55
- order_id: 'O-BORDER',
56
- approved: [
57
- {
58
- sku: 'MUG',
59
- qty: 1,
60
- resolution: 'refund',
61
- gross_cents: 1000,
62
- restocking_fee_cents: 0,
63
- refund_cents: 1000,
64
- exchange_credit_cents: 0
65
- }
66
- ],
67
- rejected: [],
68
- refund_cents: 1000,
69
- exchange_credit_cents: 0,
70
- restocking_fee_cents: 0
71
- });
72
-
73
- const validBase = {
74
- today: '2026-05-20',
75
- order: {
76
- id: 'O-VALIDATE',
77
- purchased_at: '2026-05-01',
78
- items: [
79
- { sku: 'COAT', qty: 1, unit_cents: 9900, return_window_days: 30, restocking_fee_percent: 12 }
80
- ]
81
- },
82
- request: {
83
- id: 'R-VALIDATE',
84
- lines: [
85
- { sku: 'COAT', qty: 1, reason: 'changed_mind', condition: 'opened', resolution: 'refund' }
86
- ]
87
- }
88
- };
89
-
90
- const duplicateSku = clone(validBase);
91
- duplicateSku.order.items.push({
92
- sku: 'COAT',
93
- qty: 1,
94
- unit_cents: 9900,
95
- return_window_days: 30,
96
- restocking_fee_percent: 12
97
- });
98
- assertJsonError(runCase('duplicate-sku', duplicateSku), 'duplicate order SKU');
99
-
100
- const unknownSku = clone(validBase);
101
- unknownSku.request.lines[0].sku = 'SCARF';
102
- assertJsonError(runCase('unknown-sku', unknownSku), 'unknown requested SKU');
103
-
104
- const invalidDate = clone(validBase);
105
- invalidDate.today = '2026-02-30';
106
- assertJsonError(runCase('invalid-date', invalidDate), 'invalid calendar date');
107
-
108
- const invalidCondition = clone(validBase);
109
- invalidCondition.request.lines[0].condition = 'damaged_box';
110
- assertJsonError(runCase('invalid-condition', invalidCondition), 'invalid condition');
111
-
112
- const invalidResolution = clone(validBase);
113
- invalidResolution.request.lines[0].resolution = 'store_credit';
114
- assertJsonError(runCase('invalid-resolution', invalidResolution), 'invalid resolution');
115
-
116
- console.log(JSON.stringify({ ok: true }));
@@ -1,35 +0,0 @@
1
- # F30 - Notes
2
-
3
- ## Failure Mode
4
-
5
- This fixture detects payment-style implementations that pass simple happy-path
6
- tests while double-applying duplicate operations, letting rejected operations
7
- consume available credit, failing to release holds on capture/release, or
8
- mutating input files while computing settlement state.
9
-
10
- ## Pipeline Phases
11
-
12
- It stresses IMPLEMENT and VERIFY. The visible spec names the state transition
13
- rules, idempotency output shape, and exact account summary; hidden verifiers
14
- combine those rules so a one-axis implementation is not enough.
15
-
16
- ## Why Existing Fixtures Do Not Cover This
17
-
18
- F16 covers quote math, F23 covers warehouse allocation rollback, F25 covers cart
19
- promotions, and F28 return authorization was rejected after corrected scoring
20
- showed solo saturation. None focus on duplicate operation idempotency plus
21
- credit-hold mutation, capture/release transitions, and validation immutability.
22
-
23
- ## Retirement Criteria
24
-
25
- Retire or rotate this fixture if both `solo_claude` and the selected pair arm
26
- score near the ceiling for two shipped versions, or if another fixture covers
27
- idempotent financial hold mutation with clearer pair headroom.
28
-
29
- ## Headroom Status
30
-
31
- Retired after headroom run `20260511-f30-headroom-v1`: bare 33 /
32
- solo_claude 98, headroom FAIL because `solo_claude score 98 > 80`.
33
-
34
- Do not count F30 as pair-lift evidence. Rework the visible contract or hidden
35
- verifiers before spending pair arms on this idea again.
@@ -1,12 +0,0 @@
1
- # F30 retired
2
-
3
- Retired from the active golden suite after headroom run
4
- `20260511-f30-headroom-v1`.
5
-
6
- Reason: `solo_claude` scored 98, exceeding the headroom ceiling of 80, while
7
- bare scored 33. The fixture is useful as a record of an idempotent hold
8
- settlement candidate that proved too explicit for solo, but it is not
9
- pair-lift evidence.
10
-
11
- Future use: rework the visible contract or hidden verifiers so the task creates
12
- a fair pair-risk-probe gap without hiding requirements from the spec.
@@ -1,58 +0,0 @@
1
- {
2
- "verification_commands": [
3
- {
4
- "cmd": "node --test tests/cli.test.js",
5
- "exit_code": 0,
6
- "stdout_contains": [],
7
- "stdout_not_contains": ["not ok "]
8
- },
9
- {
10
- "cmd": "node \"$BENCH_FIXTURE_DIR/verifiers/mixed-idempotent-settlement.js\"",
11
- "exit_code": 0,
12
- "stdout_contains": ["\"ok\":true"],
13
- "stdout_not_contains": [],
14
- "contract_refs": [
15
- "A failed authorization does not reserve credit and does not block a later valid authorization.",
16
- "Capture removes the active hold and increases `balance_cents`.",
17
- "Release removes the active hold without changing `balance_cents`.",
18
- "Duplicate operation ids do not mutate state and report the original status."
19
- ]
20
- },
21
- {
22
- "cmd": "node \"$BENCH_FIXTURE_DIR/verifiers/rejection-boundaries.js\"",
23
- "exit_code": 0,
24
- "stdout_contains": ["\"ok\":true"],
25
- "stdout_not_contains": [],
26
- "contract_refs": [
27
- "Reusing an active `hold_id` is rejected as `\"duplicate_hold\"`.",
28
- "Capture or release with a wrong amount is rejected as `\"amount_mismatch\"` and does not mutate state.",
29
- "Invalid unknown-account input exits `2`, prints one JSON error object to stderr, and prints no stdout.",
30
- "The input file contents are unchanged after settlement."
31
- ]
32
- }
33
- ],
34
- "forbidden_patterns": [
35
- {
36
- "pattern": "catch\\s*\\([^)]*\\)\\s*\\{[^}]*return\\s+(null|undefined|''|\\{\\})",
37
- "description": "silent catch returning fallback in credit hold settlement path",
38
- "files": ["bin/cli.js"],
39
- "severity": "disqualifier"
40
- },
41
- {
42
- "pattern": "catch\\s*\\([^)]*\\)\\s*\\{\\s*\\}",
43
- "description": "empty catch block",
44
- "files": ["bin/cli.js"],
45
- "severity": "disqualifier"
46
- },
47
- {
48
- "pattern": "/\\*\\s*eslint-disable",
49
- "description": "eslint-disable without scoped justification",
50
- "files": ["bin/cli.js"],
51
- "severity": "disqualifier"
52
- }
53
- ],
54
- "required_files": ["bin/cli.js", "tests/cli.test.js"],
55
- "forbidden_files": [],
56
- "max_deps_added": 0,
57
- "spec_output_files": ["bin/cli.js", "tests/cli.test.js"]
58
- }
@@ -1,10 +0,0 @@
1
- {
2
- "id": "F30-cli-credit-hold-settlement",
3
- "category": "high-risk",
4
- "difficulty": "high",
5
- "timeout_seconds": 1500,
6
- "required_tools": ["node"],
7
- "browser": false,
8
- "deps_change_expected": false,
9
- "intent": "Add a bench-cli settle-holds command that reads account credit holds and operations, applies authorization/capture/release with idempotency and rollback, and emits exact cents-based settlement state without mutating input."
10
- }
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -e
@@ -1,73 +0,0 @@
1
- ---
2
- id: "F30-cli-credit-hold-settlement"
3
- title: "Credit hold settlement"
4
- status: planned
5
- complexity: high
6
- depends-on: []
7
- ---
8
-
9
- # F30 Credit hold settlement
10
-
11
- ## Context
12
-
13
- `bench-cli` currently has greeting and version commands only. The task:
14
- add a `settle-holds` command that reads account credit holds and operations,
15
- applies authorization/capture/release with idempotency and rollback, and emits
16
- exact cents-based settlement state without mutating input.
17
-
18
- Credit holds feed payment and ledger workflows, so duplicate operations,
19
- failed operations, and available-credit calculations must be deterministic.
20
-
21
- ## Requirements
22
-
23
- - [ ] `bench-cli settle-holds --input <path>` reads JSON shaped as `{ "accounts": Array<Account>, "operations": Array<Operation> }`.
24
- - [ ] Each account has `{ "id": string, "balance_cents": number, "credit_limit_cents": number }`.
25
- - [ ] Each operation has `{ "id": string, "account_id": string, "type": "authorize" | "capture" | "release", "hold_id": string, "amount_cents": number }`.
26
- - [ ] Validate before settlement: ids and hold ids must be non-empty strings, account ids must be unique, balances and credit limits must be non-negative integers, amount cents must be positive integers, operation types must be one of the allowed strings, and every operation account must exist.
27
- - [ ] Invalid input exits `2`, writes exactly one JSON error object to stderr, and writes nothing to stdout.
28
- - [ ] Business rejections do not exit non-zero and do not mutate settlement state.
29
- - [ ] Process operations in input order.
30
- - [ ] An `authorize` operation creates one active hold when `credit_limit_cents - balance_cents - active_hold_cents >= amount_cents`; otherwise it is rejected with reason `"insufficient_credit"`.
31
- - [ ] An `authorize` operation for a `hold_id` that is already active is rejected with reason `"duplicate_hold"`.
32
- - [ ] A `capture` operation requires an active hold for the same account and exactly the requested amount available on that hold; otherwise it is rejected with reason `"unknown_hold"` or `"amount_mismatch"`.
33
- - [ ] An approved `capture` increases `balance_cents` by `amount_cents` and removes the active hold.
34
- - [ ] A `release` operation requires an active hold for the same account and exactly the requested amount available on that hold; otherwise it is rejected with reason `"unknown_hold"` or `"amount_mismatch"`.
35
- - [ ] An approved `release` removes the active hold without changing `balance_cents`.
36
- - [ ] Duplicate operation ids are idempotent: the first occurrence is processed normally; each later operation with the same `id` must not mutate state and emits `{ "id": string, "status": "duplicate", "original_status": "approved" | "rejected" }`.
37
- - [ ] Approved rows have keys `id`, `status`, `type`, `account_id`, `hold_id`, `amount_cents`.
38
- - [ ] Rejected rows have keys `id`, `status`, `reason`.
39
- - [ ] Duplicate rows have keys `id`, `status`, `original_status`.
40
- - [ ] On success, write exactly one JSON object to stdout and no stderr. Keys: `results`, `accounts`.
41
- - [ ] `results` is ordered by input operation order.
42
- - [ ] `accounts` is sorted by account id. Each account row has keys `id`, `balance_cents`, `active_hold_cents`, `available_cents`.
43
- - [ ] The command must not modify the input file.
44
- - [ ] `tests/cli.test.js` is updated. Existing tests still pass AND at least two new tests cover one mixed approved/rejected/duplicate settlement and one validation failure.
45
-
46
- ## Constraints
47
-
48
- - **No new npm dependencies.**
49
- - **No floating-money output.** All public amounts are integer cents.
50
- - **No silent catches.** Invalid input and file-read failures must surface as JSON errors with exit `2`.
51
- - **No extra stdout/stderr text** on the success path; downstream tooling parses stdout as JSON.
52
- - **Touch only `bin/cli.js` and `tests/cli.test.js`.**
53
-
54
- ## Out of Scope
55
-
56
- - Payment processor calls.
57
- - Persistence beyond stdout.
58
- - Partial captures or partial releases.
59
- - Currencies, interest, fees, or statement generation.
60
- - Touching `server/`, `web/`, or `tests/server.test.js`.
61
-
62
- ## Verification
63
-
64
- - `node --test tests/cli.test.js` exits 0.
65
- - A failed authorization does not reserve credit and does not block a later valid authorization.
66
- - Capture removes the active hold and increases `balance_cents`.
67
- - Release removes the active hold without changing `balance_cents`.
68
- - Duplicate operation ids do not mutate state and report the original status.
69
- - Reusing an active `hold_id` is rejected as `"duplicate_hold"`.
70
- - Capture or release with a wrong amount is rejected as `"amount_mismatch"` and does not mutate state.
71
- - Invalid unknown-account input exits `2`, prints one JSON error object to stderr, and prints no stdout.
72
- - The input file contents are unchanged after settlement.
73
- - `git diff --stat` shows only `bin/cli.js` and `tests/cli.test.js` touched.
@@ -1,17 +0,0 @@
1
- Add a bench-cli settle-holds command that reads account credit holds and
2
- operations, applies authorization/capture/release with idempotency and rollback,
3
- and emits exact cents-based settlement state without mutating input.
4
-
5
- The command should read `--input <path>` JSON with accounts and operations.
6
- Validate the input before settlement. Use integer cents only, write exactly one
7
- JSON object to stdout on success, and write exactly one JSON error object to
8
- stderr with exit code 2 for invalid input. Do not add npm dependencies.
9
-
10
- Business rejections should stay on exit code 0. Process operations in input
11
- order. Authorizations create active holds only when available credit is enough.
12
- Captures and releases require an active hold for the same account and exact
13
- amount. Failed operations must not mutate state. Duplicate operation ids are
14
- idempotent: only the first occurrence mutates state, and later duplicates report
15
- the original approved/rejected status.
16
-
17
- Update the CLI tests. Touch only `bin/cli.js` and `tests/cli.test.js`.
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- const assert = require('node:assert');
4
- const { execFileSync } = require('node:child_process');
5
- const fs = require('node:fs');
6
- const os = require('node:os');
7
- const path = require('node:path');
8
-
9
- const work = process.env.BENCH_WORKDIR || process.cwd();
10
- const cli = path.join(work, 'bin', 'cli.js');
11
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'f30-mixed-'));
12
- const input = path.join(tmp, 'holds.json');
13
-
14
- fs.writeFileSync(input, JSON.stringify({
15
- accounts: [
16
- { id: 'acct-a', balance_cents: 2000, credit_limit_cents: 10000 },
17
- { id: 'acct-b', balance_cents: 0, credit_limit_cents: 5000 }
18
- ],
19
- operations: [
20
- { id: 'op-auth-1', account_id: 'acct-a', type: 'authorize', hold_id: 'h-1', amount_cents: 5000 },
21
- { id: 'op-too-large', account_id: 'acct-a', type: 'authorize', hold_id: 'h-2', amount_cents: 4000 },
22
- { id: 'op-release', account_id: 'acct-a', type: 'release', hold_id: 'h-1', amount_cents: 5000 },
23
- { id: 'op-auth-3', account_id: 'acct-a', type: 'authorize', hold_id: 'h-3', amount_cents: 3000 },
24
- { id: 'op-capture', account_id: 'acct-a', type: 'capture', hold_id: 'h-3', amount_cents: 3000 },
25
- { id: 'op-capture', account_id: 'acct-a', type: 'capture', hold_id: 'h-3', amount_cents: 3000 },
26
- { id: 'op-auth-b', account_id: 'acct-b', type: 'authorize', hold_id: 'h-b', amount_cents: 5000 }
27
- ]
28
- }), 'utf8');
29
-
30
- const stdout = execFileSync('node', [cli, 'settle-holds', '--input', input], {
31
- cwd: work,
32
- encoding: 'utf8',
33
- stdio: ['ignore', 'pipe', 'pipe']
34
- });
35
- const parsed = JSON.parse(stdout);
36
-
37
- assert.deepStrictEqual(parsed, {
38
- results: [
39
- { id: 'op-auth-1', status: 'approved', type: 'authorize', account_id: 'acct-a', hold_id: 'h-1', amount_cents: 5000 },
40
- { id: 'op-too-large', status: 'rejected', reason: 'insufficient_credit' },
41
- { id: 'op-release', status: 'approved', type: 'release', account_id: 'acct-a', hold_id: 'h-1', amount_cents: 5000 },
42
- { id: 'op-auth-3', status: 'approved', type: 'authorize', account_id: 'acct-a', hold_id: 'h-3', amount_cents: 3000 },
43
- { id: 'op-capture', status: 'approved', type: 'capture', account_id: 'acct-a', hold_id: 'h-3', amount_cents: 3000 },
44
- { id: 'op-capture', status: 'duplicate', original_status: 'approved' },
45
- { id: 'op-auth-b', status: 'approved', type: 'authorize', account_id: 'acct-b', hold_id: 'h-b', amount_cents: 5000 }
46
- ],
47
- accounts: [
48
- { id: 'acct-a', balance_cents: 5000, active_hold_cents: 0, available_cents: 5000 },
49
- { id: 'acct-b', balance_cents: 0, active_hold_cents: 5000, available_cents: 0 }
50
- ]
51
- });
52
-
53
- console.log(JSON.stringify({ ok: true }));
@@ -1,74 +0,0 @@
1
- 'use strict';
2
-
3
- const assert = require('node:assert');
4
- const { spawnSync } = require('node:child_process');
5
- const fs = require('node:fs');
6
- const os = require('node:os');
7
- const path = require('node:path');
8
-
9
- const work = process.env.BENCH_WORKDIR || process.cwd();
10
- const cli = path.join(work, 'bin', 'cli.js');
11
-
12
- function runPayload(label, payload) {
13
- const tmp = fs.mkdtempSync(path.join(os.tmpdir(), `f30-${label}-`));
14
- const input = path.join(tmp, 'holds.json');
15
- const original = JSON.stringify(payload, null, 2);
16
- fs.writeFileSync(input, original, 'utf8');
17
- const result = spawnSync('node', [cli, 'settle-holds', '--input', input], {
18
- cwd: work,
19
- encoding: 'utf8'
20
- });
21
- assert.strictEqual(fs.readFileSync(input, 'utf8'), original, `${label}: input mutated`);
22
- return result;
23
- }
24
-
25
- const boundary = runPayload('boundary', {
26
- accounts: [
27
- { id: 'acct-a', balance_cents: 1000, credit_limit_cents: 7000 }
28
- ],
29
- operations: [
30
- { id: 'op-auth', account_id: 'acct-a', type: 'authorize', hold_id: 'h-1', amount_cents: 3000 },
31
- { id: 'op-dupe-hold', account_id: 'acct-a', type: 'authorize', hold_id: 'h-1', amount_cents: 1000 },
32
- { id: 'op-bad-capture', account_id: 'acct-a', type: 'capture', hold_id: 'h-1', amount_cents: 2000 },
33
- { id: 'op-release', account_id: 'acct-a', type: 'release', hold_id: 'h-1', amount_cents: 3000 },
34
- { id: 'op-bad-release', account_id: 'acct-a', type: 'release', hold_id: 'h-1', amount_cents: 3000 },
35
- { id: 'op-after', account_id: 'acct-a', type: 'authorize', hold_id: 'h-2', amount_cents: 6000 },
36
- { id: 'op-dupe-reject', account_id: 'acct-a', type: 'authorize', hold_id: 'h-3', amount_cents: 1 },
37
- { id: 'op-dupe-reject', account_id: 'acct-a', type: 'authorize', hold_id: 'h-4', amount_cents: 1 }
38
- ]
39
- });
40
-
41
- assert.strictEqual(boundary.status, 0);
42
- assert.strictEqual(boundary.stderr, '');
43
- assert.deepStrictEqual(JSON.parse(boundary.stdout), {
44
- results: [
45
- { id: 'op-auth', status: 'approved', type: 'authorize', account_id: 'acct-a', hold_id: 'h-1', amount_cents: 3000 },
46
- { id: 'op-dupe-hold', status: 'rejected', reason: 'duplicate_hold' },
47
- { id: 'op-bad-capture', status: 'rejected', reason: 'amount_mismatch' },
48
- { id: 'op-release', status: 'approved', type: 'release', account_id: 'acct-a', hold_id: 'h-1', amount_cents: 3000 },
49
- { id: 'op-bad-release', status: 'rejected', reason: 'unknown_hold' },
50
- { id: 'op-after', status: 'approved', type: 'authorize', account_id: 'acct-a', hold_id: 'h-2', amount_cents: 6000 },
51
- { id: 'op-dupe-reject', status: 'rejected', reason: 'insufficient_credit' },
52
- { id: 'op-dupe-reject', status: 'duplicate', original_status: 'rejected' }
53
- ],
54
- accounts: [
55
- { id: 'acct-a', balance_cents: 1000, active_hold_cents: 6000, available_cents: 0 }
56
- ]
57
- });
58
-
59
- const invalid = runPayload('invalid', {
60
- accounts: [
61
- { id: 'acct-a', balance_cents: 0, credit_limit_cents: 1000 }
62
- ],
63
- operations: [
64
- { id: 'op-missing-account', account_id: 'acct-missing', type: 'authorize', hold_id: 'h-1', amount_cents: 100 }
65
- ]
66
- });
67
-
68
- assert.strictEqual(invalid.status, 2);
69
- assert.strictEqual(invalid.stdout, '');
70
- const err = JSON.parse(invalid.stderr);
71
- assert.strictEqual(typeof err.error, 'string');
72
- assert.notStrictEqual(err.error.length, 0);
73
-
74
- console.log(JSON.stringify({ ok: true }));
@@ -1,28 +0,0 @@
1
- # F34 CLI settle in-flight
2
-
3
- ## Failure mode
4
-
5
- Detects implementations that couple authorization completion order to
6
- settlement order. The two cheap-but-wrong shapes: (a) sequential
7
- await-per-transfer — correct ledger, fails the visible overlap requirement
8
- (`high_water >= 3`); (b) apply-as-authorizations-resolve — meets overlap,
9
- corrupts file-order settlement (flips `t-60` accept and `t-40` reject in the
10
- verifier input). The correct shape starts authorizations concurrently and
11
- settles strictly in file order afterward — the decoupling is the measured
12
- skill (Tier-1 "H1" from memory `project_pair_fixture_tier1_2026_05_05`;
13
- keyword-hidden: spec never says race/lock/mutex/concurrency primitive).
14
-
15
- ## Fairness
16
-
17
- Every verifier assertion quotes a visible spec bullet via `contract_refs`
18
- (lint-fixtures enforced). Gateway latency is deterministic (trailing digits
19
- of the id = ms), high-water threshold is stated in the spec with the exact
20
- sample size, and the flip case is derivable from the visible settlement rule
21
- alone. No hidden shape or tie-break exists outside spec.md.
22
-
23
- ## Headroom prediction (pre-registered, unmeasured)
24
-
25
- bare ≤ 60 (expected to fail ordering-vs-completion or overlap), solo ≤ 80
26
- (hypothesis: misses the decoupling — settles in completion order). To be
27
- measured with `headroom-gate.py` before any pair-evidence claims; this
28
- fixture carries no measurement claim until then.
@@ -1,15 +0,0 @@
1
- # F34 retired
2
-
3
- Retired from the active golden suite after headroom run
4
- `iter-0039-headroom-f34-f35`.
5
-
6
- Reason: bare scored 92, exceeding the headroom ceiling of 60, and
7
- `solo_claude` scored 88, exceeding the headroom ceiling of 80. Both arms
8
- solved the settle-inflight task competently (judge: bare 92 vs solo_claude 88,
9
- margin -4) and share the same minor scope slip (touching
10
- `data/gateway-stats.json` outside the expected diff); neither arm hit a hard
11
- disqualifier. The task was not hard enough for bare, let alone solo — there is
12
- no pair-lift headroom to measure.
13
-
14
- Future use: rework the visible contract or hidden verifiers so the task
15
- creates a fair pair-risk-probe gap without hiding requirements from the spec.
@@ -1,57 +0,0 @@
1
- {
2
- "verification_commands": [
3
- {
4
- "cmd": "node --test tests/cli.test.js",
5
- "exit_code": 0,
6
- "stdout_contains": [],
7
- "stdout_not_contains": ["not ok "]
8
- },
9
- {
10
- "cmd": "node \"$BENCH_FIXTURE_DIR/verifiers/ordered-settlement.js\"",
11
- "exit_code": 0,
12
- "stdout_contains": ["\"ok\":true"],
13
- "stdout_not_contains": [],
14
- "contract_refs": [
15
- "Every transfer is authorized by calling `authorize(transfer)` from `lib/gateway.js` exactly once per transfer.",
16
- "Regardless of the order in which authorizations complete, transfers settle in file order, each exactly once.",
17
- "Each rejected transfer produces exact row shape `{ \"id\": string, \"error\": \"insufficient_funds\", \"available\": number, \"requested\": number }`, where `available` is the sender's balance at that transfer's turn in file order.",
18
- "The seeded gateway records the maximum number of authorizations in flight at once in `data/gateway-stats.json`; settling the six-transfer sample in `## Verification` must record `high_water` of at least `3`.",
19
- "The command must not modify `data/accounts.json`."
20
- ]
21
- },
22
- {
23
- "cmd": "node \"$BENCH_FIXTURE_DIR/verifiers/reject-invalid.js\"",
24
- "exit_code": 0,
25
- "stdout_contains": ["\"ok\":true"],
26
- "stdout_not_contains": [],
27
- "contract_refs": [
28
- "Validation happens before any authorization starts.",
29
- "unknown account, or non-positive or non-integer `amount` exits `2` and writes exactly one JSON error object to stderr with shape `{ \"error\": \"invalid_input\", \"reason\": string }`, printing nothing to stdout."
30
- ]
31
- }
32
- ],
33
- "forbidden_patterns": [
34
- {
35
- "pattern": "catch\\s*\\([^)]*\\)\\s*\\{[^}]*return\\s+(null|undefined|''|\\{\\})",
36
- "description": "silent catch returning fallback in settle path",
37
- "files": ["bin/cli.js"],
38
- "severity": "disqualifier"
39
- },
40
- {
41
- "pattern": "catch\\s*\\([^)]*\\)\\s*\\{\\s*\\}",
42
- "description": "empty catch block",
43
- "files": ["bin/cli.js"],
44
- "severity": "disqualifier"
45
- },
46
- {
47
- "pattern": "/\\*\\s*eslint-disable",
48
- "description": "eslint-disable without scoped justification",
49
- "files": ["bin/cli.js"],
50
- "severity": "disqualifier"
51
- }
52
- ],
53
- "required_files": ["bin/cli.js", "tests/cli.test.js", "data/accounts.json", "lib/gateway.js"],
54
- "forbidden_files": [],
55
- "max_deps_added": 0,
56
- "spec_output_files": ["bin/cli.js", "tests/cli.test.js"]
57
- }
@@ -1,10 +0,0 @@
1
- {
2
- "id": "F34-cli-settle-inflight",
3
- "category": "high-risk",
4
- "difficulty": "high",
5
- "timeout_seconds": 1500,
6
- "required_tools": ["node"],
7
- "browser": false,
8
- "deps_change_expected": false,
9
- "intent": "Add a bench-cli settle command that authorizes transfers through a seeded async gateway with overlapping in-flight authorizations while settling balances strictly in file order, with exact accepted/rejected/balances JSON output and validation before any authorization."
10
- }
@@ -1,50 +0,0 @@
1
- #!/usr/bin/env bash
2
- # F34 setup — seed accounts and the concurrency-tracking gateway.
3
- set -e
4
-
5
- mkdir -p data lib
6
-
7
- cat > data/accounts.json <<'JSON'
8
- {
9
- "acct-a": 100,
10
- "acct-b": 0,
11
- "acct-c": 50,
12
- "acct-d": 10
13
- }
14
- JSON
15
-
16
- cat > lib/gateway.js <<'JS'
17
- 'use strict';
18
- // Seeded authorization gateway. DO NOT MODIFY (fixture contract).
19
- // Latency is deterministic per transfer id (trailing digits = milliseconds),
20
- // so authorization completion order can differ from file order. Tracks how
21
- // many authorizations are in flight at once and how many calls were made.
22
- const fs = require('fs');
23
- const path = require('path');
24
-
25
- const STATS_PATH = path.join(__dirname, '..', 'data', 'gateway-stats.json');
26
- let inFlight = 0;
27
- let highWater = 0;
28
- let calls = 0;
29
-
30
- function writeStats() {
31
- fs.writeFileSync(STATS_PATH, JSON.stringify({ calls, high_water: highWater }) + '\n');
32
- }
33
-
34
- async function authorize(transfer) {
35
- calls += 1;
36
- inFlight += 1;
37
- if (inFlight > highWater) highWater = inFlight;
38
- writeStats();
39
- const digits = String(transfer && transfer.id ? transfer.id : '').replace(/\D/g, '');
40
- const ms = digits ? (Number(digits) % 100) || 5 : 5;
41
- await new Promise((resolve) => setTimeout(resolve, ms));
42
- inFlight -= 1;
43
- writeStats();
44
- return { authorized: true };
45
- }
46
-
47
- module.exports = { authorize };
48
- JS
49
-
50
- exit 0