@telora/daemon 0.24.42 → 0.24.55

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 (343) hide show
  1. package/build-info.json +9 -3
  2. package/dist/completion/completion-event/unfinished-work.d.ts +3 -3
  3. package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -1
  4. package/dist/completion/review-cycle-budget/review-loop-detection.js +2 -1
  5. package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -1
  6. package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts +1 -1
  7. package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts.map +1 -1
  8. package/dist/completion/review-exit-holds/review-exit-verdict-gate.js +2 -3
  9. package/dist/completion/review-exit-holds/review-exit-verdict-gate.js.map +1 -1
  10. package/dist/completion/state-cascade/focus-next-step-read.d.ts +38 -0
  11. package/dist/completion/state-cascade/focus-next-step-read.d.ts.map +1 -0
  12. package/dist/completion/state-cascade/focus-next-step-read.js +188 -0
  13. package/dist/completion/state-cascade/focus-next-step-read.js.map +1 -0
  14. package/dist/completion/state-cascade/review-request-gate.d.ts.map +1 -1
  15. package/dist/completion/state-cascade/review-request-gate.js +1 -0
  16. package/dist/completion/state-cascade/review-request-gate.js.map +1 -1
  17. package/dist/completion/state-cascade/review-request-next-step.d.ts +56 -0
  18. package/dist/completion/state-cascade/review-request-next-step.d.ts.map +1 -0
  19. package/dist/completion/state-cascade/review-request-next-step.js +47 -0
  20. package/dist/completion/state-cascade/review-request-next-step.js.map +1 -0
  21. package/dist/completion/state-cascade/review-verify-judgment-gate.d.ts +1 -1
  22. package/dist/completion/state-cascade/review-verify-judgment-gate.d.ts.map +1 -1
  23. package/dist/completion/state-cascade/review-verify-judgment-gate.js +1 -0
  24. package/dist/completion/state-cascade/review-verify-judgment-gate.js.map +1 -1
  25. package/dist/completion/state-cascade/state-cascade.d.ts +12 -7
  26. package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
  27. package/dist/completion/state-cascade/state-cascade.js +36 -105
  28. package/dist/completion/state-cascade/state-cascade.js.map +1 -1
  29. package/dist/composition/commit-gate-context.d.ts.map +1 -1
  30. package/dist/composition/commit-gate-context.js +1 -0
  31. package/dist/composition/commit-gate-context.js.map +1 -1
  32. package/dist/composition/daemon-contexts.js +1 -1
  33. package/dist/composition/execution-migrations-context.d.ts.map +1 -1
  34. package/dist/composition/execution-migrations-context.js +3 -1
  35. package/dist/composition/execution-migrations-context.js.map +1 -1
  36. package/dist/composition/execution-process-context.js +1 -1
  37. package/dist/composition/execution-recovery-context.d.ts +4 -3
  38. package/dist/composition/execution-recovery-context.d.ts.map +1 -1
  39. package/dist/composition/execution-recovery-context.js +6 -3
  40. package/dist/composition/execution-recovery-context.js.map +1 -1
  41. package/dist/composition/execution-worktree-context.js +1 -1
  42. package/dist/composition/focus-next-step-context.d.ts +19 -0
  43. package/dist/composition/focus-next-step-context.d.ts.map +1 -0
  44. package/dist/composition/focus-next-step-context.js +51 -0
  45. package/dist/composition/focus-next-step-context.js.map +1 -0
  46. package/dist/composition/runtime-contexts.d.ts.map +1 -1
  47. package/dist/composition/runtime-contexts.js +6 -18
  48. package/dist/composition/runtime-contexts.js.map +1 -1
  49. package/dist/composition/runtime-poll-context.d.ts +8 -53
  50. package/dist/composition/runtime-poll-context.d.ts.map +1 -1
  51. package/dist/composition/runtime-poll-context.js +35 -94
  52. package/dist/composition/runtime-poll-context.js.map +1 -1
  53. package/dist/composition/runtime-prd-context.d.ts +8 -0
  54. package/dist/composition/runtime-prd-context.d.ts.map +1 -1
  55. package/dist/composition/runtime-prd-context.js +32 -0
  56. package/dist/composition/runtime-prd-context.js.map +1 -1
  57. package/dist/composition/runtime-spawn-pass-context.d.ts.map +1 -1
  58. package/dist/composition/runtime-spawn-pass-context.js +2 -3
  59. package/dist/composition/runtime-spawn-pass-context.js.map +1 -1
  60. package/dist/composition/state-cascade-context.d.ts +2 -0
  61. package/dist/composition/state-cascade-context.d.ts.map +1 -1
  62. package/dist/composition/state-cascade-context.js +9 -0
  63. package/dist/composition/state-cascade-context.js.map +1 -1
  64. package/dist/composition/verification-context.d.ts.map +1 -1
  65. package/dist/composition/verification-context.js +15 -3
  66. package/dist/composition/verification-context.js.map +1 -1
  67. package/dist/config/live-daemon-config.js +1 -1
  68. package/dist/daemon-state/branch-removal-record.d.ts +30 -0
  69. package/dist/daemon-state/branch-removal-record.d.ts.map +1 -0
  70. package/dist/daemon-state/branch-removal-record.js +103 -0
  71. package/dist/daemon-state/branch-removal-record.js.map +1 -0
  72. package/dist/delivery/advance-hold.d.ts +8 -19
  73. package/dist/delivery/advance-hold.d.ts.map +1 -1
  74. package/dist/delivery/advance-hold.js +11 -36
  75. package/dist/delivery/advance-hold.js.map +1 -1
  76. package/dist/delivery/commit-verdict-hold.d.ts +1 -1
  77. package/dist/delivery/commit-verdict-hold.js +1 -1
  78. package/dist/delivery/recorded-concerns.d.ts.map +1 -1
  79. package/dist/delivery/recorded-concerns.js +0 -2
  80. package/dist/delivery/recorded-concerns.js.map +1 -1
  81. package/dist/directive/directive-queue.d.ts +4 -16
  82. package/dist/directive/directive-queue.d.ts.map +1 -1
  83. package/dist/directive/directive-queue.js +5 -13
  84. package/dist/directive/directive-queue.js.map +1 -1
  85. package/dist/directive/phase-sync.d.ts +1 -1
  86. package/dist/directive/phase-sync.js +1 -1
  87. package/dist/focus/crash-recovery.d.ts +10 -32
  88. package/dist/focus/crash-recovery.d.ts.map +1 -1
  89. package/dist/focus/crash-recovery.js +55 -150
  90. package/dist/focus/crash-recovery.js.map +1 -1
  91. package/dist/focus/daemon-contexts-runtime.d.ts +3 -3
  92. package/dist/focus/daemon-contexts-runtime.d.ts.map +1 -1
  93. package/dist/focus/daemon-contexts.js +1 -1
  94. package/dist/focus/directive-executor.d.ts.map +1 -1
  95. package/dist/focus/directive-executor.js +3 -7
  96. package/dist/focus/directive-executor.js.map +1 -1
  97. package/dist/focus/failed-head-rework-start.d.ts +61 -0
  98. package/dist/focus/failed-head-rework-start.d.ts.map +1 -0
  99. package/dist/focus/failed-head-rework-start.js +52 -0
  100. package/dist/focus/failed-head-rework-start.js.map +1 -0
  101. package/dist/focus/focus-activity-record.d.ts +4 -2
  102. package/dist/focus/focus-activity-record.d.ts.map +1 -1
  103. package/dist/focus/focus-activity-record.js +4 -2
  104. package/dist/focus/focus-activity-record.js.map +1 -1
  105. package/dist/focus/focus-liveness-pass.d.ts +62 -0
  106. package/dist/focus/focus-liveness-pass.d.ts.map +1 -0
  107. package/dist/focus/focus-liveness-pass.js +197 -0
  108. package/dist/focus/focus-liveness-pass.js.map +1 -0
  109. package/dist/focus/focus-poller-spawn.js +1 -1
  110. package/dist/focus/focus-poller-state.js +1 -1
  111. package/dist/focus/live-branch-preservation.d.ts +123 -0
  112. package/dist/focus/live-branch-preservation.d.ts.map +1 -0
  113. package/dist/focus/live-branch-preservation.js +192 -0
  114. package/dist/focus/live-branch-preservation.js.map +1 -0
  115. package/dist/focus/migration-claim-pass.d.ts +2 -0
  116. package/dist/focus/migration-claim-pass.d.ts.map +1 -1
  117. package/dist/focus/migration-claim-pass.js +57 -22
  118. package/dist/focus/migration-claim-pass.js.map +1 -1
  119. package/dist/focus/migration-held-set-publish.d.ts +28 -2
  120. package/dist/focus/migration-held-set-publish.d.ts.map +1 -1
  121. package/dist/focus/migration-held-set-publish.js +14 -0
  122. package/dist/focus/migration-held-set-publish.js.map +1 -1
  123. package/dist/focus/pending-spawn-review-next-step.d.ts +5 -11
  124. package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
  125. package/dist/focus/pending-spawn-review-next-step.js +26 -72
  126. package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
  127. package/dist/focus/review-refire-gate.d.ts +25 -0
  128. package/dist/focus/review-refire-gate.d.ts.map +1 -0
  129. package/dist/focus/review-refire-gate.js +68 -0
  130. package/dist/focus/review-refire-gate.js.map +1 -0
  131. package/dist/focus/verify-routing-passes.d.ts +8 -11
  132. package/dist/focus/verify-routing-passes.d.ts.map +1 -1
  133. package/dist/focus/verify-routing-passes.js +1 -2
  134. package/dist/focus/verify-routing-passes.js.map +1 -1
  135. package/dist/git/types.js +1 -1
  136. package/dist/prd/arm-refusal-streak.d.ts +102 -0
  137. package/dist/prd/arm-refusal-streak.d.ts.map +1 -0
  138. package/dist/prd/arm-refusal-streak.js +136 -0
  139. package/dist/prd/arm-refusal-streak.js.map +1 -0
  140. package/dist/prd/arm-refusal.d.ts.map +1 -1
  141. package/dist/prd/arm-refusal.js +7 -4
  142. package/dist/prd/arm-refusal.js.map +1 -1
  143. package/dist/prd/controller-shared.d.ts +40 -1
  144. package/dist/prd/controller-shared.d.ts.map +1 -1
  145. package/dist/prd/controller-shared.js +28 -2
  146. package/dist/prd/controller-shared.js.map +1 -1
  147. package/dist/prd/controller.d.ts.map +1 -1
  148. package/dist/prd/controller.js +3 -1
  149. package/dist/prd/controller.js.map +1 -1
  150. package/dist/prd/frontier-arming.d.ts +10 -2
  151. package/dist/prd/frontier-arming.d.ts.map +1 -1
  152. package/dist/prd/frontier-arming.js +91 -7
  153. package/dist/prd/frontier-arming.js.map +1 -1
  154. package/dist/prd/scoping-prompt.d.ts +8 -0
  155. package/dist/prd/scoping-prompt.d.ts.map +1 -1
  156. package/dist/prd/scoping-prompt.js +18 -0
  157. package/dist/prd/scoping-prompt.js.map +1 -1
  158. package/dist/prompt-sections/qa-failure-section.d.ts.map +1 -1
  159. package/dist/prompt-sections/qa-failure-section.js +3 -1
  160. package/dist/prompt-sections/qa-failure-section.js.map +1 -1
  161. package/dist/queries/api-client/shared.js +1 -1
  162. package/dist/queries/deliveries/deliveries.js +1 -1
  163. package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts +4 -3
  164. package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts.map +1 -1
  165. package/dist/queries/delivery-gate-state/delivery-gate-state.js +1 -1
  166. package/dist/queries/escalations/escalations.d.ts.map +1 -1
  167. package/dist/queries/escalations/escalations.js +0 -1
  168. package/dist/queries/escalations/escalations.js.map +1 -1
  169. package/dist/queries/escalations/incident-record.d.ts.map +1 -1
  170. package/dist/queries/escalations/incident-record.js +1 -0
  171. package/dist/queries/escalations/incident-record.js.map +1 -1
  172. package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -1
  173. package/dist/queries/focus-review/review-criterion-verdicts.js +1 -0
  174. package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -1
  175. package/dist/queries/migrations/live-focus-branches.d.ts +23 -0
  176. package/dist/queries/migrations/live-focus-branches.d.ts.map +1 -1
  177. package/dist/queries/migrations/live-focus-branches.js +32 -1
  178. package/dist/queries/migrations/live-focus-branches.js.map +1 -1
  179. package/dist/queries/prd/prd.d.ts.map +1 -1
  180. package/dist/queries/prd/prd.js +1 -16
  181. package/dist/queries/prd/prd.js.map +1 -1
  182. package/dist/queries/qa-packets/focus-qa-failure.d.ts +18 -0
  183. package/dist/queries/qa-packets/focus-qa-failure.d.ts.map +1 -1
  184. package/dist/queries/qa-packets/focus-qa-failure.js +14 -1
  185. package/dist/queries/qa-packets/focus-qa-failure.js.map +1 -1
  186. package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -1
  187. package/dist/queries/tower-decisions/tower-decisions.js +1 -0
  188. package/dist/queries/tower-decisions/tower-decisions.js.map +1 -1
  189. package/dist/queries/verification/verification.d.ts +10 -0
  190. package/dist/queries/verification/verification.d.ts.map +1 -1
  191. package/dist/queries/verification/verification.js +1 -1
  192. package/dist/queries/verification/verification.js.map +1 -1
  193. package/dist/supervision/escalation-suppression.js +1 -1
  194. package/dist/supervision/failed-head-rerun.d.ts +7 -0
  195. package/dist/supervision/failed-head-rerun.d.ts.map +1 -0
  196. package/dist/supervision/failed-head-rerun.js +41 -0
  197. package/dist/supervision/failed-head-rerun.js.map +1 -0
  198. package/dist/supervision/focus-delivery-aggregate-phase.js +1 -1
  199. package/dist/supervision/focus-delivery-aggregate-phase.js.map +1 -1
  200. package/dist/supervision/focus-liveness.d.ts +89 -0
  201. package/dist/supervision/focus-liveness.d.ts.map +1 -0
  202. package/dist/supervision/focus-liveness.js +94 -0
  203. package/dist/supervision/focus-liveness.js.map +1 -0
  204. package/dist/supervision/focus-next-step.d.ts +175 -0
  205. package/dist/supervision/focus-next-step.d.ts.map +1 -0
  206. package/dist/supervision/focus-next-step.js +129 -0
  207. package/dist/supervision/focus-next-step.js.map +1 -0
  208. package/dist/supervision/prd-frontier-rule.d.ts +52 -0
  209. package/dist/supervision/prd-frontier-rule.d.ts.map +1 -0
  210. package/dist/supervision/prd-frontier-rule.js +51 -0
  211. package/dist/supervision/prd-frontier-rule.js.map +1 -0
  212. package/dist/supervision/prt-frontier.d.ts +22 -7
  213. package/dist/supervision/prt-frontier.d.ts.map +1 -1
  214. package/dist/supervision/prt-frontier.js +17 -7
  215. package/dist/supervision/prt-frontier.js.map +1 -1
  216. package/dist/supervision/review-loop-detector.d.ts.map +1 -1
  217. package/dist/supervision/review-loop-detector.js +2 -1
  218. package/dist/supervision/review-loop-detector.js.map +1 -1
  219. package/dist/supervision/spawn-cooldown.js +1 -1
  220. package/dist/supervision/stop-registry.d.ts +1 -0
  221. package/dist/supervision/stop-registry.d.ts.map +1 -1
  222. package/dist/supervision/stop-rows-focus-health.d.ts +14 -0
  223. package/dist/supervision/stop-rows-focus-health.d.ts.map +1 -1
  224. package/dist/supervision/stop-rows-focus-health.js +32 -0
  225. package/dist/supervision/stop-rows-focus-health.js.map +1 -1
  226. package/dist/supervision/stop-rows-spawn.d.ts +3 -2
  227. package/dist/supervision/stop-rows-spawn.d.ts.map +1 -1
  228. package/dist/supervision/stop-rows-spawn.js +9 -6
  229. package/dist/supervision/stop-rows-spawn.js.map +1 -1
  230. package/dist/supervision/team-work.js +1 -1
  231. package/dist/supervision/team-work.js.map +1 -1
  232. package/dist/testing/fixtures/api-client.js +1 -1
  233. package/dist/testing/fixtures/index.js +1 -1
  234. package/dist/testing/fixtures/migration-namespace-repo.d.ts.map +1 -1
  235. package/dist/testing/fixtures/migration-namespace-repo.js +1 -0
  236. package/dist/testing/fixtures/migration-namespace-repo.js.map +1 -1
  237. package/dist/testing/fixtures/pending-spawn-world.d.ts +24 -0
  238. package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
  239. package/dist/testing/fixtures/pending-spawn-world.js +46 -19
  240. package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
  241. package/dist/testing/fixtures/recording-api-client.js +1 -1
  242. package/dist/testing/fixtures/verification-deps.d.ts +27 -0
  243. package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
  244. package/dist/testing/fixtures/verification-deps.js +77 -1
  245. package/dist/testing/fixtures/verification-deps.js.map +1 -1
  246. package/dist/testing/fixtures/vitest-failure-log.d.ts.map +1 -1
  247. package/dist/testing/fixtures/vitest-failure-log.js +1 -0
  248. package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
  249. package/dist/tower/tower-supervisor-history.d.ts.map +1 -1
  250. package/dist/tower/tower-supervisor-history.js +2 -1
  251. package/dist/tower/tower-supervisor-history.js.map +1 -1
  252. package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -1
  253. package/dist/tower/tower-supervisor-prompt.js +40 -8
  254. package/dist/tower/tower-supervisor-prompt.js.map +1 -1
  255. package/dist/tower/tower-supervisor-session.d.ts.map +1 -1
  256. package/dist/tower/tower-supervisor-session.js +1 -0
  257. package/dist/tower/tower-supervisor-session.js.map +1 -1
  258. package/dist/types/issue-status.d.ts.map +1 -1
  259. package/dist/types/issue-status.js +6 -1
  260. package/dist/types/issue-status.js.map +1 -1
  261. package/dist/verify/attribution/code-failure-evidence.d.ts +77 -0
  262. package/dist/verify/attribution/code-failure-evidence.d.ts.map +1 -0
  263. package/dist/verify/attribution/code-failure-evidence.js +92 -0
  264. package/dist/verify/attribution/code-failure-evidence.js.map +1 -0
  265. package/dist/verify/attribution/verification-attribution.d.ts +18 -0
  266. package/dist/verify/attribution/verification-attribution.d.ts.map +1 -1
  267. package/dist/verify/attribution/verification-attribution.js +49 -2
  268. package/dist/verify/attribution/verification-attribution.js.map +1 -1
  269. package/dist/verify/attribution/verification-baseline.d.ts.map +1 -1
  270. package/dist/verify/attribution/verification-baseline.js +1 -0
  271. package/dist/verify/attribution/verification-baseline.js.map +1 -1
  272. package/dist/verify/attribution/verification-diagnostics.d.ts +10 -0
  273. package/dist/verify/attribution/verification-diagnostics.d.ts.map +1 -1
  274. package/dist/verify/attribution/verification-diagnostics.js +39 -10
  275. package/dist/verify/attribution/verification-diagnostics.js.map +1 -1
  276. package/dist/verify/deterministic-gate/verification-deterministic.d.ts +19 -0
  277. package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
  278. package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
  279. package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
  280. package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
  281. package/dist/verify/engine/verification-commit-sharing.js +36 -4
  282. package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
  283. package/dist/verify/engine/verification-deps.d.ts +7 -0
  284. package/dist/verify/engine/verification-deps.d.ts.map +1 -1
  285. package/dist/verify/engine/verification-engine.d.ts.map +1 -1
  286. package/dist/verify/engine/verification-engine.js +6 -3
  287. package/dist/verify/engine/verification-engine.js.map +1 -1
  288. package/dist/verify/escaped-tests/escaped-test-run.d.ts +5 -1
  289. package/dist/verify/escaped-tests/escaped-test-run.d.ts.map +1 -1
  290. package/dist/verify/escaped-tests/escaped-test-run.js +24 -2
  291. package/dist/verify/escaped-tests/escaped-test-run.js.map +1 -1
  292. package/dist/verify/failing-test-rerun/failing-test-retry.d.ts +4 -1
  293. package/dist/verify/failing-test-rerun/failing-test-retry.d.ts.map +1 -1
  294. package/dist/verify/failing-test-rerun/failing-test-retry.js.map +1 -1
  295. package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
  296. package/dist/verify/gate-verdicts/commit-verdict-record.js.map +1 -1
  297. package/dist/verify/gate-verdicts/no-verdict-record.d.ts +27 -3
  298. package/dist/verify/gate-verdicts/no-verdict-record.d.ts.map +1 -1
  299. package/dist/verify/gate-verdicts/no-verdict-record.js +36 -6
  300. package/dist/verify/gate-verdicts/no-verdict-record.js.map +1 -1
  301. package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
  302. package/dist/verify/outcome-routing/verification-rework-issue.js +5 -4
  303. package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
  304. package/dist/verify/run-selection/default-on-guards.d.ts +15 -4
  305. package/dist/verify/run-selection/default-on-guards.d.ts.map +1 -1
  306. package/dist/verify/run-selection/default-on-guards.js +14 -4
  307. package/dist/verify/run-selection/default-on-guards.js.map +1 -1
  308. package/dist/verify/run-selection/explicit-next-step-gate.d.ts +39 -0
  309. package/dist/verify/run-selection/explicit-next-step-gate.d.ts.map +1 -0
  310. package/dist/verify/run-selection/explicit-next-step-gate.js +70 -0
  311. package/dist/verify/run-selection/explicit-next-step-gate.js.map +1 -0
  312. package/dist/verify/run-selection/pre-review-gate-dispatch.d.ts +0 -9
  313. package/dist/verify/run-selection/pre-review-gate-dispatch.d.ts.map +1 -1
  314. package/dist/verify/run-selection/pre-review-gate-dispatch.js +21 -62
  315. package/dist/verify/run-selection/pre-review-gate-dispatch.js.map +1 -1
  316. package/dist/verify/run-selection/reselection-log-line.d.ts +1 -1
  317. package/dist/verify/run-selection/reselection-log-line.d.ts.map +1 -1
  318. package/dist/verify/run-selection/reselection-log-line.js +2 -0
  319. package/dist/verify/run-selection/reselection-log-line.js.map +1 -1
  320. package/dist/verify/run-selection/verification-default-on.d.ts +32 -4
  321. package/dist/verify/run-selection/verification-default-on.d.ts.map +1 -1
  322. package/dist/verify/run-selection/verification-default-on.js +83 -19
  323. package/dist/verify/run-selection/verification-default-on.js.map +1 -1
  324. package/dist/verify/shortfalls/shortfall-park.js +1 -1
  325. package/dist/worktree/focus-worktree-state.js +1 -1
  326. package/dist/worktree/focus-worktree-state.js.map +1 -1
  327. package/package.json +3 -3
  328. package/dist/completion/state-cascade/review-next-step.d.ts +0 -107
  329. package/dist/completion/state-cascade/review-next-step.d.ts.map +0 -1
  330. package/dist/completion/state-cascade/review-next-step.js +0 -90
  331. package/dist/completion/state-cascade/review-next-step.js.map +0 -1
  332. package/dist/focus/failed-head-wedge.d.ts +0 -124
  333. package/dist/focus/failed-head-wedge.d.ts.map +0 -1
  334. package/dist/focus/failed-head-wedge.js +0 -120
  335. package/dist/focus/failed-head-wedge.js.map +0 -1
  336. package/dist/focus/stranded-review-reroute.d.ts +0 -70
  337. package/dist/focus/stranded-review-reroute.d.ts.map +0 -1
  338. package/dist/focus/stranded-review-reroute.js +0 -193
  339. package/dist/focus/stranded-review-reroute.js.map +0 -1
  340. package/dist/focus/uncommitted-work-backstop.d.ts +0 -115
  341. package/dist/focus/uncommitted-work-backstop.d.ts.map +0 -1
  342. package/dist/focus/uncommitted-work-backstop.js +0 -259
  343. package/dist/focus/uncommitted-work-backstop.js.map +0 -1
@@ -226,6 +226,9 @@ export function forgetRecordedPass(deliveryId) {
226
226
  }
227
227
  /**
228
228
  * Dispatch-result bookkeeping for a default-on run:
229
+ * - the gate exited non-zero with no evidence of a code failure -> un-mark, so
230
+ * the same commit is re-dispatched (the no-verdict backoff paces it,
231
+ * verify/gate-verdicts/no-verdict-record.ts); never a failed sha;
229
232
  * - no checkout could be made, or the verdict was discarded because dependencies
230
233
  * moved mid-run, or the reconciliation's model could not be reached -> un-mark,
231
234
  * so the next tick retries (no verdict exists to guard); any recorded pass or
@@ -256,6 +259,14 @@ export function forgetRecordedPass(deliveryId) {
256
259
  * again whether or not a scan observed the delivery gone.
257
260
  */
258
261
  export function noteDefaultOnResult(deliveryId, result) {
262
+ if (result.noCodeEvidence) {
263
+ if (defaultOnRan.delete(deliveryId)) {
264
+ forgetGuardProduct(deliveryId);
265
+ logReselection('no-code-evidence-unmark', deliveryId, `the gate exited non-zero with no evidence of a code failure (${result.noCodeEvidence.reason}), so no verdict exists `
266
+ + 'to guard and no re-work moves it; the same commit is judged again once its no-verdict backoff elapses');
267
+ }
268
+ return;
269
+ }
259
270
  if (result.checkoutUnavailable || result.modelUnavailable) {
260
271
  // A parked delivery whose every fact is unchanged is re-selected by no path
261
272
  // except a new ruling or a new commit, so the retry is DECLINED -- for BOTH
@@ -296,10 +307,9 @@ export function noteDefaultOnResult(deliveryId, result) {
296
307
  /**
297
308
  * True when the delivery's last default-on verify PASSED on the commit the focus
298
309
  * HEAD names, or `readHead` names none (skip it). A readable HEAD that differs
299
- * re-arms it. The scan hands the real HEAD only for a focus awaiting its
300
- * pre-review run, where a new HEAD is a commit the review request needs a verdict
301
- * for (verify/run-selection/pre-review-gate-dispatch.ts); for a held route it
302
- * hands none, so only the pull (which drops the pass) re-arms it.
310
+ * re-arms it. The scan asks only for a focus whose next step is a gate run at
311
+ * HEAD (verify/run-selection/verification-default-on.ts gateRunAskOf), where a
312
+ * pass at an older commit judges nothing the next step waits on.
303
313
  */
304
314
  export function alreadyPassed(deliveryId, readHead) {
305
315
  const passedSha = passedAtSha.get(deliveryId);
@@ -1 +1 @@
1
- {"version":3,"file":"default-on-guards.js","sourceRoot":"","sources":["../../../src/verify/run-selection/default-on-guards.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4HAA4H;AAC5H,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACpH,OAAO,EAAE,cAAc,EAAwB,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAGrD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,YAAY,GAAG,IAAI,GAAG,EAAyB,CA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AAU,EAAW,EAAE,CACzC,SAAS,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,KAAK,SAAS,CAAC;IAC/E,KAAK,MAAM,EAAE,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAClG,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC;YAAE,SAAS;QACzD,MAAM,OAAO,GAAG;YACd,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SACtD,CAAC;QACF,eAAe,CAAC,EAAE,CAAC,CAAC;QACpB,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACxB,wGAAwG;QACxG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACnC,cAAc,CACZ,gBAAgB,EAAE,EAAE,EACpB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,6CAA6C;cACnE,GAAG,SAAS,IAAI,gBAAgB,kCAAkC,CACrE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Explicit-method rows run on their focus's one next step, like the default-on
3
+ * scan (verify/run-selection/verification-default-on.ts gateRunAskOf).
4
+ *
5
+ * The tick selects explicit rows two ways -- the edge re-lists a pending or
6
+ * failed row every tick (explicit-row-selection.ts), and a recorded pass at an
7
+ * older commit is re-armed (explicit-rearm.ts) -- and each decided from the
8
+ * row's own state. Both now pass this gate: a row on an armed focus is kept
9
+ * only while that focus's next step (supervision/focus-next-step.ts) asks for a
10
+ * gate run at HEAD, or is serving one in flight there. A coding team, a review, a
11
+ * merge, a pause or done asks for nothing, so no gate starts beside it; an
12
+ * unreadable step keeps nothing this tick (fail closed) and is read again next
13
+ * tick. What survives still goes through the row-level rules (park, verdict
14
+ * reuse, removal) unchanged.
15
+ *
16
+ * A row naming no focus, or a focus the daemon does not run (un-armed: not in
17
+ * the active set), has no decided next step -- none of the deciders acts on such
18
+ * a focus -- and keeps the un-armed rule (verify/run-selection/unarmed-unattributed.ts).
19
+ *
20
+ * The tick reads each focus's step once (memoizeNextStepReads) and hands the same
21
+ * reads to the default-on scan, so both selectors act on one answer.
22
+ *
23
+ * @module verify/run-selection/explicit-next-step-gate
24
+ */
25
+ import type { PendingVerification } from '../../queries/verification/verification.js';
26
+ import type { FocusNextStepReader } from '../../supervision/focus-next-step.js';
27
+ import type { DefaultOnScanDeps } from './verification-default-on.js';
28
+ /** The reads the gate takes (the scan's own). */
29
+ export type ExplicitNextStepDeps = Pick<DefaultOnScanDeps, 'getActiveFocuses' | 'readFocusNextStep' | 'resolveFocusHeadSha'>;
30
+ /** A reader that reads each focus's next step at most once: one tick, one answer per focus. */
31
+ export declare function memoizeNextStepReads(read: FocusNextStepReader): FocusNextStepReader;
32
+ /** Test-only: forget every logged decline. */
33
+ export declare function __resetExplicitNextStepGateForTests(): void;
34
+ /** The rows whose focus's next step asks for a gate run (module header). Never throws. */
35
+ export declare function explicitRowsOnNextStep(rows: readonly PendingVerification[], config: {
36
+ organizationId: string;
37
+ productId: string;
38
+ }, deps: ExplicitNextStepDeps): Promise<PendingVerification[]>;
39
+ //# sourceMappingURL=explicit-next-step-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explicit-next-step-gate.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/explicit-next-step-gate.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,KAAK,EAAqB,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAMtE,iDAAiD;AACjD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC,CAAC;AAE7H,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAUnF;AAKD,8CAA8C;AAC9C,wBAAgB,mCAAmC,IAAI,IAAI,CAE1D;AAYD,0FAA0F;AAC1F,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,SAAS,mBAAmB,EAAE,EACpC,MAAM,EAAE;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EACrD,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA+BhC"}
@@ -0,0 +1,70 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/verify/run-selection/explicit-next-step-gate.test.ts
3
+ // PINNED-BY-END
4
+ import { gateRunAskOf } from './verification-default-on.js';
5
+ import { createLogger } from '../../log/daemon-log.js';
6
+ const log = createLogger({ module: 'verification' });
7
+ /** A reader that reads each focus's next step at most once: one tick, one answer per focus. */
8
+ export function memoizeNextStepReads(read) {
9
+ const reads = new Map();
10
+ return (focus) => {
11
+ let pending = reads.get(focus.focus_id);
12
+ if (!pending) {
13
+ pending = read(focus);
14
+ reads.set(focus.focus_id, pending);
15
+ }
16
+ return pending;
17
+ };
18
+ }
19
+ /** focusId -> the step its declined explicit rows were last logged for (one line per change, not per tick). */
20
+ const declineLogged = new Map();
21
+ /** Test-only: forget every logged decline. */
22
+ export function __resetExplicitNextStepGateForTests() {
23
+ declineLogged.clear();
24
+ }
25
+ function logDecline(focusId, rows, read) {
26
+ const what = read.readable ? `${read.next.step}${'reason' in read.next ? ` (${read.next.reason})` : ''}` : `unreadable (${read.what})`;
27
+ if (declineLogged.get(focusId) === what)
28
+ return;
29
+ declineLogged.set(focusId, what);
30
+ log.info(`[verification] explicit rows ${rows.map((r) => r.deliveryId).join(', ')} on focus ${focusId.slice(0, 8)} not dispatched: `
31
+ + `its next step is ${what}, not a gate run at HEAD`);
32
+ }
33
+ /** The rows whose focus's next step asks for a gate run (module header). Never throws. */
34
+ export async function explicitRowsOnNextStep(rows, config, deps) {
35
+ const byFocus = new Map();
36
+ const out = [];
37
+ for (const row of rows) {
38
+ if (row.focusId)
39
+ byFocus.set(row.focusId, [...(byFocus.get(row.focusId) ?? []), row]);
40
+ else
41
+ out.push(row);
42
+ }
43
+ if (byFocus.size === 0)
44
+ return out;
45
+ let focuses;
46
+ try {
47
+ focuses = await deps.getActiveFocuses(config.organizationId, config.productId);
48
+ }
49
+ catch (err) {
50
+ log.warn(`[verification] explicit rows held this tick: active focuses unreadable for product ${config.productId}: ${err.message}`);
51
+ return out;
52
+ }
53
+ for (const [focusId, focusRows] of byFocus) {
54
+ const focus = focuses.find((f) => f.focus_id === focusId);
55
+ if (!focus) {
56
+ out.push(...focusRows); // not run by the daemon: no decided next step (module header)
57
+ continue;
58
+ }
59
+ const read = await deps.readFocusNextStep(focus)
60
+ .catch((err) => ({ readable: false, what: 'deliveries', error: err instanceof Error ? err : new Error(String(err)) }));
61
+ if (gateRunAskOf(read, deps.resolveFocusHeadSha(focusId)) === 'none') {
62
+ logDecline(focusId, focusRows, read);
63
+ continue;
64
+ }
65
+ declineLogged.delete(focusId);
66
+ out.push(...focusRows);
67
+ }
68
+ return out;
69
+ }
70
+ //# sourceMappingURL=explicit-next-step-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explicit-next-step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AC;QAC9I,OAAO,GAAG,CAAC;IACb,CAAC;IACD,KAAK,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,OAAO,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,8DAA8D;YACtF,SAAS;QACX,CAAC;QACD,MAAM,IAAI,GAAsB,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;aAChE,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAc,EAAE,IAAI,EAAE,YAAqB,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpJ,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;YACrE,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;YACrC,SAAS;QACX,CAAC;QACD,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9B,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -5,19 +5,10 @@ export interface PreReviewFocus {
5
5
  /** The slice of a delivery row the readiness read takes. */
6
6
  export interface PreReviewDelivery {
7
7
  executionStatus: string | null;
8
- gateState?: unknown;
9
8
  }
10
9
  /**
11
10
  * True when the focus awaits its pre-review gate run: no delivery active, at
12
11
  * least one in verify, and no review window open.
13
12
  */
14
13
  export declare function focusAwaitsPreReviewRun(focus: PreReviewFocus, deliveries: readonly PreReviewDelivery[]): boolean;
15
- /**
16
- * True when the scan may select this verify delivery: its focus awaits the
17
- * pre-review run, a held route asks for a verdict on the commit the focus HEAD
18
- * names, or an awaited-model hold stands while HEAD is readable. A commit-verdict
19
- * hold naming no commit, or another one, asks for no run a dispatch could aim (a
20
- * run judges HEAD), as the pull itself rules.
21
- */
22
- export declare function mayDispatchGateRun(focusAwaitsRun: boolean, delivery: PreReviewDelivery, readHead: () => string | null): boolean;
23
14
  //# sourceMappingURL=pre-review-gate-dispatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pre-review-gate-dispatch.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/pre-review-gate-dispatch.ts"],"names":[],"mappings":"AA8DA,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,OAAO,CAKhH;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,OAAO,CAK/H"}
1
+ {"version":3,"file":"pre-review-gate-dispatch.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/pre-review-gate-dispatch.ts"],"names":[],"mappings":"AAoCA,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,OAAO,CAKhH"}
@@ -3,60 +3,34 @@
3
3
  // packages/daemon/src/verify/run-selection/pre-review-gate-dispatch.test.ts
4
4
  // PINNED-BY-END
5
5
  /**
6
- * When the default-on scan may select a focus's verify deliveries: the gate runs
7
- * once per focus HEAD, before review is requested -- not per delivery as each
8
- * one enters verify.
6
+ * The pre-review shape of a focus: no delivery active, at least one in verify, no
7
+ * review window open (supervision/focus-delivery-aggregate-phase.ts `verifying`).
8
+ * The gate runs once per focus HEAD, before review is requested -- not per
9
+ * delivery as each one enters verify.
9
10
  *
10
- * A verify delivery is selectable only when one of three things asks for a verdict:
11
+ * WHO DECIDES THE RUN. Whether the default-on scan selects a gate run is the
12
+ * focus's one next step (supervision/focus-next-step.ts), read by the scan
13
+ * (verify/run-selection/verification-default-on.ts gateRunAskOf): a gate run at
14
+ * HEAD -- a verdict owed there, or the one re-run at a failed HEAD -- or a
15
+ * shortfall park whose releaser is a gate run. That covers what this module used
16
+ * to admit beside the pre-review shape: a held route's commit (the review exit
17
+ * that found no passing verdict for HEAD leaves it owed, and its pull drops the
18
+ * pass the scan would otherwise reuse -- verify/run-selection/commit-verdict-pull.ts)
19
+ * and an awaited model (a reconciliation that could not run records no outcome
20
+ * for HEAD, so a verdict is still owed there). A live team, owed open work, a
21
+ * passed or failed HEAD and a paused or settled focus select nothing.
11
22
  *
12
- * - **The focus awaits its pre-review run.** Its delivery aggregate is
13
- * `verifying` (no delivery active, at least one in verify, no review window
14
- * open -- supervision/focus-delivery-aggregate-phase.ts). That is the moment
15
- * the review request (completion/state-cascade/review-request-gate.ts) needs
16
- * a passing verdict for HEAD; every verify delivery shares the one run at that
17
- * HEAD (verify/engine/verification-commit-sharing.ts). A delivery entering
18
- * verify while a sibling still codes selects nothing: its run is the focus's
19
- * pre-review run at whatever HEAD the focus reaches. The focus STAYS in this
20
- * state until verify has finished judging HEAD: the review request also waits
21
- * on each verify delivery's recorded outcome, effect reconciliation included
22
- * (completion/state-cascade/review-verify-judgment-gate.ts), so a delivery
23
- * whose dispatch left none is still selectable here.
24
- * - **A held route pulls it.** A review exit that found no passing verdict for
25
- * the commit it judged recorded a commit-verdict hold
26
- * (delivery/commit-verdict-hold.ts); the pull
27
- * (verify/run-selection/commit-verdict-pull.ts) aims a run at that commit
28
- * while the focus HEAD names it. A
29
- * review that committed pays exactly that one run; one that did not reads the
30
- * pre-review verdict, which is keyed on the same commit.
31
- * - **An awaited model holds it.** Its verify reconciliation could not run
32
- * (gate_state.modelUnavailable, verify/outcome-routing/verification-model-unavailable-hold.ts),
33
- * so it was judged on nothing, and the hold promises a re-judge on a later
34
- * tick. A hold the pre-review run itself forms needs no admission of its own:
35
- * a passing gate verdict no longer opens the review window while the
36
- * reconciliation is unanswered, so the focus still awaits its pre-review run
37
- * and the first rule selects the delivery again. This rule is for a hold
38
- * standing under a window that is ALREADY open -- a re-judgement a held
39
- * route pulled while its review window stood -- where the review parks on
40
- * that same hold (spawn/review-hold-park.ts): if selection waited for the
41
- * window to close, neither side could move. The hold is admitted whatever the
42
- * window while the focus HEAD is readable (a run judges HEAD). Admission
43
- * does not bypass the incurable re-hold: a kind retrying cannot cure, on an
44
- * unchanged judged input, is re-held at dispatch with no model call
45
- * (verify/outcome-routing/incurable-model-hold.ts).
23
+ * What remains here is the shape itself, read by the dashboard's activity record
24
+ * (focus/focus-activity-record.ts) to show a focus waiting on its gate before the
25
+ * verification tick reaches it.
46
26
  *
47
- * While a review window is open and no route or awaited model holds, nothing is
48
- * selected: the review judges the HEAD verify finished judging before the window
49
- * opened.
50
- *
51
- * Rationale and the decision this reverses: docs/DECISIONS.md ("The full gate
52
- * runs once per focus HEAD, before review"). History:
53
- * docs/daemon/history-verify.md (verify/run-selection/pre-review-gate-dispatch.ts).
27
+ * Rationale: docs/DECISIONS.md ("The full gate runs once per focus HEAD, before
28
+ * review"). History: docs/daemon/history-verify.md
29
+ * (verify/run-selection/pre-review-gate-dispatch.ts).
54
30
  *
55
31
  * @module verify/run-selection/pre-review-gate-dispatch
56
32
  */
57
33
  import { deriveFocusDeliveryAggregatePhase } from '../../supervision/focus-delivery-aggregate-phase.js';
58
- import { readCommitVerdictHold } from '../../delivery/commit-verdict-hold.js';
59
- import { hasModelUnavailableHold } from '../../queries/delivery-gate-state/verify-own-holds.js';
60
34
  /**
61
35
  * True when the focus awaits its pre-review gate run: no delivery active, at
62
36
  * least one in verify, and no review window open.
@@ -67,19 +41,4 @@ export function focusAwaitsPreReviewRun(focus, deliveries) {
67
41
  reviewRequestedAt: focus.review_requested_at,
68
42
  }) === 'verifying';
69
43
  }
70
- /**
71
- * True when the scan may select this verify delivery: its focus awaits the
72
- * pre-review run, a held route asks for a verdict on the commit the focus HEAD
73
- * names, or an awaited-model hold stands while HEAD is readable. A commit-verdict
74
- * hold naming no commit, or another one, asks for no run a dispatch could aim (a
75
- * run judges HEAD), as the pull itself rules.
76
- */
77
- export function mayDispatchGateRun(focusAwaitsRun, delivery, readHead) {
78
- if (focusAwaitsRun)
79
- return true;
80
- if (hasModelUnavailableHold(delivery.gateState))
81
- return readHead() !== null;
82
- const hold = readCommitVerdictHold(delivery.gateState);
83
- return hold !== null && hold.sha !== null && hold.sha === readHead();
84
- }
85
44
  //# sourceMappingURL=pre-review-gate-dispatch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pre-review-gate-dispatch.js","sourceRoot":"","sources":["../../../src/verify/run-selection/pre-review-gate-dispatch.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sEAAsE;AACtE,8EAA8E;AAC9E,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAE,qBAA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,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAC3E,iBAAiB,EAAE,KAAK,CAAC,mBAAmB;KAC7C,CAAC,KAAK,WAAW,CAAC;AACrB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * belongs here AND at a `logReselection` call site; the enumeration test fails
4
4
  * on a member with no driver.
5
5
  */
6
- export declare const RESELECTION_PATHS: readonly ["run-mark-prune", "run-mark-release", "commit-verdict-pull", "credit-rearm", "ruling-rearm", "pending-relisting", "model-unavailable-unmark", "checkout-unavailable-unmark", "unanswered-dispatch"];
6
+ export declare const RESELECTION_PATHS: readonly ["run-mark-prune", "run-mark-release", "commit-verdict-pull", "credit-rearm", "ruling-rearm", "pending-relisting", "model-unavailable-unmark", "checkout-unavailable-unmark", "no-code-evidence-unmark", "unanswered-dispatch"];
7
7
  /** One of {@link RESELECTION_PATHS}. */
8
8
  export type ReselectionPath = (typeof RESELECTION_PATHS)[number];
9
9
  /** Test-only: forget every de-duplicated line written so far. */
@@ -1 +1 @@
1
- {"version":3,"file":"reselection-log-line.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/reselection-log-line.ts"],"names":[],"mappings":"AA0CA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,+MAmBpB,CAAC;AAEX,wCAAwC;AACxC,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAKjE,iEAAiE;AACjE,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAON"}
1
+ {"version":3,"file":"reselection-log-line.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/reselection-log-line.ts"],"names":[],"mappings":"AA0CA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,0OAqBpB,CAAC;AAEX,wCAAwC;AACxC,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAKjE,iEAAiE;AACjE,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAON"}
@@ -58,6 +58,8 @@ export const RESELECTION_PATHS = [
58
58
  'model-unavailable-unmark',
59
59
  /** No checkout could be made, or the verdict was discarded mid-run (default-on-guards.ts noteDefaultOnResult). */
60
60
  'checkout-unavailable-unmark',
61
+ /** The gate exited non-zero with no evidence of a code failure: no verdict to guard (default-on-guards.ts noteDefaultOnResult). */
62
+ 'no-code-evidence-unmark',
61
63
  /** A dispatch did not pass at a commit the gate passed and left no park behind it (unanswered-dispatch.ts). */
62
64
  'unanswered-dispatch',
63
65
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"reselection-log-line.js","sourceRoot":"","sources":["../../../src/verify/run-selection/reselection-log-line.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oGAAoG;AACpG,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,6EAA6E;AAC7E,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,qHAAqH;IACrH,gBAAgB;IAChB,sHAAsH;IACtH,kBAAkB;IAClB,8FAA8F;IAC9F,qBAAqB;IACrB,mGAAmG;IACnG,cAAc;IACd,6HAA6H;IAC7H,cAAc;IACd,+FAA+F;IAC/F,mBAAmB;IACnB,uHAAuH;IACvH,0BAA0B;IAC1B,kHAAkH;IAClH,6BAA6B;IAC7B,+GAA+G;IAC/G,qBAAqB;CACb,CAAC;AAKX,oEAAoE;AACpE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;AAElC,iEAAiE;AACjE,MAAM,UAAU,6BAA6B;IAC3C,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAqB,EACrB,UAAkB,EAClB,MAAc,EACd,SAAkB;IAElB,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC;QACjD,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO;QAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,GAAG,CAAC,IAAI,CAAC,gCAAgC,IAAI,eAAe,UAAU,OAAO,MAAM,EAAE,CAAC,CAAC;AACzF,CAAC"}
1
+ {"version":3,"file":"reselection-log-line.js","sourceRoot":"","sources":["../../../src/verify/run-selection/reselection-log-line.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oGAAoG;AACpG,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,6EAA6E;AAC7E,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,qHAAqH;IACrH,gBAAgB;IAChB,sHAAsH;IACtH,kBAAkB;IAClB,8FAA8F;IAC9F,qBAAqB;IACrB,mGAAmG;IACnG,cAAc;IACd,6HAA6H;IAC7H,cAAc;IACd,+FAA+F;IAC/F,mBAAmB;IACnB,uHAAuH;IACvH,0BAA0B;IAC1B,kHAAkH;IAClH,6BAA6B;IAC7B,mIAAmI;IACnI,yBAAyB;IACzB,+GAA+G;IAC/G,qBAAqB;CACb,CAAC;AAKX,oEAAoE;AACpE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;AAElC,iEAAiE;AACjE,MAAM,UAAU,6BAA6B;IAC3C,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAqB,EACrB,UAAkB,EAClB,MAAc,EACd,SAAkB;IAElB,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC;QACjD,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO;QAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,GAAG,CAAC,IAAI,CAAC,gCAAgC,IAAI,eAAe,UAAU,OAAO,MAAM,EAAE,CAAC,CAAC;AACzF,CAAC"}
@@ -23,6 +23,7 @@ import { type VerifyManifest } from '../gate-config/verification-manifest.js';
23
23
  import type { getActiveFocuses } from '../../queries/focuses/focus-discovery.js';
24
24
  import type { getFocusDeliveries } from '../../queries/focuses/focuses.js';
25
25
  import type { OwedReworkRetry } from '../outcome-routing/verification-rework-issue.js';
26
+ import type { FocusNextStepRead, FocusNextStepReader } from '../../supervision/focus-next-step.js';
26
27
  /** Default HEAD reader: the registered focus worktree's HEAD, or null when unreadable. */
27
28
  export declare function defaultResolveFocusHeadSha(focusId: string): string | null;
28
29
  /**
@@ -49,6 +50,13 @@ export interface DefaultOnScanDeps {
49
50
  readJudgedCommitManifest: (focusId: string) => JudgedCommitRead | null;
50
51
  /** Retries a rework-Bug filing a failure left owed at the failed HEAD (verify/outcome-routing/verification-rework-issue.ts). */
51
52
  retryOwedReworkIssue: OwedReworkRetry;
53
+ /**
54
+ * The focus's one next step (supervision/focus-next-step.ts; production binds
55
+ * composition/focus-next-step-context.ts readLiveFocusNextStep). It alone says
56
+ * whether the gate runs at the focus HEAD (gateRunAskOf); read once per focus
57
+ * per scan, only for a focus with a verify delivery the scan could select.
58
+ */
59
+ readFocusNextStep: FocusNextStepReader;
52
60
  }
53
61
  /**
54
62
  * Counting semaphore capping concurrent daemon-side verification runs.
@@ -171,6 +179,26 @@ export declare function resolveProductVerificationScopes(config: DaemonConfig, r
171
179
  * conservative floor, not a stale limit from a previous tick.
172
180
  */
173
181
  export declare function resolveDaemonWideVerifyCap(scopes: readonly ProductVerificationScope[]): number;
182
+ /**
183
+ * What the focus's one next step asks of the scan: nothing; a gate run at HEAD;
184
+ * that run including the one re-run at the HEAD its gate failed on (its rework Bug
185
+ * closed with no new commit; supervision/failed-head-rerun.ts); or serving the run
186
+ * already in flight there.
187
+ */
188
+ export type GateRunAsk = 'none' | 'run' | 'rerun_failed_head' | 'serve_in_flight';
189
+ /**
190
+ * The scan's reading of the decision (supervision/focus-next-step.ts). A gate run
191
+ * at HEAD asks for one -- a verdict owed, or the failed-HEAD re-run at the HEAD the
192
+ * decision was read at. A shortfall park whose releaser is a gate run asks for one
193
+ * too: a ruling or a new delivery commit releases the park by re-arming the parked
194
+ * delivery's run, and an unparked sibling not yet judged at HEAD shares that run.
195
+ * A run in flight at HEAD is the actor, already started: the scan serves it -- a
196
+ * delivery it has not answered is selected again, which is how a CI-run gate's
197
+ * dispatch collects its verdict -- but re-arms no recorded pass to start a second
198
+ * run beside it. Every other step (a team, a review, a merge, a pause, done) asks
199
+ * for nothing. Pure.
200
+ */
201
+ export declare function gateRunAskOf(read: FocusNextStepRead, head: string | null): GateRunAsk;
174
202
  /**
175
203
  * What the commit a delivery is judged on declares in telora.verify.json, read
176
204
  * from git AT that sha -- never the worktree's files, which may hold edits the
@@ -218,10 +246,10 @@ export declare function judgedCommitVerificationConfig(read: JudgedCommitManifes
218
246
  * `verify` status, anchored to an injection, with no explicit verification
219
247
  * method (so not already returned by getPendingVerifications), not in a
220
248
  * read-only audit focus (those are discovery-only and never run a suite), in a
221
- * focus awaiting its pre-review run or carrying a held route's request
222
- * (pre-review-gate-dispatch.ts -- once per focus HEAD, before review, never
223
- * merely because the delivery entered verify), and not already run, failed or
224
- * passed on the focus's unchanged HEAD (HEAD-keyed guards).
249
+ * focus whose one next step asks for a gate run at HEAD (gateRunAskOf over
250
+ * supervision/focus-next-step.ts -- once per focus HEAD, never merely because the
251
+ * delivery entered verify), and not already run, failed or passed on the focus's
252
+ * unchanged HEAD (HEAD-keyed guards, which only keep one commit from being run twice).
225
253
  *
226
254
  * Synthesizes a `deterministic` PendingVerification carrying the resolved
227
255
  * config-default command + timeout and a `defaultOnSource` marker. Those values
@@ -1 +1 @@
1
- {"version":3,"file":"verification-default-on.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/verification-default-on.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EACjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAS3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAMvF,0FAA0F;AA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EAAE,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzI;AA8BD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,2BAA2B,EACrC,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EACxC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAyFhC"}
1
+ {"version":3,"file":"verification-default-on.d.ts","sourceRoot":"","sources":["../../../src/verify/run-selection/verification-default-on.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EACjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAS3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAEvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAInG,0FAA0F;AAC1F,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGzE;AAGD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C;;;;;OAKG;IACH,mBAA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AA8B,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzI;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,2BAA2B,EACrC,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EACxC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAuFhC"}
@@ -37,7 +37,6 @@ import { configForProduct } from '../../config/config.js';
37
37
  import { getFocusWorktree } from '../../worktree/focus-worktree-state.js';
38
38
  import { resolveHeadSha } from '../attribution/verification-baseline.js';
39
39
  import { alreadyPassed, failedOnCurrentHead, pruneGuardsOutsideVerify, ranOnCurrentHead, } from './default-on-guards.js';
40
- import { focusAwaitsPreReviewRun, mayDispatchGateRun } from './pre-review-gate-dispatch.js';
41
40
  import { createLogger } from '../../log/daemon-log.js';
42
41
  const log = createLogger({ module: 'verification' });
43
42
  /** Default HEAD reader: the registered focus worktree's HEAD, or null when unreadable. */
@@ -223,6 +222,78 @@ function memoizedHead(focusId, deps) {
223
222
  return read.head;
224
223
  };
225
224
  }
225
+ /**
226
+ * The scan's reading of the decision (supervision/focus-next-step.ts). A gate run
227
+ * at HEAD asks for one -- a verdict owed, or the failed-HEAD re-run at the HEAD the
228
+ * decision was read at. A shortfall park whose releaser is a gate run asks for one
229
+ * too: a ruling or a new delivery commit releases the park by re-arming the parked
230
+ * delivery's run, and an unparked sibling not yet judged at HEAD shares that run.
231
+ * A run in flight at HEAD is the actor, already started: the scan serves it -- a
232
+ * delivery it has not answered is selected again, which is how a CI-run gate's
233
+ * dispatch collects its verdict -- but re-arms no recorded pass to start a second
234
+ * run beside it. Every other step (a team, a review, a merge, a pause, done) asks
235
+ * for nothing. Pure.
236
+ */
237
+ export function gateRunAskOf(read, head) {
238
+ if (!read.readable)
239
+ return 'none';
240
+ const next = read.next;
241
+ if (next.step === 'hold')
242
+ return next.releaser === 'gate_run' ? 'run' : 'none';
243
+ if (next.step !== 'gate_run')
244
+ return 'none';
245
+ if (next.reason === 'verdict_owed')
246
+ return 'run';
247
+ if (next.reason === 'run_in_flight')
248
+ return 'serve_in_flight';
249
+ return head !== null && read.head === head ? 'rerun_failed_head' : 'none';
250
+ }
251
+ /** focusId -> what its decision last could not read, so an unreadable focus logs once per reason, not per tick. */
252
+ const unreadableLogged = new Map();
253
+ /**
254
+ * The focus's gate-run ask, read at most once per focus per scan. Never throws: an
255
+ * unreadable decision asks for nothing this tick (fail closed: no gate run is
256
+ * dispatched on a step nobody decided) and is read again next tick.
257
+ */
258
+ function memoizedGateRunAsk(focus, readHead, deps) {
259
+ let answer;
260
+ return () => (answer ??= (async () => {
261
+ const read = await deps.readFocusNextStep(focus)
262
+ .catch((err) => ({ readable: false, what: 'deliveries', error: err instanceof Error ? err : new Error(String(err)) }));
263
+ if (!read.readable) {
264
+ const reason = `${read.what}: ${read.error.message}`;
265
+ if (unreadableLogged.get(focus.focus_id) !== reason) {
266
+ unreadableLogged.set(focus.focus_id, reason);
267
+ log.warn(`[verification] default-on: selecting nothing on focus ${focus.focus_id.slice(0, 8)} -- its next step could not be read (${reason}); read again next tick`);
268
+ }
269
+ return 'none';
270
+ }
271
+ unreadableLogged.delete(focus.focus_id);
272
+ return gateRunAskOf(read, readHead());
273
+ })());
274
+ }
275
+ /** No HEAD re-arms a recorded pass while a run in flight answers the focus HEAD. */
276
+ const NO_REARMING_HEAD = () => null;
277
+ /**
278
+ * Whether the scan selects a verify delivery under its focus's ask -- null skips it -- and whether its run is the
279
+ * failed-HEAD re-run. The guards only keep one commit from being run twice. The pass is read FIRST, so a pass on HEAD
280
+ * reads as a pass before ranOnCurrentHead drops a run mark; a pass at an older commit is re-armed by the new HEAD,
281
+ * unless a run already in flight there answers it. An unchanged commit that already failed is re-judged only when the
282
+ * decision answers its one re-run -- and then despite the run mark its failed run left at that commit (the mark is
283
+ * what made it a failure at HEAD; the decision's once-per-HEAD record bounds the re-run, not the mark).
284
+ */
285
+ function selectionUnderAsk(d, ask, readHead) {
286
+ if (ask === 'none')
287
+ return null; // the next step is not a gate run at HEAD: its actor is a team, a review, a merge or a ruling
288
+ if (alreadyPassed(d.id, ask === 'serve_in_flight' ? NO_REARMING_HEAD : readHead))
289
+ return null;
290
+ const rerunOfFailedHead = failedOnCurrentHead(d, readHead);
291
+ if (rerunOfFailedHead)
292
+ return ask === 'rerun_failed_head' ? { rerunOfFailedHead } : null;
293
+ if (ranOnCurrentHead(d.id, readHead))
294
+ return null; // already judged on this commit this verify-entry
295
+ return { rerunOfFailedHead };
296
+ }
226
297
  /** Read telora.verify.json as committed at `sha`, through the manifest reader's own validation. */
227
298
  export function readManifestAtCommit(worktreePath, sha, runGit) {
228
299
  const manifestPath = resolveVerifyManifestPath(worktreePath);
@@ -342,17 +413,15 @@ function pruneProductGuards(productId, observedInVerify, complete) {
342
413
  log.info(`[verification] default-on: not pruning the re-run guards of product ${productId} this tick -- `
343
414
  + 'a focus\'s deliveries could not be read, so "no longer in verify" is not established');
344
415
  }
345
- /** No HEAD may re-arm a recorded pass: outside the pre-review run, only a held route's pull does. */
346
- const NO_REARMING_HEAD = () => null;
347
416
  /**
348
417
  * Discover deliveries that should receive a DEFAULT-ON deterministic run: in
349
418
  * `verify` status, anchored to an injection, with no explicit verification
350
419
  * method (so not already returned by getPendingVerifications), not in a
351
420
  * read-only audit focus (those are discovery-only and never run a suite), in a
352
- * focus awaiting its pre-review run or carrying a held route's request
353
- * (pre-review-gate-dispatch.ts -- once per focus HEAD, before review, never
354
- * merely because the delivery entered verify), and not already run, failed or
355
- * passed on the focus's unchanged HEAD (HEAD-keyed guards).
421
+ * focus whose one next step asks for a gate run at HEAD (gateRunAskOf over
422
+ * supervision/focus-next-step.ts -- once per focus HEAD, never merely because the
423
+ * delivery entered verify), and not already run, failed or passed on the focus's
424
+ * unchanged HEAD (HEAD-keyed guards, which only keep one commit from being run twice).
356
425
  *
357
426
  * Synthesizes a `deterministic` PendingVerification carrying the resolved
358
427
  * config-default command + timeout and a `defaultOnSource` marker. Those values
@@ -398,9 +467,8 @@ export async function collectDefaultOnVerifications(config, resolved, explicitDe
398
467
  continue;
399
468
  }
400
469
  const readHead = memoizedHead(focus.focus_id, deps);
401
- // Once per focus HEAD, before review: nothing is selected while a sibling codes or a review window is open,
402
- // unless a held route asks for its commit's verdict or an awaited model holds it (verify/run-selection/pre-review-gate-dispatch.ts).
403
- const awaitsPreReviewRun = focusAwaitsPreReviewRun(focus, deliveries);
470
+ // Whether the gate runs at HEAD is the focus's one next step, not this scan's read (supervision/focus-next-step.ts).
471
+ const gateRunAsk = memoizedGateRunAsk(focus, readHead, deps);
404
472
  for (const d of deliveries) {
405
473
  if (d.executionStatus !== DELIVERY_STATUS.VERIFY)
406
474
  continue;
@@ -415,16 +483,10 @@ export async function collectDefaultOnVerifications(config, resolved, explicitDe
415
483
  if (explicitDeliveryIds.has(d.id) || (typeof d.verificationMethod === 'string' && d.verificationMethod !== ''))
416
484
  continue;
417
485
  observedInVerify.add(d.id);
418
- if (!mayDispatchGateRun(awaitsPreReviewRun, d, readHead))
419
- continue; // its run is the focus's pre-review run, not its verify entry
420
- // The pass is read FIRST, so a pass on HEAD reads as a pass before ranOnCurrentHead drops a run mark. Only the
421
- // pre-review run is re-armed by a new HEAD; for a held route the pull alone re-arms a pass (it drops it).
422
- if (alreadyPassed(d.id, awaitsPreReviewRun ? readHead : NO_REARMING_HEAD))
486
+ const selected = selectionUnderAsk(d, await gateRunAsk(), readHead);
487
+ if (!selected)
423
488
  continue;
424
- if (ranOnCurrentHead(d.id, readHead))
425
- continue; // already judged on this commit this verify-entry
426
- if (failedOnCurrentHead(d, readHead))
427
- continue; // unchanged commit already failed
489
+ const { rerunOfFailedHead } = selected;
428
490
  // timeoutSource names the layer the timeout came from, so a run that applies
429
491
  // these tick values as-is (in place, no checkout) can still say where its
430
492
  // timeout was read if it is killed by it.
@@ -455,6 +517,8 @@ export async function collectDefaultOnVerifications(config, resolved, explicitDe
455
517
  defaultVerification: config.defaultVerification,
456
518
  repoPath: config.repoPath,
457
519
  },
520
+ // The re-run is spent by the dispatch that renders its verdict, not here: a candidate that never runs spends nothing.
521
+ ...(rerunOfFailedHead && readHead() ? { failedHeadRerun: readHead() } : {}),
458
522
  });
459
523
  }
460
524
  }