@telora/daemon 0.22.169 → 0.22.187

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 (254) hide show
  1. package/build-info.json +9 -3
  2. package/dist/audit/audit-floor-policy.d.ts +188 -0
  3. package/dist/audit/audit-floor-policy.d.ts.map +1 -0
  4. package/dist/audit/audit-floor-policy.js +353 -0
  5. package/dist/audit/audit-floor-policy.js.map +1 -0
  6. package/dist/audit/audit-prompt.d.ts +4 -177
  7. package/dist/audit/audit-prompt.d.ts.map +1 -1
  8. package/dist/audit/audit-prompt.js +6 -329
  9. package/dist/audit/audit-prompt.js.map +1 -1
  10. package/dist/completion/commit-verdict-release.d.ts +37 -1
  11. package/dist/completion/commit-verdict-release.d.ts.map +1 -1
  12. package/dist/completion/commit-verdict-release.js +90 -15
  13. package/dist/completion/commit-verdict-release.js.map +1 -1
  14. package/dist/completion/escalations.d.ts.map +1 -1
  15. package/dist/completion/escalations.js +3 -1
  16. package/dist/completion/escalations.js.map +1 -1
  17. package/dist/completion/review-exit-verdict-gate.d.ts +11 -5
  18. package/dist/completion/review-exit-verdict-gate.d.ts.map +1 -1
  19. package/dist/completion/review-exit-verdict-gate.js +6 -3
  20. package/dist/completion/review-exit-verdict-gate.js.map +1 -1
  21. package/dist/delivery/commit-verdict-hold.d.ts.map +1 -1
  22. package/dist/delivery/commit-verdict-hold.js +2 -1
  23. package/dist/delivery/commit-verdict-hold.js.map +1 -1
  24. package/dist/directive/stranded-review-reroute.js +1 -1
  25. package/dist/directive/stranded-review-reroute.js.map +1 -1
  26. package/dist/focus/focus-executor.d.ts.map +1 -1
  27. package/dist/focus/focus-executor.js +2 -0
  28. package/dist/focus/focus-executor.js.map +1 -1
  29. package/dist/focus/pending-review-approved-head.d.ts +1 -1
  30. package/dist/focus/pending-review-approved-head.d.ts.map +1 -1
  31. package/dist/focus/pending-review-approved-head.js +4 -3
  32. package/dist/focus/pending-review-approved-head.js.map +1 -1
  33. package/dist/focus/session-health.d.ts.map +1 -1
  34. package/dist/focus/session-health.js +2 -1
  35. package/dist/focus/session-health.js.map +1 -1
  36. package/dist/focus-stage-lifecycle/planning-release.d.ts +52 -17
  37. package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -1
  38. package/dist/focus-stage-lifecycle/planning-release.js +58 -70
  39. package/dist/focus-stage-lifecycle/planning-release.js.map +1 -1
  40. package/dist/focus-stage-lifecycle/ratify-bar-gate.d.ts +108 -0
  41. package/dist/focus-stage-lifecycle/ratify-bar-gate.d.ts.map +1 -0
  42. package/dist/focus-stage-lifecycle/ratify-bar-gate.js +174 -0
  43. package/dist/focus-stage-lifecycle/ratify-bar-gate.js.map +1 -0
  44. package/dist/git/merge-to-main.d.ts.map +1 -1
  45. package/dist/git/merge-to-main.js.map +1 -1
  46. package/dist/nexus/index.d.ts.map +1 -1
  47. package/dist/nexus/index.js +2 -1
  48. package/dist/nexus/index.js.map +1 -1
  49. package/dist/nexus/intake-prompt-sections.d.ts +70 -0
  50. package/dist/nexus/intake-prompt-sections.d.ts.map +1 -0
  51. package/dist/nexus/intake-prompt-sections.js +145 -0
  52. package/dist/nexus/intake-prompt-sections.js.map +1 -0
  53. package/dist/nexus/intake-spawn.d.ts +49 -13
  54. package/dist/nexus/intake-spawn.d.ts.map +1 -1
  55. package/dist/nexus/intake-spawn.js +45 -122
  56. package/dist/nexus/intake-spawn.js.map +1 -1
  57. package/dist/nexus/intake.d.ts +55 -0
  58. package/dist/nexus/intake.d.ts.map +1 -1
  59. package/dist/nexus/intake.js +62 -1
  60. package/dist/nexus/intake.js.map +1 -1
  61. package/dist/prd/arm-readiness.d.ts +93 -0
  62. package/dist/prd/arm-readiness.d.ts.map +1 -0
  63. package/dist/prd/arm-readiness.js +254 -0
  64. package/dist/prd/arm-readiness.js.map +1 -0
  65. package/dist/prd/arm-refusal.d.ts +149 -0
  66. package/dist/prd/arm-refusal.d.ts.map +1 -0
  67. package/dist/prd/arm-refusal.js +219 -0
  68. package/dist/prd/arm-refusal.js.map +1 -0
  69. package/dist/prd/controller-shared.d.ts +111 -0
  70. package/dist/prd/controller-shared.d.ts.map +1 -1
  71. package/dist/prd/controller-shared.js +3 -1
  72. package/dist/prd/controller-shared.js.map +1 -1
  73. package/dist/prd/controller.d.ts +16 -10
  74. package/dist/prd/controller.d.ts.map +1 -1
  75. package/dist/prd/controller.js +28 -35
  76. package/dist/prd/controller.js.map +1 -1
  77. package/dist/prd/frontier-arming.d.ts +151 -0
  78. package/dist/prd/frontier-arming.d.ts.map +1 -0
  79. package/dist/prd/frontier-arming.js +315 -0
  80. package/dist/prd/frontier-arming.js.map +1 -0
  81. package/dist/prd/index.d.ts +10 -1
  82. package/dist/prd/index.d.ts.map +1 -1
  83. package/dist/prd/index.js +9 -1
  84. package/dist/prd/index.js.map +1 -1
  85. package/dist/prd/scoping-prompt.d.ts +68 -0
  86. package/dist/prd/scoping-prompt.d.ts.map +1 -0
  87. package/dist/prd/scoping-prompt.js +86 -0
  88. package/dist/prd/scoping-prompt.js.map +1 -0
  89. package/dist/prompt/prompt-contradictions.d.ts +20 -1
  90. package/dist/prompt/prompt-contradictions.d.ts.map +1 -1
  91. package/dist/prompt/prompt-contradictions.js +35 -0
  92. package/dist/prompt/prompt-contradictions.js.map +1 -1
  93. package/dist/prompt/team-prompt-base.d.ts +18 -0
  94. package/dist/prompt/team-prompt-base.d.ts.map +1 -1
  95. package/dist/prompt/team-prompt-base.js +56 -11
  96. package/dist/prompt/team-prompt-base.js.map +1 -1
  97. package/dist/prompt-sections/persona-sections.d.ts +36 -13
  98. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  99. package/dist/prompt-sections/persona-sections.js +93 -16
  100. package/dist/prompt-sections/persona-sections.js.map +1 -1
  101. package/dist/prompt-sections/scoping-sections.d.ts +19 -5
  102. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
  103. package/dist/prompt-sections/scoping-sections.js +45 -38
  104. package/dist/prompt-sections/scoping-sections.js.map +1 -1
  105. package/dist/prompt-sections/shared.d.ts +8 -0
  106. package/dist/prompt-sections/shared.d.ts.map +1 -1
  107. package/dist/prompt-sections/shared.js.map +1 -1
  108. package/dist/queries/delivery-gate-state.js +1 -1
  109. package/dist/queries/focus-criteria-standing.d.ts +170 -7
  110. package/dist/queries/focus-criteria-standing.d.ts.map +1 -1
  111. package/dist/queries/focus-criteria-standing.js +143 -8
  112. package/dist/queries/focus-criteria-standing.js.map +1 -1
  113. package/dist/queries/focus-ratify-release.d.ts +43 -0
  114. package/dist/queries/focus-ratify-release.d.ts.map +1 -0
  115. package/dist/queries/focus-ratify-release.js +45 -0
  116. package/dist/queries/focus-ratify-release.js.map +1 -0
  117. package/dist/queries/focuses.d.ts +0 -10
  118. package/dist/queries/focuses.d.ts.map +1 -1
  119. package/dist/queries/focuses.js +2 -15
  120. package/dist/queries/focuses.js.map +1 -1
  121. package/dist/queries/prd.d.ts +31 -0
  122. package/dist/queries/prd.d.ts.map +1 -1
  123. package/dist/queries/prd.js +26 -1
  124. package/dist/queries/prd.js.map +1 -1
  125. package/dist/queries/shared.js +1 -1
  126. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
  127. package/dist/resolvers/focus-criteria-standing.js +324 -25
  128. package/dist/resolvers/focus-criteria-standing.js.map +1 -1
  129. package/dist/resolvers/shared/review-window-commits.d.ts.map +1 -1
  130. package/dist/resolvers/shared/review-window-commits.js +2 -1
  131. package/dist/resolvers/shared/review-window-commits.js.map +1 -1
  132. package/dist/security/security-auto-inject.d.ts +51 -0
  133. package/dist/security/security-auto-inject.d.ts.map +1 -1
  134. package/dist/security/security-auto-inject.js +101 -11
  135. package/dist/security/security-auto-inject.js.map +1 -1
  136. package/dist/security/security-scan-engine.d.ts +4 -4
  137. package/dist/security/security-scan-engine.d.ts.map +1 -1
  138. package/dist/security/security-scan-engine.js +6 -0
  139. package/dist/security/security-scan-engine.js.map +1 -1
  140. package/dist/session/session-lineage.d.ts.map +1 -1
  141. package/dist/session/session-lineage.js +2 -0
  142. package/dist/session/session-lineage.js.map +1 -1
  143. package/dist/shell/constants.d.ts +5 -0
  144. package/dist/shell/constants.d.ts.map +1 -1
  145. package/dist/shell/constants.js +5 -0
  146. package/dist/shell/constants.js.map +1 -1
  147. package/dist/shell/daemon-instance.d.ts +74 -64
  148. package/dist/shell/daemon-instance.d.ts.map +1 -1
  149. package/dist/shell/daemon-instance.js +16 -121
  150. package/dist/shell/daemon-instance.js.map +1 -1
  151. package/dist/shell/health-events.js +1 -1
  152. package/dist/shell/health-events.js.map +1 -1
  153. package/dist/shell/instance-liveness.d.ts +112 -0
  154. package/dist/shell/instance-liveness.d.ts.map +1 -0
  155. package/dist/shell/instance-liveness.js +205 -0
  156. package/dist/shell/instance-liveness.js.map +1 -0
  157. package/dist/shell/schema-version-gate.d.ts +22 -0
  158. package/dist/shell/schema-version-gate.d.ts.map +1 -1
  159. package/dist/shell/schema-version-gate.js +116 -6
  160. package/dist/shell/schema-version-gate.js.map +1 -1
  161. package/dist/shell/worker-pidfile.d.ts +21 -8
  162. package/dist/shell/worker-pidfile.d.ts.map +1 -1
  163. package/dist/shell/worker-pidfile.js +38 -9
  164. package/dist/shell/worker-pidfile.js.map +1 -1
  165. package/dist/spawn/lead-launch.d.ts.map +1 -1
  166. package/dist/spawn/lead-launch.js +2 -1
  167. package/dist/spawn/lead-launch.js.map +1 -1
  168. package/dist/spawn/one-shot-scoping-spawn.d.ts +51 -0
  169. package/dist/spawn/one-shot-scoping-spawn.d.ts.map +1 -0
  170. package/dist/spawn/one-shot-scoping-spawn.js +156 -0
  171. package/dist/spawn/one-shot-scoping-spawn.js.map +1 -0
  172. package/dist/spawn/process-spawn.d.ts +12 -0
  173. package/dist/spawn/process-spawn.d.ts.map +1 -1
  174. package/dist/spawn/process-spawn.js +1 -1
  175. package/dist/spawn/process-spawn.js.map +1 -1
  176. package/dist/spawn/prompt-assembly.d.ts +8 -0
  177. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  178. package/dist/spawn/prompt-assembly.js +15 -3
  179. package/dist/spawn/prompt-assembly.js.map +1 -1
  180. package/dist/spawn/worktree-session.d.ts +24 -6
  181. package/dist/spawn/worktree-session.d.ts.map +1 -1
  182. package/dist/spawn/worktree-session.js +37 -14
  183. package/dist/spawn/worktree-session.js.map +1 -1
  184. package/dist/testing/arm-coverage-model.d.ts +75 -0
  185. package/dist/testing/arm-coverage-model.d.ts.map +1 -0
  186. package/dist/testing/arm-coverage-model.js +114 -0
  187. package/dist/testing/arm-coverage-model.js.map +1 -0
  188. package/dist/testing/fixtures/index.js +1 -1
  189. package/dist/types/index.js +1 -1
  190. package/dist/verify/commit-gate-configured.d.ts.map +1 -1
  191. package/dist/verify/commit-gate-configured.js +1 -1
  192. package/dist/verify/commit-gate-configured.js.map +1 -1
  193. package/dist/verify/commit-verdict-pull.d.ts +48 -0
  194. package/dist/verify/commit-verdict-pull.d.ts.map +1 -0
  195. package/dist/verify/commit-verdict-pull.js +148 -0
  196. package/dist/verify/commit-verdict-pull.js.map +1 -0
  197. package/dist/verify/commit-verdict-record.js +1 -1
  198. package/dist/verify/credit-rearm.js +1 -1
  199. package/dist/verify/credit-rearm.js.map +1 -1
  200. package/dist/verify/default-on-guards.d.ts +74 -0
  201. package/dist/verify/default-on-guards.d.ts.map +1 -0
  202. package/dist/verify/default-on-guards.js +305 -0
  203. package/dist/verify/default-on-guards.js.map +1 -0
  204. package/dist/verify/explicit-rearm.d.ts.map +1 -1
  205. package/dist/verify/explicit-rearm.js +1 -0
  206. package/dist/verify/explicit-rearm.js.map +1 -1
  207. package/dist/verify/gate-run-registry.d.ts.map +1 -1
  208. package/dist/verify/gate-run-registry.js +1 -0
  209. package/dist/verify/gate-run-registry.js.map +1 -1
  210. package/dist/verify/judged-ancestor.d.ts +41 -0
  211. package/dist/verify/judged-ancestor.d.ts.map +1 -0
  212. package/dist/verify/judged-ancestor.js +101 -0
  213. package/dist/verify/judged-ancestor.js.map +1 -0
  214. package/dist/verify/no-own-delta-verdict.d.ts +7 -2
  215. package/dist/verify/no-own-delta-verdict.d.ts.map +1 -1
  216. package/dist/verify/no-own-delta-verdict.js +14 -17
  217. package/dist/verify/no-own-delta-verdict.js.map +1 -1
  218. package/dist/verify/rework-attribution.d.ts +71 -0
  219. package/dist/verify/rework-attribution.d.ts.map +1 -0
  220. package/dist/verify/rework-attribution.js +263 -0
  221. package/dist/verify/rework-attribution.js.map +1 -0
  222. package/dist/verify/shortfall-rulings.d.ts.map +1 -1
  223. package/dist/verify/shortfall-rulings.js +3 -2
  224. package/dist/verify/shortfall-rulings.js.map +1 -1
  225. package/dist/verify/verification-boundary-env.d.ts +70 -17
  226. package/dist/verify/verification-boundary-env.d.ts.map +1 -1
  227. package/dist/verify/verification-boundary-env.js +88 -14
  228. package/dist/verify/verification-boundary-env.js.map +1 -1
  229. package/dist/verify/verification-commit-sharing.d.ts.map +1 -1
  230. package/dist/verify/verification-commit-sharing.js +2 -1
  231. package/dist/verify/verification-commit-sharing.js.map +1 -1
  232. package/dist/verify/verification-config.d.ts.map +1 -1
  233. package/dist/verify/verification-config.js +1 -0
  234. package/dist/verify/verification-config.js.map +1 -1
  235. package/dist/verify/verification-default-on.d.ts +0 -32
  236. package/dist/verify/verification-default-on.d.ts.map +1 -1
  237. package/dist/verify/verification-default-on.js +10 -234
  238. package/dist/verify/verification-default-on.js.map +1 -1
  239. package/dist/verify/verification-deps-default.d.ts.map +1 -1
  240. package/dist/verify/verification-deps-default.js +9 -0
  241. package/dist/verify/verification-deps-default.js.map +1 -1
  242. package/dist/verify/verification-engine.d.ts +2 -1
  243. package/dist/verify/verification-engine.d.ts.map +1 -1
  244. package/dist/verify/verification-engine.js +12 -4
  245. package/dist/verify/verification-engine.js.map +1 -1
  246. package/dist/verify/verification-feedback.d.ts +1 -1
  247. package/dist/verify/verification-feedback.d.ts.map +1 -1
  248. package/dist/verify/verification-feedback.js +5 -0
  249. package/dist/verify/verification-feedback.js.map +1 -1
  250. package/dist/verify/verification-rework-issue.d.ts +48 -7
  251. package/dist/verify/verification-rework-issue.d.ts.map +1 -1
  252. package/dist/verify/verification-rework-issue.js +111 -9
  253. package/dist/verify/verification-rework-issue.js.map +1 -1
  254. package/package.json +2 -2
@@ -141,9 +141,10 @@ async function declinedHead(focus, target, deps) {
141
141
  }
142
142
  /**
143
143
  * A declined review does not leave a FAILED gate verdict at that head unanswered:
144
- * no review will run there, so the failure is filed as rework on the focus's
145
- * verify deliveries (deduped per commit, skipped beside open work) and a coding
146
- * pass fixes it. Best-effort; a verdict read that throws files nothing.
144
+ * no review will run there, so the failure is filed as rework on the verify
145
+ * delivery whose commits caused it (verify/rework-attribution.ts; deduped per
146
+ * commit, skipped beside open work) and a coding pass fixes it. Best-effort; a
147
+ * verdict read that throws files nothing.
147
148
  */
148
149
  async function reworkFailedVerdictAtDeclinedHead(focus, target, sha, deps) {
149
150
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"pending-review-approved-head.js","sourceRoot":"","sources":["../../src/focus/pending-review-approved-head.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6EAA6E;AAC7E,+DAA+D;AAC/D,2FAA2F;AAC3F,mFAAmF;AACnF,2FAA2F;AAC3F,kFAAkF;AAClF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAGvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAA8B,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,iBAAiB,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G,EAAE,EAC7B,6CAA6C,KAAK,CAAC,UAAU,eAAe,EAAE,IAAI,GAAG,2BAA2B;QAChH,qBAAqB;QACrB,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,2GAA2G,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5I,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"pending-review-approved-head.js","sourceRoot":"","sources":["../../src/focus/pending-review-approved-head.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6EAA6E;AAC7E,+DAA+D;AAC/D,2FAA2F;AAC3F,mFAAmF;AACnF,2FAA2F;AAC3F,kFAAkF;AAClF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAGvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAA8B,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAsB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AAmCjD,mFAAmF;AACnF,+EAA+E;AAC/E,4EAA4E;AAC5E,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B,mFAAmF;AACnF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AYG;IACH,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,sBAAsB,CAAC;IACtE;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAC/B,cAAc,GACd,eAAe,GACf,cAAc,GACd,cAAc;AAChB,uEAAuE;GACrE,oBAAoB;AACtB,oFAAoF;GAClF,qBAAqB;AACvB,6EAA6E;GAC3E,kBAAkB,CAAC;AAEvB,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,uCAAuC;IACvC,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;CACtF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,oBAAoB,GACxB,qBAAqB,CAiFvB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,GAAG,EAAE,oBAAoB,GACxB,qBAAqB,EAAE,CAEzB"}
@@ -1,6 +1,7 @@
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/session-close-producers.test.ts,
3
- // packages/daemon/src/focus/session-health.test.ts, packages/daemon/src/focus/session-process-reap.test.ts
3
+ // packages/daemon/src/focus/session-health.test.ts, packages/daemon/src/focus/session-process-reap.test.ts,
4
+ // packages/daemon/src/shell/daemon-instance.test.ts
4
5
  // PINNED-BY-END
5
6
  /**
6
7
  * Grace period: a session started within this window is left alone even if it
@@ -1 +1 @@
1
- {"version":3,"file":"session-health.js","sourceRoot":"","sources":["../../src/focus/session-health.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,6GAA6G;AAC7G,gBAAgB;AAkChB;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAEzE,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,OAA4C;IAC1E,OAAO,OAAO,CAAC,aAAa,IAAI,IAAI,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA+C;IACjF,MAAM,SAAS,GAAG,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC;IACtD,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC;AAwED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAqB,EACrB,GAAyB;IAEzB,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,8BAA8B,CAAC;IAC9D,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG;QACX,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,OAAO,EAAE,OAAO,CAAC,QAAQ;QACzB,UAAU,EAAE,OAAO,CAAC,WAAW;QAC/B,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;IAEF,8EAA8E;IAC9E,oEAAoE;IACpE,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,qBAAqB,CAAC,GAAG,CAAC,OAAO,CAAC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AAO,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACxE,CAAC;IAED,gFAAgF;IAChF,2EAA2E;IAC3E,4EAA4E;IAC5E,8EAA8E;IAC9E,4DAA4D;IAC5D,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3D,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACzE,CAAC;IAED,uEAAuE;IACvE,2EAA2E;IAC3E,gFAAgF;IAChF,OAAO;QACL,GAAG,IAAI;QACP,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa;KAClD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAiC,EACjC,GAAyB;IAEzB,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC"}
@@ -3,7 +3,9 @@
3
3
  *
4
4
  * Owns the two planning->queued release paths:
5
5
  * - `releaseRatifiedReadOnlyFocus` -- the SOLE human-ratified planning->execution
6
- * crossing for a read-only audit focus.
6
+ * crossing for a read-only audit focus. Gated by `ratify-bar-gate.ts`: that
7
+ * crossing is the audit focus's go-signal, so it states a bar or it does
8
+ * not happen.
7
9
  * - `releaseWritableFocusPlanningDeliveries` -- the writable-focus analogue that
8
10
  * closes the silent born-planning wedge for a normal execute focus.
9
11
  *
@@ -12,9 +14,11 @@
12
14
  *
13
15
  * @module focus-stage-lifecycle/planning-release
14
16
  */
15
- import { getFocusDeliveries as defaultGetFocusDeliveries, updateFocusReadOnly as defaultUpdateFocusReadOnly } from '../queries/focuses.js';
17
+ import { getFocusDeliveries as defaultGetFocusDeliveries } from '../queries/focuses.js';
18
+ import { ratifyReleaseFocus as defaultRatifyReleaseFocus } from '../queries/focus-ratify-release.js';
16
19
  import { updateDeliveryStatus as defaultUpdateDeliveryStatus } from '../queries/deliveries.js';
17
20
  import { emitLoopTrigger } from '../loops/index.js';
21
+ import { holdRatifyForUnstatedBar as defaultHoldRatifyForUnstatedBar, noteRatifyFlipFailure as defaultNoteRatifyFlipFailure } from './ratify-bar-gate.js';
18
22
  /**
19
23
  * Pure predicate: a read-only focus is ready to cross planning->execution
20
24
  * exactly when a human has ratified its remediation plan.
@@ -38,33 +42,64 @@ export declare function isFocusRatifiedForExecute(focus: {
38
42
  /**
39
43
  * Dependencies for `releaseRatifiedReadOnlyFocus`. Defaults reach for the real
40
44
  * query modules; tests pass stub implementations.
45
+ *
46
+ * ONE write dep, not three. The crossing used to fetch the deliveries, queue
47
+ * them one at a time, and flip read_only afterwards; it now hands the whole
48
+ * crossing to `ratifyReleaseFocus` (the `ratify_release_focus` RPC), because
49
+ * the two halves must succeed or fail TOGETHER -- see the function below.
41
50
  */
42
51
  export interface RatifyReleaseDeps {
43
- getFocusDeliveries: typeof defaultGetFocusDeliveries;
44
- updateFocusReadOnly: typeof defaultUpdateFocusReadOnly;
45
- updateDeliveryStatus: typeof defaultUpdateDeliveryStatus;
52
+ /** The whole crossing, as ONE database transaction. */
53
+ ratifyReleaseFocus: typeof defaultRatifyReleaseFocus;
46
54
  emitLoopTrigger: typeof emitLoopTrigger;
55
+ /**
56
+ * The BAR pre-check (`ratify-bar-gate.ts`). True => this crossing states no
57
+ * future to judge the released work against, so do not attempt it.
58
+ */
59
+ holdRatifyForUnstatedBar: typeof defaultHoldRatifyForUnstatedBar;
60
+ /** The recorder for a refusal that arrives at the crossing anyway. */
61
+ noteRatifyFlipFailure: typeof defaultNoteRatifyFlipFailure;
47
62
  }
48
63
  /**
49
64
  * The SOLE planning->execution crossing for a read-only audit focus.
50
65
  *
51
66
  * When `isFocusRatifiedForExecute(focus)` holds (read_only=true AND a human
52
- * stamped ratified_at), atomically-in-effect:
67
+ * stamped ratified_at), cross ATOMICALLY:
53
68
  * (a) flip read_only=false, and
54
69
  * (b) release every held delivery (execution_status 'planning') to 'queued'.
55
70
  *
56
- * This is the ONLY path that does either, which is what makes the gate
57
- * non-procedural: the gate cannot be crossed by an agent or a stage transition;
58
- * it requires the distinct human ratification signal that this function reads.
71
+ * ATOMICALLY IS THE WHOLE POINT, AND IT IS NOT THIS FUNCTION'S DOING. Both
72
+ * writes happen inside `ratify_release_focus(p_focus_id)`, one database
73
+ * transaction (migration 20260922173056). Ratification is an audit focus's
74
+ * go-signal, so the database refuses the read_only flip when the focus states
75
+ * no future to judge the released work against -- and a refusal is only a
76
+ * refusal if it can still stop the release.
77
+ *
78
+ * It could not, and no ORDERING could make it. This function used to do the
79
+ * two writes itself, deliberately releasing FIRST: flipping first makes the
80
+ * re-entry predicate fail, so a partial release would be abandoned with
81
+ * deliveries stranded in 'planning'. Release-then-flip meant a refusal arriving
82
+ * on the flip left every delivery already at 'queued' -- actionable work that
83
+ * ready-focus discovery does not exclude -- under the empty bar the refusal had
84
+ * just rejected (review finding, issue d8985d50). One transaction dissolves the
85
+ * dilemma: a refusal rolls the release back with it, and a success commits both
86
+ * halves, so neither half-crossing exists.
87
+ *
88
+ * `holdRatifyForUnstatedBar` (`ratify-bar-gate.ts`) still runs first. It is no
89
+ * longer load-bearing for correctness -- the transaction is -- but it turns the
90
+ * common "the audit stated no future yet" case into a cheap, RECORDED hold
91
+ * instead of a round trip that raises, and it is where the operator-facing
92
+ * record is written.
59
93
  *
60
- * Idempotent by construction:
61
- * - flipping read_only=false first means the predicate fails on re-entry, so a
62
- * second tick is a no-op;
63
- * - the delivery move is guarded to ONLY touch 'planning' rows, so deliveries
64
- * already queued (or further along) are left untouched.
94
+ * Idempotent by construction, at the database: the RPC takes the focus row FOR
95
+ * UPDATE and re-evaluates the crossing predicate against it, so a second tick
96
+ * (or a lost race) writes nothing and answers `crossed: false`. The release is
97
+ * scoped to 'planning' rows, so deliveries already queued or further along are
98
+ * untouched.
65
99
  *
66
- * Returns the number of deliveries released (0 when the predicate does not hold
67
- * or there were no held deliveries).
100
+ * Returns the number of deliveries released (0 when the predicate does not
101
+ * hold, the bar gate held, the crossing was refused, or there were no held
102
+ * deliveries).
68
103
  *
69
104
  * Runs regardless of stage: a read-only audit focus may sit at planning/queued/
70
105
  * in_progress, so this is NOT gated on focus.stage.
@@ -162,7 +197,7 @@ export declare function isWritableFocusPastKickoff(input: {
162
197
  /**
163
198
  * Dependencies for `releaseWritableFocusPlanningDeliveries`. A strict subset of
164
199
  * `RatifyReleaseDeps` -- there is no read_only flip here (the focus is already
165
- * writable), so no `updateFocusReadOnly`. `hasActiveTeam` is the kickoff-window
200
+ * writable), so no read_only flip and no atomic crossing RPC. `hasActiveTeam` is the kickoff-window
166
201
  * discriminator (see `isWritableFocusPastKickoff`); injected so tests can drive it.
167
202
  */
168
203
  export interface WritableReleaseDeps {
@@ -1 +1 @@
1
- {"version":3,"file":"planning-release.d.ts","sourceRoot":"","sources":["../../src/focus-stage-lifecycle/planning-release.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,kBAAkB,IAAI,yBAAyB,EAC/C,mBAAmB,IAAI,0BAA0B,EAClD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE/F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,GAAG,OAAO,CAEV;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,OAAO,yBAAyB,CAAC;IACrD,mBAAmB,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AE,MAAM,KAAK,OAAO,CAAC;CAC7C;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAsB,sCAAsC,CAC1D,KAAK,EAAE;IACL,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yFAAyF;IACzF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC,EACD,IAAI,GAAE,mBAAgD,GACrD,OAAO,CAAC,MAAM,CAAC,CAyFjB"}
@@ -6,7 +6,9 @@
6
6
  *
7
7
  * Owns the two planning->queued release paths:
8
8
  * - `releaseRatifiedReadOnlyFocus` -- the SOLE human-ratified planning->execution
9
- * crossing for a read-only audit focus.
9
+ * crossing for a read-only audit focus. Gated by `ratify-bar-gate.ts`: that
10
+ * crossing is the audit focus's go-signal, so it states a bar or it does
11
+ * not happen.
10
12
  * - `releaseWritableFocusPlanningDeliveries` -- the writable-focus analogue that
11
13
  * closes the silent born-planning wedge for a normal execute focus.
12
14
  *
@@ -15,13 +17,15 @@
15
17
  *
16
18
  * @module focus-stage-lifecycle/planning-release
17
19
  */
18
- import { getFocusDeliveries as defaultGetFocusDeliveries, updateFocusReadOnly as defaultUpdateFocusReadOnly, } from '../queries/focuses.js';
20
+ import { getFocusDeliveries as defaultGetFocusDeliveries } from '../queries/focuses.js';
21
+ import { ratifyReleaseFocus as defaultRatifyReleaseFocus } from '../queries/focus-ratify-release.js';
19
22
  import { updateDeliveryStatus as defaultUpdateDeliveryStatus } from '../queries/deliveries.js';
20
23
  import { DELIVERY_STATUS, isExecutionStatus, isValidTransition } from '@telora/daemon-core';
21
24
  import { emitLoopTrigger } from '../loops/index.js';
22
25
  import { deriveFocusPhase, PRE_EXECUTION_STATUSES } from '../focus/focus-phase.js';
23
26
  import { hasActiveTeam as defaultHasActiveTeam } from '../focus/focus-team-state.js';
24
27
  import { isAuditPhaseFocus } from '../audit/audit-shape.js';
28
+ import { holdRatifyForUnstatedBar as defaultHoldRatifyForUnstatedBar, noteRatifyFlipFailure as defaultNoteRatifyFlipFailure, } from './ratify-bar-gate.js';
25
29
  import { createLogger } from '../shell/log.js';
26
30
  const log = createLogger({ module: 'focus-stage-lifecycle' });
27
31
  // ── Ratify-to-execute release (Safe audit-to-remediation D3) ──────
@@ -45,31 +49,51 @@ export function isFocusRatifiedForExecute(focus) {
45
49
  return focus.readOnly === true && focus.ratifiedAt != null;
46
50
  }
47
51
  const defaultRatifyReleaseDeps = {
48
- getFocusDeliveries: defaultGetFocusDeliveries,
49
- updateFocusReadOnly: defaultUpdateFocusReadOnly,
50
- updateDeliveryStatus: defaultUpdateDeliveryStatus,
52
+ ratifyReleaseFocus: defaultRatifyReleaseFocus,
51
53
  emitLoopTrigger,
54
+ holdRatifyForUnstatedBar: defaultHoldRatifyForUnstatedBar,
55
+ noteRatifyFlipFailure: defaultNoteRatifyFlipFailure,
52
56
  };
53
57
  /**
54
58
  * The SOLE planning->execution crossing for a read-only audit focus.
55
59
  *
56
60
  * When `isFocusRatifiedForExecute(focus)` holds (read_only=true AND a human
57
- * stamped ratified_at), atomically-in-effect:
61
+ * stamped ratified_at), cross ATOMICALLY:
58
62
  * (a) flip read_only=false, and
59
63
  * (b) release every held delivery (execution_status 'planning') to 'queued'.
60
64
  *
61
- * This is the ONLY path that does either, which is what makes the gate
62
- * non-procedural: the gate cannot be crossed by an agent or a stage transition;
63
- * it requires the distinct human ratification signal that this function reads.
65
+ * ATOMICALLY IS THE WHOLE POINT, AND IT IS NOT THIS FUNCTION'S DOING. Both
66
+ * writes happen inside `ratify_release_focus(p_focus_id)`, one database
67
+ * transaction (migration 20260922173056). Ratification is an audit focus's
68
+ * go-signal, so the database refuses the read_only flip when the focus states
69
+ * no future to judge the released work against -- and a refusal is only a
70
+ * refusal if it can still stop the release.
71
+ *
72
+ * It could not, and no ORDERING could make it. This function used to do the
73
+ * two writes itself, deliberately releasing FIRST: flipping first makes the
74
+ * re-entry predicate fail, so a partial release would be abandoned with
75
+ * deliveries stranded in 'planning'. Release-then-flip meant a refusal arriving
76
+ * on the flip left every delivery already at 'queued' -- actionable work that
77
+ * ready-focus discovery does not exclude -- under the empty bar the refusal had
78
+ * just rejected (review finding, issue d8985d50). One transaction dissolves the
79
+ * dilemma: a refusal rolls the release back with it, and a success commits both
80
+ * halves, so neither half-crossing exists.
64
81
  *
65
- * Idempotent by construction:
66
- * - flipping read_only=false first means the predicate fails on re-entry, so a
67
- * second tick is a no-op;
68
- * - the delivery move is guarded to ONLY touch 'planning' rows, so deliveries
69
- * already queued (or further along) are left untouched.
82
+ * `holdRatifyForUnstatedBar` (`ratify-bar-gate.ts`) still runs first. It is no
83
+ * longer load-bearing for correctness -- the transaction is -- but it turns the
84
+ * common "the audit stated no future yet" case into a cheap, RECORDED hold
85
+ * instead of a round trip that raises, and it is where the operator-facing
86
+ * record is written.
70
87
  *
71
- * Returns the number of deliveries released (0 when the predicate does not hold
72
- * or there were no held deliveries).
88
+ * Idempotent by construction, at the database: the RPC takes the focus row FOR
89
+ * UPDATE and re-evaluates the crossing predicate against it, so a second tick
90
+ * (or a lost race) writes nothing and answers `crossed: false`. The release is
91
+ * scoped to 'planning' rows, so deliveries already queued or further along are
92
+ * untouched.
93
+ *
94
+ * Returns the number of deliveries released (0 when the predicate does not
95
+ * hold, the bar gate held, the crossing was refused, or there were no held
96
+ * deliveries).
73
97
  *
74
98
  * Runs regardless of stage: a read-only audit focus may sit at planning/queued/
75
99
  * in_progress, so this is NOT gated on focus.stage.
@@ -77,68 +101,32 @@ const defaultRatifyReleaseDeps = {
77
101
  export async function releaseRatifiedReadOnlyFocus(focus, deps = defaultRatifyReleaseDeps) {
78
102
  if (!isFocusRatifiedForExecute(focus))
79
103
  return 0;
80
- // Crash-safety ordering: release held deliveries FIRST, and flip
81
- // read_only=false ONLY after every held 'planning' delivery has been queued.
82
- // The flip is what makes the predicate fail on re-entry, so deferring it
83
- // until the release is complete means a crash (or a partial failure)
84
- // mid-release leaves the predicate TRUE (read_only still true) and the next
85
- // tick retries the whole release. Flipping first would orphan any
86
- // not-yet-released held delivery: the predicate would already be false and
87
- // those deliveries would never be queued.
88
- // (a) Release held deliveries: planning -> queued. Guarded so only 'planning'
89
- // rows move; anything already queued/further-along is left untouched
90
- // (idempotency + safety).
91
- let deliveries;
104
+ // ASK FIRST: does this crossing state a bar? A hold costs one poll tick and
105
+ // records the reason where an operator reads it.
106
+ if (await deps.holdRatifyForUnstatedBar(focus))
107
+ return 0;
108
+ let result;
92
109
  try {
93
- deliveries = await deps.getFocusDeliveries(focus.focusId);
110
+ result = await deps.ratifyReleaseFocus(focus.focusId);
94
111
  }
95
112
  catch (err) {
96
- log.warn(`[focus-stage-lifecycle] Ratify-release: failed to fetch deliveries to ` +
97
- `release for "${focus.focusName}" (leaving read_only=true to retry next ` +
98
- `tick): ${err.message}`);
113
+ // A refusal the pre-check did not catch (the two read the tree seconds
114
+ // apart, through different paths) degrades to held+recorded, never to a
115
+ // crash and never to a silent log line. NOTHING was released: the refusal
116
+ // aborted the transaction that would have released it.
117
+ await deps.noteRatifyFlipFailure(focus, err);
99
118
  return 0;
100
119
  }
101
- let released = 0;
102
- let allReleased = true;
103
- for (const d of deliveries) {
104
- // Ratify-release stays scoped to 'planning' (NOT the wider pre_execution set
105
- // the writable path sweeps): audit remediation deliveries are born 'planning',
106
- // never 'draft', so there is no draft to release here. Keeping this narrow also
107
- // keeps the human-ratify gate the SOLE crossing for audit focuses.
108
- if (d.executionStatus !== DELIVERY_STATUS.PLANNING)
109
- continue;
110
- try {
111
- await deps.updateDeliveryStatus(d.id, DELIVERY_STATUS.QUEUED, undefined, undefined, undefined, { organizationId: focus.organizationId, fromStatus: DELIVERY_STATUS.PLANNING });
112
- released += 1;
113
- }
114
- catch (err) {
115
- allReleased = false;
116
- log.warn(`[focus-stage-lifecycle] Ratify-release: failed to queue held delivery ` +
117
- `${d.id.slice(0, 8)} on "${focus.focusName}": ${err.message}`);
118
- }
119
- }
120
- // (b) Flip read_only=false ONLY when every held delivery was queued. If any
121
- // release failed, leave read_only=true so the predicate stays satisfied and
122
- // the next tick retries the (planning-only, idempotent) release -- never
123
- // crossing the gate with held deliveries still stuck in planning.
124
- if (!allReleased) {
125
- log.warn(`[focus-stage-lifecycle] Ratify-release: not all held deliveries queued ` +
126
- `for "${focus.focusName}" (released ${released}); leaving read_only=true ` +
127
- `to retry next tick.`);
128
- return released;
129
- }
130
- try {
131
- await deps.updateFocusReadOnly(focus.focusId, false);
132
- }
133
- catch (err) {
134
- log.warn(`[focus-stage-lifecycle] Ratify-release: held deliveries queued for ` +
135
- `"${focus.focusName}" but failed to flip read_only=false (will retry ` +
136
- `next tick): ${err.message}`);
137
- return released;
120
+ if (!result.crossed) {
121
+ // The RPC re-read the predicate and found no crossing to make -- already
122
+ // crossed by an earlier tick, or ratified_at cleared under us. Not an
123
+ // error, and nothing was written.
124
+ return 0;
138
125
  }
126
+ const { released } = result;
139
127
  log.info(`[focus-stage-lifecycle] Focus "${focus.focusName}" ratified -> execute: ` +
140
128
  `read_only=false, released ${released} held planning ` +
141
- `deliver${released === 1 ? 'y' : 'ies'} to queued.`);
129
+ `deliver${released === 1 ? 'y' : 'ies'} to queued (one transaction).`);
142
130
  deps.emitLoopTrigger({
143
131
  type: 'focus_status_changed',
144
132
  focusId: focus.focusId,
@@ -1 +1 @@
1
- {"version":3,"file":"planning-release.js","sourceRoot":"","sources":["../../src/focus-stage-lifecycle/planning-release.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0F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ACJ,eAAe,CAAC,MAAM,EACtB,SAAS,EACT,SAAS,EACT,SAAS,EACT,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,CAC7D,CAAC;YACF,QAAQ,IAAI,CAAC,CAAC;QAChB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CACN,0EAA0E;gBAC1E,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,KAAK,CAAC,SAAS,MAAO,GAAa,CAAC,OAAO,EAAE,CACzE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QACjB,GAAG,CAAC,IAAI,CACN,kCAAkC,KAAK,CAAC,SAAS,8BAA8B;YAC/E,YAAY,QAAQ,8BAA8B,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,aAAa,CAC5F,CAAC;QACF,IAAI,CAAC,eAAe,CAAC;YACnB,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,gCAAgC;SACzC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * THE RATIFY CROSSING STATES A BAR, OR IT DOES NOT HAPPEN.
3
+ *
4
+ * WHY THIS EXISTS. A read_only (audit) focus is armed in order to go and
5
+ * DISCOVER what its tree should say, so its role arm states no bar and the
6
+ * database does not refuse it -- it stamps an honest empty `[]`. That empty
7
+ * stamp used to be treated as harmless, on the reasoning that nothing waits on
8
+ * an audit focus's bar. It is not harmless: `releaseRatifiedReadOnlyFocus`
9
+ * (planning-release.ts) later releases the focus's held 'planning' deliveries
10
+ * to 'queued' and flips read_only=false with NO new arm and NO re-stamp, so
11
+ * execution proceeded under a bar that stated nothing and no reviewer could
12
+ * hold the work against anything (review finding, delivery 3e6bacf5).
13
+ *
14
+ * So the rule binds the write that IS the audit focus's go-signal. Migration
15
+ * 20260922173056 refuses the read_only TRUE -> FALSE crossing when the focus
16
+ * states no bar, and re-stamps the whole baseline from the CURRENT tree when it
17
+ * does. This module is the daemon's half of that: ASK FIRST, so the refusal
18
+ * never has to arrive in the middle of a crossing that has already queued
19
+ * deliveries.
20
+ *
21
+ * WHY ASKING FIRST MATTERS HERE and not merely as politeness: the crossing is
22
+ * deliberately ordered release-then-flip, so that a partial release retries
23
+ * (see planning-release.ts). A refusal landing on the flip would therefore
24
+ * leave the deliveries queued and read_only still true -- released work under
25
+ * an audit flag, the worst of both. Holding BEFORE the release keeps the focus
26
+ * exactly where it was.
27
+ *
28
+ * FAIL CLOSED = HOLD. An unreadable bar holds the crossing, because crossing on
29
+ * an unproven bar spends the human's ratification on a run nobody can judge,
30
+ * and only a new ratification restores it. A hold costs one poll tick.
31
+ *
32
+ * WHAT IS RECORDED, AND WHERE. The same `focus_debug_artifacts` section the PRD
33
+ * frontier's refused arm uses (`arm_refused`, one row per focus, rendered on
34
+ * the focus Debug tab, read by NOTHING in the machine's decision path) through
35
+ * the same writer (`prd/arm-refusal.ts` `recordArmRefusalSection`), so there is
36
+ * one row and one since-when line rather than two vocabularies for "this focus
37
+ * states no future". Only a READABLE refusal is recorded: "the tree says this
38
+ * focus states nothing" is a finding an operator acts on, while "I could not
39
+ * read the tree" is a transient the next tick retries, and recording the second
40
+ * as the first would put a permanent-looking note on a healthy focus.
41
+ *
42
+ * NOTHING HERE ESCALATES. An audit whose findings state no future is a waiting
43
+ * state whose fix is a restatement on a tree node -- work an agent does, not a
44
+ * question for a human queue.
45
+ *
46
+ * @module focus-stage-lifecycle/ratify-bar-gate
47
+ */
48
+ import { readFocusStatesABar as defaultReadFocusStatesABar } from '../prd/arm-readiness.js';
49
+ import { clearArmRefusal as defaultClearArmRefusal, recordArmRefusalSection as defaultRecordArmRefusalSection } from '../prd/arm-refusal.js';
50
+ /** The focus identity this gate reads and reports on. */
51
+ export interface RatifyBarFocus {
52
+ focusId: string;
53
+ focusName: string;
54
+ }
55
+ /** Injectable seam (tests drive it with no API and no mock.module). */
56
+ export interface RatifyBarGateDeps {
57
+ readFocusStatesABar: typeof defaultReadFocusStatesABar;
58
+ recordArmRefusalSection: typeof defaultRecordArmRefusalSection;
59
+ clearArmRefusal: typeof defaultClearArmRefusal;
60
+ now: () => Date;
61
+ }
62
+ /** Production wiring. */
63
+ export declare const defaultRatifyBarGateDeps: RatifyBarGateDeps;
64
+ /**
65
+ * Render the operator-facing record. PURE.
66
+ *
67
+ * `detail` is whatever named the refusal: the daemon's own reading of the tree
68
+ * when it held the crossing, or the DATABASE's verbatim message when a refusal
69
+ * arrived anyway. Neither is re-worded -- the node list is the half a human
70
+ * needs and only the reader that produced it could resolve.
71
+ */
72
+ export declare function renderRatifyBarRefusalArtifact(args: {
73
+ focusName: string;
74
+ focusId: string;
75
+ detail: string;
76
+ observedAt: string;
77
+ /** True when the DATABASE refused the write; false when the daemon held first. */
78
+ refusedByDatabase: boolean;
79
+ }, since: string): string;
80
+ /**
81
+ * Should the ratify crossing be held? Answered BEFORE anything is released.
82
+ *
83
+ * `true` => hold: release nothing, leave read_only=true, and the next tick asks
84
+ * again. The reason is logged, and a readable refusal is also recorded durably.
85
+ * `false` => the focus states a bar; any stale record is cleared and the
86
+ * crossing proceeds.
87
+ */
88
+ export declare function holdRatifyForUnstatedBar(focus: RatifyBarFocus, deps?: RatifyBarGateDeps): Promise<boolean>;
89
+ /**
90
+ * The backstop: a refusal that arrived ANYWAY, on the read_only flip itself.
91
+ *
92
+ * The pre-check and the trigger read the tree at two different instants and
93
+ * through two different paths (the injection bundle's `nowTargets` vs the
94
+ * `targets` edges), so they CAN disagree without either being wrong. When they
95
+ * do, the crossing degrades to "held, recorded" -- never to a crash and never
96
+ * to a silent log line -- and the next tick re-asks. A failure that is NOT the
97
+ * criteria refusal is logged as before and records nothing: it is an ordinary
98
+ * transient, not a statement about this focus's bar.
99
+ *
100
+ * RECOGNITION DEPENDS ON THE EDGE CARRYING THE TEXT. `daemon_update_focus_status`
101
+ * answers a refused flip with the database's message verbatim and
102
+ * `code: 'arm_criteria_required'`. In the deploy-order window -- migration live,
103
+ * edge function not -- the same refusal comes back as an opaque 500, so it is
104
+ * logged and held but not recorded. That degradation is deliberate: the
105
+ * alternative is recording every transient as a statement about the bar.
106
+ */
107
+ export declare function noteRatifyFlipFailure(focus: RatifyBarFocus, err: unknown, deps?: RatifyBarGateDeps): Promise<void>;
108
+ //# sourceMappingURL=ratify-bar-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratify-bar-gate.d.ts","sourceRoot":"","sources":["../../src/focus-stage-lifecycle/ratify-bar-gate.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EACL,mBAAmB,IAAI,0BAA0B,EAElD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,eAAe,IAAI,sBAAsB,EACzC,uBAAuB,IAAI,8BAA8B,EAC1D,MAAM,uBAAuB,CAAC;AAK/B,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,OAAO,0BAA0B,CAAC;IACvD,uBAAuB,EAAE,OAAO,8BAA8B,CAAC;IAC/D,eAAe,EAAE,OAAO,sBAAsB,CAAC;IAC/C,GAAG,EAAE,MAAM,IAAI,CAAC;CACjB;AAED,yBAAyB;AACzB,eAAO,MAAM,wBAAwB,EAAE,iBAKtC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAA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