@mjasnikovs/pi-task 0.38.29 → 0.38.31

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 (373) hide show
  1. package/dist/config/config.d.ts +70 -70
  2. package/dist/config/config.js +26 -35
  3. package/dist/config/extension-list.d.ts +6 -5
  4. package/dist/config/extension-list.js +3 -2
  5. package/dist/config/reasoning-args.d.ts +9 -7
  6. package/dist/config/reasoning-args.js +12 -10
  7. package/dist/config/reasoning.d.ts +44 -105
  8. package/dist/config/reasoning.js +27 -704
  9. package/dist/config/register.d.ts +34 -48
  10. package/dist/config/register.js +41 -51
  11. package/dist/config/tool-list.d.ts +16 -16
  12. package/dist/config/tool-list.js +1 -1
  13. package/dist/index.js +2 -0
  14. package/dist/remote/bridge.d.ts +19 -10
  15. package/dist/remote/bridge.js +3 -2
  16. package/dist/remote/broadcast.js +3 -1
  17. package/dist/remote/events.js +12 -11
  18. package/dist/remote/history.d.ts +1 -1
  19. package/dist/remote/protocol.d.ts +6 -3
  20. package/dist/remote/protocol.js +2 -1
  21. package/dist/remote/push.d.ts +16 -16
  22. package/dist/remote/push.js +27 -27
  23. package/dist/remote/register.d.ts +3 -3
  24. package/dist/remote/register.js +17 -19
  25. package/dist/remote/server.d.ts +9 -8
  26. package/dist/remote/server.js +15 -14
  27. package/dist/remote/session-state.d.ts +5 -4
  28. package/dist/remote/session-state.js +8 -5
  29. package/dist/remote/sw.d.ts +7 -6
  30. package/dist/remote/sw.js +7 -6
  31. package/dist/remote/tailscale.d.ts +4 -2
  32. package/dist/remote/tailscale.js +4 -2
  33. package/dist/remote/ui-highlight.js +6 -5
  34. package/dist/remote/ui-render.js +4 -4
  35. package/dist/remote/ui-script.js +24 -24
  36. package/dist/remote/ui-styles.d.ts +1 -1
  37. package/dist/remote/ui-styles.js +10 -13
  38. package/dist/remote/ui-tools.js +9 -6
  39. package/dist/shared/child-extensions.d.ts +29 -17
  40. package/dist/shared/child-extensions.js +29 -17
  41. package/dist/shared/child-output.d.ts +30 -24
  42. package/dist/shared/child-output.js +25 -17
  43. package/dist/shared/child-process.d.ts +47 -40
  44. package/dist/shared/child-process.js +50 -59
  45. package/dist/shared/command-watchdog.d.ts +85 -16
  46. package/dist/shared/command-watchdog.js +115 -21
  47. package/dist/shared/fs-text.d.ts +16 -10
  48. package/dist/shared/fs-text.js +16 -10
  49. package/dist/shared/git-runner.d.ts +25 -25
  50. package/dist/shared/git-runner.js +25 -25
  51. package/dist/shared/leaked-tool-call.d.ts +17 -11
  52. package/dist/shared/leaked-tool-call.js +23 -15
  53. package/dist/shared/model-endpoint.d.ts +29 -16
  54. package/dist/shared/model-endpoint.js +33 -21
  55. package/dist/shared/pi-invocation.d.ts +7 -4
  56. package/dist/shared/pi-invocation.js +12 -7
  57. package/dist/shared/pkg-version.d.ts +13 -5
  58. package/dist/shared/pkg-version.js +13 -5
  59. package/dist/shared/reasoning-capability.d.ts +35 -24
  60. package/dist/shared/reasoning-capability.js +35 -24
  61. package/dist/shared/stream-watchdog.d.ts +60 -44
  62. package/dist/shared/stream-watchdog.js +62 -45
  63. package/dist/task/accept-debt.d.ts +41 -43
  64. package/dist/task/accept-debt.js +73 -65
  65. package/dist/task/api-synthesis.d.ts +24 -21
  66. package/dist/task/api-synthesis.js +32 -26
  67. package/dist/task/apis-contract.d.ts +32 -64
  68. package/dist/task/apis-contract.js +32 -64
  69. package/dist/task/artifact-closure.d.ts +27 -13
  70. package/dist/task/artifact-closure.js +95 -67
  71. package/dist/task/auto-commit.d.ts +46 -35
  72. package/dist/task/auto-commit.js +51 -38
  73. package/dist/task/auto-io.d.ts +45 -25
  74. package/dist/task/auto-io.js +57 -29
  75. package/dist/task/auto-orchestrator.d.ts +26 -24
  76. package/dist/task/auto-orchestrator.js +192 -165
  77. package/dist/task/auto-prompts.d.ts +36 -24
  78. package/dist/task/auto-prompts.js +40 -26
  79. package/dist/task/autofix-ledger.d.ts +27 -25
  80. package/dist/task/autofix-ledger.js +29 -26
  81. package/dist/task/batch-test-task.d.ts +20 -12
  82. package/dist/task/batch-test-task.js +67 -60
  83. package/dist/task/boot-probe.d.ts +60 -44
  84. package/dist/task/boot-probe.js +91 -72
  85. package/dist/task/cancel-input.d.ts +30 -16
  86. package/dist/task/cancel-input.js +20 -11
  87. package/dist/task/cancel-points.d.ts +27 -20
  88. package/dist/task/cancel-points.js +30 -22
  89. package/dist/task/child-runner.d.ts +124 -55
  90. package/dist/task/child-runner.js +298 -90
  91. package/dist/task/child-status.d.ts +23 -16
  92. package/dist/task/child-status.js +23 -16
  93. package/dist/task/clamp-output.js +12 -5
  94. package/dist/task/command-run.d.ts +31 -28
  95. package/dist/task/command-run.js +44 -35
  96. package/dist/task/command-shrink.d.ts +25 -18
  97. package/dist/task/command-shrink.js +37 -31
  98. package/dist/task/command-watchdog.d.ts +9 -6
  99. package/dist/task/command-watchdog.js +21 -15
  100. package/dist/task/context-attribution.d.ts +34 -26
  101. package/dist/task/context-attribution.js +34 -26
  102. package/dist/task/context-silence.d.ts +39 -29
  103. package/dist/task/context-silence.js +35 -25
  104. package/dist/task/context-usage.d.ts +16 -9
  105. package/dist/task/context-usage.js +16 -9
  106. package/dist/task/contracts.d.ts +8 -4
  107. package/dist/task/contracts.js +25 -17
  108. package/dist/task/coverage-loop.d.ts +22 -18
  109. package/dist/task/coverage-loop.js +35 -30
  110. package/dist/task/critique-probes.d.ts +13 -14
  111. package/dist/task/critique-probes.js +50 -39
  112. package/dist/task/debug-log.d.ts +13 -5
  113. package/dist/task/debug-log.js +32 -20
  114. package/dist/task/decompose-fidelity.d.ts +11 -9
  115. package/dist/task/decompose-fidelity.js +38 -33
  116. package/dist/task/decompose-granularity.d.ts +41 -38
  117. package/dist/task/decompose-granularity.js +41 -38
  118. package/dist/task/deep-render-check.d.ts +22 -14
  119. package/dist/task/deep-render-check.js +40 -31
  120. package/dist/task/dropped-input.d.ts +12 -7
  121. package/dist/task/dropped-input.js +5 -2
  122. package/dist/task/enforce-attribution.d.ts +38 -47
  123. package/dist/task/enforce-attribution.js +46 -52
  124. package/dist/task/enforce-guidelines.d.ts +31 -20
  125. package/dist/task/enforce-guidelines.js +32 -21
  126. package/dist/task/enrichment.d.ts +7 -2
  127. package/dist/task/enrichment.js +26 -14
  128. package/dist/task/env-notes.d.ts +16 -7
  129. package/dist/task/env-notes.js +48 -31
  130. package/dist/task/env-template-closure.d.ts +4 -4
  131. package/dist/task/env-template-closure.js +42 -34
  132. package/dist/task/external-context.d.ts +28 -21
  133. package/dist/task/external-context.js +17 -12
  134. package/dist/task/failure-classifier.d.ts +4 -5
  135. package/dist/task/failure-classifier.js +30 -8
  136. package/dist/task/file-inventory.d.ts +15 -11
  137. package/dist/task/file-inventory.js +25 -22
  138. package/dist/task/final-gate-fix.d.ts +74 -86
  139. package/dist/task/final-gate-fix.js +97 -116
  140. package/dist/task/final-gate-progress.d.ts +29 -46
  141. package/dist/task/final-gate-progress.js +40 -51
  142. package/dist/task/final-gate.d.ts +64 -97
  143. package/dist/task/final-gate.js +192 -199
  144. package/dist/task/fix-child.d.ts +21 -27
  145. package/dist/task/fix-child.js +21 -27
  146. package/dist/task/foreign-path.d.ts +6 -5
  147. package/dist/task/foreign-path.js +0 -0
  148. package/dist/task/frozen-conflict.d.ts +9 -10
  149. package/dist/task/frozen-conflict.js +61 -64
  150. package/dist/task/frozen-path-guard.d.ts +35 -14
  151. package/dist/task/frozen-path-guard.js +56 -39
  152. package/dist/task/gate-child.d.ts +27 -28
  153. package/dist/task/gate-child.js +36 -35
  154. package/dist/task/gate-deps.d.ts +34 -27
  155. package/dist/task/gate-deps.js +169 -159
  156. package/dist/task/gate-tally.d.ts +77 -80
  157. package/dist/task/gate-tally.js +65 -68
  158. package/dist/task/git-state-guard.d.ts +15 -11
  159. package/dist/task/git-state-guard.js +76 -66
  160. package/dist/task/impl-widget.d.ts +25 -16
  161. package/dist/task/impl-widget.js +27 -17
  162. package/dist/task/implementation-guards.d.ts +26 -0
  163. package/dist/task/implementation-guards.js +177 -0
  164. package/dist/task/implementation-thinking.d.ts +33 -31
  165. package/dist/task/implementation-thinking.js +5 -6
  166. package/dist/task/implementation-turn.d.ts +39 -31
  167. package/dist/task/implementation-turn.js +41 -28
  168. package/dist/task/inline-markdown.d.ts +20 -7
  169. package/dist/task/inline-markdown.js +15 -6
  170. package/dist/task/launch-config-gap.js +25 -39
  171. package/dist/task/launch-contract.d.ts +18 -21
  172. package/dist/task/launch-contract.js +28 -30
  173. package/dist/task/launch-manifest.d.ts +6 -2
  174. package/dist/task/launch-manifest.js +35 -34
  175. package/dist/task/ledger.js +16 -14
  176. package/dist/task/lint-fix.d.ts +6 -8
  177. package/dist/task/lint-fix.js +67 -69
  178. package/dist/task/loop-detector.d.ts +27 -8
  179. package/dist/task/loop-detector.js +38 -14
  180. package/dist/task/mid-run-input.d.ts +17 -15
  181. package/dist/task/mid-run-input.js +17 -15
  182. package/dist/task/orchestrator.d.ts +24 -28
  183. package/dist/task/orchestrator.js +89 -66
  184. package/dist/task/orientation.d.ts +18 -23
  185. package/dist/task/orientation.js +24 -31
  186. package/dist/task/owned-freeze-conflict.d.ts +21 -20
  187. package/dist/task/owned-freeze-conflict.js +52 -85
  188. package/dist/task/owned-freeze-reassign.d.ts +40 -60
  189. package/dist/task/owned-freeze-reassign.js +41 -61
  190. package/dist/task/parsers.d.ts +4 -2
  191. package/dist/task/parsers.js +4 -4
  192. package/dist/task/phases.d.ts +41 -48
  193. package/dist/task/phases.js +196 -252
  194. package/dist/task/plan-io.d.ts +6 -7
  195. package/dist/task/plan-io.js +6 -7
  196. package/dist/task/plan-orchestrator.d.ts +10 -8
  197. package/dist/task/plan-orchestrator.js +14 -10
  198. package/dist/task/plan-prompts.d.ts +6 -5
  199. package/dist/task/plan-prompts.js +6 -5
  200. package/dist/task/plan-readonly.d.ts +4 -5
  201. package/dist/task/plan-readonly.js +4 -5
  202. package/dist/task/plan-rounds.d.ts +17 -29
  203. package/dist/task/plan-rounds.js +21 -34
  204. package/dist/task/plan-session.d.ts +58 -72
  205. package/dist/task/plan-session.js +61 -83
  206. package/dist/task/probe-gaming.d.ts +28 -27
  207. package/dist/task/probe-gaming.js +0 -0
  208. package/dist/task/prohibition-probe.d.ts +14 -16
  209. package/dist/task/prompts.d.ts +3 -4
  210. package/dist/task/prompts.js +17 -26
  211. package/dist/task/qa-transcript.d.ts +15 -22
  212. package/dist/task/qa-transcript.js +15 -21
  213. package/dist/task/question-box.d.ts +17 -13
  214. package/dist/task/question-box.js +19 -15
  215. package/dist/task/question-dedup.d.ts +6 -7
  216. package/dist/task/question-dedup.js +13 -14
  217. package/dist/task/question-dialog.d.ts +22 -32
  218. package/dist/task/question-dialog.js +22 -32
  219. package/dist/task/question-source.d.ts +18 -44
  220. package/dist/task/question-source.js +22 -51
  221. package/dist/task/refuted-constraint.d.ts +11 -31
  222. package/dist/task/refuted-constraint.js +27 -51
  223. package/dist/task/regenerable-artifacts.d.ts +12 -31
  224. package/dist/task/regenerable-artifacts.js +12 -31
  225. package/dist/task/render-check.d.ts +11 -22
  226. package/dist/task/render-check.js +33 -46
  227. package/dist/task/repo-health-check.d.ts +10 -14
  228. package/dist/task/repo-health-check.js +17 -23
  229. package/dist/task/requirements.d.ts +38 -71
  230. package/dist/task/requirements.js +78 -126
  231. package/dist/task/research-fanout-budget.d.ts +51 -88
  232. package/dist/task/research-fanout-budget.js +51 -88
  233. package/dist/task/research-worker.d.ts +29 -39
  234. package/dist/task/research-worker.js +37 -61
  235. package/dist/task/resume-gap.d.ts +14 -15
  236. package/dist/task/root-cause-repair.d.ts +9 -9
  237. package/dist/task/root-cause-repair.js +28 -40
  238. package/dist/task/run-bracket.d.ts +10 -13
  239. package/dist/task/run-end.d.ts +12 -22
  240. package/dist/task/run-end.js +8 -16
  241. package/dist/task/run-final-gate.d.ts +19 -21
  242. package/dist/task/run-final-gate.js +62 -80
  243. package/dist/task/runner-globs.d.ts +12 -13
  244. package/dist/task/runner-globs.js +12 -13
  245. package/dist/task/runner-resolve.d.ts +9 -9
  246. package/dist/task/runner-resolve.js +22 -23
  247. package/dist/task/script-escape.d.ts +10 -12
  248. package/dist/task/script-escape.js +13 -14
  249. package/dist/task/serve-entry.d.ts +1 -1
  250. package/dist/task/serve-entry.js +22 -25
  251. package/dist/task/service-blocks.js +4 -2
  252. package/dist/task/shipped-source.d.ts +11 -29
  253. package/dist/task/shipped-source.js +11 -29
  254. package/dist/task/skip-escape.js +10 -14
  255. package/dist/task/spec-urls.d.ts +26 -65
  256. package/dist/task/spec-urls.js +26 -65
  257. package/dist/task/spec-validation.d.ts +17 -20
  258. package/dist/task/spec-validation.js +17 -20
  259. package/dist/task/stall-detector.d.ts +23 -30
  260. package/dist/task/stall-detector.js +23 -30
  261. package/dist/task/stream-watchdog.d.ts +14 -12
  262. package/dist/task/stream-watchdog.js +14 -12
  263. package/dist/task/substitution-probe.d.ts +17 -20
  264. package/dist/task/substitution-probe.js +17 -20
  265. package/dist/task/task-gates.d.ts +36 -41
  266. package/dist/task/task-gates.js +95 -106
  267. package/dist/task/task-io.d.ts +4 -4
  268. package/dist/task/task-io.js +4 -4
  269. package/dist/task/task-parsers.js +4 -3
  270. package/dist/task/task-provenance.d.ts +2 -2
  271. package/dist/task/task-provenance.js +11 -13
  272. package/dist/task/task-types.d.ts +4 -3
  273. package/dist/task/terminal-outcome.d.ts +14 -16
  274. package/dist/task/terminal-outcome.js +12 -14
  275. package/dist/task/test-assembly.d.ts +13 -20
  276. package/dist/task/test-assembly.js +13 -20
  277. package/dist/task/timings.d.ts +5 -3
  278. package/dist/task/timings.js +5 -3
  279. package/dist/task/title-label.d.ts +9 -4
  280. package/dist/task/title-label.js +9 -4
  281. package/dist/task/type-only-answer.d.ts +44 -52
  282. package/dist/task/type-only-answer.js +44 -52
  283. package/dist/task/unfailable-command.d.ts +18 -24
  284. package/dist/task/unfailable-command.js +21 -27
  285. package/dist/task/unknown-routing.d.ts +10 -4
  286. package/dist/task/unknown-routing.js +10 -4
  287. package/dist/task/user-directives.d.ts +5 -8
  288. package/dist/task/user-directives.js +5 -8
  289. package/dist/task/verify-quality.d.ts +18 -22
  290. package/dist/task/verify-quality.js +45 -46
  291. package/dist/task/verify-reconcile.d.ts +15 -10
  292. package/dist/task/verify-reconcile.js +45 -43
  293. package/dist/task/verify-resolution.d.ts +24 -20
  294. package/dist/task/verify-resolution.js +51 -50
  295. package/dist/task/verify-work.d.ts +59 -66
  296. package/dist/task/verify-work.js +101 -138
  297. package/dist/task/widget.d.ts +15 -14
  298. package/dist/task/widget.js +22 -17
  299. package/dist/task/wiring-claims.d.ts +25 -32
  300. package/dist/task/wiring-claims.js +30 -35
  301. package/dist/task/write-guard.d.ts +39 -39
  302. package/dist/task/write-guard.js +48 -51
  303. package/dist/task/yolo.d.ts +34 -30
  304. package/dist/task/yolo.js +42 -37
  305. package/dist/workers/abstention.d.ts +21 -41
  306. package/dist/workers/abstention.js +27 -48
  307. package/dist/workers/brave-search.d.ts +4 -3
  308. package/dist/workers/brave-search.js +5 -2
  309. package/dist/workers/brave-warning.d.ts +7 -4
  310. package/dist/workers/brave-warning.js +19 -7
  311. package/dist/workers/ddg-search.d.ts +6 -6
  312. package/dist/workers/ddg-search.js +18 -12
  313. package/dist/workers/docs-cache.js +5 -2
  314. package/dist/workers/docs-chunk.d.ts +30 -37
  315. package/dist/workers/docs-chunk.js +37 -41
  316. package/dist/workers/docs-core.d.ts +28 -44
  317. package/dist/workers/docs-core.js +25 -44
  318. package/dist/workers/docs-index.js +4 -3
  319. package/dist/workers/docs-lookup.d.ts +15 -22
  320. package/dist/workers/docs-lookup.js +12 -21
  321. package/dist/workers/docs-project.d.ts +15 -9
  322. package/dist/workers/docs-project.js +17 -10
  323. package/dist/workers/docs-resolve.d.ts +19 -20
  324. package/dist/workers/docs-resolve.js +35 -32
  325. package/dist/workers/docs-retrieve.d.ts +5 -6
  326. package/dist/workers/docs-retrieve.js +18 -15
  327. package/dist/workers/exa-search.d.ts +9 -6
  328. package/dist/workers/exa-search.js +23 -12
  329. package/dist/workers/fetch-core.d.ts +13 -16
  330. package/dist/workers/fetch-core.js +23 -23
  331. package/dist/workers/focused-extractor.d.ts +13 -12
  332. package/dist/workers/focused-extractor.js +27 -19
  333. package/dist/workers/html-clean.js +24 -14
  334. package/dist/workers/http-request.d.ts +28 -20
  335. package/dist/workers/http-request.js +22 -17
  336. package/dist/workers/npm-version.d.ts +28 -11
  337. package/dist/workers/npm-version.js +24 -15
  338. package/dist/workers/phantom-imports.d.ts +15 -12
  339. package/dist/workers/phantom-imports.js +30 -24
  340. package/dist/workers/pi-worker-core.d.ts +65 -96
  341. package/dist/workers/pi-worker-core.js +93 -181
  342. package/dist/workers/pi-worker-docs.d.ts +24 -19
  343. package/dist/workers/pi-worker-docs.js +67 -76
  344. package/dist/workers/pi-worker-fetch.d.ts +7 -3
  345. package/dist/workers/pi-worker-fetch.js +27 -19
  346. package/dist/workers/pi-worker-search.js +12 -8
  347. package/dist/workers/pi-worker.d.ts +9 -4
  348. package/dist/workers/pi-worker.js +21 -14
  349. package/dist/workers/reasoning-warning.d.ts +18 -17
  350. package/dist/workers/reasoning-warning.js +22 -20
  351. package/dist/workers/research-cache.js +50 -78
  352. package/dist/workers/search-core.js +7 -5
  353. package/dist/workers/search-types.d.ts +10 -9
  354. package/dist/workers/search-types.js +9 -8
  355. package/dist/workers/session-hint.d.ts +13 -14
  356. package/dist/workers/session-hint.js +8 -9
  357. package/dist/workers/shared.d.ts +21 -25
  358. package/dist/workers/shared.js +0 -0
  359. package/dist/workers/single-read-extension.d.ts +14 -7
  360. package/dist/workers/single-read-extension.js +14 -7
  361. package/dist/workers/single-read-guard.d.ts +27 -30
  362. package/dist/workers/single-read-guard.js +36 -36
  363. package/dist/workers/typeonly-log.d.ts +12 -9
  364. package/dist/workers/typeonly-log.js +29 -33
  365. package/dist/workers/worker-channels.d.ts +15 -23
  366. package/dist/workers/worker-channels.js +15 -23
  367. package/dist/workers/worker-failure.d.ts +38 -46
  368. package/dist/workers/worker-failure.js +31 -39
  369. package/dist/workers/worker-kill.d.ts +25 -26
  370. package/dist/workers/worker-kill.js +16 -19
  371. package/dist/workers/worker-profiles.d.ts +54 -56
  372. package/dist/workers/worker-profiles.js +63 -39
  373. package/package.json +10 -8
@@ -2,31 +2,34 @@
2
2
  * The final gate's tally: everything its sections RECORD, and the one pure
3
3
  * function that turns the record into a `FinalGateOutcome`.
4
4
  *
5
- * `runFinalIntegrationGate` used to carry this as twelve mutable locals the
6
- * ranked failure list, four dynamic counters, three note lists, a warning list,
7
- * the boot verdict threaded through ~400 lines by closure, with three sections
8
- * hand-incrementing the same counters and one branch doing `dynObserved -= 1`.
9
- * The verdict assembly at the end was pure, but reachable only through a temp
10
- * dir and real spawns. Here the sections call named methods (an attempt is
11
- * `attempted(bin)`, the config-gap un-count is `unobserve()`, a probe that looked
12
- * and saw something bad is `failObserved(...)`) and `verdict()` is the ONE place
13
- * the PASS / FAIL / UNOBSERVED polarity, note ordering and debt attachment live,
14
- * testable with no tree at all.
5
+ * The alternative is a dozen mutable locals threaded through
6
+ * `runFinalIntegrationGate` by closure — the ranked failure list, four dynamic
7
+ * counters, three note lists, a warning list, the boot verdict with several
8
+ * sections hand-incrementing the same counters and one branch decrementing one.
9
+ * Here the sections call named methods (an attempt is `attempted(bin)`, the
10
+ * config-gap un-count is `unobserve()`, a probe that looked and saw something bad
11
+ * is `failObserved(...)`), and `verdict()` is the ONE place the PASS / FAIL /
12
+ * UNOBSERVED polarity, the note ordering and the debt attachment live. All of it
13
+ * is decidable with no tree at all: a fresh GateTally verdicts to UNOBSERVED, one
14
+ * `attempted`+`observed`+`ran` verdicts to `statics + \`…\` passed`, and a rank-0
15
+ * plus a rank-1 failure verdicts to the numbered list with boot first.
15
16
  *
16
- * The two verdict predicates the gate has always exported — `observabilityGapFailure`
17
- * (run-16 full-blindness FAIL) and `unobservedVerdict` (the third, non-blocking
18
- * verdict) live here because they read exactly the counters the tally owns;
19
- * `final-gate.ts` re-exports them so every existing importer is unchanged.
17
+ * `observabilityGapFailure` and `unobservedVerdict` live here because they read
18
+ * exactly the counters the tally owns. `final-gate.ts` re-exports them, which is
19
+ * how the gate's own test file reaches them.
20
20
  */
21
21
  import type { AcceptDebt } from './accept-debt.js';
22
22
  import type { FinalGateOutcome } from './final-gate.js';
23
23
  /**
24
- * Full-skip blindness guard (mx5 run 16). Per-command env-gap skips stay
25
- * legitimate (a missing browser must not fail a suite); what may never happen
26
- * again is ALL of them skipping while the gate still reports PASS a gate that
27
- * observed nothing dynamic has no basis to vouch for the assembled app. Pure so
28
- * the semantics are unit-tested; the tally feeds it its own counters plus runner
29
- * resolvability.
24
+ * Full-skip blindness guard. Per-command env-gap skips stay legitimate — a missing
25
+ * browser must not fail a suite but ALL of them skipping while the gate reports
26
+ * PASS may not: a gate that observed nothing dynamic has no basis to vouch for the
27
+ * assembled app.
28
+ *
29
+ * Measured on the four boundary cases: `attempted: 0` → null, any `observed > 0` →
30
+ * null, spawnFailures BELOW attempted → null (a tool-level gap proves the runner
31
+ * works), and only all-attempts-spawn-failed returns the failure text. Pure, so
32
+ * the tally feeds it its own counters plus runner resolvability.
30
33
  */
31
34
  export declare function observabilityGapFailure(args: {
32
35
  /** Dynamic commands the gate discovered and tried to run. */
@@ -45,40 +48,33 @@ export declare function observabilityGapFailure(args: {
45
48
  runnerResolvable: (bin: string) => boolean;
46
49
  }): string | null;
47
50
  /**
48
- * The THIRD verdict. observabilityGapFailure above covers "commands were DISCOVERED
49
- * but every one failed to spawn" — a rank-0 FAIL. It deliberately returns null for
50
- * `attempted === 0`, and until now that silence fell straight through to
51
- * `PASS no integration command found (statics passed)`: the run-16 blindness class
52
- * entering through a different door, where "we never checked" reads exactly like "we
53
- * checked and it was fine". Measured 2026-07-27: IAR1 (C++/CMake, no package.json)
54
- * shipped that verdict TWICE while carrying 2 and 3 open verify-FAIL debts, and
55
- * godot-engine (package.json whose only script is `verify`) reproduces it live today.
51
+ * The THIRD verdict. `observabilityGapFailure` above covers "commands were
52
+ * DISCOVERED but every one failed to spawn" — a rank-0 FAIL. It returns null for
53
+ * `attempted === 0`, and that silence would otherwise fall straight through to a
54
+ * PASS: the same blindness entering through a different door, where "we never
55
+ * checked" reads exactly like "we checked and it was fine".
56
56
  *
57
57
  * So: observed anything dynamic ⇒ PASS; discovered-but-all-spawn-failed ⇒ the
58
- * existing FAIL; observed NOTHING ⇒ this note, carried on an `ok: true` outcome.
58
+ * FAIL above; observed NOTHING ⇒ this note, carried on an `ok: true` outcome.
59
+ *
60
+ * WHY NON-BLOCKING, decided rather than deferred:
61
+ * 1. The open ACCEPT debts are ALREADY surfaced at the gate moment, on PASS as on
62
+ * FAIL (`surfaceOpenDebts` in run-final-gate.ts sits outside the ok branch).
63
+ * The missing signal was never the debt; it was the word PASS endorsing the
64
+ * run, and that is what this changes.
65
+ * 2. `ok: false` routes into the autofix picker, whose seed is `reason`. "No
66
+ * integration command is discoverable" cannot be fixed by editing code, so the
67
+ * likeliest child response is to FABRICATE a runnable command to satisfy the
68
+ * gate — the same fabrication class that rules out the `## verified tooling`
69
+ * harvest (see discoverIntegrationCommands).
70
+ * 3. Because that harvest is ruled out, a project outside the manifest allowlist
71
+ * can NEVER discover a command, so blocking would end every such run in
72
+ * `failed` permanently with no remedy.
59
73
  *
60
- * WHY NON-BLOCKING (decided, not deferred the evidence cuts both ways and this is
61
- * the resolution):
62
- * - Blocking's case: both real occurrences also carried open verify-FAIL debt, so
63
- * the runs with no dynamic evidence were exactly the runs already known to be
64
- * carrying defects.
65
- * - Against, and decisive: (1) that debt is ALREADY surfaced unconditionally at the
66
- * gate moment, on PASS as on FAIL — the IAR1 records literally read "PASS — no
67
- * integration command found … UNRESOLVED VERIFY-FAIL DEBT still open (2)". The
68
- * missing signal was never the debt, it was the word PASS endorsing the run, and
69
- * that is what this fixes. (2) `ok: false` routes into the autofix picker, whose
70
- * seed is `reason`; "no integration command is discoverable" is not fixable by
71
- * editing code, so the highest-probability child response is to FABRICATE a
72
- * runnable command to satisfy the gate — the same fabrication class that refuted
73
- * the `## verified tooling` harvest (see discoverIntegrationCommands) and that had
74
- * run 11's fix child `rm` a sibling's deliverable. (3) That harvest being refuted
75
- * means IAR1 and godot-engine can NEVER discover a command, so blocking would end
76
- * every non-npm run in `failed` permanently, with no remedy — the task's own I3
77
- * ("show blocking does not block IAR1/godot post-Task-1") is unsatisfiable, and
78
- * its stated consequence is to downgrade to a warning and say so. This is that.
79
- * The teeth are elsewhere and are real: the verdict word changes, the gate trail says
80
- * UNOBSERVED, and the caller records a durable final-gate debt that the NEXT run's
81
- * gate re-surfaces (it can never auto-close — it is not static-class).
74
+ * The teeth are real and elsewhere: the verdict word changes, the gate trail line
75
+ * says UNOBSERVED, and the caller records a durable final-gate debt the next run's
76
+ * gate re-surfaces. It can never auto-close measured, `isStaticClassDebt` on
77
+ * this exact text returns false.
82
78
  */
83
79
  export declare function unobservedVerdict(args: {
84
80
  /** Dynamic commands the gate discovered and tried to run (0 ⇒ nothing existed). */
@@ -102,22 +98,22 @@ export declare class GateTally {
102
98
  private spawnFailures;
103
99
  private readonly bins;
104
100
  private readonly warnings;
105
- /** UNOBSERVED notes for launch scripts reclassified as CONFIG GAPS (run 20).
101
+ /** UNOBSERVED notes for launch scripts reclassified as CONFIG GAPS.
106
102
  * They ride in `unobserved`, not `warnings`, so the caller's existing
107
103
  * `recordDebt(cwd, id, fin.unobserved, 'final-gate')` writes the debt —
108
104
  * never a PASS. */
109
105
  private readonly configGapNotes;
110
- /** The inert-launch-contract note (16A): "declared scripts, but no manifest to
111
- * diff against" — a note, never a failure, never a silent pass. */
106
+ /** The inert-launch-contract note: "declared scripts, but no manifest to diff
107
+ * against" — a note, never a failure, never a silent pass. */
112
108
  private readonly contractNotes;
113
109
  /** The boot section's own UNOBSERVED verdict (bootSkipVerdict / rejected launch
114
- * script). Lives outside the dynamic counters ON PURPOSE (mx5 run 18): the
115
- * test/build commands that did run cannot cancel it. */
110
+ * script). Lives outside the dynamic counters ON PURPOSE, so the test and
111
+ * build commands that DID run cannot cancel it. */
116
112
  private bootNote;
117
113
  /** A failure at `rank` (default 1). Rank 0 is boot/render, the most load-bearing. */
118
114
  fail(text: string, rank?: number): void;
119
115
  /**
120
- * A failure a PROBE returned after observing (nexttask 19A — see
116
+ * A failure a PROBE returned after observing (see
121
117
  * FinalGateOutcome.observedFailures). Used by exactly one caller: the boot
122
118
  * section, whose `fail` outcome can only arise from a probe that looked. Every
123
119
  * other `fail()` keeps its class, so nothing else changes.
@@ -131,7 +127,7 @@ export declare class GateTally {
131
127
  /** The attempt was OBSERVED — a real pass or a real fail; only skips observe nothing. */
132
128
  observed(): void;
133
129
  /**
134
- * Un-count one observation. The config-gap branch (mx5 run 20): a launch
130
+ * Un-count one observation. The config-gap branch: a launch
135
131
  * script failed, the four static conditions plus the placeholder re-run said
136
132
  * the failure was a missing env variable the shipped template declares, and
137
133
  * so NOTHING about that script was observed — the real run could not reach
@@ -151,7 +147,7 @@ export declare class GateTally {
151
147
  /** True while nothing dynamic has been attempted and nothing has failed —
152
148
  * the state the zero-discovery return checks (see runFinalIntegrationGate). */
153
149
  silent(): boolean;
154
- /** The run-16 blindness guard over this tally's own counters (see
150
+ /** The blindness guard over this tally's own counters (see
155
151
  * observabilityGapFailure); the caller fails it at rank 0. */
156
152
  blindness(runnerResolvable: (bin: string) => boolean): string | null;
157
153
  /**
@@ -159,31 +155,32 @@ export declare class GateTally {
159
155
  *
160
156
  * FAIL when anything failed: stable-sorted so boot/render (rank 0) leads and
161
157
  * everything else keeps execution order. One failure keeps the exact
162
- * single-failure wording; several become a numbered list so the trail, the
163
- * ACCEPT picker, and the autofix seed all carry the complete ranked picture.
164
- * The observed subset rides along by exact text identity (19A) — the demote
165
- * decision downstream reads THIS, instead of re-deriving observability from
166
- * the failure string.
158
+ * single-failure wording; several become a numbered list, so the trail, the
159
+ * ACCEPT picker and the autofix seed all carry the complete ranked picture. The
160
+ * observed subset rides along by exact text identity — the demote decision
161
+ * downstream reads THAT, instead of re-deriving observability from the failure
162
+ * string. Measured on a rank-1 `b` plus a rank-0 observed `boot`: the reason is
163
+ * the two-item numbered list with `boot` first, and `observedFailures` is
164
+ * `["boot"]` alone.
167
165
  *
168
166
  * Otherwise `ok: true`, with the UNOBSERVED note when the gate could not
169
- * observe something it meant to. Two independent notes, either or both of which
170
- * may apply: the boot never ran (run 18), and/or NOTHING dynamic ran at all
171
- * (unobservedVerdict — commands WERE discovered, none spawn-failed so the run-16
172
- * guard correctly stayed silent, and yet nothing ran: that used to be `statics
173
- * passed (integration commands not runnable here)`, the identical "we never
174
- * checked" silence wearing different words). The boot note leads because it
175
- * names a concrete command and the trail line is sliced at 300 chars; then the
176
- * config-gap notes, then the inert-contract note. Unchanged when anything at all
177
- * was observed, so a project with runnable commands is byte-for-byte unaffected.
167
+ * observe something it meant to. Two independent notes, either or both: the
168
+ * boot never ran, and/or nothing dynamic ran at all (unobservedVerdict — where
169
+ * commands WERE discovered, none spawn-failed so the blindness guard correctly
170
+ * stayed silent, and yet nothing ran). The boot note leads because it names a
171
+ * concrete command and the trail line is sliced at 300 chars; then the
172
+ * config-gap notes, then the inert-contract note. Nothing here changes when
173
+ * anything at all was observed.
178
174
  *
179
- * ZERO ATTEMPTS IS UNOBSERVED, NEVER A PASS: when nothing dynamic was even
180
- * attempted, the note IS the reason there is no `statics passed (…)` suffix,
181
- * because "we never checked" must not read like "we checked and it was fine".
182
- * IAR1 shipped that verdict TWICE while carrying open verify-FAIL debt.
175
+ * ZERO ATTEMPTS IS UNOBSERVED, NEVER A PASS. Measured on a fresh tally: the
176
+ * note IS the reason, with no `statics passed (…)` suffix, because "we never
177
+ * checked" must not read like "we checked and it was fine". One `attempted` +
178
+ * `observed` + `ran('bun run test')` instead gives `statics + \`bun run test\`
179
+ * passed`.
183
180
  *
184
- * The debt note rides in its OWN field: `reason` stays the mechanical failure
185
- * because it seeds the autofix child's prompt (see FinalGateOutcome.reason
186
- * run 11's fix child executed a recorded claim as an instruction).
181
+ * The debt note rides in its OWN field. `reason` stays the mechanical failure
182
+ * because it seeds the autofix child's prompt, and a write-enabled child reads
183
+ * a recorded defect claim as an instruction to act on it.
187
184
  */
188
185
  verdict(debts: GateDebts): FinalGateOutcome;
189
186
  }
@@ -1,10 +1,13 @@
1
1
  /**
2
- * Full-skip blindness guard (mx5 run 16). Per-command env-gap skips stay
3
- * legitimate (a missing browser must not fail a suite); what may never happen
4
- * again is ALL of them skipping while the gate still reports PASS a gate that
5
- * observed nothing dynamic has no basis to vouch for the assembled app. Pure so
6
- * the semantics are unit-tested; the tally feeds it its own counters plus runner
7
- * resolvability.
2
+ * Full-skip blindness guard. Per-command env-gap skips stay legitimate — a missing
3
+ * browser must not fail a suite but ALL of them skipping while the gate reports
4
+ * PASS may not: a gate that observed nothing dynamic has no basis to vouch for the
5
+ * assembled app.
6
+ *
7
+ * Measured on the four boundary cases: `attempted: 0` → null, any `observed > 0` →
8
+ * null, spawnFailures BELOW attempted → null (a tool-level gap proves the runner
9
+ * works), and only all-attempts-spawn-failed returns the failure text. Pure, so
10
+ * the tally feeds it its own counters plus runner resolvability.
8
11
  */
9
12
  export function observabilityGapFailure(args) {
10
13
  if (args.attempted === 0 || args.observed > 0)
@@ -22,40 +25,33 @@ export function observabilityGapFailure(args) {
22
25
  + `the gate observed nothing dynamic and cannot vouch for the assembled app`);
23
26
  }
24
27
  /**
25
- * The THIRD verdict. observabilityGapFailure above covers "commands were DISCOVERED
26
- * but every one failed to spawn" — a rank-0 FAIL. It deliberately returns null for
27
- * `attempted === 0`, and until now that silence fell straight through to
28
- * `PASS no integration command found (statics passed)`: the run-16 blindness class
29
- * entering through a different door, where "we never checked" reads exactly like "we
30
- * checked and it was fine". Measured 2026-07-27: IAR1 (C++/CMake, no package.json)
31
- * shipped that verdict TWICE while carrying 2 and 3 open verify-FAIL debts, and
32
- * godot-engine (package.json whose only script is `verify`) reproduces it live today.
28
+ * The THIRD verdict. `observabilityGapFailure` above covers "commands were
29
+ * DISCOVERED but every one failed to spawn" — a rank-0 FAIL. It returns null for
30
+ * `attempted === 0`, and that silence would otherwise fall straight through to a
31
+ * PASS: the same blindness entering through a different door, where "we never
32
+ * checked" reads exactly like "we checked and it was fine".
33
33
  *
34
34
  * So: observed anything dynamic ⇒ PASS; discovered-but-all-spawn-failed ⇒ the
35
- * existing FAIL; observed NOTHING ⇒ this note, carried on an `ok: true` outcome.
35
+ * FAIL above; observed NOTHING ⇒ this note, carried on an `ok: true` outcome.
36
+ *
37
+ * WHY NON-BLOCKING, decided rather than deferred:
38
+ * 1. The open ACCEPT debts are ALREADY surfaced at the gate moment, on PASS as on
39
+ * FAIL (`surfaceOpenDebts` in run-final-gate.ts sits outside the ok branch).
40
+ * The missing signal was never the debt; it was the word PASS endorsing the
41
+ * run, and that is what this changes.
42
+ * 2. `ok: false` routes into the autofix picker, whose seed is `reason`. "No
43
+ * integration command is discoverable" cannot be fixed by editing code, so the
44
+ * likeliest child response is to FABRICATE a runnable command to satisfy the
45
+ * gate — the same fabrication class that rules out the `## verified tooling`
46
+ * harvest (see discoverIntegrationCommands).
47
+ * 3. Because that harvest is ruled out, a project outside the manifest allowlist
48
+ * can NEVER discover a command, so blocking would end every such run in
49
+ * `failed` permanently with no remedy.
36
50
  *
37
- * WHY NON-BLOCKING (decided, not deferred the evidence cuts both ways and this is
38
- * the resolution):
39
- * - Blocking's case: both real occurrences also carried open verify-FAIL debt, so
40
- * the runs with no dynamic evidence were exactly the runs already known to be
41
- * carrying defects.
42
- * - Against, and decisive: (1) that debt is ALREADY surfaced unconditionally at the
43
- * gate moment, on PASS as on FAIL — the IAR1 records literally read "PASS — no
44
- * integration command found … UNRESOLVED VERIFY-FAIL DEBT still open (2)". The
45
- * missing signal was never the debt, it was the word PASS endorsing the run, and
46
- * that is what this fixes. (2) `ok: false` routes into the autofix picker, whose
47
- * seed is `reason`; "no integration command is discoverable" is not fixable by
48
- * editing code, so the highest-probability child response is to FABRICATE a
49
- * runnable command to satisfy the gate — the same fabrication class that refuted
50
- * the `## verified tooling` harvest (see discoverIntegrationCommands) and that had
51
- * run 11's fix child `rm` a sibling's deliverable. (3) That harvest being refuted
52
- * means IAR1 and godot-engine can NEVER discover a command, so blocking would end
53
- * every non-npm run in `failed` permanently, with no remedy — the task's own I3
54
- * ("show blocking does not block IAR1/godot post-Task-1") is unsatisfiable, and
55
- * its stated consequence is to downgrade to a warning and say so. This is that.
56
- * The teeth are elsewhere and are real: the verdict word changes, the gate trail says
57
- * UNOBSERVED, and the caller records a durable final-gate debt that the NEXT run's
58
- * gate re-surfaces (it can never auto-close — it is not static-class).
51
+ * The teeth are real and elsewhere: the verdict word changes, the gate trail line
52
+ * says UNOBSERVED, and the caller records a durable final-gate debt the next run's
53
+ * gate re-surfaces. It can never auto-close measured, `isStaticClassDebt` on
54
+ * this exact text returns false.
59
55
  */
60
56
  export function unobservedVerdict(args) {
61
57
  if (args.observed > 0)
@@ -71,13 +67,13 @@ export function unobservedVerdict(args) {
71
67
  + 'that the assembled product builds, boots or works.');
72
68
  }
73
69
  export class GateTally {
74
- // Aggregated failures across ALL sections (mx5 run 13 — see runFinalIntegrationGate's
70
+ // Aggregated failures across ALL sections (see runFinalIntegrationGate's
75
71
  // doc). rank 0 = boot/render ("does not serve/render" is the most load-bearing
76
72
  // signal); rank 1 = everything else, kept in execution order by stable sort.
77
73
  failures = [];
78
74
  /** Labels of the dynamic commands that ran AND passed — the PASS reason names them. */
79
75
  passed = [];
80
- // Full-skip blindness counters (mx5 run 16): every dynamic spawn counts an
76
+ // Full-skip blindness counters: every dynamic spawn counts an
81
77
  // attempt; a real pass OR a real fail counts an observation; skips observe
82
78
  // nothing. If everything discovered ends up skipped, observabilityGapFailure
83
79
  // turns the silence into a rank-0 failure instead of a static-only PASS.
@@ -86,24 +82,24 @@ export class GateTally {
86
82
  spawnFailures = 0;
87
83
  bins = new Set();
88
84
  warnings = [];
89
- /** UNOBSERVED notes for launch scripts reclassified as CONFIG GAPS (run 20).
85
+ /** UNOBSERVED notes for launch scripts reclassified as CONFIG GAPS.
90
86
  * They ride in `unobserved`, not `warnings`, so the caller's existing
91
87
  * `recordDebt(cwd, id, fin.unobserved, 'final-gate')` writes the debt —
92
88
  * never a PASS. */
93
89
  configGapNotes = [];
94
- /** The inert-launch-contract note (16A): "declared scripts, but no manifest to
95
- * diff against" — a note, never a failure, never a silent pass. */
90
+ /** The inert-launch-contract note: "declared scripts, but no manifest to diff
91
+ * against" — a note, never a failure, never a silent pass. */
96
92
  contractNotes = [];
97
93
  /** The boot section's own UNOBSERVED verdict (bootSkipVerdict / rejected launch
98
- * script). Lives outside the dynamic counters ON PURPOSE (mx5 run 18): the
99
- * test/build commands that did run cannot cancel it. */
94
+ * script). Lives outside the dynamic counters ON PURPOSE, so the test and
95
+ * build commands that DID run cannot cancel it. */
100
96
  bootNote = null;
101
97
  /** A failure at `rank` (default 1). Rank 0 is boot/render, the most load-bearing. */
102
98
  fail(text, rank = 1) {
103
99
  this.failures.push({ rank, text });
104
100
  }
105
101
  /**
106
- * A failure a PROBE returned after observing (nexttask 19A — see
102
+ * A failure a PROBE returned after observing (see
107
103
  * FinalGateOutcome.observedFailures). Used by exactly one caller: the boot
108
104
  * section, whose `fail` outcome can only arise from a probe that looked. Every
109
105
  * other `fail()` keeps its class, so nothing else changes.
@@ -126,7 +122,7 @@ export class GateTally {
126
122
  this.observations += 1;
127
123
  }
128
124
  /**
129
- * Un-count one observation. The config-gap branch (mx5 run 20): a launch
125
+ * Un-count one observation. The config-gap branch: a launch
130
126
  * script failed, the four static conditions plus the placeholder re-run said
131
127
  * the failure was a missing env variable the shipped template declares, and
132
128
  * so NOTHING about that script was observed — the real run could not reach
@@ -161,7 +157,7 @@ export class GateTally {
161
157
  silent() {
162
158
  return this.attempts === 0 && this.failures.length === 0;
163
159
  }
164
- /** The run-16 blindness guard over this tally's own counters (see
160
+ /** The blindness guard over this tally's own counters (see
165
161
  * observabilityGapFailure); the caller fails it at rank 0. */
166
162
  blindness(runnerResolvable) {
167
163
  return observabilityGapFailure({
@@ -177,31 +173,32 @@ export class GateTally {
177
173
  *
178
174
  * FAIL when anything failed: stable-sorted so boot/render (rank 0) leads and
179
175
  * everything else keeps execution order. One failure keeps the exact
180
- * single-failure wording; several become a numbered list so the trail, the
181
- * ACCEPT picker, and the autofix seed all carry the complete ranked picture.
182
- * The observed subset rides along by exact text identity (19A) — the demote
183
- * decision downstream reads THIS, instead of re-deriving observability from
184
- * the failure string.
176
+ * single-failure wording; several become a numbered list, so the trail, the
177
+ * ACCEPT picker and the autofix seed all carry the complete ranked picture. The
178
+ * observed subset rides along by exact text identity — the demote decision
179
+ * downstream reads THAT, instead of re-deriving observability from the failure
180
+ * string. Measured on a rank-1 `b` plus a rank-0 observed `boot`: the reason is
181
+ * the two-item numbered list with `boot` first, and `observedFailures` is
182
+ * `["boot"]` alone.
185
183
  *
186
184
  * Otherwise `ok: true`, with the UNOBSERVED note when the gate could not
187
- * observe something it meant to. Two independent notes, either or both of which
188
- * may apply: the boot never ran (run 18), and/or NOTHING dynamic ran at all
189
- * (unobservedVerdict — commands WERE discovered, none spawn-failed so the run-16
190
- * guard correctly stayed silent, and yet nothing ran: that used to be `statics
191
- * passed (integration commands not runnable here)`, the identical "we never
192
- * checked" silence wearing different words). The boot note leads because it
193
- * names a concrete command and the trail line is sliced at 300 chars; then the
194
- * config-gap notes, then the inert-contract note. Unchanged when anything at all
195
- * was observed, so a project with runnable commands is byte-for-byte unaffected.
185
+ * observe something it meant to. Two independent notes, either or both: the
186
+ * boot never ran, and/or nothing dynamic ran at all (unobservedVerdict — where
187
+ * commands WERE discovered, none spawn-failed so the blindness guard correctly
188
+ * stayed silent, and yet nothing ran). The boot note leads because it names a
189
+ * concrete command and the trail line is sliced at 300 chars; then the
190
+ * config-gap notes, then the inert-contract note. Nothing here changes when
191
+ * anything at all was observed.
196
192
  *
197
- * ZERO ATTEMPTS IS UNOBSERVED, NEVER A PASS: when nothing dynamic was even
198
- * attempted, the note IS the reason there is no `statics passed (…)` suffix,
199
- * because "we never checked" must not read like "we checked and it was fine".
200
- * IAR1 shipped that verdict TWICE while carrying open verify-FAIL debt.
193
+ * ZERO ATTEMPTS IS UNOBSERVED, NEVER A PASS. Measured on a fresh tally: the
194
+ * note IS the reason, with no `statics passed (…)` suffix, because "we never
195
+ * checked" must not read like "we checked and it was fine". One `attempted` +
196
+ * `observed` + `ran('bun run test')` instead gives `statics + \`bun run test\`
197
+ * passed`.
201
198
  *
202
- * The debt note rides in its OWN field: `reason` stays the mechanical failure
203
- * because it seeds the autofix child's prompt (see FinalGateOutcome.reason
204
- * run 11's fix child executed a recorded claim as an instruction).
199
+ * The debt note rides in its OWN field. `reason` stays the mechanical failure
200
+ * because it seeds the autofix child's prompt, and a write-enabled child reads
201
+ * a recorded defect claim as an instruction to act on it.
205
202
  */
206
203
  verdict(debts) {
207
204
  const withDebts = (o) => ({
@@ -20,12 +20,16 @@ export interface ReconcileResult {
20
20
  * non-artifact (source-shaped) file was modified/deleted. This is the real
21
21
  * mutate-to-pass class; a verdict computed on such a tree is discarded.
22
22
  *
23
- * Deliberately false for child-CREATED files and for modified/deleted untracked
24
- * *test-runner artifacts* (test-results/, playwright-report/, coverage output,
25
- * *.tsbuildinfo, .last-run.json …): a gate child that merely ran the suite and
26
- * left its report behind judged a tree whose only difference from pre-run is
27
- * regenerable output discarding a 49-min verify over that is the F-class this
28
- * splits off (mx5 run 9: 7 of 9 guard firings were pure test-results churn). */
23
+ * Deliberately false for child-CREATED files and for modified or deleted
24
+ * untracked *test-runner artifacts* (test-results/, playwright-report/,
25
+ * coverage output, `*.tsbuildinfo`, `.last-run.json` …): a child that merely
26
+ * ran the suite and left its report behind judged a tree whose only difference
27
+ * from pre-run is regenerable output, and discarding the whole verify over
28
+ * that costs a re-run for nothing.
29
+ *
30
+ * Measured against a real repo: rewriting a tracked source file taints;
31
+ * creating `test-results/r.json` does not; rewriting a tracked
32
+ * `*-snapshots/*.png` baseline DOES taint. */
29
33
  verdictTainted: boolean;
30
34
  /** Human-readable restore actions, for the debug log / notify / gate trail. */
31
35
  actions: string[];
@@ -37,11 +41,11 @@ export declare function captureGitState(cwd: string, signal?: AbortSignal, spawn
37
41
  * whatever a gate child moved. Ordering matters:
38
42
  *
39
43
  * 1. HEAD first — a child parked on another commit must be back on the original
40
- * ref before the worktree comparison/restore makes sense.
41
- * 2. Worktree content from the snapshot TREE (not from any stash the child may
42
- * have pushed the snapshot is the authoritative "as the child found it").
43
- * 3. Child-pushed stash entries are dropped LAST, once the work they swallowed
44
- * is already restored — this is exactly the orphan that detonated mx5 run 6.
44
+ * ref before the worktree comparison and restore make sense.
45
+ * 2. Worktree content from the snapshot TREE, never from a stash the child may
46
+ * have pushed: the snapshot is the authoritative "as the child found it".
47
+ * 3. Child-pushed stash entries are dropped LAST, once the work they swallowed is
48
+ * already restored — dropping first would destroy the only other copy.
45
49
  *
46
50
  * Never throws; failures degrade to actions[] lines so the caller can log them.
47
51
  */