@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
@@ -37,7 +37,7 @@ export declare function hasCommitVerdictHoldMarker(gateState: unknown): boolean;
37
37
  * The verify deliveries whose review exit is held awaiting a gate verdict (a
38
38
  * well-formed marker above). The ONE read of "this review window waits on a gate
39
39
  * verdict": the review park (spawn/review-hold-park.ts) parks a queued review on
40
- * it, and the stranded-review re-fire (focus/stranded-review-reroute.ts) leaves
40
+ * it, and the stranded-review re-fire (focus/review-refire-gate.ts) leaves
41
41
  * such a window to the release pass instead of queuing a review.
42
42
  */
43
43
  export declare function commitVerdictHeldDeliveryIds(deliveries: ReadonlyArray<{
@@ -75,7 +75,7 @@ export function hasCommitVerdictHoldMarker(gateState) {
75
75
  * The verify deliveries whose review exit is held awaiting a gate verdict (a
76
76
  * well-formed marker above). The ONE read of "this review window waits on a gate
77
77
  * verdict": the review park (spawn/review-hold-park.ts) parks a queued review on
78
- * it, and the stranded-review re-fire (focus/stranded-review-reroute.ts) leaves
78
+ * it, and the stranded-review re-fire (focus/review-refire-gate.ts) leaves
79
79
  * such a window to the release pass instead of queuing a review.
80
80
  */
81
81
  export function commitVerdictHeldDeliveryIds(deliveries) {
@@ -1 +1 @@
1
- {"version":3,"file":"recorded-concerns.d.ts","sourceRoot":"","sources":["../../src/delivery/recorded-concerns.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAE/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAOhE;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAEtF,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAqB,CAAC;AAE3E;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,KAAK;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAIrD;AAED,6EAA6E;AAC7E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,+BAA+B,CAEjG;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,+FAA+F;IAC/F,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,oGAAoG;IACpG,KAAK,CAAC,UAAU,EAAE,aAAa,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7E;AAcD,gCAAgC;AAChC,eAAO,MAAM,iBAAiB,EAAE,aAA0D,CAAC;AAE3F,0GAA0G;AAC1G,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,M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AM,CAAA;CAAE,EACpE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,EAC5B,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,IAAI,EAAE,CAAC,EAAE,CAAA;CAAE,CAG1B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,EACxE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAC9B,eAAe,EAAE,CAInB"}
@@ -2,8 +2,6 @@
2
2
  // Pinned by: packages/daemon/src/completion/state-cascade/standing-approval-convergence.test.ts,
3
3
  // packages/daemon/src/completion/team-outcome/apply.test.ts,
4
4
  // packages/daemon/src/delivery/recorded-concerns.test.ts,
5
- // packages/daemon/src/focus/stranded-review-refire-bound.test.ts,
6
- // packages/daemon/src/focus/stranded-review-reroute.test.ts,
7
5
  // packages/daemon/src/integration/f114-review-concern-never-holds-done-regression.test.ts,
8
6
  // packages/daemon/src/integration/failed-verdict-review-exit-respawn-regression.test.ts,
9
7
  // packages/daemon/src/integration/failed-verdict-review-loop-regression.test.ts,
@@ -1 +1 @@
1
- {"version":3,"file":"recorded-concerns.js","sourceRoot":"","sources":["../../src/delivery/recorded-concerns.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iGAAiG;AACjG,+DAA+D;AAC/D,4DAA4D;AAC5D,oEAAoE;AACpE,+DAA+D;AAC/D,6FAA6F;AAC7F,2FAA2F;AAC3F,mFAAmF;AACnF,0FAA0F;AAC1F,6EAA6E;AAC7E,yEAAyE;AACzE,iFAAiF;AACjF,gBAAgB;AAuChB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/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AE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
@@ -85,13 +85,6 @@ export interface PendingSpawnDirective {
85
85
  * never stranded; only its log is throttled.
86
86
  */
87
87
  refireSuppressedCount?: number;
88
- /**
89
- * Set ONLY on the coding respawn the daemon queues to finish a teamless armed
90
- * focus's uncommitted work (queueDaemonCodingRespawn): no review pass supersedes
91
- * it (focus/pending-spawn-review-next-step.ts), because a review judges a HEAD
92
- * the uncommitted work is not in. Absent on every stage directive.
93
- */
94
- purpose?: 'uncommitted_work';
95
88
  }
96
89
  /**
97
90
  * Single shared instance of the pending spawn directive store. The executor
@@ -189,9 +182,10 @@ export declare function closeReviewWindowWith(clearWindow: (focusId: string) =>
189
182
  export declare function __setPendingSpawnDirectiveForTesting(focusId: string, directive: PendingSpawnDirective): void;
190
183
  /**
191
184
  * Queue a CODING respawn the daemon itself asks for, with no stage directive
192
- * behind it: the uncommitted-work backstop (focus/uncommitted-work-backstop.ts)
193
- * hands a teamless armed focus's dirty worktree back to its own coding lineage
194
- * (resumed, so the team that wrote the work keeps its context). It never
185
+ * behind it: the liveness pass (focus/focus-liveness-pass.ts) starts the coding
186
+ * team an armed focus's next step names when none has started -- its own coding
187
+ * lineage, resumed, so the team that wrote the work keeps its context. Whether
188
+ * it spawns is the pending-spawn gate's call on the same next step. It never
195
189
  * replaces a directive already queued -- that one spawns a team too. Returns
196
190
  * whether this call queued.
197
191
  */
@@ -201,12 +195,6 @@ export declare function queueDaemonCodingRespawn(args: {
201
195
  contentHash: string;
202
196
  focusOverrideModel: string | null;
203
197
  }): boolean;
204
- /**
205
- * Withdraw the daemon's uncommitted-work respawn for a focus, if that is what is
206
- * queued (the worktree came clean before the team spawned). Any other directive is
207
- * left alone. Returns whether one was withdrawn.
208
- */
209
- export declare function withdrawDaemonCodingRespawn(focusId: string): boolean;
210
198
  /**
211
199
  * Check if a focus has a pending spawn directive.
212
200
  * Used by the spawn guard to skip actionable-delivery checks.
@@ -1 +1 @@
1
- {"version":3,"file":"directive-queue.d.ts","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIvE;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;;;OAMG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACjC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;;;;;;;;OAWG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,oCAA2C,CAAC;AAE/E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,cAAc,GAAG,MAAM,CAMtE;AAED;sCACsC;AACt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ACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAE3F;AAED,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAElD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,EAAE;IACzD,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IAC7C,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAEV;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,uBAAuB,EAAE,OAAO,CAAC;CAClC,GAAG,OAAO,CAGV;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAKV;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM/D"}
1
+ {"version":3,"file":"directive-queue.d.ts","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIvE;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;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BAA+B,CAAC,KAAK,EAAE;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,uBAAuB,EAAE,OAAO,CAAC;CAClC,GAAG,OAAO,CAGV;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAKV;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM/D"}
@@ -1,5 +1,5 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
- // Pinned by: 53 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/directive/directive-queue.ts
2
+ // Pinned by: 51 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/directive/directive-queue.ts
3
3
  // PINNED-BY-END
4
4
  /**
5
5
  * Directive queue: the pending spawn-directive store + its identity/guard logic.
@@ -140,9 +140,10 @@ export function __setPendingSpawnDirectiveForTesting(focusId, directive) {
140
140
  }
141
141
  /**
142
142
  * Queue a CODING respawn the daemon itself asks for, with no stage directive
143
- * behind it: the uncommitted-work backstop (focus/uncommitted-work-backstop.ts)
144
- * hands a teamless armed focus's dirty worktree back to its own coding lineage
145
- * (resumed, so the team that wrote the work keeps its context). It never
143
+ * behind it: the liveness pass (focus/focus-liveness-pass.ts) starts the coding
144
+ * team an armed focus's next step names when none has started -- its own coding
145
+ * lineage, resumed, so the team that wrote the work keeps its context. Whether
146
+ * it spawns is the pending-spawn gate's call on the same next step. It never
146
147
  * replaces a directive already queued -- that one spawns a team too. Returns
147
148
  * whether this call queued.
148
149
  */
@@ -161,18 +162,9 @@ export function queueDaemonCodingRespawn(args) {
161
162
  continuity: 'resume',
162
163
  contentHash: args.contentHash,
163
164
  originStageId: null,
164
- purpose: 'uncommitted_work',
165
165
  });
166
166
  return true;
167
167
  }
168
- /**
169
- * Withdraw the daemon's uncommitted-work respawn for a focus, if that is what is
170
- * queued (the worktree came clean before the team spawned). Any other directive is
171
- * left alone. Returns whether one was withdrawn.
172
- */
173
- export function withdrawDaemonCodingRespawn(focusId) {
174
- return pendingSpawnDirectives.get(focusId)?.purpose === 'uncommitted_work' && pendingSpawnDirectives.delete(focusId);
175
- }
176
168
  /**
177
169
  * Check if a focus has a pending spawn directive.
178
170
  * Used by the spawn guard to skip actionable-delivery checks.
@@ -1 +1 @@
1
- {"version":3,"file":"directive-queue.js","sourceRoot":"","sources":["../../src/directive/directive-queue.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+GAA+G;AAC/G,gBAAgB;AAEhB;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAoGzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAiC,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAyB;IAC5D,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QAChD,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,IAAI;QAChC,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,EAAE;QAClC,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,IAAI;KAC/B,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpB,CAAC;AAED;sCACsC;AACtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAIxC;IACC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACxC,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,MAAM,GAAG,GAAG,GAAG,GAAG,IA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,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,MAAM,OAAO,GAAG,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,IAAI,CAAC,CAAC;IAChD,OAAO,CAAC,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC;IACzC,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -104,7 +104,7 @@ export declare function resolveFocusStageName(input: {
104
104
  * the verdict lands. Re-firing there queued a review that ran on the unchanged
105
105
  * commit after the release had already routed the work to coding (67 same-commit
106
106
  * re-reviews measured 2026-09-30). The caller reads the hold
107
- * (focus/stranded-review-reroute.ts strandedReviewAwaitsGateVerdict).
107
+ * (focus/review-refire-gate.ts readReviewWindowGateHold).
108
108
  *
109
109
  * Pure and exported for unit testing.
110
110
  */
@@ -165,7 +165,7 @@ const REVIEW_STAGE_NAMES = new Set(['reviewing', 'review']);
165
165
  * the verdict lands. Re-firing there queued a review that ran on the unchanged
166
166
  * commit after the release had already routed the work to coding (67 same-commit
167
167
  * re-reviews measured 2026-09-30). The caller reads the hold
168
- * (focus/stranded-review-reroute.ts strandedReviewAwaitsGateVerdict).
168
+ * (focus/review-refire-gate.ts readReviewWindowGateHold).
169
169
  *
170
170
  * Pure and exported for unit testing.
171
171
  */
@@ -3,6 +3,8 @@ import { type OrphanCaptureDeps, type OrphanCaptureDisposition } from './orphan-
3
3
  import { type SessionScope } from '../queries/sessions/sessions.js';
4
4
  import { type RecoveryProbeSource } from '../daemon-state/daemon-instance.js';
5
5
  import type { CreateEscalationParams } from '../supervision/escalation-filing.js';
6
+ import { type LiveBranchPreservationDeps, type LiveFocusPopulation } from './live-branch-preservation.js';
7
+ import type { BranchRemoval } from '../daemon-state/branch-removal-record.js';
6
8
  export interface OrphanedWorktree {
7
9
  /** Absolute path to the worktree directory. */
8
10
  worktreePath: string;
@@ -36,6 +38,8 @@ export interface CleanupAction extends OrphanCaptureDisposition {
36
38
  worktreeRemoved?: boolean;
37
39
  /** True when the branch ref was preserved (kept, not deleted). */
38
40
  branchPreserved?: boolean;
41
+ /** True when `git branch -d` deleted the branch ref (recorded for the held-set publisher). */
42
+ branchDeleted?: boolean;
39
43
  /**
40
44
  * The 8-char focus-key suffix parsed from the branch name
41
45
  * (agent/<role>/<slug>-<8hexfocuskey>). Used to anchor any residual signal to
@@ -62,13 +66,10 @@ export interface RecoveryResult {
62
66
  * host probes, worktree reaping and capture) is built at the composition root
63
67
  * (composition/execution-recovery-context.ts).
64
68
  */
65
- export interface RecoveryDeps extends Omit<OrphanCaptureDeps, 'resolveFocusByKeyPrefix'>, RecoveryProbeSource {
69
+ export interface RecoveryDeps extends Omit<OrphanCaptureDeps, 'resolveFocusByKeyPrefix'>, RecoveryProbeSource, LiveBranchPreservationDeps {
66
70
  getActiveSessions: (scope: SessionScope) => Promise<AgentSession[]>;
67
- getActiveFocuses: (organizationId: string, productId?: string) => Promise<Array<{
68
- focus_id: string;
69
- focus_name: string;
70
- assigned_agent_role_id: string | null;
71
- }>>;
71
+ /** Record branches recovery deleted, so a later not-covered claim refusal can say why (daemon-state/branch-removal-record.ts). */
72
+ recordBranchRemovals: (productId: string, removals: ReadonlyArray<BranchRemoval>) => void;
72
73
  updateSession: (sessionId: string, updates: Record<string, unknown>) => Promise<unknown>;
73
74
  createEscalation: (params: CreateEscalationParams) => Promise<{
74
75
  escalationId: string | null;
@@ -92,13 +93,6 @@ export interface RecoveryDeps extends Omit<OrphanCaptureDeps, 'resolveFocusByKey
92
93
  * removed.
93
94
  */
94
95
  removeWorktreeDir: (repoPath: string, worktreePath: string) => boolean;
95
- /**
96
- * The focus ids this host holds a pending completion merge for
97
- * (merge/completion-hold-record.ts). Their worktrees are NOT orphans even when
98
- * the focus has left the active set: the completed work still has to reach
99
- * integration, and the merge-back loop drives it from that worktree.
100
- */
101
- listPendingCompletionFocusIds: (productId: string) => string[];
102
96
  }
103
97
  /**
104
98
  * The focus-key resolver: scan the product's focuses and match the 8-char
@@ -110,34 +104,18 @@ export declare function resolveFocusByKeyPrefixFromFocuses(keyPrefix: string, pr
110
104
  focusId: string;
111
105
  productId: string | null;
112
106
  } | null>;
113
- /**
114
- * Parse `git worktree list --porcelain` to build a map of
115
- * worktree path -> branch name for all registered worktrees.
116
- */
117
- export declare function parseWorktreeList(repoPath: string): Map<string, string>;
118
107
  /**
119
108
  * Scan the worktree directory and reconcile against active DB sessions
120
109
  * to classify each worktree as active or orphaned.
121
110
  */
122
- export declare function detectOrphanedWorktrees(config: DaemonConfig, deps: RecoveryDeps): Promise<OrphanedWorktree[]>;
111
+ export declare function detectOrphanedWorktrees(config: DaemonConfig, deps: RecoveryDeps,
112
+ /** What must not be removed (readLiveFocusPopulation): read once by recoverFromCrash and shared with the pruner. */
113
+ population: LiveFocusPopulation): Promise<OrphanedWorktree[]>;
123
114
  /**
124
115
  * Clean up all orphaned worktrees. Returns actions taken and
125
116
  * any preserved orphans that need escalation.
126
117
  */
127
118
  export declare function cleanupOrphanedWorktrees(orphans: OrphanedWorktree[], config: DaemonConfig, deps: RecoveryDeps): Promise<CleanupAction[]>;
128
- /**
129
- * Prune stale agent branches that have no worktree and no unmerged commits.
130
- *
131
- * Same housekeeping policy as the orphaned-worktree path: a branch with
132
- * unmerged commits is PRESERVED and LOGGED (the commits are recoverable from
133
- * the ref), never escalated. A merged branch with no worktree is safe to delete.
134
- * No path here files a needs_operator escalation -- branch-only orphans are
135
- * reality-side housekeeping the daemon owns.
136
- */
137
- export declare function pruneStaleAgentBranches(config: DaemonConfig): {
138
- pruned: string[];
139
- preserved: string[];
140
- };
141
119
  /**
142
120
  * Run full crash recovery: detect orphans, clean up, prune branches.
143
121
  *
@@ -1 +1 @@
1
- {"version":3,"file":"crash-recovery.d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,YAAY,EACpB,IAAI,EAAE,YAAY;AAClB,oHAAoH;AACpH,UAAU,EAAE,mBAAmB,GAC9B,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAsF7B;AAqLD;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,gBAAgB,EAAE,EAC3B,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,aAAa,EAAE,CAAC,CAgI1B;AAsCD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,cAAc,CAAC,CA8HzB"}
@@ -1,7 +1,8 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
2
  // Pinned by: packages/daemon/src/focus/crash-recovery-session-scope.test.ts,
3
3
  // packages/daemon/src/focus/crash-recovery.test.ts,
4
- // packages/daemon/src/focus/safety-capture-entry-points.test.ts
4
+ // packages/daemon/src/focus/safety-capture-entry-points.test.ts,
5
+ // packages/daemon/src/integration/finished-merged-active-focus-restart-regression.test.ts
5
6
  // PINNED-BY-END
6
7
  /**
7
8
  * Crash recovery: orphaned worktree cleanup and stale branch pruning.
@@ -22,6 +23,7 @@ import { ownedSessionScope } from '../queries/sessions/sessions.js';
22
23
  import { reconcileOwnedSessions } from '../daemon-state/daemon-instance.js';
23
24
  import { NO_HUMAN_ACT } from '../queries/escalations/filing-observation.js';
24
25
  import { scanAllFocuses } from '../queries/focuses/focuses.js';
26
+ import { extractFocusIdPrefix, extractFocusKeyFromBranch, parseWorktreeList, pruneStaleAgentBranches, readLiveFocusPopulation, populationKeepsWorktree, } from './live-branch-preservation.js';
25
27
  import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS } from '@telora/daemon-core';
26
28
  import { createLogger } from '../log/daemon-log.js';
27
29
  const log = createLogger({ module: 'crash-recovery' });
@@ -44,85 +46,12 @@ export async function resolveFocusByKeyPrefixFromFocuses(keyPrefix, productId) {
44
46
  return null;
45
47
  }
46
48
  }
47
- // ── Helpers ──────────────────────────────────────────────────────
48
- /**
49
- * Extract the focus ID prefix (last 8 hex chars) from a worktree directory name.
50
- * Focus worktree directories follow: agent-{role}-{name}-{8-char-id}
51
- */
52
- function extractFocusIdPrefix(dirName) {
53
- const match = dirName.match(/-([0-9a-f]{8})$/);
54
- return match ? match[1] : null;
55
- }
56
- /**
57
- * Extract the 8-char focus-key suffix from an agent BRANCH name.
58
- * Branch format: agent/<role>/<slug>-<8hexfocuskey>. The final path segment
59
- * carries the same -<8hex> suffix that extractFocusIdPrefix parses off the
60
- * worktree DIRECTORY name, so this is the branch-name analogue used to anchor a
61
- * residual signal back to the owning focus.
62
- */
63
- function extractFocusKeyFromBranch(branchName) {
64
- const lastSegment = branchName.split('/').pop() ?? branchName;
65
- return extractFocusIdPrefix(lastSegment);
66
- }
67
49
  // ── Worktree scanning ────────────────────────────────────────────
68
- /**
69
- * Parse `git worktree list --porcelain` to build a map of
70
- * worktree path -> branch name for all registered worktrees.
71
- */
72
- export function parseWorktreeList(repoPath) {
73
- const result = runGitSync(['worktree', 'list', '--porcelain'], repoPath);
74
- const map = new Map();
75
- if (!result.success)
76
- return map;
77
- let currentPath = null;
78
- for (const line of result.output.split('\n')) {
79
- if (line.startsWith('worktree ')) {
80
- currentPath = line.slice('worktree '.length);
81
- }
82
- else if (line.startsWith('branch refs/heads/') && currentPath) {
83
- map.set(currentPath, line.slice('branch refs/heads/'.length));
84
- currentPath = null;
85
- }
86
- else if (line === '') {
87
- currentPath = null;
88
- }
89
- }
90
- return map;
91
- }
92
- /**
93
- * The 8-char focus-id prefixes whose worktrees are persistent, not orphaned:
94
- * every ACTIVE focus, plus every focus this host holds a pending completion
95
- * merge for (RecoveryDeps.listPendingCompletionFocusIds) -- its completed work
96
- * still has to reach integration from that worktree.
97
- */
98
- async function readPreservedFocusIdPrefixes(config, deps) {
99
- const prefixes = new Set();
100
- try {
101
- const activeFocuses = await deps.getActiveFocuses(config.organizationId, config.productId);
102
- for (const s of activeFocuses) {
103
- prefixes.add(s.focus_id.slice(0, 8));
104
- }
105
- }
106
- catch (err) {
107
- log.warn(`[crash-recovery] Failed to query active focuses: ${err instanceof Error ? err.message : String(err)}. ` +
108
- `Persistent focus worktrees may be incorrectly classified as orphaned.`);
109
- }
110
- for (const focusId of deps.listPendingCompletionFocusIds(config.productId)) {
111
- prefixes.add(focusId.slice(0, 8));
112
- }
113
- return prefixes;
114
- }
115
- /**
116
- * Scan the worktree directory and reconcile against active DB sessions
117
- * to classify each worktree as active or orphaned.
118
- */
119
- export async function detectOrphanedWorktrees(config, deps) {
120
- const { worktreeDir, repoPath } = config;
121
- // 1. Read all subdirectories in worktreeDir
50
+ /** The subdirectories of the worktree dir (none when it does not exist). */
51
+ function listWorktreeSubdirs(worktreeDir) {
122
52
  if (!existsSync(worktreeDir))
123
53
  return [];
124
- const entries = readdirSync(worktreeDir);
125
- const subdirs = entries.filter((entry) => {
54
+ return readdirSync(worktreeDir).filter((entry) => {
126
55
  const fullPath = join(worktreeDir, entry);
127
56
  try {
128
57
  return statSync(fullPath).isDirectory();
@@ -132,6 +61,17 @@ export async function detectOrphanedWorktrees(config, deps) {
132
61
  return false;
133
62
  }
134
63
  });
64
+ }
65
+ /**
66
+ * Scan the worktree directory and reconcile against active DB sessions
67
+ * to classify each worktree as active or orphaned.
68
+ */
69
+ export async function detectOrphanedWorktrees(config, deps,
70
+ /** What must not be removed (readLiveFocusPopulation): read once by recoverFromCrash and shared with the pruner. */
71
+ population) {
72
+ const { worktreeDir, repoPath } = config;
73
+ // 1. Read all subdirectories in worktreeDir
74
+ const subdirs = listWorktreeSubdirs(worktreeDir);
135
75
  if (subdirs.length === 0)
136
76
  return [];
137
77
  // 2. Parse git worktree list to map paths -> branch names
@@ -157,8 +97,9 @@ export async function detectOrphanedWorktrees(config, deps) {
157
97
  for (const session of activeSessions) {
158
98
  branchToSession.set(session.branch_name, session);
159
99
  }
160
- // 3b. Active foci and pending completion merges keep their persistent worktrees.
161
- const activeFocusIdPrefixes = await readPreservedFocusIdPrefixes(config, deps);
100
+ // 3b. Live focuses (the migration branch population) and pending completion
101
+ // merges keep their persistent worktrees.
102
+ const activeFocusIdPrefixes = population.focusIdPrefixes;
162
103
  // 4. Classify each worktree subdirectory
163
104
  const orphans = [];
164
105
  for (const subdir of subdirs) {
@@ -187,12 +128,9 @@ export async function detectOrphanedWorktrees(config, deps) {
187
128
  log.info(`Worktree is active (has DB session): ${fullPath} [${branchName}]`);
188
129
  continue;
189
130
  }
190
- // Check if this worktree belongs to an active focus (persistent worktree)
191
- const idPrefix = extractFocusIdPrefix(subdir);
192
- if (idPrefix && activeFocusIdPrefixes.has(idPrefix)) {
193
- log.info(`Worktree belongs to an active focus or a pending completion merge (persistent): ${fullPath} [${branchName}]`);
131
+ // A live focus's worktree is persistent, merged or not (and an unread population keeps everything).
132
+ if (populationKeepsWorktree(population, subdir, fullPath, branchName))
194
133
  continue;
195
- }
196
134
  // No active session and no active focus — orphaned
197
135
  const session = branchToSession.get(branchName) ?? null;
198
136
  orphans.push({
@@ -283,6 +221,7 @@ function cleanupSingleOrphan(orphan, config, deps, capture) {
283
221
  if (deleteResult.success) {
284
222
  log.info(`Deleted merged branch: ${branchName}`);
285
223
  }
224
+ const branchDeleted = deleteResult.success;
286
225
  return {
287
226
  worktreePath,
288
227
  branchName,
@@ -291,6 +230,7 @@ function cleanupSingleOrphan(orphan, config, deps, capture) {
291
230
  focusKey,
292
231
  worktreeRemoved: true,
293
232
  branchPreserved: false,
233
+ branchDeleted,
294
234
  };
295
235
  }
296
236
  const unmergedCount = countUnmergedCommits(branchName, integrationBranch, repoPath);
@@ -460,64 +400,35 @@ export async function cleanupOrphanedWorktrees(orphans, config, deps) {
460
400
  }
461
401
  return actions;
462
402
  }
463
- // ── Stale branch pruning ─────────────────────────────────────────
464
403
  /**
465
- * List all local branches matching the agent/* pattern.
466
- */
467
- function listAgentBranches(repoPath) {
468
- const result = runGitSync(['branch', '--list', 'agent/*'], repoPath);
469
- if (!result.success)
470
- return [];
471
- return result.output
472
- .split('\n')
473
- .map((line) => line.replace(/^[*+]?\s+/, '').trim())
474
- .filter(Boolean);
475
- }
476
- /**
477
- * Prune stale agent branches that have no worktree and no unmerged commits.
478
- *
479
- * Same housekeeping policy as the orphaned-worktree path: a branch with
480
- * unmerged commits is PRESERVED and LOGGED (the commits are recoverable from
481
- * the ref), never escalated. A merged branch with no worktree is safe to delete.
482
- * No path here files a needs_operator escalation -- branch-only orphans are
483
- * reality-side housekeeping the daemon owns.
404
+ * Step 3 of recovery: prune stale agent branches (keeping every branch the live
405
+ * population names), then record every branch the pass deleted -- merged orphans
406
+ * and pruned branches -- so a migration claim later refused for a missing branch
407
+ * can name what removed it (daemon-state/branch-removal-record.ts).
484
408
  */
485
- export function pruneStaleAgentBranches(config) {
486
- const { repoPath, integrationBranch } = config;
487
- const branches = listAgentBranches(repoPath);
488
- const pruned = [];
489
- const preserved = [];
490
- if (branches.length === 0) {
491
- log.info('No stale agent branches found');
492
- return { pruned, preserved };
409
+ function pruneAndRecordRemovals(config, deps, livePopulation, result) {
410
+ let prunedBranches = [];
411
+ try {
412
+ const { pruned, preserved } = pruneStaleAgentBranches(config, livePopulation);
413
+ prunedBranches = pruned;
414
+ result.branchesPruned = pruned.length;
415
+ result.branchesPreserved = preserved.length;
493
416
  }
494
- // Get set of branches that have active worktrees
495
- const worktreeMap = parseWorktreeList(repoPath);
496
- const worktreeBranches = new Set(worktreeMap.values());
497
- for (const branch of branches) {
498
- // Skip branches with active worktrees
499
- if (worktreeBranches.has(branch))
500
- continue;
501
- // Check for unmerged commits
502
- if (branchHasUnmergedCommits(branch, integrationBranch, repoPath)) {
503
- const focusKey = extractFocusKeyFromBranch(branch);
504
- log.info(`[crash-recovery] Housekeeping: preserving stale branch with unmerged commits: ${branch}` +
505
- (focusKey ? ` (focus-key ${focusKey})` : ''));
506
- preserved.push(branch);
507
- continue;
508
- }
509
- // Safe to delete
510
- const deleteResult = runGitSync(['branch', '-D', branch], repoPath);
511
- if (deleteResult.success) {
512
- log.info(`Pruned stale branch: ${branch}`);
513
- pruned.push(branch);
514
- }
515
- else {
516
- log.warn(`Failed to prune branch ${branch}: ${deleteResult.error}`);
517
- }
417
+ catch (err) {
418
+ const msg = `Failed during branch pruning: ${err instanceof Error ? err.message : String(err)}`;
419
+ log.error(`${msg}`);
420
+ result.errors.push(msg);
518
421
  }
519
- log.info(`[crash-recovery] Branch pruning: ${pruned.length} pruned, ${preserved.length} preserved with unmerged work`);
520
- return { pruned, preserved };
422
+ if (!config.productId)
423
+ return;
424
+ const at = Date.now();
425
+ const removals = [
426
+ ...result.actions
427
+ .filter((a) => a.branchDeleted)
428
+ .map((a) => ({ branch: a.branchName, kind: 'merged_orphan', at })),
429
+ ...prunedBranches.map((branch) => ({ branch, kind: 'stale_branch', at })),
430
+ ];
431
+ deps.recordBranchRemovals(config.productId, removals);
521
432
  }
522
433
  // ── Main recovery orchestrator ───────────────────────────────────
523
434
  /**
@@ -537,10 +448,13 @@ export async function recoverFromCrash(config, deps) {
537
448
  actions: [],
538
449
  errors: [],
539
450
  };
451
+ // Step 0: Read the live focus population ONCE; the worktree classifier and the
452
+ // branch pruner both keep what it names (the migration allocator's rule).
453
+ const livePopulation = await readLiveFocusPopulation(config, deps);
540
454
  // Step 1: Detect orphaned worktrees
541
455
  let orphans;
542
456
  try {
543
- orphans = await detectOrphanedWorktrees(config, deps);
457
+ orphans = await detectOrphanedWorktrees(config, deps, livePopulation);
544
458
  result.orphansDetected = orphans.length;
545
459
  }
546
460
  catch (err) {
@@ -576,17 +490,8 @@ export async function recoverFromCrash(config, deps) {
576
490
  result.errors.push(msg);
577
491
  }
578
492
  }
579
- // Step 3: Prune stale agent branches
580
- try {
581
- const { pruned, preserved } = pruneStaleAgentBranches(config);
582
- result.branchesPruned = pruned.length;
583
- result.branchesPreserved = preserved.length;
584
- }
585
- catch (err) {
586
- const msg = `Failed during branch pruning: ${err instanceof Error ? err.message : String(err)}`;
587
- log.error(`${msg}`);
588
- result.errors.push(msg);
589
- }
493
+ // Step 3: Prune stale agent branches, then record every branch this pass deleted.
494
+ pruneAndRecordRemovals(config, deps, livePopulation, result);
590
495
  // Step 4: Mark remaining active sessions failed (DB-driven reconciliation) -- ones left
591
496
  // behind with no worktree. Every row this pass writes it stamps failed, so it reads only
592
497
  // what we OWN and closes only what is provably STOPPED: see reconcileOwnedSessions.