@wildo-ai/dev-companion 1.1.13 → 1.1.14

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 (256) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +21 -0
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +37 -4
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  7. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +9 -2
  8. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  9. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +66 -0
  10. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  11. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +183 -7
  12. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  13. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +6 -2
  14. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  15. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +16 -39
  16. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  17. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +31 -2
  18. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
  19. package/dist/esm/companion-api/companion-api.schemas.d.ts +2 -0
  20. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  21. package/dist/esm/companion-api/companion-api.schemas.js +8 -0
  22. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  23. package/dist/esm/companion-api/controllers/companion.controller.d.ts +7 -0
  24. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  25. package/dist/esm/companion-api/controllers/companion.controller.js +26 -12
  26. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  27. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts +17 -0
  28. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts.map +1 -0
  29. package/dist/esm/companion-api/controllers/long-held-request.companion.js +33 -0
  30. package/dist/esm/companion-api/controllers/long-held-request.companion.js.map +1 -0
  31. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +9 -0
  32. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
  33. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +12 -0
  34. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  35. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  36. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +7 -1
  37. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  38. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +8 -20
  39. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  40. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +37 -142
  41. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  42. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts +64 -0
  43. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts.map +1 -0
  44. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js +304 -0
  45. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js.map +1 -0
  46. package/dist/esm/core/runtime/companion-language-model-route.d.ts +16 -1
  47. package/dist/esm/core/runtime/companion-language-model-route.d.ts.map +1 -1
  48. package/dist/esm/core/runtime/companion-language-model-route.js +23 -1
  49. package/dist/esm/core/runtime/companion-language-model-route.js.map +1 -1
  50. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  51. package/dist/esm/core/runtime/services/start-companion-application.service.js +3 -2
  52. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  53. package/dist/esm/core/utils/git-read-broker.companion.d.ts +62 -0
  54. package/dist/esm/core/utils/git-read-broker.companion.d.ts.map +1 -0
  55. package/dist/esm/core/utils/git-read-broker.companion.js +282 -0
  56. package/dist/esm/core/utils/git-read-broker.companion.js.map +1 -0
  57. package/dist/esm/core/utils/local-write-recording.companion.d.ts +8 -1
  58. package/dist/esm/core/utils/local-write-recording.companion.d.ts.map +1 -1
  59. package/dist/esm/core/utils/local-write-recording.companion.js +7 -23
  60. package/dist/esm/core/utils/local-write-recording.companion.js.map +1 -1
  61. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts +29 -0
  62. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts.map +1 -0
  63. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js +29 -0
  64. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js.map +1 -0
  65. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts +29 -0
  66. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts.map +1 -0
  67. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js +29 -0
  68. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js.map +1 -0
  69. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +1 -0
  70. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  71. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +2 -1
  72. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  73. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts +1 -0
  74. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts.map +1 -1
  75. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js +2 -1
  76. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js.map +1 -1
  77. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts +5 -2
  78. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts.map +1 -1
  79. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js +5 -2
  80. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js.map +1 -1
  81. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts +5 -2
  82. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts.map +1 -1
  83. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js +5 -2
  84. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js.map +1 -1
  85. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts +41 -0
  86. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts.map +1 -0
  87. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js +41 -0
  88. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js.map +1 -0
  89. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts +41 -0
  90. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts.map +1 -0
  91. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js +41 -0
  92. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js.map +1 -0
  93. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +1 -0
  94. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  95. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +2 -1
  96. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
  97. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts +1 -0
  98. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts.map +1 -1
  99. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js +2 -1
  100. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js.map +1 -1
  101. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +1 -0
  102. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  103. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +2 -1
  104. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  105. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts +1 -0
  106. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts.map +1 -1
  107. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js +2 -1
  108. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js.map +1 -1
  109. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +1 -0
  110. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  111. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +2 -1
  112. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
  113. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts +1 -0
  114. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts.map +1 -1
  115. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js +2 -1
  116. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js.map +1 -1
  117. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +2 -0
  118. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  119. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +3 -1
  120. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
  121. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts +2 -0
  122. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts.map +1 -1
  123. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js +3 -1
  124. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js.map +1 -1
  125. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +1 -1
  126. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +1 -1
  127. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
  128. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.d.ts +1 -1
  129. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js +1 -1
  130. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js.map +1 -1
  131. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +2 -0
  132. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  133. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +3 -1
  134. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
  135. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts +3 -1
  136. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts.map +1 -1
  137. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js +4 -2
  138. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js.map +1 -1
  139. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +17 -0
  140. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  141. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +18 -1
  142. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  143. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts +17 -0
  144. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts.map +1 -1
  145. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js +18 -1
  146. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js.map +1 -1
  147. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts +206 -195
  148. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts.map +1 -1
  149. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js +206 -195
  150. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js.map +1 -1
  151. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts +10 -0
  152. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts.map +1 -1
  153. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js +12 -2
  154. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js.map +1 -1
  155. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts +70 -0
  156. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts.map +1 -1
  157. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js +70 -0
  158. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js.map +1 -1
  159. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts +12 -2
  160. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts.map +1 -1
  161. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js +12 -2
  162. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js.map +1 -1
  163. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts +10 -0
  164. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts.map +1 -1
  165. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js +10 -0
  166. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js.map +1 -1
  167. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts +25 -20
  168. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts.map +1 -1
  169. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js +25 -20
  170. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js.map +1 -1
  171. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.d.ts +32 -32
  172. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js +32 -32
  173. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js.map +1 -1
  174. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.d.ts +65 -65
  175. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js +65 -65
  176. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js.map +1 -1
  177. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts +20 -0
  178. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts.map +1 -1
  179. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js +20 -0
  180. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js.map +1 -1
  181. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts +12 -0
  182. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts.map +1 -1
  183. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js +13 -1
  184. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js.map +1 -1
  185. package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +170 -170
  186. package/dist/esm/i18n/system_enums/application-creation.fr.js +170 -170
  187. package/dist/esm/i18n/system_enums/application-creation.fr.js.map +1 -1
  188. package/dist/esm/i18n/system_enums/flows-actors.fr.d.ts +22 -22
  189. package/dist/esm/i18n/system_enums/flows-actors.fr.js +22 -22
  190. package/dist/esm/i18n/system_enums/flows-actors.fr.js.map +1 -1
  191. package/dist/esm/i18n/system_enums/run-records.fr.d.ts +21 -21
  192. package/dist/esm/i18n/system_enums/run-records.fr.js +21 -21
  193. package/dist/esm/i18n/system_enums/run-records.fr.js.map +1 -1
  194. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +1 -0
  195. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -1
  196. package/dist/esm/i18n/system_enums/workbench-build.en.js +1 -0
  197. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  198. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts +37 -33
  199. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts.map +1 -1
  200. package/dist/esm/i18n/system_enums/workbench-build.fr.js +37 -33
  201. package/dist/esm/i18n/system_enums/workbench-build.fr.js.map +1 -1
  202. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +1 -0
  203. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -1
  204. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +1 -0
  205. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -1
  206. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts +18 -17
  207. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts.map +1 -1
  208. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js +18 -17
  209. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js.map +1 -1
  210. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts +7 -5
  211. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts.map +1 -1
  212. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js +8 -6
  213. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js.map +1 -1
  214. package/dist/esm/i18n/system_enums/workbench-secrets.fr.d.ts +12 -12
  215. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js +12 -12
  216. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js.map +1 -1
  217. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts +1 -0
  218. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts.map +1 -1
  219. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js +2 -1
  220. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js.map +1 -1
  221. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  222. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +3 -4
  223. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  224. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +11 -0
  225. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  226. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +21 -0
  227. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  228. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +120 -16
  229. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  230. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +875 -191
  231. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  232. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +102 -13
  233. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  234. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +243 -57
  235. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  236. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts +3 -3
  237. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js +3 -3
  238. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map +1 -1
  239. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts +9 -0
  240. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts.map +1 -1
  241. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js +19 -0
  242. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js.map +1 -1
  243. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -1
  244. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +4 -5
  245. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -1
  246. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  247. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +6 -3
  248. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  249. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.d.ts.map +1 -1
  250. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js +3 -5
  251. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js.map +1 -1
  252. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +1 -1
  253. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  254. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +38 -21
  255. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  256. package/package.json +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"application-build-dispatch.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,0CAA0C,EAC1C,+BAA+B,EAC/B,gCAAgC,GAEjC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,mCAAmC,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAA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YAClF,IAAI,EAAE,mHAAmH;kBACrH,mFAAmF;SACxF;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,0BAA0B,CAAC,IAA2C;IACnF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,uCAAuC,CAAC,CAAC;IAC9E,OAAO,OAAO,QAAQ,KAAK,QAAQ,IAAI,iCAAiC,CAAC,QAAQ,CAAC,CAAC;AACrF,CAAC","sourcesContent":["import {\n MetaWorkflow_ContextSourceScreeningOutcome,\n MetaWorkflow_ContextSourceTrust,\n ResearchProvenanceCatalogReading,\n type MetaWorkflow_ApplicationCodingTaskContract,\n} from '@wildo-ai/saas-models/meta-workflows';\nimport { readCompiledResearchInformedContent } from '@wildo-ai/framework-knowledge';\nimport { existsSync, readdirSync } from 'node:fs';\nimport { randomUUID } from 'node:crypto';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport path, { join } from 'node:path';\n\nimport { inject, injectable, optional } from 'inversify';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { ApplicationSchemaPlanObligation } from '../../core/config/application-schema-plan-obligation.companion.utils';\nimport { experienceTaskSkillRefs, taskHasExperienceProduct } from './application-build-experience-skills.companion.service';\nimport {\n buildWebsitePlanContextSource,\n citedRequirementRefsByWebsiteTask,\n deliveringTasksFor,\n deriveWebsiteClaimDelivery,\n deriveWebsiteTaskOrdering,\n describeWebsiteTaskCopySubjects,\n describeWebsiteTaskVisualSubjects,\n websiteTaskDemoResourceRef,\n websiteTaskSkillRefs,\n type WebsiteClaimDelivery,\n type WebsiteSectionDemoFactsResolution,\n type WebsiteTaskCopySubject,\n} from './application-build-website-context.companion.service';\nimport { websiteDemoResourceFacts } from './website-demo-facts.models';\nimport {\n collectWebsiteCopyDeclarations,\n currentWebsiteCopy,\n reviewWebsiteTaskCopy,\n type RawWebsiteCopyFinding,\n type WebsiteCopyAlsoReviewed,\n} from './application-build-website-copy-review.companion.service';\nimport { readWebsiteCopyReview, WebsiteCopyReviewOutcome, type WebsiteCopyReview } from '../models/website-copy-review.models';\nimport { WEBSITE_COPY_REVIEW_JUDGE_AGENT_REF, WebsiteCopyReviewVerdictOutputSchema } from '../models/website-copy-review.actors-system.definitions';\nimport { reviewWebsiteTaskVisuals, type RawWebsiteVisualFinding } from './application-build-website-visual-review.companion.service';\nimport { lookAtWebsite, readWebsiteShotAsDataUri, readWebsiteVisualRubric } from './website-visual-camera.companion';\nimport { readWebsiteVisualReview, WebsiteVisualReviewOutcome, type WebsiteVisualReview } from '../models/website-visual-review.models';\nimport { WEBSITE_VISUAL_REVIEW_JUDGE_AGENT_REF, WebsiteVisualReviewVerdictOutputSchema } from '../models/website-visual-review.actors-system.definitions';\nimport {\n CodingRunFailureAttribution,\n WORKBENCH_TASK_CORRELATION_DOMAIN,\n Workbench_BuildDispatchPhase,\n Workbench_BuildTaskStuckReason,\n WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN,\n WorkbenchBuildPlanTaskStatus,\n WorkbenchTaskCorrelationRef,\n sanitizeWorkbenchCreationPlaneIdentity,\n BuildTaskRearmReason,\n BuildTaskClosureKind,\n OPERATOR_BUILD_TASK_REARM_REASONS,\n BrandDesignState,\n DesignTokenBlockState,\n SchemaPlanSyncState,\n FRONTEND_MODULES_REGISTRY_RELATIVE_PATH,\n frontendRegistryPassesSettingsHub,\n} from '@wildo-ai/platform-core-shared';\n\nimport {\n assemblyRepairTaskRef,\n composeAssemblyRepairCodingContract,\n composeBuildTaskCodingContract,\n slugifyRegistryIdentifier,\n type BuildTaskContextSource,\n decidedFamilyValuesFromCompanionExports,\n getFamilyPackageRelativePath,\n indexDecidedAspects,\n mergePlaybookSpend,\n PlaybookSpendMeasurement,\n readApplicationDisplayName,\n readEngineCapabilityEnabled,\n SAAS_CONFIG_FILE_NAME,\n type PlaybookSpend,\n SpecificationWriteRefusedError,\n type BuildPlanSpecificationFault,\n} from '@wildo-ai/application-creation-runtime';\nimport type { ActorExecutionOpenRequest, ActorsSystemBackendService, AgentsBackendService, ContentSafetyBackendService, LoggerService, OpenedActorExecution } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES, describeCaughtError } from '@wildo-ai/saas-backend-lib';\nimport { Actor_Task_Topics, FlowsActors_Status, type AgentWorkDeclarations, type AgentWorkShortfall, type FlowsActors_Agent_Invocation } from '@wildo-ai/saas-models';\nimport { PER_SERVICE_WEBSITE_CONFIG_FILE_NAME, resolveStaticWebsiteServiceEntry } from '@wildo-ai/saas-website/config-loader';\nimport {\n AcceptOrigin,\n ApplicationSpecificationFamily,\n BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES,\n BuildPlanResourceStage,\n BuildPlanTaskGraphSchema,\n type BuildPlanTaskProduct,\n BuildPlanTaskTargetKind,\n BuildPlanTaskProductKind,\n FrontendConfigSurface,\n DomainPlanTenancyModel,\n MetaWorkflow_FunctionalTopic,\n PlacementDisposition,\n PlacementPlanSchema,\n PlacementSurface,\n RoadmapSnapshotSchema,\n selectReadyBuildPlanTasks,\n type PlacementPlan,\n validateBuildPlanTaskGraph,\n type BuildPlanTask,\n type Journey_AutonomyPreset,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { relatedWorkspaceResources } from '../../core/introspection/workspace-element-index.companion';\nimport { BRIEF_INCOMPLETE_SOURCE_REF, BRIEF_PROVENANCE_UNAVAILABLE_SOURCE_REF, ThirdPartyBriefContent } from '../models/build-brief-content-trust.models';\nimport {\n companionScreeningVerdicts,\n DERIVED_TEXT_UNSCREENED_NOTICE,\n DERIVED_TEXT_UNSCREENED_SOURCE_REF,\n screenRunOutputSection,\n screenThirdPartyBriefElements,\n unscreenedClassifierReason,\n WITHHELD_RUN_OUTPUT_NOTICE,\n} from './build-brief-third-party-screening.companion';\nimport { loadEffectiveSystemOfRecordFacets, systemOfRecordInstancePartitionSupportOf, type SystemOfRecordInstanceFacetRequest } from './system-of-record-facet-library.companion.utils';\nimport { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport { readSpecificationsEvaluationFindings, type SpecificationsEvaluationFindings } from '../../core/context/companion-package-loaders.companion';\nimport { loadSpecificationFamilyData, type SpecificationFamilyData } from '../../core/context/specification-family-data.companion';\nimport { specificationFaultModules } from '../../core/context/specification-fault-modules.companion';\nimport { waitForDevCompileQuiet } from '../../core/runtime/dev-compile-quiet.companion';\nimport { companionRestartDrain } from '../../core/runtime/restart-drain.companion';\nimport { getWorkspaceMutationLockPath, loadConfig, loadInfraEnvConfig, loadSaasConfig, readBuildParallelism, WildoEnvironment, withDedicatedFileLock } from '@wildo-ai/platform-config-lib';\nimport { CodingRunConcurrency, failedVerificationBesideSiblings } from '../../claude-cli/models/concurrent-coding-runs.models';\nimport {\n CodingAgentDispatchCompanionService,\n type ApplicationCodingTaskSettledOutcome,\n} from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n ApplicationCodingTaskDisposition,\n ChangeSetFileChangeKind,\n CodingRunStart,\n deriveCodingRunStart,\n isApplicationCodingContractRefusal,\n readSettledRunFailureMessage,\n resolveApplicationCodingTaskVerificationPlans,\n type ApplicationCodingTaskRunAdmission,\n type ApplicationCodingUnmetRequirement,\n type ApplicationCodingMetRequirement,\n SETTLED_HEAD_OUTPUT_FIELD,\n} from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';\nimport { readIsolatedVerificationRecheck } from '../../claude-cli/models/shared-tree-reconciliation.models';\nimport { composeLandingSourceKey, LandingProjectionCache } from './application-build-landing-projection.companion';\nimport {\n ApplicationBuildPreparationPhase,\n ApplicationBuildPreparationTracker,\n describeBuildPreparation,\n type ApplicationBuildPreparation,\n} from './application-build-dispatch-preparation.companion';\nimport { CompanionTraceabilityLevel } from '../../core/traceability/companion-traceability.models';\nimport type { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { signEvaluatedCompanionTree } from '../../core/context/companion-package-loaders.companion';\nimport { resolveIntrospectedApplicationPackageRoots } from '../../core/introspection/services/introspection-source-state.companion.service';\nimport type { CodingAgentUsageLimit } from '../../claude-cli/models/coding-agent-usage-limit.models';\nimport { describeVerificationHostCause, type VerificationToolUnavailableHold } from '../../claude-cli/models/verification-tool-availability.models';\nimport { EXPERT_CHARTERS_RELATIVE_DIRECTORY, EXPERT_STAFFING_PLAYBOOK_REF, readStaleExpertSeatsRefusal, type StaleExpertSeatsRefusal } from '../../deliberations/models/stale-expert-seats-refusal.models';\nimport type { AcceptedChangeCommitCompanionService, DecisionRecordActor } from '../../claude-cli/services/accepted-change-commit.companion.service';\nimport type { CodingRunWriteRegisterCompanionService } from '../../claude-cli/services/coding-run-write-register.companion.service';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport { CompanionCreateActorExecutionRequestSchema, CompanionCreateActorTaskRequestSchema, CompanionExecutionsListQuerySchema, CompanionUpdateActorTaskRequestSchema } from '../../companion-api/companion-api.schemas';\nimport { APPLICATION_CODING_SYSTEM_REF } from '../models/application-coding-agent.actors-system.definitions';\nimport {\n isApplicationStartupFailure,\n readApplicationBootFailures,\n readUnavailableApplicationRuntimes,\n type ApplicationBootFailure,\n type UnavailableApplicationRuntime,\n} from '../../core/runtime/application-runtime-liveness.companion';\nimport type { CarriedVerificationDiagnosis } from '../models/carried-verification-failure.models';\nimport type { GenerationStepProgress } from '../models/generation-step-progress.models';\nimport {\n MAXIMUM_INTERFERENCE_REARMS,\n NothingToRearmError,\n readBuildTaskInterference,\n landedOverrideContextSource,\n readBuildTaskLandedOverride,\n readBuildTaskRearm,\n withBuildTaskRearm,\n type BuildTaskInterference,\n type BuildTaskLandedOverride,\n type BuildTaskRearm,\n} from '../models/build-task-rearm.models';\nimport { APPLICATION_BUILD_GENERATION_STEP_ACTOR_REF, APPLICATION_BUILD_SYSTEM_REF } from '../models/application-build.actors-system.definitions';\nimport { APPLICATION_BUILD_DECISIONS_DOOR_ACTOR_REF, APPLICATION_BUILD_DECISIONS_SYSTEM_REF } from '../models/application-build-decisions.actors-system.definitions';\nimport { readRecordedPlaybookSpend } from '../models/playbook-run-record.models';\nimport {\n ApplicationBuildGenerationStep,\n ApplicationBuildGenerationStepCompanionService,\n type ApplicationBuildGenerationStepLandedCondition,\n ApplicationBuildGenerationStepLandedKind,\n type ApplicationBuildGenerationStepRunResult,\n readDesignSystemConfigImportsBrandDesign,\n signSchemaPlanInputs,\n generationStepCheckReadsSpecifications,\n generationStepReadsSpecifications,\n GenerationStepFailureOwner,\n readGenerationStepFailureOwner,\n} from './application-build-generation-step.companion.service';\nimport { INSTALLED_SKILL_INDEX_RELATIVE_PATH, readApplicationCapabilityFacts, sliceSkillIndexForTask } from './build-task-brief-application-facts.companion';\nimport {\n ApplicationBuildTaskNotACodingTaskError,\n resolveAssemblyRepairCodingPolicy,\n resolveBuildPlanTaskCodingPolicy,\n BuildPlanTaskLandedProbeKind,\n buildPlanTaskLandedProbePaths,\n declarationsAppearAt,\n findAgentWorkShortfalls,\n findConfigurationShortfalls,\n findSystemOfRecordDeclarationShortfalls,\n systemOfRecordPartitionUnanswerable,\n isConfigurationProvenProduct,\n unreadableResourceConfigurationFor,\n relativeImportedFiles,\n applicationConfigurationDeclarationsOf,\n type ApplicationConfigurationWitness,\n flowsActorsIndexImportedFiles,\n labelFileDeclaresKeys,\n labelPacksDeclareKeyPrefix,\n launcherShellIdentities,\n placementSubjectShellIdentity,\n ProductDeclarationRelation,\n productDerivedSkillRefs,\n resourceSchemaFilePath,\n schemaSourceDeclaresPersonalData,\n targetDerivedSkillRefs,\n resolveBuildTaskLandedProbes,\n buildPlanTaskLandedProbeWritablePaths,\n resolveBuildTaskLandingAdvisories,\n buildTaskProducesBillingCatalogue,\n BACKEND_BILLING_SWITCH_FILE,\n type BuildTaskLandingAdvisory,\n resolveUndraftableDocumentRef,\n settingsDestinationShellIdentity,\n shellModuleContributionFile,\n shellSurfaceConfigFile,\n websiteLabelPackPath,\n websiteSectionLabelFragmentPath,\n type BuildPlanTaskLandedProbe,\n} from './application-build-task-coding-policy.companion.service';\nimport { describeStaleFrontendLibrary, findStaleFrontendLibraryOutputs, readFrontendLibraryProgram } from './frontend-config-library-currency.companion';\nimport { buildTaskDecisionsApplicationPath } from '../models/build-task-decisions-path.models';\nimport {\n BuildTaskDecisionRefusedError,\n BuildTaskDecisionsStanding,\n resolveHonouredDecisionsBlob,\n type BuildTaskDecisionsCommit,\n followUpAwaitsReview,\n followUpsAwaitReviewUnder,\n parseBuildTaskDecisions,\n resolveClosedBuildTaskRefs,\n withBuildTaskDecision,\n type BuildFollowUpApproval,\n type BuildTaskClosure,\n type BuildTaskDecisions,\n} from './application-build-task-closure.companion';\nimport { APPLICATION_CREATION_AUTONOMY_POSTURE } from '../models/playbook-run-checkpoint.models';\nimport {\n chainFollowUpAfter,\n collectFollowUpGapsMetSince,\n collectOpenReportedGaps,\n type OpenReportedGap,\n followUpGapKey,\n FollowUpGapNotDerivedReason,\n type FollowUpGapMetSince,\n HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX,\n deriveBuildPlanFollowUpTasks,\n type FollowUpDerivation,\n} from './application-build-follow-up-derivation.companion';\nimport { resolveApplicationAssemblyCheckRefs } from './application-assembly-checks.companion.utils';\nimport { BrandAssetPurpose, SpecificationModuleFaultReading, specificationModuleFaultsAreAVerdict, SpecificationUnavailableError, unguardedSpecifications } from '@wildo-ai/saas-specifications';\nimport { hasAcceptedBrandMark } from '../../brand/models/accepted-brand-mark.models';\nimport {\n ASSEMBLY_FAILURE_CONTEXT_SOURCE_REF,\n ASSEMBLY_REPAIR_GUIDANCE,\n ASSEMBLY_REPAIR_TARGET_KIND,\n MAXIMUM_ASSEMBLY_REPAIRS_PER_CHECK,\n assemblyRepairAttemptsThisRound,\n describeWithheldAssemblyRepairs,\n isAssemblyRepairTaskRef,\n readGivenAssemblyFailure,\n selectAssemblyRepair,\n type AssemblyCheckFailure,\n type AssemblyFailureContextContent,\n type AssemblyRepairWithheldReason,\n type BuildDispatchRunSummary,\n} from './application-assembly-repair.companion.utils';\nimport type { AppShellPlacementContentResult } from '../../core/introspection/subprocess/app-shell-placement-content.behavior';\n\n/** No build plan, or nothing left to do. Named so the transport can say which. */\n\n\n/** A landing resolution taking at least this long is logged without a debug type (#3452). */\nconst LANDING_RESOLUTION_LOG_THRESHOLD_MS = 1_000;\nexport class ApplicationBuildPlanUnavailableError extends Error {}\n\n/** Whether a plan could not be read because a specifications module failed (#3258): it exists, and the reason names the module. */\nexport function isBuildPlanHeldByFailedModule(error: unknown): error is ApplicationBuildPlanUnavailableError {\n return error instanceof ApplicationBuildPlanUnavailableError && error.cause instanceof SpecificationUnavailableError;\n}\n\nexport class ApplicationBuildPlanExhaustedError extends Error {\n /**\n * The counts, carried STRUCTURALLY rather than only inside the sentence.\n *\n * A finished plan is something a surface wants to SAY — \"39 of 39 landed\" — and until these were\n * fields the only copy lived in prose the reader would have had to parse. A board that parses\n * another component's error message is a board that breaks when somebody improves the wording.\n */\n public constructor(\n message: string,\n public readonly taskCount: number,\n public readonly landedCount: number,\n /** WHICH tasks landed — so a finished plan can still say which of them no run of their own produced (#2217). */\n public readonly landedTaskRefs: readonly string[] = [],\n /**\n * Whether the application the finished plan built ASSEMBLES (#2222) — set by a dispatch door, which is where\n * \"the build is finished\" is claimed; absent from the cheap read door, which never runs a compiler.\n */\n public readonly assembly?: ApplicationAssemblyVerdict,\n /** See {@link ApplicationBuildPlanExhaustion}. */\n public readonly specificationFault?: BuildPlanSpecificationFault,\n ) {\n super(message);\n }\n}\n\n/**\n * The answer to \"does the application this plan built assemble?\" (#2222), from the checks every package owes.\n *\n * A finished plan used to be the end of the question: in `app-creation-test-004` the build would have read 92 of 92\n * with a website that did not compile, because each task typechecks only the package it wrote and a file can reach\n * git without its task's checks (a wave's reconciliation commit). MARKED, never a refusal of anything that already\n * landed — `application-creation-directive.md`: what the operator does next is fix the package, so the verdict says\n * which package and what the compiler said, and leaves the landed work alone.\n */\nexport interface ApplicationAssemblyVerdict {\n readonly passed: boolean;\n readonly checkRefs: readonly string[];\n /**\n * `output` is an EXCERPT of what the check printed: the first lines of the captured stdout (where `tsc` writes its\n * diagnostics), else of stderr. The capture is a bounded tail, so on a very long run these are the first lines\n * of that tail, not necessarily the compiler's first error.\n */\n readonly failed: ReadonlyArray<{ readonly checkRef: string; readonly output: string }>;\n /** A check that could not be RUN (no compiler, no built registry): not a verdict about the application. */\n readonly couldNotRun?: string;\n /** Present when no task was left to run only because a specifications module fails (#3258): the plan is not finished. */\n readonly specificationFault?: BuildPlanSpecificationFault;\n /**\n * The failing checks no repair was dispatched for, and why (#2283): their repairs this round are spent, or the\n * last one was given this same failure. Absent when nothing was withheld.\n */\n readonly repairsWithheld?: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[];\n}\n\n/**\n * Why a read door cannot ANSWER with an exception.\n *\n * `prepareNextBuildTask` serves two kinds of caller: the READS (`describeNextBuildTask`, and\n * `describeNextBuildTaskOrExhaustion` for a surface that must render \"there is none\") and the two\n * DISPATCH doors. The throw is right for a DISPATCH — the caller asked to run something, there is\n * nothing to run, and a door that silently did nothing would be worse. It is wrong for a READ: \"what\n * is next?\" answered by \"nothing, everything landed\" is an ANSWER, and the terminal success of the\n * whole build lane is not a failure to look. The same holds for \"nothing, every ready task is stuck\"\n * (#1451), whose answer is the remedy.\n *\n * Measured 2026-09-18, when Wonder CRM became the first application to finish a plan (39 of 39): the\n * workbench's `requestCompanion` threw on the non-2xx, `useCompanionRead` caught it into `error`, and\n * the board rendered `BoardReadError` — the primitive it defines as \"could not look\", against\n * `BoardEmpty` for \"looked, nothing there\". The last screen of the journey the workbench exists to\n * drive reported the finish as a fault.\n *\n * Reads tolerate, acceptance refuses — `continuity-drift-and-cas-basis.md` Rule 1's split — and\n * `application-creation-directive.md`'s test verbatim: if this refuses, what does the operator do\n * next? Nothing. There is no artifact to fix, so the state is REPRESENTABLE instead.\n */\nexport interface ApplicationBuildPlanExhaustion {\n readonly taskCount: number;\n readonly landedCount: number;\n /** Present while a specifications module fails: nothing is left to run, and the plan is not finished. */\n readonly specificationFault?: BuildPlanSpecificationFault;\n}\n\n\n/**\n * What the read door answers: a plan to run, or the reason there is none. Never an exception for either.\n *\n * Three shapes, and exactly one holds: a `plan`; no plan and `exhausted` (nothing left to run); or no plan,\n * `stuckQueue`, and a non-empty `stuckTasks` (every ready task is stuck, #1451). `stuckTasks` is present beside a plan\n * too, naming what that selection passed over.\n */\n/**\n * How far the queue got when every ready task turned out to be stuck — the same progress a plan row\n * carries, so a stuck row can say \"3 of 5 landed, 2 ready\" instead of zeroes it does not mean.\n */\nexport interface ApplicationBuildStuckQueue {\n readonly taskCount: number;\n readonly readyTaskRefs: readonly string[];\n readonly landedTaskRefs: readonly string[];\n readonly unverifiableLandedTaskRefs: readonly string[];\n /** Present while a specifications module fails (#3258): it is why a step that never ran is passed over. */\n readonly specificationFault?: BuildPlanSpecificationFault;\n}\n\nexport interface ApplicationBuildDispatchDescription {\n readonly plan: ApplicationBuildDispatchPlan | null;\n /** Present exactly when `plan` is null because nothing is left to run: finished, unless it carries a specifications fault. */\n readonly exhausted?: ApplicationBuildPlanExhaustion;\n /** Present exactly when `plan` is null because every ready task is stuck. */\n readonly stuckQueue?: ApplicationBuildStuckQueue;\n /** Every ready task dispatch passed over, and why. Empty when nothing was skipped. */\n readonly stuckTasks: readonly ApplicationBuildStuckTask[];\n /**\n * The landed tasks no run of their own ever started (#2217): the probe found the product before anything ran.\n * Beside every answer — a next task, a stuck queue, a finished plan — because \"92 of 92 landed\" is precisely the\n * sentence it must qualify. ABSENT — not empty — when the run history was truncated at the page cap, because a\n * partial history cannot say a task never ran; and absent from a caller older than the field.\n */\n readonly landedBeforeAnyRunTaskRefs?: readonly string[];\n}\n\n/**\n * The plan and its landing as one FILL of a build wave read them (#3204): every slot the fill prepares selects from this\n * one reading instead of deriving the landing again (20-90 s each on a 217-task plan, measured on reference run\n * 42468505853, so five slots took minutes to fill while their runs took two to four).\n *\n * Reused only while nothing could have LANDED since it was read. A run completes and commits inside its OWN\n * settlement, whenever it finishes, so a fill can meet one; a reading taken before it would offer a task the run just\n * landed (a task declaring no product lands on its completed run alone). Two guards, because neither alone is enough:\n *\n * - **The runs in flight when it was read.** A run's row reads COMPLETED, and the run leaves the in-flight list, a few\n * seconds BEFORE its accept commits and its listeners fire (#3204 second review R1). So the reading keeps the tasks\n * that were in flight, and every selection reads them fresh: one that has LEFT drops the reading. This needs no\n * listener, so it also covers a run another door started.\n * - **The settlement generation** (`landingSettlementGeneration`): moved by a completed run, an accepted commit, and every\n * place that declares the landing stale, for a landing a person or another door caused while no run left.\n *\n * An ADMISSION moves neither (a run only joins the in-flight list), which is what lets the slots of one fill share a\n * reading. A generation step run inside the fill drops the reading explicitly.\n */\ninterface BuildWaveFillLanding {\n current?: {\n readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>;\n readonly resolution: LandedTaskResolution;\n /** The settlement generation the reading was taken at. */\n readonly settlementGeneration: number;\n /** The tasks whose runs were in flight when it was taken: one that has left may have landed something. */\n readonly inFlightTaskRefs: ReadonlySet<string>;\n };\n}\n\n/** What one landing resolution found — every answer a caller needs, from the pass it asked for. */\ninterface LandedTaskResolution {\n readonly landed: ReadonlySet<string>;\n /** Landed WITHOUT proof: a task that declares no product and has a completed run. */\n readonly unverifiableLandedTaskRefs: readonly string[];\n /**\n * Generation steps whose landing check could not be ANSWERED on this pass: a migration step whose\n * schema-plan check neither passed nor reported drift, or a `design-tokens` step whose block check did\n * not run. Running either now would only fail the same way, so the selector passes over them.\n */\n readonly unanswerableGenerationStepTaskRefs: ReadonlySet<string>;\n /** The specifications modules failing on this pass, which hold every generation step not yet landed (#3258). */\n readonly modulesHoldingGenerationSteps?: readonly string[];\n /** See {@link BuildPlanSpecificationFault.repairOwed}. */\n readonly specificationRepairOwed?: boolean;\n /**\n * Each generation step's landed condition, as this pass resolved it. A reader that needs the condition again (the\n * records) takes it from here: resolving a labels step's condition plans every labelling unit (#2504 review F7).\n */\n readonly generationStepConditions: ReadonlyMap<string, ApplicationBuildGenerationStepLandedCondition>;\n /**\n * The introspection witnesses this pass read, and its tree reader (#3219). A reader that EXPLAINS a\n * landing — why a stuck task is not landed — asks these, never fresh ones:\n * a second witness or a second git reading taken minutes later could disagree with the first, and the task then\n * read \"its product is written, awaiting a commit\" with nothing to commit (measured on `app-creation-test-007`, when\n * landing still read HEAD).\n */\n readonly witnesses: IntrospectionWitnesses;\n /** The tree this pass judged landing on: the WORKING tree (#3204), see {@link createLandingTreeReader}. */\n readonly landingTree: CommittedTreeReader;\n /**\n * The tasks whose latest coding run is live or ended without a working result, not re-armed and not passed by an\n * isolated re-check (#3204, #3220): not landed whatever their product shows. Absent when the run history could not be\n * read (the pass is then provisional).\n */\n readonly heldBackTaskRefs?: ReadonlySet<string>;\n /**\n * The tasks whose latest coding run failed its checks BESIDE SIBLINGS and was not yet re-checked alone or re-armed\n * (`failedVerificationBesideSiblings`, #3204), each with that run's start: within the wave that ran it, such a task waits\n * for the wave's end, where its checks run alone. Absent when the run history could not be read.\n */\n readonly awaitingIsolatedRecheck?: ReadonlyMap<string, string>;\n /**\n * TRUE when an answer of this pass was UNKNOWN rather than no — a generation step whose check could not be asked, or\n * a witness that could not be read. Such a pass is only briefly reused (`PROVISIONAL_LANDING_REUSE_MS`), because the\n * cause is this process's own state (an introspection still warming after a restart, #3223), which no file signs.\n */\n readonly provisional: boolean;\n /**\n * The tasks whose own specification file its factory REFUSED (#3210, #3211), with the validator's faults. Such a task is\n * NOT landed whatever its probes find: the file is committed, and the companion serves nothing from it. So only the\n * tasks that depend on it wait, it is offered again with the faults in its brief, and its re-dispatches are bounded.\n */\n readonly refusedSpecificationFaults: ReadonlyMap<string, readonly SpecificationRefusal[]>;\n /**\n * The tasks landed by a person's committed CLOSURE rather than by their own probe (#3224, #3227): `wildo build close`.\n * Every one is in `landed`; this says which, and why, so no reader mistakes a closure for a proven product.\n */\n readonly closedTaskRefs: ReadonlyMap<string, BuildTaskClosure>;\n /** The derived follow-ups a person approved to run (#3227), read from the same HEAD; consulted only under a reviewing posture. */\n readonly followUpApprovals: ReadonlyMap<string, BuildFollowUpApproval>;\n /**\n * How the person's decisions stood on this pass ({@link BuildTaskDecisionsStanding}), with its reason and named\n * conditions. When UNKNOWN the pass is provisional and every task the decisions file names is held (never dispatched,\n * a generation step among them passed over as unanswerable), with this reason as its cause.\n */\n readonly buildTaskDecisions: Pick<BuildTaskDecisions, 'standing' | 'reason' | 'conditions' | 'heldTaskRefs'>;\n}\n\n/** One specification its factory refused, as a build task is told about it (#3210): the validator's own words, and where. */\nexport interface SpecificationRefusal {\n readonly kind: string;\n readonly key: string;\n readonly message: string;\n readonly authoredFrame: string | null;\n /** A module that threw on loading rather than a factory's refusal: `kind` and `message` are then the module's own text (#3258). */\n readonly thrownByTheModule?: true;\n}\n\n/**\n * How many COMPLETED runs a task whose specification is refused may have before it is no longer re-dispatched on its own\n * (#3210): the run that wrote the refused file, then two more, each told the validator's error. A third refusal of the\n * same task is held as `completed_unlanded` with the fault, so an agent that keeps rewriting the same invalid definition\n * cannot loop; `wildo build rearm` releases it once a person has looked.\n */\nexport const MAXIMUM_REFUSED_SPECIFICATION_RUNS = 3;\n\n/** The brief section a re-dispatched task reads its refused specification from (#3210). */\nexport const REFUSED_SPECIFICATION_CONTEXT_SOURCE_REF = 'application-creation:context/refused-specification';\n\n/**\n * The app-root-relative file an authored frame names (`at fn (/app/specifications/src/x.ts:12:3)`, or the path alone),\n * or `undefined` when it names none. The frame is the first stack frame inside `specifications/src/` (the engine's own\n * reader of it), so it is where the refused definition was written.\n */\nexport function refusedSpecificationFramePath(authoredFrame: string | null, saasRoot: string): string | undefined {\n if (authoredFrame === null) return undefined;\n const located = /\\(([^()]+)\\)\\s*$/u.exec(authoredFrame)?.[1] ?? authoredFrame;\n const file = located.replace(/:\\d+(?::\\d+)?$/u, '').trim();\n if (file === '') return undefined;\n const root = saasRoot.endsWith('/') ? saasRoot : `${saasRoot}/`;\n return file.startsWith(root) ? file.slice(root.length) : file;\n}\n\n/** Does a refused specification belong to this task — is its authored file one the task's probes name? */\nfunction refusalBelongsToTask(framePath: string, probePaths: readonly string[]): boolean {\n return probePaths.some((path) => path === framePath || framePath.endsWith(`/${path}`) || path.endsWith(`/${framePath}`));\n}\n\n/** The brief section of a task re-dispatched because its specification was refused (#3210). */\nexport function refusedSpecificationContextSource(refusals: readonly SpecificationRefusal[]): BuildTaskContextSource {\n return {\n sourceRef: REFUSED_SPECIFICATION_CONTEXT_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The engine's own validators wrote these messages, inside this repository's process (#2846: trusted).\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n // What a module threw is its own text, not the companion's statement: `wildo creation feed` prints it.\n refusals: refusals.map((refusal) => (refusal.thrownByTheModule === true\n ? { key: refusal.key, authoredAt: refusal.authoredFrame }\n : { kind: refusal.kind, key: refusal.key, message: refusal.message, authoredAt: refusal.authoredFrame })),\n guidance: 'This task already ran and wrote a specification its factory REFUSES, or a module that cannot be evaluated: the '\n + 'companion serves nothing from it, and the tasks that depend on it wait. A refusal carrying a message is the validator\\'s '\n + 'own, naming the field and the remedy; for a module that threw, `wildo creation feed` prints the error. Fix the '\n + 'definition so it is accepted (run `check:specification-exports` or `wildo build tasks` to see the refusal is gone); do '\n + 'not delete the specification or weaken the definition to make the refusal disappear.',\n },\n };\n}\n\n/**\n * How many attempts (completed runs plus the task's own failed runs) a task whose declared product is ABSENT from the\n * tree may have before it is no longer re-dispatched on its own (#3204): the run that missed it, then at most two more,\n * each told which of its probes are unmet.\n *\n * Measured on reference run 42365624598: `build-task-customer-workflow-resources` declared schema fields, registrations,\n * interfaces and specifications for four resources. Its four-minute run, in a wave beside the superseded plan's leftovers,\n * wrote one interface and completed; the quote-or-tender specification never received its eight declared fields. The loop\n * guard (#606) then held it for the rest of the run, and twelve tasks with it, because a repeat of the same run with the\n * same brief would spend the same turn for the same result. A brief that names the unmet probes is not the same run, so\n * a bounded number of them is offered, as #3210 does for a refused specification; after that the guard holds it, and\n * `wildo build rearm` releases it once a person has looked.\n */\nexport const MAXIMUM_UNMET_PRODUCT_RUNS = 3;\n\n/** What {@link ApplicationBuildDispatchCompanionService} decides for a task that completed a run without landing (#3204). */\nexport enum CompletedTaskRetry {\n /** Offer it again: within the attempt bound, nothing parked, every unmet probe answerable. */\n OFFER = 'offer',\n /** Hold it with the loop guard's reason, as before the retry existed. */\n HOLD = 'hold',\n}\n\n/** The brief section a re-dispatched task reads its unmet product from (#3204). */\nexport const UNMET_PRODUCT_CONTEXT_SOURCE_REF = 'application-creation:context/unmet-product';\n\n/** What a re-dispatched task is told about the products its earlier run did not produce (#3204). */\nexport function unmetProductContextSource(unmetProbes: readonly BuildPlanTaskLandedProbe[], completedRuns: number): BuildTaskContextSource {\n return {\n sourceRef: UNMET_PRODUCT_CONTEXT_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own reading of the working tree against the task's declaration (#2846: trusted).\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n completedRuns,\n unmetProbes,\n guidance: `This task already ran ${completedRuns === 1 ? 'once' : `${completedRuns} times`} and completed, but the working tree `\n + 'still does not hold part of what it declares: each probe here names a file and what it must declare. Produce exactly '\n + 'those, beside what is already there (read the files first; most of the task may be done). Do not change the '\n + 'declaration, and do not report the task finished until every probe here is met.',\n },\n };\n}\n\n/** The ref of the `database-migrations` step the dispatch host derives when a plan owes it and omits it (#1027). */\nexport const HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF = 'build-task-database-migrations';\n\n/** The ref of the `documentation-publication` step the host derives for a plan that authors chapters (#1273). */\nexport const HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF = 'build-task-documentation-publication';\n\n/** The ref of the `i18n-translations` step the host derives after a plan's labels step, for a multi-locale application (#2204). */\nexport const HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF = 'build-task-i18n-translations';\n\n/** The ref of the `design-tokens` step the host derives after every task that writes the design-system config (#2358). */\nexport const HOST_DERIVED_DESIGN_TOKENS_TASK_REF = 'build-task-design-tokens';\n\n/** The ref of the `design-system-brand` step the host derives before every task that writes the design-system config (#2353). */\nexport const HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF = 'build-task-design-system-brand';\n\n/**\n * Does this build task write the application's design-system config — and so oblige the `design-tokens`\n * step to run after it, and the `design-system-brand` step to run before it?\n *\n * One shape: a coding task targeting the DESIGN_SYSTEM frontend config surface, the only target whose mutation\n * scope includes that file. The predicate is keyed on the TARGET rather than on a declared product, because the\n * target is what the coding policy grants write access from; a product declared on any other target could not\n * have written the file. The brand step does not write the config; it writes a module the config imports, and\n * {@link isDesignTokenBlockInputWriter} is the predicate that covers both.\n */\nexport function isDesignSystemConfigWriter(task: BuildPlanTask): boolean {\n return task.target?.kind === BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG\n && task.target.configSurface === FrontendConfigSurface.DESIGN_SYSTEM;\n}\n\n/**\n * Does this build task build the website (a page or a section of it)? The site's theme is composed from the brand's\n * website palette and personality (`website/src/brand-theme.ts`, which the scaffold imports), so a plan that builds the\n * site owes the brand step even when it writes no design-system config (#2742 step 5d).\n */\nexport function isWebsiteBuildTask(task: BuildPlanTask): boolean {\n return task.target?.kind === BuildPlanTaskTargetKind.WEBSITE\n || task.produces.some((product) => product.kind === BuildPlanTaskProductKind.WEBSITE_PAGE || product.kind === BuildPlanTaskProductKind.WEBSITE_SECTION);\n}\n\n/** Is this build task the `design-system-brand` generation step? */\nexport function isDesignSystemBrandStep(task: BuildPlanTask): boolean {\n return task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DESIGN_SYSTEM_BRAND;\n}\n\n/**\n * Does this build task write a file the stylesheet's design-token block is a function of? The config's writers,\n * and the brand step, whose module the config imports (#2353). The `design-tokens` step waits on all of them,\n * so the block is regenerated from the config's final state whichever of them moved last.\n */\nexport function isDesignTokenBlockInputWriter(task: BuildPlanTask): boolean {\n return isDesignSystemConfigWriter(task) || isDesignSystemBrandStep(task);\n}\n\n/** The ref of the `engine-capabilities` step the host derives when the decisions imply a capability nothing turned on (#2497). */\nexport const HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF = 'build-task-engine-capabilities';\n\n/** The ref of the `display-name` step the host derives when the brand's name is not yet the application's (#2505). */\nexport const HOST_DERIVED_DISPLAY_NAME_TASK_REF = 'build-task-display-name';\n\n/*\n * How far a build dispatch got is `Workbench_BuildDispatchPhase` in `@wildo-ai/platform-core-shared` —\n * NOT declared here, and deliberately not re-exported from here either (a re-export outside a declared\n * public entrypoint is its own defect). It moved there because the WORKBENCH reads these values to\n * decide how a dispatch renders and a browser bundle cannot import this package; that enum's docstring\n * carries the semantics of each member and why the two executors settle at different ones.\n */\n\n/**\n * One dispatch, newest first in {@link ApplicationBuildDispatchCompanionService.readDetachedDispatches}.\n * A PROJECTION of the dispatch's actor-system execution since #1359, not a record anything keeps.\n */\nexport interface ApplicationBuildDetachedDispatchRecord {\n /**\n * The execution this dispatch IS — what tells two attempts at one task apart (#2530). They used to be told apart by\n * task and start instant, which a second's resolution made the same for two attempts started together.\n */\n readonly executionId: string;\n readonly taskRef: string;\n /** When the task was SELECTED — the execution's creation instant. */\n readonly startedAt: string;\n readonly phase: Workbench_BuildDispatchPhase;\n /** When the phase left SUBMITTED. */\n readonly settledAt?: string;\n /** The durable actor-task row an ADMITTED coding run writes its real outcome to. */\n readonly codingTaskId?: string;\n /**\n * How the dispatch's run stands — its execution's status — and when it ended (#2523). The phase names the\n * hand-off and, for a coding run, stops at ADMITTED; a reader asking whether a dispatch has ended, and\n * how, reads these.\n */\n readonly runStatus: FlowsActors_Status;\n readonly runFinishedAt?: string;\n readonly error?: string;\n /**\n * Whose failure a FAILED coding run was, as the run recorded it (#1581): the task's, or the host's (a signed-out agent,\n * a spent quota, a killed turn). Read by the dispatch's page and card to link the coding lane where its trouble shows\n * (#2530 review M2). Absent for a run that did not fail, a generation step, and a run recorded before the field.\n */\n readonly failureAttribution?: CodingRunFailureAttribution;\n /** The conversation the dispatch was started from, when it was (#1454, Step 7). */\n readonly conversationId?: string;\n}\n\n/** A coding run's reported tokens, per dimension (#2232). Read off `CodingAgent_Usage` on the run's row. */\nexport interface CodingRunReportedTokens {\n readonly inputTokens?: number;\n readonly outputTokens?: number;\n readonly cacheReadTokens?: number;\n readonly cacheWriteTokens?: number;\n /** As reported; when the agent reported none, the sum of the dimensions it did report. */\n readonly totalTokens?: number;\n}\n\n/**\n * The tokens a run's recorded usage carries, or `undefined` when it carries none. Read by SHAPE: the row\n * crossed a JSON boundary, and `CodingAgent_Usage` makes every field optional.\n */\nexport function readCodingRunReportedTokens(usage: unknown): CodingRunReportedTokens | undefined {\n if (typeof usage !== 'object' || usage === null) return undefined;\n const bag = usage as Record<string, unknown>;\n const count = (key: string): number | undefined => (typeof bag[key] === 'number' && Number.isFinite(bag[key]) && (bag[key] as number) >= 0 ? bag[key] as number : undefined);\n const dimensions = {\n inputTokens: count('inputTokens'),\n outputTokens: count('outputTokens'),\n cacheReadTokens: count('cachedReadTokens'),\n cacheWriteTokens: count('cachedWriteTokens'),\n };\n const reported = Object.values(dimensions).filter((value): value is number => value !== undefined);\n const totalTokens = count('totalTokens') ?? (reported.length > 0 ? reported.reduce((sum, value) => sum + value, 0) : undefined);\n const tokens = Object.fromEntries(Object.entries({ ...dimensions, totalTokens }).filter((entry) => entry[1] !== undefined));\n return Object.keys(tokens).length > 0 ? tokens as CodingRunReportedTokens : undefined;\n}\n\n/**\n * One ATTEMPT at a build task — one actor execution, read from its own durable row (#1521).\n *\n * Nothing new is written to produce this: every dispatch has been an execution since #1359, so the\n * attempt history already existed and was read only five-at-a-time, newest first, across the whole\n * plan. This groups it by task.\n */\nexport interface ApplicationBuildTaskAttempt {\n /** The execution's own task id — the row an operator opens to read the full outcome. */\n readonly runTaskId: string;\n /**\n * A companion GENERATION step (labels, migrations, translations) rather than a coding run (#2232 review).\n * Both are attempts at a build task, but a generation step is no agent run: it has no agent-reported tokens or\n * cost, so counting it among the coding runs listed it as \"cost not reported by the agent\" and made every\n * coding-run total a false floor. Its own model calls' spend is {@link generationStepSpend}. Absent for a coding run.\n */\n readonly generationStep?: true;\n /**\n * What a GENERATION STEP's model calls spent, as its row records it (#2232). A labels or translations pass is\n * model calls priced by the provider, not an agent's reported cost, so it is a {@link PlaybookSpend}, the same\n * reading a playbook run's figure is. Absent on a coding run, and on a step whose row predates the field.\n */\n readonly generationStepSpend?: PlaybookSpend;\n /**\n * Who can fix a FAILED generation step's cause, as the step classified it (#3709); absent when it could not tell, and on\n * every coding run. `FRAMEWORK` holds the step at once (`FAILURE_OUTSIDE_APPLICATION`).\n */\n readonly failureOwner?: GenerationStepFailureOwner;\n /** This run was started past a landing the operator said was wrong, and why (#2217). */\n readonly landedOverride?: BuildTaskLandedOverride;\n /** When the run's row was opened: the task was SELECTED and its brief composed. */\n readonly startedAt: string;\n /**\n * When the door that dispatched this run began preparing it (#3206), from the run's task input: a wave's slot, or a\n * single-task door's read of the plan. The dispatch wait runs from here to {@link admittedAt}. Absent only on a row\n * from before #3206.\n */\n readonly preparationStartedAt?: string;\n /**\n * When the run was ADMITTED — the task row's start instant (#3206): a coding run once the coding lane started it, a\n * generation step when it opened. Absent for a run that never started.\n */\n readonly admittedAt?: string;\n readonly settledAt?: string;\n /** The execution's status, from the actor plane's own vocabulary. */\n readonly status: FlowsActors_Status;\n /** The coding lane's typed disposition, when the run recorded one (`ApplicationCodingTaskDisposition`). */\n readonly disposition?: string;\n readonly error?: string;\n /** Set when an operator put the task back in the queue after this run (#1535): the run no longer holds it. */\n readonly rearm?: BuildTaskRearm;\n /**\n * The failed checks of a run whose failure was suspected to be a sibling's, run again once nothing was writing (#3220):\n * TRUE when they all passed. Absent when no such re-check was made.\n */\n readonly isolatedRecheckPassed?: boolean;\n /** Checks that were already red when this run started, each with its diagnosis (#1529). */\n readonly carriedFailures?: readonly CarriedVerificationDiagnosis[];\n /** Checks this run ran GREEN — what tells a repair that a carried red has since been cleared. */\n readonly passedCheckRefs?: readonly string[];\n /*\n * What the durable row already recorded about the run and nothing read (#1541): each answers a question\n * the first end-to-end run's post-mortem answered with a script over the raw rows.\n */\n /**\n * What the run cost, as the agent reported it: its session's cumulative total, so a whole run's cost\n * however many turns it took (#2232). Absent when the agent reported none — never read as zero.\n */\n readonly cost?: { readonly amount: number; readonly currency: string };\n /**\n * The tokens the run reported (#2232), each dimension present only when reported. A coding run's total\n * is mostly prompt-cache reads (on app-creation-test-004, 1.1M of a 1.2M-token run), so the cache read\n * is kept apart: it is what a total that looks enormous is made of.\n */\n readonly tokens?: CodingRunReportedTokens;\n /** Checks the run FAILED, as this run's own (a carried red is in `carriedFailures`, not here). */\n readonly failedCheckRefs?: readonly string[];\n /** Why the agent's turn ended — `max_tokens` or `refusal` leave a change set that reads as complete and is not. */\n readonly agentStopReason?: string;\n /** Permission requests the ceiling or the task's scope refused. */\n readonly deniedPermissionCount?: number;\n /** Paths changed during the run outside the task's declared scope — recorded, never refused. */\n readonly outOfScopePaths?: readonly string[];\n /** Files the run itself changed (exclusive to the run, appeared during it, or committed during it). */\n readonly filesChanged?: number;\n /** The runs that shared the tree with this one, and the paths both changed (#1528). Absent for a run alone. */\n readonly concurrency?: { readonly overlappingTaskRefs: readonly string[]; readonly contendedPaths: readonly string[] };\n /** It failed while other runs were editing the tree, so the failure may be theirs; the budget forgives a bounded number. */\n readonly interferenceSuspected?: true;\n /**\n * It COMPLETED, and a sibling of its wave overwrote its declared product (#2210): which runs, which files,\n * and whether the wave re-ran the task for it. Absent for a run nobody interfered with.\n */\n readonly interference?: BuildTaskInterference;\n /**\n * The run ended without ever starting, by the HOST's act: refused at admission, or left selected by\n * a stopped process (#1581). Shown in the history, because it explains why nothing ran, and counted\n * by no summary figure, because it was no attempt of the task's (`CodingRunStart.REFUSED_BY_HOST`).\n */\n readonly refusedBeforeStart?: true;\n /**\n * Nothing ran: either a host refusal (above) or admission refusing the task's OWN contract, which IS\n * an attempt the budget counts. Either way no agent worked, so the run could report no cost.\n */\n readonly ranNothing?: true;\n /**\n * Whose failure a failed run was (#1581): the budget forgives HOST failures up to a bound, so this is\n * what explains a task that failed three times and was still offered again.\n */\n readonly failureAttribution?: CodingRunFailureAttribution;\n /**\n * Requirements the run's agent reported it could NOT fully meet, from its closing report's typed block (#2496). A\n * completed run's entries derive follow-up tasks ({@link HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX}); every run's are shown.\n */\n readonly unmetRequirements?: readonly ApplicationCodingUnmetRequirement[];\n /** The agent wrote the block and it did not parse: the gap was stated and could not be read (#2496). */\n readonly unmetRequirementsMalformed?: string;\n /**\n * Requirements the run's agent STATED are met by the tree it left, with where (#3227): the positive statement that alone\n * may close a gap another run reported (`collectFollowUpGapsMetSince`). Absent means nothing was stated, never \"met\".\n */\n readonly metRequirements?: readonly ApplicationCodingMetRequirement[];\n /** The agent wrote the met block and it did not parse: it states nothing (#3227). */\n readonly metRequirementsMalformed?: string;\n /**\n * What the review of a website task's copy found, once the run completed (#2593): claims its cited requirements do\n * not back, figures that disagree with their declarations. Advisory, like `unmetRequirements`: shown, never a reason\n * the task does not land. Absent for a run that was not a website run or is not reviewed yet.\n */\n readonly websiteCopyReview?: WebsiteCopyReview;\n /**\n * What the review of a website task's DRAWING found, once the run completed (#2785): rubric rules its sections break\n * as photographed, and what the camera measured. Advisory like the copy review: shown, never a reason the task does\n * not land. Absent for a run that was not a website run or is not reviewed yet.\n */\n readonly websiteVisualReview?: WebsiteVisualReview;\n}\n\n/**\n * An instant as an ISO string: the task snapshot carries strings, the task row dates (#2187), and a reader must not\n * care which it was handed.\n */\nfunction toIsoInstant(value: string | Date): string {\n return value instanceof Date ? value.toISOString() : value;\n}\n\n/**\n * The dispatch instants a build attempt's task row carries (#3206): the wave preparation's start, stamped on its input\n * at open, and its admission, the row's start instant. Read by shape: the row crossed a JSON boundary.\n */\nfunction readBuildAttemptDispatchInstants(task: { readonly input?: unknown; readonly startedAt?: string | Date }): {\n readonly preparationStartedAt?: string;\n readonly admittedAt?: string;\n} {\n const preparationStartedAt = (task.input as { preparationStartedAt?: unknown } | undefined)?.preparationStartedAt;\n return {\n ...(typeof preparationStartedAt === 'string' && Number.isFinite(Date.parse(preparationStartedAt)) ? { preparationStartedAt } : {}),\n ...(task.startedAt ? { admittedAt: toIsoInstant(task.startedAt) } : {}),\n };\n}\n\n/**\n * Whether an attempt COUNTS as one of the task's: everything but a host refusal. A refusal of the task's\n * own contract counts although nothing ran, because the attempt budget counts it (#1581).\n */\nexport function isCountedBuildTaskAttempt(attempt: Pick<ApplicationBuildTaskAttempt, 'refusedBeforeStart'>): boolean {\n return attempt.refusedBeforeStart !== true;\n}\n\n/**\n * A red the build keeps meeting and no task caused — owed a repair, with its diagnosis (#1529).\n *\n * Grouped per check across every attempt that carried it, because that is the unit a repair fixes: one\n * broken generated file reds one check for every task that verifies against it.\n */\nexport interface ApplicationBuildRepairOwed {\n readonly checkRef: string;\n /** The first attempt that met it red — when the breakage is known to predate. */\n readonly firstSeenAt: string;\n readonly lastSeenAt: string;\n /** The tasks whose attempts met it red: the work this red has been taxing. */\n readonly affectedTaskRefs: readonly string[];\n /** From the most recent attempt that carried it. */\n readonly diagnosis: CarriedVerificationDiagnosis;\n}\n\n/**\n * A landing probe the tree landing read (the working tree, #3204) does NOT satisfy: exactly what landing searched for, and\n * where. Whether the product is merely uncommitted is no longer a question (#3514): a commit is not a condition of landing.\n */\nexport interface ApplicationBuildTaskUnmetProbe {\n readonly probe: BuildPlanTaskLandedProbe;\n /** For a shell probe: what the surface is missing, still carries, or could not be asked (#1538). */\n readonly shell?: ShellProbeExplanation;\n /** For a registry probe: what the application does not register as planned, or why it could not be read (#2966). */\n readonly registered?: AgentWorkProbeExplanation;\n}\n\n/**\n * Everything the build knows about ONE task, in one read (#1521).\n *\n * The case it exists for: \"not landed\" hid three facts — never dispatched, dispatched and FAILED, and\n * dispatched, SUCCEEDED, and unprovable — and the third burned hours on the #1273 run because it is\n * indistinguishable from the first on every other surface. Here they are three different shapes:\n * no attempts; a failed attempt; a completed attempt with `unmetProbes`.\n */\nexport interface ApplicationBuildTaskRecord {\n readonly taskRef: string;\n readonly targetKind: string;\n readonly status: WorkbenchBuildPlanTaskStatus;\n /**\n * The follow-up tasks the host derived from this task's reported unmet requirements (#2496), as the plan carries them.\n * Named here so a reader never has to restate the derivation: absent means none was derived, whatever the attempts say.\n */\n readonly followUpTaskRefs?: readonly string[];\n /** Present on a follow-up task: the task whose reported gap derived it (#2496). */\n readonly followUpOf?: string;\n /**\n * Landed by a person's committed closure, not by its own probe (#3224, #3227): what satisfied it, or that it was\n * declined, and why. A reader must never take it for a proven product.\n */\n readonly closure?: { readonly kind: BuildTaskClosureKind; readonly satisfiedBy?: string; readonly reason: string };\n /** Newest first. Empty = never dispatched. */\n readonly attempts: readonly ApplicationBuildTaskAttempt[];\n /** READY tasks only: why dispatch passes over it, from the SAME classification the selector uses. */\n readonly stuck?: ApplicationBuildStuckTask;\n /** Not landed and attempted at least once: the probes HEAD does not satisfy. */\n readonly unmetProbes?: readonly ApplicationBuildTaskUnmetProbe[];\n /** A generation step that lands on schema-plan state rather than on files: that state, when not in sync. */\n readonly schemaPlanSyncState?: SchemaPlanSyncState;\n /** The `design-tokens` step, not landed and attempted: whether its stylesheet block is stale or could not be checked. */\n readonly designTokenBlockState?: DesignTokenBlockState;\n /** The `design-system-brand` step, not landed and attempted: whether its module is stale or the brand could not be read. */\n readonly brandDesignState?: BrandDesignState;\n /**\n * A generation step whose landing cannot be judged, and why (#2504): a labels plan that hides units the application\n * owes. Carried so the board and `wildo context journey` name the cause, instead of listing nothing.\n */\n readonly landingBlockedBy?: string;\n /** BLOCKED tasks only: the prerequisites that have not landed. */\n readonly waitingOn?: readonly string[];\n /** LANDED with no product to prove — RAN-not-PROVEN (`application-creation-directive.md`). */\n readonly unverifiable?: boolean;\n /**\n * LANDED, and no run of this task ever started (#2217): the probe found the product before anything ran. It may\n * be true — a sibling task's run wrote it, or a person did — or the probe may be reading something that is not\n * the product (#2216 read a comment). The board must not show it as a bare `landed`, which reads as \"built by its\n * own run\". `probedPaths` is where the probe found it; `wildo build run <task> --despite-landed` runs it anyway.\n */\n readonly landedBeforeAnyRun?: { readonly probedPaths: readonly string[] };\n /**\n * LANDED, and something the landing does not cover is unfinished (#3285): a billing catalogue committed while the\n * backend does not enable billing, so nothing serves it. A MARK beside the landing, never a reason it does not land\n * (`resolveBuildTaskLandingAdvisories`); derived from the committed tree at read time, so it clears once the switch is\n * committed. Absent when there is none.\n */\n readonly landingAdvisories?: readonly BuildTaskLandingAdvisory[];\n /**\n * A generation step running in this companion right now: how far it has got (#2215). Without it a\n * step that runs for hours reads \"running\" the whole time, and slow cannot be told from stuck.\n */\n readonly progress?: GenerationStepProgress;\n}\n\nexport interface ApplicationBuildTaskRecords {\n readonly tasks: readonly ApplicationBuildTaskRecord[];\n readonly summary: {\n readonly taskCount: number;\n readonly landed: number;\n /** Of `landed`, the tasks no run of their own ever started (#2217) — see {@link ApplicationBuildTaskRecord.landedBeforeAnyRun}. */\n readonly landedBeforeAnyRun: number;\n readonly blocked: number;\n /** READY and no run ever STARTED — the work simply not reached yet. A refused dispatch starts nothing (#1581). */\n readonly readyNeverAttempted: number;\n /** READY, attempted, not stuck — a failed run the loop will re-offer. */\n readonly readyToRetry: number;\n /** READY and passed over, per typed reason. */\n readonly stuckByReason: Readonly<Record<Workbench_BuildTaskStuckReason, number>>;\n /** Runs that STARTED. A dispatch refused before admission is in its task's history and not here (#1581). */\n readonly attempts: number;\n /**\n * Attempts that COMPLETED on a task that has still not landed — dispatches that bought nothing.\n * The band-level stall signal: it grows while the landed count does not.\n */\n readonly completedAttemptsWithoutLanding: number;\n /** Tasks attempted more than once without landing — the per-task stall signal. */\n readonly repeatedlyAttemptedWithoutLanding: readonly string[];\n /** What the build has spent, per currency, and how much of it on tasks that have not landed (#1541). */\n readonly spend: ReturnType<typeof deriveBuildSpend>;\n /**\n * Parallel-build observability (#1528): the degree the lane runs at now, and across every attempt\n * how many overlapped another run, how many failed while suspected of interference, and which paths\n * two runs both changed.\n */\n readonly parallelism: {\n readonly degree: number;\n readonly overlappingAttempts: number;\n readonly interferenceSuspectedAttempts: number;\n /** Completed attempts whose product a sibling overwrote (#2210). */\n readonly interferedCompletedAttempts: number;\n readonly contendedPaths: readonly string[];\n };\n };\n /**\n * TRUE when an attempt listing reached its page cap, so some attempts may be missing. Said rather\n * than hidden: a count read off a truncated listing is a claim about the query, not the build.\n */\n readonly attemptsTruncated: boolean;\n /**\n * The application's runtimes a live dev-loop supervisor has PAUSED or is CRASH-LOOPING (#1537, #3365) — the\n * application being built cannot start. Said beside the build rather than gating it: most tasks build fine against a\n * dead backend, and refusing them would turn a visible problem into a stalled lane. Absent when no\n * supervisor could answer.\n */\n readonly unavailableRuntimes?: readonly UnavailableApplicationRuntime[];\n /**\n * The backends whose own start record says their last start FAILED (#2405), with the refusal. Unlike a paused\n * supervisor this is read in every dev-loop mode, including an app-creator application with no supervisor. The wave\n * stops filling while one is listed; this is where `wildo build tasks` shows why. Absent when there is none.\n */\n readonly bootFailures?: readonly ApplicationBuildRecordsBootFailure[];\n /**\n * How the person's build-task decisions stand when they do not simply count (#3224 review, R2): NOT_HONOURED or UNKNOWN\n * with the reason, and any named condition on a single run record with its remedy. Absent when they count and nothing\n * is to be said; `wildo build tasks` prints it.\n */\n readonly buildTaskDecisions?: { readonly standing: BuildTaskDecisionsStanding; readonly reason?: string; readonly conditions?: readonly string[] };\n /**\n * Reds the build keeps meeting that no task caused (#1529), each with the files it names and what\n * generated them. A check that a LATER attempt ran green is cleared and not listed.\n */\n readonly repairsOwed: readonly ApplicationBuildRepairOwed[];\n}\n\n/**\n * The window of NEWEST runs a reader asks under when it is about recent runs only (the assembly repair's attempts this\n * round). A reader of a task's whole history (the build record, which tasks ever started a run, each task's latest\n * completed run for the follow-up derivation) reads to {@link BUILD_TASK_RECORD_HISTORY_CEILING} instead.\n */\nconst BUILD_TASK_ATTEMPT_PAGE_CAP = 200;\n\n/** How long one listing of the latest completed coding runs serves the plan reads of a burst (#2496 review F8). */\nconst LATEST_COMPLETED_CODING_RUNS_TTL_MS = 2_000;\n\n/**\n * How far back the BUILD RECORD reads each coding system's runs (#2530): the record is every attempt at every task, and a\n * window of the newest 200 is not that. On a long build that window held only the latest runs, so an early task attempted\n * six times showed fewer, and a task run long ago showed none.\n *\n * Still a bound, and still said (`attemptsTruncated`): the read pages from the database, newest first, so its cost grows\n * with the history, and an unbounded one would bring back what #2186 removed. Ten times the window: a whole creation run\n * fits under it many times over (a build is tens of tasks, each run a few times, plus the playbooks' own coding runs).\n * The other readers keep the window, since they ask about the newest runs only (what is in flight, what failed last).\n */\nexport const BUILD_TASK_RECORD_HISTORY_CEILING = 2_000;\n\n/**\n * How many of its OWN failures a build task may spend before dispatch stops offering it (#1536).\n * Three, because the first end-to-end run's two repeating tasks each failed three times identically:\n * a third identical failure says the dispatch, not luck, is the problem. Released by a re-arm.\n */\nexport const MAXIMUM_ATTRIBUTABLE_FAILED_ATTEMPTS = 3;\n\n/** The check a repair of the application's refused start is scoped and verified by (#3204): the running backend's. */\nexport const STARTUP_REPAIR_CHECK_REF = 'check:backend-ready';\n\n/**\n * The refused starts among the backend's boot failures, as the failing check a repair is given (#3204): each service and\n * the refusal it recorded. `undefined` when no failure is the application's own refusal (a dev-stack cause is no task's).\n */\nexport function describeRefusedStartupAsCheckFailure(failures: readonly ApplicationBootFailure[]): AssemblyCheckFailure | undefined {\n const refused = failures.filter(isApplicationStartupFailure);\n if (refused.length === 0) return undefined;\n const detail = refused.map((failure) => `${failure.serviceIdentifier}: ${failure.message ?? 'its start failed and recorded no message'}`).join('\\n');\n return { checkRef: STARTUP_REPAIR_CHECK_REF, output: detail.split('\\n').slice(0, 5).join('\\n'), detail };\n}\n\n/** The stuck reasons that clear by themselves while a wave runs: a plan whose ready tasks are only these is moving (#3204). */\nconst BUILD_TASK_REASONS_THAT_ARE_PROGRESS: ReadonlySet<Workbench_BuildTaskStuckReason> = new Set([\n Workbench_BuildTaskStuckReason.IN_FLIGHT,\n Workbench_BuildTaskStuckReason.CONTENDED,\n Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK,\n]);\n\n/** How much of a failed check's output a retry is shown — enough for a compiler's first errors, not a log. */\nconst PREVIOUS_ATTEMPT_OUTPUT_TAIL_CHARS = 2000;\n\n/** One build attempt from its execution row; `null` for a row that names no build task. Read by the build record and the journey timeline. */\nexport function projectBuildTaskAttempt(execution: {\n readonly systemRef?: string;\n readonly status: FlowsActors_Status;\n // The stored row's instants are dates (#2187); the attempt this builds carries ISO strings.\n readonly createdAt: Date;\n readonly finishedAt?: Date;\n readonly standaloneTasks: readonly { readonly _id: string; readonly input?: unknown; readonly output?: unknown; readonly memory?: unknown; readonly startedAt?: string | Date }[];\n}): { readonly taskRef: string; readonly attempt: ApplicationBuildTaskAttempt } | null {\n const task = execution.standaloneTasks[0];\n const taskRef = (task?.input as { taskRef?: unknown } | undefined)?.taskRef;\n if (!task || typeof taskRef !== 'string') return null;\n const output = task.output as {\n disposition?: unknown;\n carriedVerificationDiagnoses?: unknown;\n carriedVerificationFailures?: unknown;\n verification?: unknown;\n usage?: { cost?: { amount?: unknown; currency?: unknown } } & Record<string, unknown>;\n agentStopReason?: unknown;\n deniedPermissionCount?: unknown;\n scopeAssessment?: { outOfScopePaths?: unknown };\n changeSetSummary?: { stats?: Record<string, unknown> };\n concurrency?: { overlappingTaskRefs?: unknown; contendedPaths?: unknown };\n interferenceSuspected?: unknown;\n failureAttribution?: unknown;\n unmetRequirements?: unknown;\n unmetRequirementsMalformed?: unknown;\n metRequirements?: unknown;\n metRequirementsMalformed?: unknown;\n } | undefined;\n const rearm = readBuildTaskRearm(task.memory);\n const isolatedRecheck = readIsolatedVerificationRecheck(task.memory);\n const unmetRequirements = Array.isArray(output?.unmetRequirements)\n ? (output!.unmetRequirements as { requirementRef?: unknown; missing?: unknown }[])\n .filter((entry) => typeof entry?.requirementRef === 'string' && typeof entry.missing === 'string')\n .map((entry) => ({ requirementRef: entry.requirementRef as string, missing: entry.missing as string }))\n : [];\n const metRequirements = Array.isArray(output?.metRequirements)\n ? (output!.metRequirements as { requirementRef?: unknown; evidence?: unknown }[])\n .filter((entry) => typeof entry?.requirementRef === 'string' && typeof entry.evidence === 'string')\n .map((entry) => ({ requirementRef: entry.requirementRef as string, evidence: entry.evidence as string }))\n : [];\n const landedOverride = readBuildTaskLandedOverride(task.input);\n const interference = readBuildTaskInterference(task.memory);\n const websiteCopyReview = readWebsiteCopyReview(task.memory);\n const websiteVisualReview = readWebsiteVisualReview(task.memory);\n const carriedFailures = Array.isArray(output?.carriedVerificationDiagnoses)\n ? (output!.carriedVerificationDiagnoses as CarriedVerificationDiagnosis[]).filter((entry) => typeof entry?.checkRef === 'string')\n : [];\n const verification = Array.isArray(output?.verification)\n ? (output!.verification as { checkRef?: unknown; outcome?: { success?: unknown } }[]).filter((entry) => typeof entry?.checkRef === 'string')\n : [];\n const passedCheckRefs = verification.filter((entry) => entry.outcome?.success === true).map((entry) => String(entry.checkRef));\n const carriedRefs = new Set(Array.isArray(output?.carriedVerificationFailures) ? (output!.carriedVerificationFailures as unknown[]).map(String) : []);\n const failedCheckRefs = verification\n .filter((entry) => entry.outcome?.success === false && !carriedRefs.has(String(entry.checkRef)))\n .map((entry) => String(entry.checkRef));\n const cost = output?.usage?.cost;\n // Whichever key the run's writer used (#2390): `failure` for a refusal or a step, `error` and its siblings for a coding run.\n const failureMessage = readSettledRunFailureMessage(output);\n const tokens = readCodingRunReportedTokens(output?.usage);\n const stats = output?.changeSetSummary?.stats;\n const count = (value: unknown): number => (typeof value === 'number' && Number.isFinite(value) ? value : 0);\n const outOfScopePaths = Array.isArray(output?.scopeAssessment?.outOfScopePaths)\n ? (output!.scopeAssessment!.outOfScopePaths as unknown[]).map(String)\n : [];\n return {\n taskRef,\n attempt: {\n runTaskId: String(task._id),\n ...(execution.systemRef === APPLICATION_BUILD_SYSTEM_REF ? { generationStep: true as const } : {}),\n ...(() => {\n if (execution.systemRef !== APPLICATION_BUILD_SYSTEM_REF) return {};\n const generationStepSpend = readRecordedPlaybookSpend((task.output as { spend?: unknown } | undefined)?.spend);\n const recordedOwner = (task.output as { failureOwner?: unknown } | undefined)?.failureOwner;\n const failureOwner = (Object.values(GenerationStepFailureOwner) as unknown[]).includes(recordedOwner) ? recordedOwner as GenerationStepFailureOwner : undefined;\n return { ...(generationStepSpend ? { generationStepSpend } : {}), ...(failureOwner !== undefined ? { failureOwner } : {}) };\n })(),\n startedAt: execution.createdAt.toISOString(),\n ...readBuildAttemptDispatchInstants(task),\n ...(execution.finishedAt ? { settledAt: execution.finishedAt.toISOString() } : {}),\n status: execution.status,\n ...(typeof output?.disposition === 'string' ? { disposition: output.disposition } : {}),\n ...(failureMessage !== undefined ? { error: failureMessage } : {}),\n ...(rearm ? { rearm } : {}),\n ...(isolatedRecheck ? { isolatedRecheckPassed: isolatedRecheck.passed } : {}),\n ...(landedOverride ? { landedOverride } : {}),\n ...(carriedFailures.length > 0 ? { carriedFailures } : {}),\n ...(passedCheckRefs.length > 0 ? { passedCheckRefs } : {}),\n ...(typeof cost?.amount === 'number' && typeof cost.currency === 'string' ? { cost: { amount: cost.amount, currency: cost.currency } } : {}),\n ...(tokens ? { tokens } : {}),\n ...(failedCheckRefs.length > 0 ? { failedCheckRefs } : {}),\n ...(typeof output?.agentStopReason === 'string' ? { agentStopReason: output.agentStopReason } : {}),\n ...(typeof output?.deniedPermissionCount === 'number' ? { deniedPermissionCount: output.deniedPermissionCount } : {}),\n ...(outOfScopePaths.length > 0 ? { outOfScopePaths } : {}),\n ...(stats ? { filesChanged: count(stats['runExclusive']) + count(stats['appearedDuringRun']) + count(stats['committedDuringRun']) } : {}),\n ...(Array.isArray(output?.concurrency?.overlappingTaskRefs) ? {\n concurrency: {\n overlappingTaskRefs: (output!.concurrency!.overlappingTaskRefs as unknown[]).map(String),\n contendedPaths: Array.isArray(output!.concurrency!.contendedPaths) ? (output!.concurrency!.contendedPaths as unknown[]).map(String) : [],\n },\n } : {}),\n ...(output?.interferenceSuspected === true ? { interferenceSuspected: true as const } : {}),\n ...(interference ? { interference } : {}),\n ...(typeof output?.failureAttribution === 'string' ? { failureAttribution: output.failureAttribution as CodingRunFailureAttribution } : {}),\n ...(unmetRequirements.length > 0 ? { unmetRequirements } : {}),\n ...(typeof output?.unmetRequirementsMalformed === 'string' ? { unmetRequirementsMalformed: output.unmetRequirementsMalformed } : {}),\n ...(metRequirements.length > 0 ? { metRequirements } : {}),\n ...(typeof output?.metRequirementsMalformed === 'string' ? { metRequirementsMalformed: output.metRequirementsMalformed } : {}),\n ...(websiteCopyReview ? { websiteCopyReview } : {}),\n ...(websiteVisualReview ? { websiteVisualReview } : {}),\n ...refusalMarks(deriveCodingRunStart({ status: execution.status, ...(task.startedAt ? { startedAt: toIsoInstant(task.startedAt) } : {}), ...(output ? { output } : {}) })),\n },\n };\n}\n\n/**\n * What one website run's copy review covers (#2593): the task's own subjects, and — for a PAGE task — every section of\n * its page whose section task has no completed run of its own. A page agent that wrote its sections' bodies despite\n * its boundary leaves those tasks landed by probe with no run to review them, so the page run's review covers them.\n */\nfunction websiteCopyReviewScope(\n task: BuildPlanTask,\n tasks: readonly BuildPlanTask[],\n companionExports: unknown,\n latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>,\n deliveryOf?: (requirementRef: string) => WebsiteClaimDelivery,\n): { readonly own: readonly WebsiteTaskCopySubject[]; readonly alsoReviewed: readonly WebsiteCopyAlsoReviewed[] } {\n const own = describeWebsiteTaskCopySubjects(task, companionExports, deliveryOf) ?? [];\n const pageRefs = new Set(task.produces.flatMap((product) => (product.kind === BuildPlanTaskProductKind.WEBSITE_PAGE ? [product.pageRef] : [])));\n if (pageRefs.size === 0) return { own, alsoReviewed: [] };\n const alsoReviewed = tasks\n .filter((candidate) => candidate.taskRef !== task.taskRef && candidate.target.kind === BuildPlanTaskTargetKind.WEBSITE && !latest.has(candidate.taskRef)\n && candidate.produces.some((product) => product.kind === BuildPlanTaskProductKind.WEBSITE_SECTION && pageRefs.has(product.pageRef)))\n .map((candidate) => ({ taskRef: candidate.taskRef, subjects: describeWebsiteTaskCopySubjects(candidate, companionExports, deliveryOf) ?? [] }))\n .filter((entry) => entry.subjects.length > 0);\n return { own, alsoReviewed };\n}\n\n/** The key segment a page's own words sit under (`website.<page>.meta.title`), in the place a section ref would be. */\nconst WEBSITE_PAGE_OWN_WORDS_SEGMENT = 'meta';\n\n/**\n * A locale's website pack (by its CODE) from a tree reader, `undefined` when absent or not a flat object, with the\n * fragments of the sections whose key prefixes are named merged in (#3204): a section keeps its words in\n * `<segment>/<page>.<sectionRef>.json`, which the website's own loader merges the same way. A page's own words\n * (`website.<page>.meta.`, the prefix `describeWebsiteTaskCopySubjects` gives a page) are not a section's: they live\n * in the pack, where `add-marketing-page` writes them, so no file is read for them. Nor for a bare page prefix.\n */\nexport async function readWebsiteLabelPack(\n reader: { readText(subjectRelativePath: string): Promise<string | undefined> },\n locale: string,\n sectionKeyPrefixes: readonly string[] = [],\n): Promise<Readonly<Record<string, unknown>> | undefined> {\n const pack = parseWebsiteLabelPackText(await reader.readText(websiteLabelPackPath(locale)));\n if (pack === undefined) return undefined;\n const merged: Record<string, unknown> = { ...pack };\n for (const prefix of new Set(sectionKeyPrefixes)) {\n const section = /^website\\.([^.]+)\\.([^.]+)\\.$/u.exec(prefix);\n if (section === null || section[2] === WEBSITE_PAGE_OWN_WORDS_SEGMENT) continue;\n Object.assign(merged, parseWebsiteLabelPackText(await reader.readText(websiteSectionLabelFragmentPath(locale, section[1]!, section[2]!))) ?? {});\n }\n return merged;\n}\n\nfunction parseWebsiteLabelPackText(text: string | undefined): Readonly<Record<string, unknown>> | undefined {\n if (text === undefined) return undefined;\n try {\n const parsed: unknown = JSON.parse(text);\n return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed) ? parsed as Record<string, unknown> : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction sameWebsiteCopy(left: Readonly<Record<string, string>>, right: Readonly<Record<string, string>>): boolean {\n const keys = Object.keys(left);\n return keys.length === Object.keys(right).length && keys.every((key) => right[key] === left[key]);\n}\n\n/** What an attempt's record says about a run that never started (`deriveCodingRunStart`, #1581). */\nfunction refusalMarks(start: CodingRunStart): { refusedBeforeStart?: true; ranNothing?: true } {\n if (start === CodingRunStart.REFUSED_BY_HOST) return { refusedBeforeStart: true, ranNothing: true };\n if (start === CodingRunStart.REFUSED_CONTRACT) return { ranNothing: true };\n return {};\n}\n\n/**\n * What the build has SPENT, per currency (#1541): every attempt's reported cost, and the part of it\n * spent on tasks that have not landed. Rounded at this boundary to the cent, because it accumulates.\n *\n * `attemptsWithoutReportedCost` counts SETTLED attempts whose run reported no cost (#1507): an agent may\n * report none, and those attempts are not in the totals — which are then a floor, and say so, rather\n * than quietly reading an unpriced attempt as free. An attempt still running has no cost yet and is not\n * counted.\n *\n * `totalTokens` / `cacheReadTokens` (#2232) sum what the runs REPORTED, present only when at least one did.\n * Generation steps are left out of every figure here: they are no agent runs and report neither.\n * Tokens are reported where a cost may not be (an agent priced by subscription, a provider that prices\n * nothing), so they are the figure that says a run worked when its cost is unknown.\n */\nexport function deriveBuildSpend(records: readonly Pick<ApplicationBuildTaskRecord, 'status' | 'attempts'>[]): {\n readonly total: Readonly<Record<string, number>>;\n readonly onTasksNotLanded: Readonly<Record<string, number>>;\n readonly attemptsWithoutReportedCost: number;\n readonly totalTokens?: number;\n readonly cacheReadTokens?: number;\n /** The generation steps' own spend (#2232), apart from the coding runs. Absent when no step ran. */\n readonly generationSteps?: ApplicationBuildGenerationStepSpend;\n} {\n const total: Record<string, number> = {};\n const onTasksNotLanded: Record<string, number> = {};\n let attemptsWithoutReportedCost = 0;\n const tokens: { totalTokens?: number; cacheReadTokens?: number } = {};\n const generationSpends: PlaybookSpend[] = [];\n let generationSteps = 0;\n let generationStepsWithoutRecordedSpend = 0;\n for (const record of records) {\n for (const attempt of record.attempts) {\n // A run that never started could report no cost: it is not an unpriced attempt (#1581).\n if (attempt.ranNothing === true) continue;\n // A generation step is no agent run: its model calls are its own figure, never an unpriced coding run (#2232).\n if (attempt.generationStep === true) {\n if (attempt.settledAt === undefined) continue;\n generationSteps += 1;\n // A step no meter observed recorded nothing either: counted apart, never merged in as spending nothing.\n if (attempt.generationStepSpend && attempt.generationStepSpend.measurement !== PlaybookSpendMeasurement.NOT_OBSERVED) generationSpends.push(attempt.generationStepSpend);\n else generationStepsWithoutRecordedSpend += 1;\n continue;\n }\n for (const key of ['totalTokens', 'cacheReadTokens'] as const) {\n const value = attempt.tokens?.[key];\n if (value !== undefined) tokens[key] = (tokens[key] ?? 0) + value;\n }\n if (!attempt.cost) {\n if (attempt.settledAt !== undefined) attemptsWithoutReportedCost += 1;\n continue;\n }\n total[attempt.cost.currency] = (total[attempt.cost.currency] ?? 0) + attempt.cost.amount;\n if (record.status !== WorkbenchBuildPlanTaskStatus.LANDED) {\n onTasksNotLanded[attempt.cost.currency] = (onTasksNotLanded[attempt.cost.currency] ?? 0) + attempt.cost.amount;\n }\n }\n }\n const cents = (sums: Record<string, number>) => Object.fromEntries(Object.entries(sums).map(([currency, amount]) => [currency, Math.round(amount * 100) / 100]));\n return {\n total: cents(total),\n onTasksNotLanded: cents(onTasksNotLanded),\n attemptsWithoutReportedCost,\n ...tokens,\n ...(generationSteps > 0 ? { generationSteps: {\n steps: generationSteps,\n stepsWithoutRecordedSpend: generationStepsWithoutRecordedSpend,\n // Absent when no step recorded one: an empty merge would read \"measured, 0 calls\" beside steps that recorded nothing.\n ...(generationSpends.length > 0 ? { spend: mergePlaybookSpend(generationSpends) } : {}),\n } } : {}),\n };\n}\n\n/**\n * What the build's generation steps spent (#2232): how many settled, how many have no recorded spend (a row\n * from before #2232), and their merged spend. The merged spend's own `measurement` says whether any call\n * reported no usage; a step with no recorded spend is counted apart, never as free.\n */\nexport interface ApplicationBuildGenerationStepSpend {\n readonly steps: number;\n readonly stepsWithoutRecordedSpend: number;\n /** The steps' recorded spend, merged. Absent when no step recorded one. */\n readonly spend?: PlaybookSpend;\n}\n\n/**\n * The reds owed a repair, from every attempt's record (#1529). Pure over the attempts, so what counts as\n * \"still owed\" is pinned rather than implied: a check is cleared once any attempt that started AFTER the\n * last one carrying it ran it green.\n */\nexport function deriveRepairsOwed(attemptsByTask: ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]>): ApplicationBuildRepairOwed[] {\n const byCheck = new Map<string, { firstSeenAt: string; lastSeenAt: string; affected: Set<string>; diagnosis: CarriedVerificationDiagnosis }>();\n const passes: { checkRef: string; at: string }[] = [];\n for (const [taskRef, attempts] of attemptsByTask) {\n for (const attempt of attempts) {\n for (const checkRef of attempt.passedCheckRefs ?? []) passes.push({ checkRef, at: attempt.startedAt });\n for (const carried of attempt.carriedFailures ?? []) {\n const entry = byCheck.get(carried.checkRef);\n if (entry === undefined) {\n byCheck.set(carried.checkRef, { firstSeenAt: attempt.startedAt, lastSeenAt: attempt.startedAt, affected: new Set([taskRef]), diagnosis: carried });\n continue;\n }\n entry.affected.add(taskRef);\n if (attempt.startedAt < entry.firstSeenAt) entry.firstSeenAt = attempt.startedAt;\n if (attempt.startedAt > entry.lastSeenAt) {\n entry.lastSeenAt = attempt.startedAt;\n entry.diagnosis = carried;\n }\n }\n }\n }\n return [...byCheck]\n .filter(([checkRef, entry]) => !passes.some((pass) => pass.checkRef === checkRef && pass.at > entry.lastSeenAt))\n .map(([checkRef, entry]) => ({\n checkRef,\n firstSeenAt: entry.firstSeenAt,\n lastSeenAt: entry.lastSeenAt,\n affectedTaskRefs: [...entry.affected].sort(),\n diagnosis: entry.diagnosis,\n }))\n .sort((left, right) => left.firstSeenAt.localeCompare(right.firstSeenAt));\n}\n\n/** What the next dispatch WOULD be. Returned unconfirmed, so a creator sees the scope before anything runs. */\nexport interface ApplicationBuildDispatchPlan {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n /**\n * What the task DECLARES it will produce (#1432).\n *\n * Carried on the plan because the plan is what the coding-run judge is given, and its treatment asks\n * whether the run implemented the dispatched task's target and stage — a question nothing can answer\n * from a taskRef and a target kind. It is also what a creator reading an unconfirmed plan needs in\n * order to see the scope: the mutation prefixes say where the agent may write, and only this says\n * what is supposed to come out.\n */\n readonly produces: readonly BuildPlanTaskProduct[];\n /**\n * Present exactly when the next task is a companion generation step. A build plan INTERLEAVES two\n * executors — coding tasks for a coding agent, and companion generation steps (labels, seeds, emails)\n * the companion runs itself — and this route serves BOTH: `dispatch-next` routes by the task's own\n * `target.kind`. (An earlier version refused generation steps by name; now that an executor exists,\n * the refusal would be a hole in the build lane, not a boundary.)\n */\n readonly generationStepRef?: string;\n readonly allowedPathPrefixes: readonly string[];\n readonly prohibitedPathPrefixes: readonly string[];\n readonly requiredChecks: readonly string[];\n readonly installedSkillRefs: readonly string[];\n readonly readyTaskRefs: readonly string[];\n readonly landedTaskRefs: readonly string[];\n /**\n * The subset of `landedTaskRefs` that landed WITHOUT PROOF — a task declaring no product, which has\n * a completed run and therefore cannot be held against the queue, but whose work nothing verified.\n *\n * A subset rather than a separate state on purpose: for scheduling these tasks ARE landed, and a\n * caller that forgot this field would schedule correctly and merely report less. The opposite\n * shape — a third status the scheduler must interpret — is how a task nobody handled becomes a\n * task nobody runs.\n *\n * Empty is the healthy answer and the one a regenerated plan produces (#600): a task that declares\n * what it produces is proven landed or is not landed, with no third case.\n */\n readonly unverifiableLandedTaskRefs: readonly string[];\n}\n\n/**\n * A build task that has been SELECTED and composed, before either executor has touched it.\n *\n * Named rather than inlined on `prepareNextBuildTask` because both dispatch doors now pass one of\n * these to a shared executor — the seam that makes selection happen exactly once per dispatch.\n *\n * `stuckTasks` rides the selection that produced it, so a concurrent pass can never be reported in\n * its place (#1451).\n */\ntype PreparedBuildTask = (\n | { readonly kind: 'CODING'; readonly plan: ApplicationBuildDispatchPlan; readonly contract: ReturnType<typeof composeBuildTaskCodingContract>; readonly stuckTasks: readonly ApplicationBuildStuckTask[] }\n | { readonly kind: 'GENERATION_STEP'; readonly plan: ApplicationBuildDispatchPlan; readonly task: BuildPlanTask; readonly stuckTasks: readonly ApplicationBuildStuckTask[] }\n) & {\n /** Set only when the selection EXERCISED an override: the task read landed and the operator ran it anyway (#2217). */\n readonly landedOverride?: BuildTaskLandedOverride;\n};\n\n\n/**\n * The stuck reasons a landed override passes (#2217): a COMPLETED earlier run — that run is the landing the operator says\n * is wrong. Every other reason still refuses the task.\n */\nconst LANDED_OVERRIDE_RELEASES: ReadonlySet<Workbench_BuildTaskStuckReason> = new Set([\n Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n]);\n\n/** The family the build plan lands as. */\nconst BUILD_PLAN_FAMILY = 'build-plan';\n\n/** How long one read of the build plan's commit time answers every row and selection that asks (#3460). */\nconst BUILD_PLAN_COMMIT_TIME_REUSE_MS = 5_000;\n\n/** How long a CONCURRENT admission waits for the compile watchers before starting anyway (#1528). */\nconst CONCURRENT_ADMISSION_COMPILE_QUIET_MS = 30_000;\n\n/**\n * Where a task's declared products may be WRITTEN (#3204): its landed probes' writable paths, which are a subset of what\n * landing reads (`buildPlanTaskLandedProbeWritablePaths`), and may name a directory (a trailing `/`). A product whose home\n * is one of several candidates contributes every candidate, so two tasks that MAY meet are kept apart. A probe answered\n * by introspection (the shell) names no path, and a shared file no product names (a barrel, a registry) is not seen.\n */\nfunction buildTaskProductWritePaths(task: BuildPlanTask): readonly string[] {\n return resolveBuildTaskLandedProbes(task).flatMap((probe) => buildPlanTaskLandedProbeWritablePaths(probe));\n}\n\n/** Whether two write sets may touch one file: an equal path, or a path under the other's directory. */\nexport function productWritePathsMeet(left: readonly string[], right: readonly string[]): boolean {\n const covers = (path: string, other: string): boolean => path === other || (path.endsWith('/') && other.startsWith(path));\n return left.some((path) => right.some((other) => covers(path, other) || covers(other, path)));\n}\n\n/**\n * Dispatches one wave call may make per slot before it returns and lets the next call continue (the playbook loop takes a\n * turn between waves). A wave returns only once its live runs have drained, so each wave costs the tail of its slowest run:\n * raised from 4 to 8 with #3204, once nothing but the isolated re-checks and the single-flight repairs waited on a drain\n * any more (progress reads the working tree; commits are checkpoints). Not unbounded: a drain is also the quiet moment the\n * runtime supervisor restarts the companion in, and a restart held past its ceiling kills the live runs.\n */\nexport const WAVE_DISPATCHES_PER_DEGREE = 8;\n\n/**\n * Every run of the wave that has ALSO settled by now, without waiting for one that has not (#3204).\n *\n * The wave refills after a settlement, and a refill reads the landing again (a settled run moves it). That reading took\n * 41-47 s per slot on reference run 42506906346, and the runs that settled DURING it were then taken one per loop turn,\n * each paying a reading of its own: ten slots refilled at about one task a minute, and the wave ran with one to three\n * agents of ten. Taken together, the runs that settled while the previous refill ran are refilled from ONE reading,\n * which the fill shares across its slots (an admission does not move the landing).\n *\n * A run that has already settled wins its race against the sentinel because the race subscribes to it first, so its\n * reaction is queued first; a run still pending loses to the sentinel.\n */\nasync function takeAlreadySettled<T>(inFlight: ReadonlyMap<string, Promise<T>>): Promise<T[]> {\n const pending = Symbol('pending');\n const states: ReadonlyArray<T | typeof pending> = await Promise.all([...inFlight.values()].map((run) => Promise.race([run, Promise.resolve(pending)])));\n return states.filter((state): state is T => state !== pending);\n}\n\n/** Why a wave stopped taking new tasks — it always still drains the runs already live. */\nexport enum ApplicationBuildWaveStop {\n /** No task is ready and no run is live: the plan is done, blocked, or every ready task is stuck. */\n NOTHING_READY = 'nothing-ready',\n /** The call reached its dispatch cap; the next call continues. */\n DISPATCH_CAP = 'dispatch-cap',\n /** The next ready task is a generation step this call already ran, and its landing is still unmet. */\n GENERATION_STEP_REPEATED = 'generation-step-repeated',\n /** An admission was refused; the refusal is on the dispatch entry. */\n DISPATCH_REFUSED = 'dispatch-refused',\n /**\n * The coding agent's account hit its usage limit (#2388): every turn started before its reset would be\n * refused the same way, so the wave starts none. `usageLimit` on the result says when it resumes, and the\n * build lane submits the next wave then.\n */\n CODING_AGENT_USAGE_LIMITED = 'coding-agent-usage-limited',\n /**\n * The application's backend no longer starts (#2405): its own start record says the last start FAILED, after the\n * newest commit had its chance to restart it. Every task landed now would be built on, and verified against, an\n * application that cannot run. `bootFailures` on the result names the backend, its refusal and the runs this wave\n * landed (`wildo build tasks` names every task landed since the last good start, across waves). While runs are live\n * the filling only pauses and asks again at the next settle; with none live it stops. A task named with\n * `wildo build run` still runs, because re-running the task that broke it is the repair.\n */\n APPLICATION_DOES_NOT_BOOT = 'application-does-not-boot',\n /**\n * A person asked the wave to stop (`wildo build stop`, #3206): it starts no new task, drains the runs already live, and\n * ends as any wave does (reconciliation, repairs). The next `wildo build run` starts a new wave.\n */\n STOP_REQUESTED = 'stop-requested',\n /**\n * The dev supervisor is HOLDING a restart of this companion (#3204): a dependency install or an engine rebuild needs a\n * fresh process, and the supervisor waits for the work in flight. The wave starts nothing more and drains what is live,\n * as for `STOP_REQUESTED`, so the restart comes once the runs have settled instead of killing them at the hold's ceiling\n * (reference run 43237839187: nine coding runs, at 15:43). The next wave, in the restarted companion, continues.\n */\n RESTART_PENDING = 'restart-pending',\n /**\n * A verification check cannot be asked for a host cause (#3423, #3432): a command not on PATH, one lacking the verb, the\n * same failure on two tasks. Every task's check would fail the same way, so the companion admits no coding turn until\n * the cause's probe clears it. `verificationToolUnavailable` on the result names it. The admission that ended the\n * filling was refused before anything ran, so no attempt was spent.\n */\n VERIFICATION_TOOL_UNAVAILABLE = 'verification-tool-unavailable',\n}\n\n/**\n * The next-task doors' refusal while the application's backend does not start (#2405). A CONFLICT: the request is\n * valid, the application's state forbids it, and the message names the refusal and the repair.\n */\nexport class ApplicationDoesNotBootError extends Error {\n /*\n * Each failure carries its own remedy, worded for WHOSE problem it is (#3214, #3217): only a startup the application's\n * code refused is a task's to fix; a held port, an orphan or stale backend, a dead watcher or unreachable\n * infrastructure is the dev stack's, and telling a person to re-run a task for it sends them to the wrong place.\n */\n public constructor(public readonly bootFailures: readonly ApplicationBootFailure[]) {\n super(`The application's backend does not start, so no next task is dispatched: ${bootFailures\n .map((failure) => `${failure.serviceIdentifier} — ${failure.message ?? 'no reason recorded'} ${failure.remedy}`).join('; ')}`);\n this.name = 'ApplicationDoesNotBootError';\n }\n}\n\n/**\n * A backend start failure as the build records show it (#2405 review F3): with the tasks whose coding run COMPLETED\n * since the backend's last good start, across waves — the candidates for the break. Empty when the backend never\n * started cleanly in this record, or when nothing has completed since.\n */\nexport interface ApplicationBuildRecordsBootFailure extends ApplicationBootFailure {\n readonly candidateTaskRefs: readonly string[];\n}\n\n/** A backend start failure that stopped a wave (#2405), with the runs this wave landed that may have caused it. */\nexport interface ApplicationBuildBootFailure extends ApplicationBootFailure {\n /** Coding runs of THIS wave that completed: the candidates when the backend broke during it. Empty if it was broken before. */\n readonly landedThisWave: readonly string[];\n}\n\n/** One task a wave dispatched: a coding admission, a generation step, or the refusal that ended the filling. */\nexport interface ApplicationBuildWaveDispatch {\n readonly plan: ApplicationBuildDispatchPlan;\n readonly admission?: ApplicationCodingTaskRunAdmission;\n readonly generationStep?: ApplicationBuildGenerationStepRunResult;\n readonly error?: string;\n}\n\n/** What one wave call did (#1528). */\nexport interface ApplicationBuildWaveResult {\n readonly degree: number;\n readonly mode: CodingRunConcurrency;\n readonly dispatched: readonly ApplicationBuildWaveDispatch[];\n /** Each coding run's settled outcome, in settle order; `null` for a row that could not be classified. */\n readonly outcomes: readonly (ApplicationCodingTaskSettledOutcome | null)[];\n /**\n * The end-of-wave repair (#1805): per run it named, how many paths its ONE commit carried (0 for a run\n * that contributed nothing to it).\n */\n readonly reconciliation: readonly { readonly taskId: string; readonly committedPaths: number; readonly error?: string }[];\n /**\n * The runs that completed and lost their product to a sibling, found once the wave's tree was reconciled,\n * and what was done about each (#2210). Empty for a single-flight wave, which has no sibling.\n */\n readonly interferenceRepairs: readonly ApplicationBuildInterferenceRepair[];\n readonly stoppedFillingBecause: ApplicationBuildWaveStop;\n /**\n * Set when a person's `wildo build stop` holds the build at the wave's END (#3206), whenever it was asked: before the\n * wave stopped filling (then `stoppedFillingBecause` is `stop-requested`) or while it drained after a usage limit, a cap\n * or a backend that does not start. No resume follows such a wave; only a person's `wildo build run` starts the next.\n */\n readonly heldByStopSince?: string;\n /** Set when the wave stopped because the backend does not start (`APPLICATION_DOES_NOT_BOOT`, #2405). */\n readonly bootFailures?: readonly ApplicationBuildBootFailure[];\n /**\n * The usage limit that stopped the filling (`CODING_AGENT_USAGE_LIMITED`, #2388): when the lane resumes,\n * and the run that met it. Absent for every other stop.\n */\n readonly usageLimit?: CodingAgentUsageLimit & { readonly taskRef: string; readonly runTaskId: string };\n /** The check's command holding coding admissions at the wave's end (#3423). Absent when none holds. */\n readonly verificationToolUnavailable?: VerificationToolUnavailableHold;\n /**\n * The generation steps whose panel refused stale expert charters, as the hold stands at the wave's end (#3204): each\n * step was passed over and the wave went on filling. Absent when none is held.\n */\n readonly staleExpertCharters?: readonly StaleExpertChartersHeld[];\n /**\n * Present when the wave ended because the PLAN is exhausted — every task landed — and says whether the application\n * those tasks built assembles (#2222). A parallel build ends here rather than at a single dispatch door, so this\n * is where \"the build is finished\" is claimed for it.\n */\n readonly assembly?: ApplicationAssemblyVerdict;\n /**\n * The repairs the wave's end ran because the finished plan did not assemble (#2283), in order: which check each\n * repaired and how its run settled (`null` when the row could not be classified). `assembly` is the verdict after\n * the last of them.\n */\n readonly assemblyRepairs?: readonly { readonly checkRef: string; readonly taskRef: string; readonly outcome: ApplicationCodingTaskSettledOutcome | null }[];\n}\n\n/**\n * What a build wave's end tells the build lane's SELECTOR about selecting another wave (#2405 review F10, #3214, #3206,\n * #2388): each reason the build cannot proceed, with its own guidance, so the selector does not spend rounds on empty\n * waves. The selector reads this condensed step value, never the wave itself.\n *\n * - a backend that does not start carries each failure's cause and remedy; the guidance names a task's repair only when\n * a startup refusal is among them, and otherwise says the repair is the person's (the dev stack or the infrastructure);\n * - a person's `wildo build stop` says the build stays stopped until a person runs `wildo build run` again, and then no\n * usage-limit resume is announced, because none happens. A courtesy: the hold itself refuses every unattended start;\n * - a coding-agent usage limit says when the companion resumes the build on its own;\n * - a build check that cannot be asked for a host cause (#3423, #3432: a command missing from the companion's PATH, one\n * lacking the verb, the same failure on two tasks) says only a person lifts it, so no build wave is worth selecting\n * until then.\n */\nexport function describeBuildWaveHoldsForSelector(\n wave: Pick<ApplicationBuildWaveResult, 'stoppedFillingBecause' | 'heldByStopSince' | 'bootFailures' | 'usageLimit' | 'verificationToolUnavailable' | 'staleExpertCharters'>,\n): Record<string, unknown> {\n // From the hold at the wave's end, not from why filling stopped: a stop asked while it drained holds too (#3206 review R1).\n const stoppedByPerson = wave.heldByStopSince !== undefined || wave.stoppedFillingBecause === ApplicationBuildWaveStop.STOP_REQUESTED;\n return {\n ...(wave.bootFailures ? {\n backendDoesNotStart: wave.bootFailures.map((failure) => ({\n serviceIdentifier: failure.serviceIdentifier,\n refusal: failure.message,\n cause: failure.cause,\n remedy: failure.remedy,\n landedThisWave: failure.landedThisWave,\n })),\n guidance: wave.bootFailures.some(isApplicationStartupFailure)\n ? 'The application\\'s backend does not start because its own startup refused: no ordinary task is dispatched until it does. '\n + 'Stop selecting build waves; each failure\\'s `remedy` names the repair (re-running the task that broke it, with the refusal as its note).'\n : 'The application\\'s backend does not start, and no task broke it (the dev stack or the infrastructure did): no ordinary task is '\n + 'dispatched until it starts. Stop selecting build waves; each failure\\'s `remedy` names the repair, which is the person\\'s, not a task\\'s.',\n } : {}),\n ...(wave.stoppedFillingBecause === ApplicationBuildWaveStop.RESTART_PENDING ? {\n restartPending: {\n guidance: 'The dev supervisor is restarting the companion (a dependency install or an engine rebuild needs a fresh process): '\n + 'this wave started nothing more so its runs could settle first. Keep the build lane: the next wave continues after the restart.',\n },\n } : {}),\n ...(stoppedByPerson ? {\n stoppedByPerson: {\n guidance: 'A person stopped the build with `wildo build stop`. Do not select build waves: they are refused until a person runs '\n + '`wildo build run` again.',\n },\n } : {}),\n ...(wave.usageLimit && !stoppedByPerson ? {\n codingAgentUsageLimit: {\n resumesAt: wave.usageLimit.resumesAt,\n guidance: `The coding agent's account hit its usage limit: no build task can run before ${wave.usageLimit.resumesAt}, and the `\n + 'companion submits the next build wave on its own then. Stop selecting build waves; nothing a later round does changes this.',\n },\n } : {}),\n ...(wave.verificationToolUnavailable ? {\n verificationToolUnavailable: {\n command: wave.verificationToolUnavailable.command,\n checkRef: wave.verificationToolUnavailable.checkRef,\n guidance: `${describeVerificationHostCause(wave.verificationToolUnavailable)} No coding turn is admitted until then. `\n + 'Stop selecting build waves: only a person repairing this lifts it, and nothing a later round does changes it.',\n },\n } : {}),\n ...(wave.staleExpertCharters ? {\n staleExpertCharters: {\n steps: wave.staleExpertCharters.map((held) => ({\n taskRef: held.taskRef,\n seats: held.staleSeats.map((seat) => ({ roleRef: seat.roleRef, changedInputs: seat.changedInputs, editedByPerson: seat.authored })),\n })),\n guidance: wave.staleExpertCharters.some((held) => held.staleSeats.some((seat) => seat.authored))\n ? 'These steps wait for expert charters a person edited, which are never derived again: the charter is updated by hand. '\n + 'Keep dispatching: every other task runs meanwhile.'\n : `These steps wait for their experts' charters to be derived again. The build-dispatch step runs ${EXPERT_STAFFING_PLAYBOOK_REF} itself `\n + 'and the next wave runs them; keep dispatching, every other task runs meanwhile.',\n },\n } : {}),\n };\n}\n\n/**\n * One completed run whose declared product a concurrent sibling overwrote (#2210), and its repair: the task\n * is re-armed and run again ALONE, so nothing can overwrite the second attempt. `rerun` is absent when the\n * bound was already spent (`interference.requeued` is then false and the task waits for a person).\n */\nexport interface ApplicationBuildInterferenceRepair {\n readonly taskRef: string;\n /** The completed run that lost its product. */\n readonly runTaskId: string;\n readonly interference: BuildTaskInterference;\n readonly rerun?: {\n readonly dispatch?: ApplicationBuildDispatchResult;\n readonly outcome?: ApplicationCodingTaskSettledOutcome | null;\n /** The re-run could not be dispatched; the task stays re-armed, so the next dispatch offers it. */\n readonly error?: string;\n };\n}\n\n/**\n * One dispatched build task's outcome — exactly one of the two executor results is present, matching the\n * plan's `targetKind`. `admission` for a coding run; `generationStep` for a companion generation step.\n */\nexport interface ApplicationBuildDispatchResult {\n readonly plan: ApplicationBuildDispatchPlan;\n readonly admission?: ApplicationCodingTaskRunAdmission;\n readonly generationStep?: ApplicationBuildGenerationStepRunResult;\n /** The step's panel refused stale expert charters: nothing ran, and the step is held until they are derived again (#3204). */\n readonly staleExpertCharters?: StaleExpertChartersHeld;\n}\n\n/** A generation step held because its panel refused stale expert charters (#3244, #3204). */\nexport interface StaleExpertChartersHeld extends StaleExpertSeatsRefusal {\n readonly taskRef: string;\n /** When the refusal was met: a commit of the charters after it releases the hold. */\n readonly observedAt: string;\n}\n\n/**\n * Dispatch the next ready build-plan task to a coding agent.\n *\n * ## The chain, and who owns each link\n *\n * | link | owner |\n * |---|---|\n * | which tasks have landed | GIT — a task has landed when the files it produces are committed |\n * | which are READY | `selectReadyBuildPlanTasks` in `_core` — pure, prerequisite-closed |\n * | what a task may touch | `resolveBuildPlanTaskCodingPolicy` — the ONLY place a `target.kind` becomes paths |\n * | the contract | `composeBuildTaskCodingContract` in the runtime — pure, schema-pinned |\n * | the run | `CodingAgentDispatchCompanionService` — mutation lock, git baseline, change-set capture |\n *\n * Nothing in that chain is decided by a model. The agent is handed a task and a boundary; it does not\n * choose either.\n *\n * ## There is no confirmation flag, and that was a correction\n *\n * `dispatchNextBuildTask` ran only when the caller also passed `confirmWorkspaceMutation: true`. It was\n * removed the day it was written, because it protected nothing the mechanism does not already protect:\n * the scope is derived from the task's CLOSED `target.kind` and cannot be widened, the mutation lock\n * admits one workspace-mutating run at a time, the run is bracketed by a git baseline snapshot and a\n * change-set capture so every touched path is visible and revertible, the required checks gate the\n * result, and acceptance is a separate act: the loop's commit under the autonomy posture, authored as\n * the companion and refusing what it cannot vouch for, or a person's (#1534).\n *\n * A caller that posts to this route is asking for a coding run — that IS the route. Making them say so\n * twice is the acceptance ceremony this whole migration exists to remove, and a field that feels like a\n * control while enforcing nothing is the exact failure mode recorded in the plan's objective.\n *\n * What was genuinely useful in it — seeing the scope before committing to a run — is a READ, and lives at\n * `describeNextBuildTask` below.\n */\n/**\n * A ready task that has already been run to a working result — the loop guard's typed refusal.\n *\n * Distinct from `ApplicationBuildPlanExhaustedError`, which means the OPPOSITE and is a healthy\n * terminal state. Conflating them would let an operator read a money-burning loop as \"the build is\n * finished\".\n */\n/**\n * A build wave was asked for while one is already running in this companion (#2208 review M1).\n *\n * A second wave would double the width the person set, and it would break the first wave's end: that wave\n * commits what its runs left and re-runs interfered tasks ALONE \"now that nothing is writing\", which is false\n * while a second wave's runs are live. Refused as a CONFLICT — nothing is wrong with the request, the\n * companion's state forbids it — and the remedy is to wait for the running wave, whose feed line ends it.\n */\n/**\n * The three doors a PERSON starts the build through (#3206), and the only starts that may end a `wildo build stop` hold —\n * each an authenticated console or workbench caller acting on a person's command. Closed on purpose: the workbench's\n * per-task dispatch is absent because it also fires on its own (a task approved later, the creation conversation's\n * tool), and the server cannot tell that from a click. The value is what the hold's release is logged as.\n */\nexport enum BuildStopReleaseDoor {\n /** `wildo build run` (`POST /build/dispatch-next`): the wave, or the next ready task alone. */\n BUILD_RUN = 'wildo build run',\n /** `wildo build run <taskRef>` (`POST /build/tasks/:taskRef/dispatch`): one named task. */\n BUILD_RUN_NAMED_TASK = 'wildo build run <taskRef>',\n /** The workbench's \"Run the build\" (`dispatch_next` on the build-plan tasks). */\n WORKBENCH_RUN_THE_BUILD = 'workbench: Run the build',\n}\n\n/**\n * A person stopped the build (`wildo build stop`, #3206) and no person has started it since: an unattended start — the\n * build lane's selector, the loop, the usage-limit resume — is refused until a person runs `wildo build run`.\n */\nexport class ApplicationBuildStoppedByPersonError extends Error {\n public constructor(public readonly heldSince: string) {\n super(`A person stopped the build with \\`wildo build stop\\` (${heldSince}): nothing starts until a person runs \\`wildo build run\\` `\n + '(or `wildo build run <taskRef>`, or the workbench\\'s \"Run the build\"). The hold lives in this companion and ends with a restart.');\n }\n}\n\nexport class ApplicationBuildWaveInFlightError extends Error {\n public constructor(public readonly startedAt: string) {\n super(`A build wave is already running (started ${startedAt}). Follow it with \\`wildo creation feed --follow\\`; `\n + 'start the next one once it has ended — it takes the tasks that are ready then.');\n }\n}\n\nexport class ApplicationBuildTaskCompletedButUnlandedError extends Error {\n /**\n * `stuckTasks` is every ready task that cannot move, as typed facts. The message explains the FIRST;\n * the read door answers with all of them, so a board never has to parse this prose (#1451).\n */\n public constructor(\n message: string,\n public readonly taskRef: string,\n public readonly priorTaskId: string,\n public readonly stuckTasks: readonly ApplicationBuildStuckTask[],\n public readonly queue: ApplicationBuildStuckQueue,\n ) {\n super(message);\n this.name = 'ApplicationBuildTaskCompletedButUnlandedError';\n }\n}\n\n/**\n * A NAMED task was asked for and it is not READY (#1454, Step 7): landed already, blocked on a\n * prerequisite, or not in the plan. The graph still decides what may run; naming a task only lets\n * the creator pick among the ready ones. `standing` and the unmet refs are what the answer needs.\n */\nexport enum ApplicationBuildTaskStanding {\n /** The task has landed: its declared product is committed. */\n LANDED = 'landed',\n /** The task waits on a prerequisite that has not landed. */\n BLOCKED = 'blocked',\n /** The plan holds no such task. */\n UNKNOWN = 'unknown',\n}\n\nexport class ApplicationBuildTaskNotReadyError extends Error {\n public constructor(\n message: string,\n public readonly taskRef: string,\n public readonly standing: ApplicationBuildTaskStanding,\n public readonly unmetPrerequisiteTaskRefs: readonly string[],\n ) {\n super(message);\n this.name = 'ApplicationBuildTaskNotReadyError';\n }\n}\n\n/** Where a dispatch was started from, carried onto the run's row so the conversation shows it (#1454, Step 7). */\nexport interface ApplicationBuildDispatchOrigin {\n readonly conversationId?: string;\n /** An operator ran a task the landing probe calls landed, and why (#2217). */\n readonly landedOverride?: BuildTaskLandedOverride;\n /**\n * When the door that dispatched this run began preparing it (#3206) — a wave's slot, or a single-task door before it\n * read the plan: stamped on the run's task input, so the dispatch wait (this instant to admission) is on a row and\n * survives a restart. Every door sets it; {@link dispatchBuildTask}'s caller may name an earlier one.\n */\n readonly preparationStartedAt?: string;\n}\n\n/** A NAMED selection, and — for a task that reads landed — the operator's override of that landing (#2217). */\nexport interface ApplicationBuildTaskSelection {\n readonly taskRef: string;\n readonly despiteLanded?: BuildTaskLandedOverride;\n}\n\n/**\n * Why a READY task cannot make progress is `Workbench_BuildTaskStuckReason` in\n * `@wildo-ai/platform-core-shared`. It moved there in #1451 so the board can render it; this service\n * is its only producer.\n */\nexport interface ApplicationBuildStuckTask {\n readonly taskRef: string;\n /** The run that proves it is stuck; empty for a task that is unbuildable before any run. */\n readonly priorTaskId: string;\n readonly completedAt?: string;\n readonly reason: Workbench_BuildTaskStuckReason;\n /** Set only for `NO_DOCUMENT_BLUEPRINT`, so the message can name the ref that has no blueprint. */\n readonly documentRef?: string;\n /**\n * The parked run's own question, carried so the refusal is complete on its own.\n *\n * Until #1359 this was the ONLY place the question survived a companion restart: the operator\n * surface read an in-process map that a restart emptied, exactly when this guard matters. The\n * surface now reads the run's waiting execution, so both hold it — and the message still carries\n * it, because a refusal that sends its reader elsewhere for the one fact it is about is a worse\n * refusal, whatever the elsewhere.\n */\n readonly question?: string;\n /** Set only for `LANDING_UNKNOWN` (#3223): which check could not answer, and the command that shows why. */\n readonly landingUnknownCause?: string;\n /** Set when the stuck task is a GENERATION STEP held for having run on unchanged inputs (#3233): its remedy differs. */\n readonly generationStep?: true;\n /**\n * Set only for `REPEATED_IDENTICAL_FAILURE` (#3709): the step's latest failure, as its run recorded it, and how many of\n * its runs in a row failed that way. Carried so the refusal and the board name the cause without another read.\n */\n readonly repeatedFailure?: { readonly failure: string; readonly consecutive: number; readonly owner?: GenerationStepFailureOwner };\n /** Set when the task's own specification is refused and its re-dispatches are spent (#3210): the validator's faults. */\n readonly refusedSpecifications?: readonly SpecificationRefusal[];\n}\n\n\n/**\n * The most files a configuration's relative-import closure is followed to (#2305 review). A configuration reaches a\n * handful (measured: at most 8 across the dogfood applications); the bound stops a pathological import graph from\n * turning one landing resolution into a walk of the application. A closure that reaches it is not answered: the files\n * past it were never asked about, so landing on the part that was read would be the defect the closure exists to stop.\n */\nconst CONFIGURATION_IMPORT_CLOSURE_LIMIT = 200;\n\n/**\n * The committed tree as ONE landing resolution reads it: each path is asked at most once (#1005).\n *\n * A plan's tasks probe the same few files. A resource's schema, config and ui-behaviour tasks all read\n * that resource's files, so resolving probe by probe spawned git for the same path again and again. The\n * answer cannot change within one resolution, which is also what the landed set it builds assumes.\n */\n/**\n * The same two questions are also asked of the WORKING TREE (`createWorktreeReader`), only to explain a\n * stuck task — never to decide landing. There \"committed\" reads as \"present on disk\".\n */\ninterface CommittedTreeReader {\n isCommitted(subjectRelativePath: string): Promise<boolean>;\n readText(subjectRelativePath: string): Promise<string | undefined>;\n /**\n * Answer `isCommitted` for a whole path set up front, in a bounded number of git spawns.\n *\n * Pure acceleration: it seeds the same memo `isCommitted` would have filled one path at a time, so\n * a path this does not cover still resolves on demand and the answers are identical either way.\n */\n primeCommitted(subjectRelativePaths: readonly string[]): Promise<void>;\n /** The same, for committed TEXT: one `cat-file --batch` instead of one `show` per path. */\n primeTexts(subjectRelativePaths: readonly string[]): Promise<void>;\n /**\n * What the resolved shell carries and what the placement plan decided — ONE introspection per\n * landing resolution, however many shell probes ask (#1538). The paths it names are then asked of\n * THIS reader, so the committed reader and the working-tree reader give their own answers.\n */\n shellWitness(): Promise<ShellWitness>;\n /**\n * What the application's backend registers of its agent work (#2966) — ONE introspection per landing resolution,\n * however many registry probes ask. Like the shell, the files a probe then requires are asked of THIS reader.\n */\n agentWorkWitness(): Promise<AgentWorkWitness>;\n /**\n * What the application's configuration declares (its organization types, relationship kinds and system-of-record\n * instances), read once per landing resolution (#2305 S6, #3035, #3039).\n */\n applicationConfigurationWitness(): Promise<ApplicationConfigurationWitness>;\n}\n\n/** The introspection half of a reader: answered from the live application, identical for every tree one resolution reads. */\ntype IntrospectionWitnesses = Pick<CommittedTreeReader, 'shellWitness' | 'agentWorkWitness' | 'applicationConfigurationWitness'>;\n\n/**\n * Why a generation step's landing is UNKNOWN, by step, and the command that shows the cause (#3223) — the words the\n * selection used to log when it passed such a step over, now also the refusal when nothing else can run.\n */\nfunction describeUnanswerableGenerationStepLanding(task: BuildPlanTask): string {\n const stepRef = task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP ? task.target.generationStepRef : undefined;\n const subject = `Build step \"${task.taskRef}\" was passed over:`;\n switch (stepRef) {\n case ApplicationBuildGenerationStep.DESIGN_TOKENS:\n return `${subject} \\`wildo design-tokens validate\\` neither confirmed nor refuted the stylesheet block (a design-system config `\n + 'that does not load, a stylesheet with no design-token markers, or a CLI that could not start or timed out — run '\n + '`wildo design-tokens validate` to see which).';\n case ApplicationBuildGenerationStep.DESIGN_SYSTEM_BRAND:\n return `${subject} the brand's visual tone could not be read (the specifications package did not evaluate — run `\n + '`wildo context info brand-visual-tone`, which evaluates the same exports and names the error).';\n // #2694: before, this step owed nothing on an unreadable brand, so it was never passed over.\n case ApplicationBuildGenerationStep.DISPLAY_NAME:\n return `${subject} the brand could not be read, so whether the application owes its name is unknown (the specifications `\n + 'package did not evaluate; the step\\'s build-task record names the error).';\n case ApplicationBuildGenerationStep.DATABASE_MIGRATIONS:\n return `${subject} its \\`wildo db diff --check\\` neither passed nor reported drift (no accepted schema plan, no built backend `\n + 'registry, a CLI that could not import or spawn, a timeout, an unparseable lockfile, or an engine planner-contract '\n + 'mismatch — run `wildo db diff` to see which).';\n default:\n return `${subject} whether it has already landed could not be checked (\\`wildo build tasks --json\\` shows the step's record).`;\n }\n}\n\n/**\n * What makes two failures of a generation step THE SAME failure (#3709): the failure text with what changes between two\n * runs of one cause taken out — an instant, a run or row id, a duration. `undefined` for a failure that recorded no text,\n * which never matches anything: a step is held only on a POSITIVE match, as a choreography lane is (596611bf2).\n *\n * Counts are kept on purpose. \"6 authored example(s) do not match\" and \"5 … do not match\" are progress, and reading them\n * as one failure would hold a step that is being repaired one example at a time.\n *\n * Rejected: compare the text exactly. A step's message can carry the instant it failed or the id of the run it read\n * (a labels unit's model call, a lock holder), so two runs of one cause would never match and the hold would never fire.\n */\nexport function generationStepFailureFingerprint(failure: string | undefined): string | undefined {\n if (failure === undefined) return undefined;\n const fingerprint = failure\n .replace(/\\b\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?/gu, '<instant>')\n .replace(/\\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\b/giu, '<id>')\n .replace(/\\b[0-9a-f]{12,}\\b/giu, '<id>')\n .replace(/\\b\\d+(?:\\.\\d+)?\\s?(?:ms|milliseconds?|s|seconds?|min|minutes?)\\b/gu, '<duration>')\n .replace(/\\s+/gu, ' ')\n .trim();\n return fingerprint === '' ? undefined : fingerprint;\n}\n\n/**\n * How many of a step's latest runs, newest first, FAILED with the same failure and were not re-armed (#3709): 0 when the\n * newest did not fail, or failed with no text to compare. The count stops at the first run that differs.\n */\nexport function countConsecutiveIdenticalGenerationStepFailures(attemptsNewestFirst: readonly ApplicationBuildTaskAttempt[]): number {\n const newest = attemptsNewestFirst[0];\n const fingerprint = newest?.status === FlowsActors_Status.FAILED && newest.rearm === undefined ? generationStepFailureFingerprint(newest.error) : undefined;\n if (fingerprint === undefined) return 0;\n let count = 0;\n for (const attempt of attemptsNewestFirst) {\n if (attempt.status !== FlowsActors_Status.FAILED || attempt.rearm !== undefined || generationStepFailureFingerprint(attempt.error) !== fingerprint) break;\n count += 1;\n }\n return count;\n}\n\n/**\n * What a FAILED generation step's row records beside the engine's failure: what its model calls spent (#2232), and who can\n * fix the cause when the step could tell (#3709), which the selection holds a framework-owned failure on. `null` for\n * neither, so the row carries the failure alone.\n */\nexport function recordBesideGenerationStepFailure(spend: PlaybookSpend | undefined, error: unknown): Readonly<Record<string, unknown>> | null {\n const failureOwner = readGenerationStepFailureOwner(error);\n const beside = { ...(spend ? { spend } : {}), ...(failureOwner !== undefined ? { failureOwner } : {}) };\n return Object.keys(beside).length > 0 ? beside : null;\n}\n\n/**\n * The identical failures, in a row, after which a generation step is withheld (#3709): TWO, the choreography's number.\n * One more run after a first failure is allowed, because a sibling's landing may have changed what the step reads; an\n * identical second failure over unchanged inputs says it did not.\n */\nexport const GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER = 2;\n\n/**\n * The sentence a decision door adds when HEAD's decisions bytes were not honoured (review of 8d6b95d29): the decision was\n * added to the newest decisions a person's door recorded, or, when there are none, the file was REPLACED.\n */\nfunction describeReplacedDecisions(replacedUnhonoured: { readonly reason: string; readonly carriedEarlier: boolean } | undefined): string {\n if (replacedUnhonoured === undefined) return '';\n return replacedUnhonoured.carriedEarlier\n ? ` HEAD's decisions file was not honoured (${replacedUnhonoured.reason}), so this decision was added to the last ones a person recorded, and those bytes were dropped.`\n : ` HEAD's decisions file was not honoured (${replacedUnhonoured.reason}) and no person had recorded a decision, so it was replaced.`;\n}\n\n/**\n * Why a task is held while the person's decisions are UNKNOWN (R2), or `undefined` when they do not hold it: the decisions\n * name it, and whether a person recorded them cannot be read.\n */\nfunction describeHeldByUnknownDecisions(taskRef: string, decisions: Pick<BuildTaskDecisions, 'standing' | 'reason' | 'heldTaskRefs'> | undefined): string | undefined {\n if (decisions?.standing !== BuildTaskDecisionsStanding.UNKNOWN || decisions.heldTaskRefs?.has(taskRef) !== true) return undefined;\n return `Build task \"${taskRef}\" is named by the committed build-task decisions, and whether a person recorded them cannot be read right now `\n + `(${decisions.reason ?? 'unknown'}). It is held rather than run as if never decided; it is offered again once that can be read.`;\n}\n\n/** Why a generation step was passed over while a specifications module fails (#3258), or `undefined` when none does. */\nexport function describeHeldBySpecificationFault(task: BuildPlanTask, modules: readonly string[] | undefined): string | undefined {\n if (modules === undefined || modules.length === 0) return undefined;\n if (task.target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP || !generationStepReadsSpecifications(task.target.generationStepRef)) return undefined;\n return `Build step \"${task.taskRef}\" was passed over: specifications module ${modules.map((modulePath) => `\"${modulePath}\"`).join(', ')} could not be evaluated, `\n + 'so what the step reads may be short. It is offered again once the module evaluates.';\n}\n\n/** The assembly check that evaluates the specifications package. */\nconst SPECIFICATION_EXPORTS_CHECK_REF = 'check:specification-exports';\n\n/** The fault a landing pass found, or `undefined` with no module failing (#3258). Every answer about a plan's progress reads it here. */\nfunction readBuildPlanSpecificationFault(\n tasks: readonly BuildPlanTask[],\n resolution: Pick<LandedTaskResolution, 'modulesHoldingGenerationSteps' | 'specificationRepairOwed' | 'unverifiableLandedTaskRefs'>,\n): BuildPlanSpecificationFault | undefined {\n const failingModules = resolution.modulesHoldingGenerationSteps ?? [];\n if (failingModules.length === 0) return undefined;\n const generationSteps = new Set(tasks.filter((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP).map((task) => task.taskRef));\n return {\n failingModules,\n ranNotProvenTaskRefs: resolution.unverifiableLandedTaskRefs.filter((taskRef) => generationSteps.has(taskRef)),\n ...(resolution.specificationRepairOwed === true ? { repairOwed: true as const } : {}),\n };\n}\n\n/** The fault as an optional field, for the answers that carry it. */\nfunction withSpecificationFault(fault: BuildPlanSpecificationFault | undefined): { readonly specificationFault?: BuildPlanSpecificationFault } {\n return fault === undefined ? {} : { specificationFault: fault };\n}\n\n/** Why a step that counts as landed is not proven (#3258). */\nfunction describeUnprovenWhileAModuleFails(taskRef: string, modules: readonly string[]): string {\n return `Build step \"${taskRef}\" ran, and its check cannot answer while specifications module ${modules.map((modulePath) => `\"${modulePath}\"`).join(', ')} `\n + 'does not evaluate. The first clean pass proves it or takes it back.';\n}\n\n/** The execution statuses that END a run: one of them, and a run's window is bounded by what it recorded. */\nconst RUN_STATUSES_THAT_ENDED: ReadonlySet<FlowsActors_Status> = new Set([\n FlowsActors_Status.COMPLETED,\n FlowsActors_Status.FAILED,\n FlowsActors_Status.CANCELLED,\n FlowsActors_Status.ABORTED,\n]);\n\n/** Every task that waits on `taskRef`, directly or through others: what can never land before it. */\nfunction transitiveDependentsOf(taskRef: string, tasks: readonly BuildPlanTask[]): ReadonlySet<string> {\n const dependents = new Set<string>();\n let frontier = [taskRef];\n while (frontier.length > 0) {\n const next = tasks.filter((task) => !dependents.has(task.taskRef) && task.prerequisiteTaskRefs.some((ref) => frontier.includes(ref))).map((task) => task.taskRef);\n for (const ref of next) dependents.add(ref);\n frontier = next;\n }\n return dependents;\n}\n\n/** A record's `closure` field from the closure that landed it, or nothing. */\nfunction closureOf(closure: BuildTaskClosure | undefined): { readonly closure?: ApplicationBuildTaskRecord['closure'] } {\n if (closure === undefined) return {};\n return { closure: { kind: closure.kind, ...(closure.satisfiedBy !== undefined ? { satisfiedBy: closure.satisfiedBy } : {}), reason: closure.reason } };\n}\n\n/**\n * The key {@link ApplicationBuildDispatchCompanionService.selectSettledRunWrites} answers by: a recorded write's path, and\n * whether it was a DELETION or a write of any kind (added, modified, renamed and the rest all settle the same way —\n * committed at HEAD). A deletion and a write of one path are two different facts, so they never share a key.\n */\nexport function settledRunWriteKey(file: { readonly path: string; readonly changeKind: string }): string {\n return `${file.changeKind === ChangeSetFileChangeKind.DELETED ? 'deleted' : 'written'}:${file.path}`;\n}\n\n/**\n * The same witnesses, remembering which were ASKED, so a landing pass can say afterwards whether any of the answers it\n * used was \"could not read\" (#3223). Only asked witnesses count: a plan with no shell probe is not provisional because\n * a shell nobody asked about would not have answered.\n */\nfunction trackWitnessAnswers(witnesses: IntrospectionWitnesses): { readonly witnesses: IntrospectionWitnesses; anyUnanswered(): Promise<boolean> } {\n // A Set: the witnesses are memoized, so every later call hands back the promise already held.\n const asked = new Set<Promise<{ readonly answered: boolean }>>();\n const track = <W extends { readonly answered: boolean }>(read: () => Promise<W>): (() => Promise<W>) => () => {\n const answer = read();\n asked.add(answer);\n return answer;\n };\n return {\n witnesses: {\n shellWitness: track(witnesses.shellWitness),\n agentWorkWitness: track(witnesses.agentWorkWitness),\n applicationConfigurationWitness: track(witnesses.applicationConfigurationWitness),\n },\n anyUnanswered: async () => (await Promise.all([...asked].map((answer) => answer.then((settled) => !settled.answered, () => true)))).some(Boolean),\n };\n}\n\n/**\n * The application's registered agent work, as a registry probe needs it (#2966). Three-valued like {@link ShellWitness}:\n * a registry that could not be READ (no backend, a failed introspection, a backend that does not build) lands nothing\n * and says why, never \"nothing is registered\".\n */\nexport type AgentWorkWitness =\n | { readonly answered: false; readonly reason: string }\n | { readonly answered: true; readonly declarations: AgentWorkDeclarations };\n\n/** Why a registry probe is or is not satisfied — what the build record reports for it (#2966). */\nexport interface AgentWorkProbeExplanation {\n readonly satisfied: boolean;\n /** Set when the registry could not be read: the probe is then unsatisfied without being a \"no\". */\n readonly unanswerable?: string;\n /** What the task's module does not register as planned, typed; empty when the product is registered as planned. */\n readonly missing: readonly AgentWorkShortfall[];\n /**\n * Registration files, or files the agent index imports, that the tree asked does not hold (#3514): absent from the working\n * tree for the landing and working-tree readers, which are the only explanations anything shows; not committed when the\n * committed reader asks, which only `satisfied` is read from.\n */\n readonly absentPaths: readonly string[];\n}\n\n/**\n * The shell, as a landing probe needs it (#1538). Three-valued by construction: a witness that could\n * not be READ (no placement plan, no frontend, the introspection failed) is never a \"no\" — it lands\n * nothing and says why, the distinction `check:schema-plan-drift` draws between drift and could-not-ask.\n */\nexport type ShellWitness =\n | { readonly answered: false; readonly reason: string }\n | {\n readonly answered: true;\n /** Entry identities each surface carries in the RESOLVED configuration. */\n readonly carried: ReadonlyMap<PlacementSurface, ReadonlySet<string>>;\n /** The files each surface is composed from — the application's config and every contributing module's. */\n readonly contributingPaths: ReadonlyMap<PlacementSurface, readonly string[]>;\n /** Identities the plan PLACED on each surface. */\n readonly placed: ReadonlyMap<PlacementSurface, readonly string[]>;\n /** Identities the plan DECLINED — to be carried by no surface. */\n readonly declined: readonly string[];\n /**\n * Who each carried entry is shown to, per surface and identity (#2512): every audience the surface carries that\n * identity with, `undefined` for everyone.\n */\n readonly carriedAudiences: ReadonlyMap<PlacementSurface, ReadonlyMap<string, readonly PlacementAudienceLayers[]>>;\n /** Who the plan shows each placed identity to, per surface and layer. */\n readonly placedAudiences: ReadonlyMap<PlacementSurface, ReadonlyMap<string, PlacementAudienceLayers>>;\n };\n\n/** Why a shell probe is or is not satisfied — what the build record reports for it. */\nexport interface ShellProbeExplanation {\n readonly satisfied: boolean;\n /** Set when the witness could not be read: the probe is then unsatisfied without being a \"no\". */\n readonly unanswerable?: string;\n /** Placed subjects the surface does not carry. */\n readonly missing: readonly string[];\n /** Declined subjects the surface still carries. */\n readonly declinedButPresent: readonly string[];\n /**\n * Placed subjects the surface carries but shows to a different audience than the plan decided (#2512), each as\n * `<identity>: plan <audience>, shell <audience>`. Both directions count: a restriction the code dropped leaves the\n * entry visible to people it was not for, and one the code added hides it from people it was for.\n */\n readonly audienceMismatches: readonly string[];\n /** Contributing files the tree asked does not hold (#3514), read as {@link AgentWorkProbeExplanation.absentPaths} is. */\n readonly absentPaths: readonly string[];\n}\n\n/**\n * Every path one landed probe consults.\n *\n * One definition, because the two callers must agree: the batch that PRIMES the landing pass's tree reader\n * and the pass that reports a task's unmet probes from that same reader. A probe set gathered differently\n * in the two places would leave exactly the paths they disagree about resolving one spawn-pair at a\n * time — the cost the batch exists to remove, reappearing only for the paths nobody compared.\n */\nfunction landedProbePaths(probe: BuildPlanTaskLandedProbe): readonly string[] {\n // Delegates to the policy module's exhaustive definition. This used to be a second, non-exhaustive\n // copy of it — the thing this docstring says must not exist — and a new probe kind was a type error\n // here rather than a decision there (#1538).\n return buildPlanTaskLandedProbePaths(probe);\n}\n\n/** The probes that read the resolved shell rather than a file (#1538). */\ntype ShellLandedProbe = Extract<BuildPlanTaskLandedProbe, { kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN | BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT }>;\nfunction isShellProbe(probe: BuildPlanTaskLandedProbe): probe is ShellLandedProbe {\n return probe.kind === BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN || probe.kind === BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT;\n}\n\n/** The probe that reads the backend's registry rather than a file (#2966). */\ntype AgentWorkLandedProbe = Extract<BuildPlanTaskLandedProbe, { kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED }>;\nfunction isAgentWorkProbe(probe: BuildPlanTaskLandedProbe): probe is AgentWorkLandedProbe {\n return probe.kind === BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED;\n}\n\n/**\n * A probe answered by INTROSPECTING the live application rather than by reading named files: the shell (#1538) and the\n * agent-work registry (#2966). Neither can be read \"as a commit would leave it\", so the questions that need exactly\n * that — the prospective accept, the interference repair — leave them out, as they always left the shell out.\n */\nfunction isIntrospectedProbe(probe: BuildPlanTaskLandedProbe): boolean {\n return isShellProbe(probe) || isAgentWorkProbe(probe);\n}\n\n/** Store the pending read BEFORE awaiting it, so probes of one path running in parallel share it. */\nfunction memoizeByPath<T>(cache: Map<string, Promise<T>>, subjectRelativePath: string, read: () => Promise<T>): Promise<T> {\n const cached = cache.get(subjectRelativePath);\n if (cached) return cached;\n const pending = read();\n cache.set(subjectRelativePath, pending);\n return pending;\n}\n\n/** How many dispatches the narrative carries. Five is what the in-memory list kept; the board renders that many. */\nconst DISPATCH_NARRATIVE_LENGTH = 5;\n\n/**\n * How far a dispatch got, read off its execution row — see `Workbench_BuildDispatchPhase` for what\n * each member means and why the two executors resolve at different moments.\n *\n * - **A coding run** (`application-coding.system`): `PENDING` is SUBMITTED. Once its task has a start\n * instant it is ADMITTED and STAYS so however it ends — the phase names the hand-off, and the\n * outcome is the task row `codingTaskId` points at. A run that ended WITHOUT ever starting is the\n * only coding FAILED: the dispatch threw before admission.\n * - **A generation step** (`application-build.system`): running is SUBMITTED (nothing has resolved\n * yet), `COMPLETED` is FINISHED, and any other ending — failed, or aborted by a restart — is FAILED.\n */\nexport function projectBuildDispatchPhase(row: { readonly systemRef: string; readonly status: FlowsActors_Status; readonly taskStarted: boolean }): Workbench_BuildDispatchPhase {\n if (row.systemRef === APPLICATION_CODING_SYSTEM_REF) {\n if (row.taskStarted) return Workbench_BuildDispatchPhase.ADMITTED;\n return row.status === FlowsActors_Status.PENDING ? Workbench_BuildDispatchPhase.SUBMITTED : Workbench_BuildDispatchPhase.FAILED;\n }\n if (row.status === FlowsActors_Status.COMPLETED) return Workbench_BuildDispatchPhase.FINISHED;\n return row.status === FlowsActors_Status.PROCESSING || row.status === FlowsActors_Status.PENDING\n ? Workbench_BuildDispatchPhase.SUBMITTED\n : Workbench_BuildDispatchPhase.FAILED;\n}\n\n/**\n * One execution row as a dispatch record, or `null` for a row that is not a build dispatch — an\n * execution with no task, or a task naming no build-plan task (a coding run dispatched by something\n * other than the build plan would be one).\n */\nfunction projectBuildDispatchRecord(execution: {\n readonly _id: unknown;\n readonly systemRef: string;\n readonly status: FlowsActors_Status;\n // The stored row's instants are dates (#2187); the record this builds carries ISO strings.\n readonly createdAt: Date;\n readonly finishedAt?: Date;\n readonly standaloneTasks: readonly { readonly _id: string; readonly input?: unknown; readonly output?: unknown; readonly startedAt?: string }[];\n}): ApplicationBuildDetachedDispatchRecord | null {\n const task = execution.standaloneTasks[0];\n const input = task?.input as { taskRef?: unknown; conversationId?: unknown } | undefined;\n if (!task || typeof input?.taskRef !== 'string') return null;\n const taskStarted = typeof task.startedAt === 'string';\n const phase = projectBuildDispatchPhase({ systemRef: execution.systemRef, status: execution.status, taskStarted });\n const isCodingRun = execution.systemRef === APPLICATION_CODING_SYSTEM_REF;\n const failure = readSettledRunFailureMessage(task.output);\n const failureAttribution = Object.values(CodingRunFailureAttribution).find((value) => value === (task.output as { failureAttribution?: unknown } | undefined)?.failureAttribution);\n // When the phase LEFT `SUBMITTED`: admission for a coding run, the end of the step otherwise.\n const settledAt = phase === Workbench_BuildDispatchPhase.SUBMITTED ? undefined\n : isCodingRun && taskStarted ? task.startedAt\n : execution.finishedAt?.toISOString();\n return {\n executionId: String(execution._id),\n taskRef: input.taskRef,\n startedAt: execution.createdAt.toISOString(),\n phase,\n ...(settledAt !== undefined ? { settledAt } : {}),\n ...(isCodingRun && taskStarted ? { codingTaskId: String(task._id) } : {}),\n runStatus: execution.status,\n ...(execution.finishedAt ? { runFinishedAt: execution.finishedAt.toISOString() } : {}),\n ...(phase === Workbench_BuildDispatchPhase.FAILED && typeof failure === 'string' ? { error: failure } : {}),\n ...(isCodingRun && failureAttribution ? { failureAttribution } : {}),\n ...(typeof input.conversationId === 'string' ? { conversationId: input.conversationId } : {}),\n };\n}\n\n/** A landing derivation another reader started (#3204): what joining it needs to know. */\ninterface RunningLandingDerivation {\n readonly key: string | undefined;\n /** The plan it derives, as the landing key reads it: only a derivation of the same plan answers this reader. */\n readonly planIdentity: string;\n /** Its place in the order derivations started: one that began after a reader arrived reads a tree at least as new. */\n readonly ordinal: number;\n readonly resolution: Promise<LandedTaskResolution>;\n}\n\n/**\n * How long a landing reader waits on a derivation that began before it arrived (#3204). Longer than any derivation measured\n * on the reference runs (120 s, three overlapping); past it the derivation has stopped answering and must not hold every reader.\n */\nexport const LANDING_DERIVATION_WAIT_CEILING_MS = 180_000;\n\n/** How many derivations a landing reader waits for before it derives beside the next one (#3204). */\nconst LANDING_GATE_MAXIMUM_WAITS = 2;\n\n/** Whether `promise` settles, either way, within `ceilingMs`. */\nasync function settlesWithin(promise: Promise<unknown>, ceilingMs: number): Promise<boolean> {\n let timer: ReturnType<typeof setTimeout> | undefined;\n try {\n return await Promise.race([\n promise.then(() => true, () => true),\n new Promise<boolean>((resolve) => { timer = setTimeout(() => resolve(false), ceilingMs); }),\n ]);\n } finally {\n if (timer !== undefined) clearTimeout(timer);\n }\n}\n\n@injectable()\nexport class ApplicationBuildDispatchCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n /** Set once the follow-up derivation has warned that the coding-run listing hit its cap (#2496 review N1). */\n private followUpListingTruncationWarned = false;\n /** Set once a brief has warned that the compiled catalog could not say which elements are research-informed (#2846). */\n private unreadableProvenanceWarned = false;\n /**\n * The CLEAN and WITHHELD verdicts this process received, so an element is screened once, not on every task (#2846 review\n * M2). The process's one store, shared with the `wildo context elements` door and the research step values (#2938), and\n * dropped on every provider-registry rebuild by the store itself (#2846 review N2).\n */\n private readonly briefScreeningVerdicts = companionScreeningVerdicts();\n\n /** What every screening a coding brief makes needs: the companion's classifier, its log and the process's verdicts. */\n private briefScreeningHost(taskRef: string) {\n return { contentSafety: this.contentSafety, logger: this.logger, taskRef, verdicts: this.briefScreeningVerdicts };\n }\n /** See `readLatestCompletedCodingRuns`. */\n private latestCompletedCodingRuns: { readonly at: number; readonly value: Promise<{ readonly latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>; readonly truncated: boolean } | undefined> } | undefined;\n /**\n * When the wave running in this companion started; `undefined` when none is (#2208 review M1). One process\n * owns every wave — the console, a lane child and an explicit playbook run all reach {@link dispatchBuildWave}\n * here — so an in-process marker is the whole population, and a restart (which ends every run) clears it.\n */\n private liveWaveStartedAt: string | undefined;\n /**\n * The plan's landing, held per source state and shared by every reader (#3206) — see\n * `application-build-landing-projection.companion.ts` for what the key is made of and why.\n */\n private readonly landingProjection = new LandingProjectionCache<LandedTaskResolution>((resolution) => resolution.provisional);\n /** The landing derivation running now, if any: readers join or wait for it rather than derive beside it (#3204). */\n private landingDerivationInFlight?: RunningLandingDerivation;\n /** How many landing derivations this instance has started: a derivation's ordinal says whether it began after a reader arrived. */\n private landingDerivationsStarted = 0;\n /** Bumped on every in-process run-state event and every accepted commit: the key part no file can show (#3219). */\n private landingRunStateGeneration = 0;\n /**\n * Bumped whenever something may have LANDED (#3204): a run completed, a commit accepted, or a reading declared stale.\n * Never on an admission. A fill's shared landing reading is reused only while this is unchanged ({@link BuildWaveFillLanding}).\n */\n private landingSettlementGeneration = 0;\n /** The failing modules a pass found no repair to run for (#3258): none is offered for them again in this process. */\n private modulesWithNoRepairToRun: string | undefined;\n /**\n * The autonomy posture the build reads (#3227): whether a derived follow-up waits for a person's review before it runs.\n * The ONE named posture (`APPLICATION_CREATION_AUTONOMY_POSTURE`, `one-source-of-truth.md` D5); a field rather than a\n * read at each site only so a test can pin the GUIDED behaviour without editing the constant.\n */\n private autonomyPosture: Journey_AutonomyPreset = APPLICATION_CREATION_AUTONOMY_POSTURE;\n /** The decisions file's history at one HEAD (R4): walked once per HEAD change, never per read. */\n private decisionsHistory: {\n readonly head: string;\n readonly path: string;\n readonly headBlobId: string | undefined;\n readonly commits: readonly (BuildTaskDecisionsCommit & { readonly blobId?: string })[];\n } | undefined;\n /** Each run record's window (R4): records are immutable, so a window, or its unresolvable SHA, is computed once. */\n private readonly runWindowsByRecord = new Map<string, { readonly commits: readonly string[] } | { readonly unresolvable: string }>();\n /** A landing-key read in progress, joined by callers arriving meanwhile so a burst of readers spawns git once. */\n private landingKeyRead: { readonly planIdentity: string; readonly runStateGeneration: number; readonly key: Promise<string | undefined>; readonly sequence: number } | undefined;\n /** How many landing-key reads have started; see {@link readLandingSourceKey}. */\n private landingKeyReadSequence = 0;\n /** The slot a running wave is filling now, while it prepares the dispatch (#3206); see `application-build-dispatch-preparation`. */\n private currentBuildPreparation: ApplicationBuildPreparationTracker | undefined;\n /** The last preparation that ended, with each step's duration. */\n private lastBuildPreparation: ApplicationBuildPreparation | undefined;\n /** When `wildo build stop` asked the running wave to stop (#3206); cleared when the wave ends. */\n private buildWaveStopRequestedAt: string | undefined;\n /**\n * The build HOLD a person's `wildo build stop` sets (#3206), kept after the wave it ended: while it is set no build\n * wave or task starts unless a person's door released it first ({@link releaseBuildStopHold}) — not the choreography\n * selector, not the loop, not the usage-limit resume. In memory only: it does not survive a companion restart, which\n * ends any wave and drops any pending resume anyway.\n */\n private buildStopHeldSince: string | undefined;\n\n /**\n * The generation steps whose panel refused stale expert charters, by task (#3244, #3204). A held step is passed over by\n * every unnamed selection, so the rest of the plan keeps running, and the build-dispatch step runs the staffing step\n * that repairs it (`top_down.expert-personas`). Released by that step, by any commit of the charters after the refusal\n * (the staffing step landing in another lane, or a person's hand edit), or by a person naming the step\n * (`wildo build run <task>`). In memory, like the other holds: a restart drops it, and the next run meets the refusal\n * again, which costs no model call (the panel refuses before generating anything).\n */\n private readonly staleExpertChartersHeld = new Map<string, StaleExpertChartersHeld>();\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly dispatch: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.GitChangeSetService) private readonly git: GitChangeSetCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BuildGenerationStepService) private readonly generationSteps: ApplicationBuildGenerationStepCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly introspection: CompanionIntrospectionService,\n // The engine's execution driver and the rows it writes (#1359): every dispatch is an execution.\n @inject(SAAS_SERVICE_TYPES.ActorsSystemBackendService) private readonly actorsSystem: ActorsSystemBackendService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executions: CompanionExecutionsCompanionService,\n /*\n * The accept door, given the one thing it cannot know from below: whether a concurrent run's files carry\n * its task's declared product (#2209). Bound in the container like every other dependency, so the\n * companion always registers the witness; typed optional only so a test harness that builds this service\n * positionally need not hand it one.\n */\n @inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService) private readonly acceptedChangeCommit?: AcceptedChangeCommitCompanionService,\n /*\n * The model call behind the website-copy review (#2593). Bound in the container like everything else; typed\n * optional for the reason `acceptedChangeCommit` is, and without it no review runs, because there is no judge.\n */\n @inject(SAAS_SERVICE_TYPES.AgentsBackendService) private readonly agents?: AgentsBackendService,\n /*\n * The classifier a brief's third-party text is screened through (#2846): the engine's one content-safety seam, the\n * same the application's agents use, answering from the provider the application binds in its `companion` scope.\n * Optional: unbound (or bound with no provider), third-party sections travel MARKED as unscreened; the lane never stops.\n */\n @inject(SAAS_SERVICE_TYPES.ContentSafetyService) @optional() private readonly contentSafety?: ContentSafetyBackendService,\n /*\n * Where a wave's per-slot preparation durations are recorded (#3206): its own trace session, beside the runs it\n * started. Optional for the reason the others are; without it the durations are only logged.\n */\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) @optional() private readonly traceability?: CompanionTraceabilityService,\n /*\n * What each coding run wrote (#3227): a run that states a reported gap met counts only once everything it wrote is\n * committed. Optional for the reason the others are; without it no gap is ever dropped as met.\n */\n @inject(COMPANION_SERVICE_TYPES.CodingRunWriteRegisterService) @optional() private readonly codingRunWrites?: CodingRunWriteRegisterCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationBuildDispatchCompanionService');\n /*\n * Every run-state event and every accepted commit moves the landing key (#3206, #3219): a run selected or settled\n * changes what is in flight and lands a task declaring no product, and an accept's commit lands its task the moment\n * it is made rather than when somebody next re-reads git. Feature-detected because test harnesses build this\n * service with partial doubles.\n */\n const bumpLandingRunState = (): void => { this.landingRunStateGeneration += 1; };\n if (typeof this.dispatch.registerRunStateChangedListener === 'function') this.dispatch.registerRunStateChangedListener(bumpLandingRunState);\n if (typeof this.dispatch.registerRunAcceptedListener === 'function') this.dispatch.registerRunAcceptedListener(bumpLandingRunState);\n // What may have LANDED, apart from what is merely in flight (#3204): a completed run, an accepted commit.\n const bumpLandingSettlement = (): void => { this.landingSettlementGeneration += 1; };\n if (typeof this.dispatch.registerRunAcceptedListener === 'function') this.dispatch.registerRunAcceptedListener(bumpLandingSettlement);\n if (typeof this.dispatch.registerRunCompletedListener === 'function') this.dispatch.registerRunCompletedListener(bumpLandingSettlement);\n this.acceptedChangeCommit?.registerConcurrentRunProductWitness({\n pathsLackingOwnProduct: (taskRef, candidatePaths) => this.pathsLackingOwnProduct(taskRef, candidatePaths),\n });\n if (this.agents !== undefined) {\n /*\n * A completed run only REQUESTS the sweep, which reviews any completed website run with no review — this one\n * included — and any whose copy another task's run has since rewritten. Enqueueing the run's own review beside it\n * judged a run twice in a wave: a sweep queued by an earlier completion reached the new run before its own review\n * did (#2593 re-review M1).\n */\n this.dispatch.registerRunCompletedListener(() => {\n void this.requestWebsiteCopySweep();\n void this.requestWebsiteVisualSweep();\n });\n }\n }\n\n /**\n * Every copy review runs through this one queue (#2593): two reviews running at once cannot see each other's record\n * before it is written, so they would judge the same run twice, each paying a judge call.\n */\n private websiteCopyReviews: Promise<unknown> | undefined;\n\n private enqueueWebsiteCopyReview<T>(work: () => Promise<T>): Promise<T> {\n const next = (this.websiteCopyReviews ?? Promise.resolve()).then(work, work);\n this.websiteCopyReviews = next.catch(() => undefined);\n return next;\n }\n\n /** The sweep already queued and not yet started, which a further request joins rather than queueing another. */\n private queuedWebsiteCopySweep: { readonly retryNotReviewed: boolean; readonly done: Promise<void> } | undefined;\n\n /**\n * Review every website run whose copy has no review, or changed since its review (#2593 review M3, M4). A run's\n * review is started when it completes and is lost when the companion restarts during the judge call, and copy one\n * task wrote can be rewritten by another task's run; the sweep is what catches both. Requested after every completed\n * run (coalesced: a wave's completions share one sweep) and once at startup. A NOT_REVIEWED review is retried only\n * when asked (`retryNotReviewed`, the startup sweep): retrying a provider that refuses on every completion would pay\n * for a refusal each time. Never throws.\n */\n public requestWebsiteCopySweep(options: { readonly retryNotReviewed?: boolean } = {}): Promise<void> {\n const retryNotReviewed = options.retryNotReviewed === true;\n const queued = this.queuedWebsiteCopySweep;\n if (queued !== undefined && (queued.retryNotReviewed || !retryNotReviewed)) return queued.done;\n const done = this.enqueueWebsiteCopyReview(async () => {\n if (this.queuedWebsiteCopySweep?.done === done) this.queuedWebsiteCopySweep = undefined;\n await this.sweepWebsiteCopy(retryNotReviewed);\n });\n this.queuedWebsiteCopySweep = { retryNotReviewed, done };\n return done;\n }\n\n /**\n * Runs whose review could not be RECORDED (the record door refused them: not found among the completed runs it lists),\n * skipped for the life of the process (#2593 re-review L1). Without this, every later sweep would find the run still\n * unreviewed and pay another judge call for a verdict that again cannot be written.\n */\n private readonly unrecordableWebsiteCopyRuns = new Set<string>();\n\n private async sweepWebsiteCopy(retryNotReviewed: boolean): Promise<void> {\n if (this.agents === undefined) return;\n try {\n // Before build-decompose there is no plan and nothing to review: quietly, not as a failed sweep.\n if (!(await this.hasAuthoredBuildPlan())) return;\n const plan = await this.readBuildPlan();\n const websiteTasks = plan.tasks.filter((task) => task.target.kind === BuildPlanTaskTargetKind.WEBSITE);\n if (websiteTasks.length === 0) return;\n const companionExports = await loadSpecificationFamilyData(this.companionContext);\n // Runs nobody could list (the reader said so): nothing to review this pass, and the next sweep asks again.\n const runs = await this.fetchLatestCompletedCodingRuns();\n if (runs === undefined) return;\n const { latest } = runs;\n const worktree = this.createWorktreeReader();\n for (const task of websiteTasks) {\n const run = latest.get(task.taskRef);\n if (run === undefined || this.unrecordableWebsiteCopyRuns.has(run.runTaskId)) continue;\n const review = run.websiteCopyReview;\n if (review?.outcome === WebsiteCopyReviewOutcome.NOT_REVIEWED && !retryNotReviewed) continue;\n if (review?.outcome === WebsiteCopyReviewOutcome.REVIEWED && review.locale !== undefined) {\n const scope = websiteCopyReviewScope(task, plan.tasks, companionExports, latest);\n const subjects = [...scope.own, ...scope.alsoReviewed.flatMap((entry) => entry.subjects)];\n const pack = await readWebsiteLabelPack(worktree, review.locale, subjects.map((subject) => subject.labelKeyPrefix));\n const current = pack === undefined ? {} : currentWebsiteCopy(subjects, pack);\n if (sameWebsiteCopy(current, review.reviewedCopy ?? {})) continue;\n }\n await this.reviewWebsiteCopyOfRun(task.taskRef, run.runTaskId);\n }\n } catch (error) {\n this.logger.warn('Could not sweep the website copy for runs whose review is missing or out of date', { error: describeCaughtError(error) });\n }\n }\n\n /**\n * Review the copy a COMPLETED website run wrote, and record the review on that run (#2593). Reached through the\n * sweep, which every completed run requests whichever door ran it (a wave, `wildo build run`, a lane), and left to\n * finish on its own: it is advisory, so nothing waits for it and nothing it finds changes whether the task lands.\n * Call it only from inside the review queue; a direct call races the sweep.\n *\n * Reads the WORKING tree, not HEAD: the run's own writes are what is reviewed, and under a posture that keeps\n * acceptance with a person they are not committed yet. The standings are derived NOW, by the function that wrote the\n * task's brief, and recorded beside the findings, because a standing moves: a requirement IN_PROGRESS today may be\n * DELIVERED tomorrow, and a finding is read against the standing it was found under.\n *\n * Never throws. A review that cannot run is recorded as NOT_REVIEWED with its reason; a task that is not a website\n * task, or a plan that cannot be read, records nothing, because there is no copy to speak of.\n */\n public async reviewWebsiteCopyOfRun(taskRef: string, runTaskId: string, session?: CompanionExecutionSessionContext): Promise<WebsiteCopyReview | undefined> {\n const agents = this.agents;\n if (agents === undefined) return undefined;\n try {\n const plan = await this.readBuildPlan();\n const task = plan.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (task === undefined || task.target.kind !== BuildPlanTaskTargetKind.WEBSITE) return undefined;\n const companionExports = await loadSpecificationFamilyData(this.companionContext);\n const deliveryOf = await this.resolveWebsiteClaimDelivery(companionExports);\n // Runs nobody could list record nothing, like a plan that cannot be read: the next sweep redoes it.\n const runs = await this.fetchLatestCompletedCodingRuns();\n if (runs === undefined) return undefined;\n const { latest } = runs;\n const scope = websiteCopyReviewScope(task, plan.tasks, companionExports, latest, deliveryOf);\n if (scope.own.length === 0 && describeWebsiteTaskCopySubjects(task, companionExports) === undefined) return undefined;\n const saasRoot = this.companionContext.saasRoot;\n const worktree = this.createWorktreeReader();\n // Every language CODE the vocabulary has; each pack's file is named by its path segment (`websiteLabelPackPath`).\n const locales = Object.values(AvailableLanguage).map(String);\n // Read fresh, once per review: a build task may have just declared the retention schedule, a provider choice, or the site.\n const freshSaasConfig = loadSaasConfig(join(saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true })\n .then((config) => config ?? this.companionContext.saasConfig, () => this.companionContext.saasConfig);\n const review = await reviewWebsiteTaskCopy(scope.own, {\n defaultLocale: async () => {\n try {\n // Not `loadWebsiteConfig`, which memoizes per path for the life of the process: a long-lived reader reads it now.\n const [, service] = resolveStaticWebsiteServiceEntry(await freshSaasConfig);\n const config = await loadConfig<{ defaultLocale?: unknown }>(join(saasRoot, service.path, PER_SERVICE_WEBSITE_CONFIG_FILE_NAME), { freshModuleCache: true });\n return typeof config.defaultLocale === 'string' ? { locale: config.defaultLocale } : { unreadable: 'its config declares no defaultLocale' };\n } catch (error) {\n return { unreadable: describeCaughtError(error) };\n }\n },\n availableLocales: async () => locales,\n readLabelPack: (locale) => readWebsiteLabelPack(worktree, locale, [...scope.own, ...scope.alsoReviewed.flatMap((entry) => entry.subjects)].map((subject) => subject.labelKeyPrefix)),\n readFile: (relativePath) => worktree.readText(relativePath),\n declarations: async () => {\n let productionInfraConfig: unknown;\n let productionInfraUnreadable: string | undefined;\n try {\n // Environment ids are open slugs; `production` is the conventional one, and no other declares itself production.\n productionInfraConfig = (await loadInfraEnvConfig(saasRoot, WildoEnvironment.PRODUCTION, { freshModuleCache: true }))?.config;\n } catch (error) {\n productionInfraUnreadable = describeCaughtError(error);\n }\n return collectWebsiteCopyDeclarations({ saasConfig: await freshSaasConfig, productionInfraConfig, ...(productionInfraUnreadable !== undefined ? { productionInfraUnreadable } : {}) });\n },\n judge: async (prompt) => {\n const invocation: FlowsActors_Agent_Invocation<any, any> = {\n agentRef: WEBSITE_COPY_REVIEW_JUDGE_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: WebsiteCopyReviewVerdictOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await agents.invokeAgent(invocation);\n const parsed = WebsiteCopyReviewVerdictOutputSchema.safeParse((response.output as { object?: unknown } | undefined)?.object);\n if (!parsed.success) throw new Error(`the judge's answer did not match its schema: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`);\n return { findings: parsed.data.findings as readonly RawWebsiteCopyFinding[] };\n },\n // A cited element written from web research is screened as a brief screens it, before the judge reads it (#2938).\n screenThirdPartyElements: (elements) => screenThirdPartyBriefElements(elements, this.briefScreeningHost(taskRef)),\n now: () => new Date(),\n }, scope.alsoReviewed);\n try {\n await this.dispatch.recordWebsiteCopyReview(taskRef, runTaskId, review, session);\n } catch (error) {\n this.unrecordableWebsiteCopyRuns.add(runTaskId);\n throw error;\n }\n if (review.findings.length > 0) {\n this.logger.warn('The copy a website task wrote claims what its build does not back (advisory; the task still lands)', {\n taskRef, runTaskId, findings: review.findings.map((finding) => `${finding.kind} ${finding.labelKey}`),\n });\n }\n return review;\n } catch (error) {\n this.logger.warn('Could not review the copy of a completed website run', { taskRef, runTaskId, error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The visual reviews' own queue (#2785): one at a time, for the copy reviews' reason (two at once would judge one run\n * twice), and apart from them, because a drawing and its words are judged independently and neither waits on the other.\n */\n private websiteVisualReviews: Promise<unknown> | undefined;\n\n private queuedWebsiteVisualSweep: { readonly retryNotReviewed: boolean; readonly done: Promise<void> } | undefined;\n\n /** Runs whose visual review could not be recorded, skipped for the life of the process (the copy reviews' L1). */\n private readonly unrecordableWebsiteVisualRuns = new Set<string>();\n\n /**\n * Review every completed website run whose DRAWING has no review (#2785), coalesced like the copy sweep: requested\n * after every completed run and once at startup, where a NOT_REVIEWED review is retried (`retryNotReviewed`): the\n * usual reason is a website that was not running, and a later start may find it up. A REVIEWED run is not judged\n * again: screenshots differ from one take to the next, so \"the drawing changed\" cannot be told from the pixels, and a\n * later run that redraws a section is reviewed as its own run. Never throws.\n */\n public requestWebsiteVisualSweep(options: { readonly retryNotReviewed?: boolean } = {}): Promise<void> {\n const retryNotReviewed = options.retryNotReviewed === true;\n const queued = this.queuedWebsiteVisualSweep;\n if (queued !== undefined && (queued.retryNotReviewed || !retryNotReviewed)) return queued.done;\n const work = async () => {\n if (this.queuedWebsiteVisualSweep?.done === done) this.queuedWebsiteVisualSweep = undefined;\n await this.sweepWebsiteVisuals(retryNotReviewed);\n };\n const done: Promise<void> = (this.websiteVisualReviews ?? Promise.resolve()).then(work, work);\n this.websiteVisualReviews = done.catch(() => undefined);\n this.queuedWebsiteVisualSweep = { retryNotReviewed, done };\n return done;\n }\n\n private async sweepWebsiteVisuals(retryNotReviewed: boolean): Promise<void> {\n if (this.agents === undefined) return;\n try {\n if (!(await this.hasAuthoredBuildPlan())) return;\n const plan = await this.readBuildPlan();\n const websiteTasks = plan.tasks.filter((task) => task.target.kind === BuildPlanTaskTargetKind.WEBSITE);\n if (websiteTasks.length === 0) return;\n const runs = await this.fetchLatestCompletedCodingRuns();\n if (runs === undefined) return;\n for (const task of websiteTasks) {\n const run = runs.latest.get(task.taskRef);\n if (run === undefined || this.unrecordableWebsiteVisualRuns.has(run.runTaskId)) continue;\n const review = run.websiteVisualReview;\n if (review?.outcome === WebsiteVisualReviewOutcome.REVIEWED) continue;\n if (review?.outcome === WebsiteVisualReviewOutcome.NOT_REVIEWED && !retryNotReviewed) continue;\n await this.reviewWebsiteVisualsOfRun(task.taskRef, run.runTaskId);\n }\n } catch (error) {\n this.logger.warn('Could not sweep the website drawings for runs whose visual review is missing', { error: describeCaughtError(error) });\n }\n }\n\n /**\n * Photograph what a COMPLETED website run drew and judge it against the visual quality rubric, then record the review\n * on that run (#2785). Advisory: nothing waits for it and nothing it finds changes whether the task lands. Reads the\n * RUNNING website (`wildo website look`), so the review describes the site as served: a website that is not running\n * records NOT_REVIEWED with the camera's reason, retried at the next startup. Call it only from inside the visual\n * review queue. Never throws.\n */\n public async reviewWebsiteVisualsOfRun(taskRef: string, runTaskId: string, session?: CompanionExecutionSessionContext): Promise<WebsiteVisualReview | undefined> {\n const agents = this.agents;\n if (agents === undefined) return undefined;\n try {\n const plan = await this.readBuildPlan();\n const task = plan.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (task === undefined || task.target.kind !== BuildPlanTaskTargetKind.WEBSITE) return undefined;\n const companionExports = await loadSpecificationFamilyData(this.companionContext);\n const subjects = describeWebsiteTaskVisualSubjects(task, companionExports);\n if (subjects === undefined) return undefined;\n const saasRoot = this.companionContext.saasRoot;\n // Throwaway and gitignored: the pictures the findings are about, kept for a person to open.\n const outputDirectory = join(saasRoot, '.wildo-saas', 'tmp', 'website-visual-review', runTaskId);\n const review = await reviewWebsiteTaskVisuals(subjects, {\n look: (routePath, sectionRefs) => lookAtWebsite({ saasRoot, routePath, sectionRefs, outputDirectory }),\n readImage: readWebsiteShotAsDataUri,\n rubric: readWebsiteVisualRubric,\n judge: async (prompt, images) => {\n const invocation: FlowsActors_Agent_Invocation<any, any> = {\n agentRef: WEBSITE_VISUAL_REVIEW_JUDGE_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: WebsiteVisualReviewVerdictOutputSchema, images: images.map((image) => ({ type: 'image', image })) },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await agents.invokeAgent(invocation);\n const parsed = WebsiteVisualReviewVerdictOutputSchema.safeParse((response.output as { object?: unknown } | undefined)?.object);\n if (!parsed.success) throw new Error(`the judge's answer did not match its schema: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`);\n return { findings: parsed.data.findings as readonly RawWebsiteVisualFinding[] };\n },\n now: () => new Date(),\n });\n try {\n await this.dispatch.recordWebsiteVisualReview(taskRef, runTaskId, review, session);\n } catch (error) {\n this.unrecordableWebsiteVisualRuns.add(runTaskId);\n throw error;\n }\n if (review.findings.length > 0 || review.measurements.length > 0) {\n this.logger.warn('What a website task drew breaks the visual rubric or failed a measurement (advisory; the task still lands)', {\n taskRef, runTaskId, findings: review.findings.map((finding) => `${finding.viewport} ${finding.sectionRef ?? 'page'}: ${finding.rule}`), measurements: review.measurements.length,\n });\n }\n return review;\n } catch (error) {\n this.logger.warn('Could not review the drawing of a completed website run', { taskRef, runTaskId, error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * Of the paths a concurrent run is about to commit under its task's name, the ones a landing probe of that\n * task names and that do NOT carry the task's declared product (#2209) — read from the tree AS THE COMMIT\n * WOULD LEAVE IT, by the very predicate landing uses ({@link isLandedProbeSatisfied}), so the accept and the\n * landing check cannot disagree about whether the commit holds the product.\n *\n * Only probes naming one of the paths are asked: a probe about another file says nothing about this\n * commit. SHELL probes are not asked here: the shell they read is composed from many files and resolved\n * from the live tree by introspection, so it cannot be read \"as this commit leaves it\", and a shell-placement\n * run's own files are its configuration rather than a list several runs append to. A task the plan no\n * longer holds declares nothing to check. A plan that cannot be read throws: the person's accept then commits\n * nothing under the run's name, and the next build checkpoint commits the files with the tree (#3204).\n */\n private async pathsLackingOwnProduct(taskRef: string, candidatePaths: readonly string[]): Promise<readonly string[]> {\n const graph = await this.readBuildPlan();\n const task = graph.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (!task) return [];\n const committing = new Set(candidatePaths);\n const prospective = this.createProspectiveCommitReader(committing);\n const lacking = new Set<string>();\n for (const probe of resolveBuildTaskLandedProbes(task)) {\n if (isIntrospectedProbe(probe)) continue;\n const named = landedProbePaths(probe).filter((path) => committing.has(path));\n if (named.length === 0) continue;\n if (await this.isLandedProbeSatisfied(probe, prospective)) continue;\n for (const path of named) lacking.add(path);\n }\n return [...lacking].sort();\n }\n\n /**\n * The application workspace's top-level entries — the raw material of a coding run's mutation\n * scope since #1268.\n *\n * ## Read per dispatch, and deliberately NOT cached\n *\n * The listing changes when a composition scenario adds a package (`wildo compose add-website`,\n * `add-technical-doc`, `add-minion`, `add-worker-node`), and the whole point of deriving it is that\n * a package added yesterday is writable today. A cache turns that into a REFUSAL — the run confined\n * away from the package it was asked to write — which is the defect the widening removes, arriving\n * back through the door marked \"performance\". One `readdir` per dispatch, against a dispatch that\n * runs a coding agent for minutes, is not a cost worth that.\n *\n * ## An unreadable workspace answers NOTHING rather than throwing\n *\n * The scope is ADDITIVE, so an empty answer degrades a run to its task-derived scope — today's\n * behaviour — instead of failing a dispatch over a directory listing. A workspace this process\n * cannot list is a condition the contract composer's own empty-scope refusal will catch if it\n * matters, and one that says nothing about whether this task can run.\n */\n private readApplicationWorkspaceEntries(): readonly string[] {\n try {\n return readdirSync(this.companionContext.saasRoot);\n } catch (error) {\n this.logDebug('Could not list the application workspace; a coding run keeps its task-derived scope', {\n saasRoot: this.companionContext.saasRoot,\n error: describeCaughtError(error),\n });\n return [];\n }\n }\n\n /**\n * What the next run would be, without running it. Pure read — nothing is locked, created or started.\n *\n * REQUIRES a task: an exhausted plan throws, exactly as the dispatch doors do. That is right for its\n * caller — a `dryRun` build-dispatch playbook, which is rehearsing a run and has nothing to rehearse\n * when the plan is finished.\n *\n * A surface that wants to SHOW the queue's state rather than act on it wants\n * `describeNextBuildTaskOrExhaustion` instead. The two are kept apart rather than merged because\n * \"give me the next task\" and \"tell me whether there is one\" are different questions, and only the\n * second can be answered by \"there is none\".\n */\n public async describeNextBuildTask(): Promise<ApplicationBuildDispatchPlan> {\n return (await this.prepareNextBuildTask()).plan;\n }\n\n /**\n * The same read for a caller that is about to RUN the build (#2208): the one a build wave asks before it\n * is submitted. It refuses exactly as the one-task door refuses — including an exhausted plan's assembly\n * verdict (#2222), which {@link describeNextBuildTask} leaves out because a dry run has nothing to check.\n * Without it, `wildo build run` at a parallelism above one answered \"every task landed\" with no word on\n * whether the application builds, which is the claim #2222 exists to qualify.\n */\n public async describeNextBuildTaskBeforeRunning(): Promise<ApplicationBuildDispatchPlan> {\n return (await this.prepareNextBuildTaskOrQualifyExhaustion()).plan;\n }\n\n /**\n * The same read, for a caller that must be able to render \"there is nothing left\".\n *\n * The catch narrows to TWO classes — exhausted, and every-ready-task-stuck — and that is the part\n * worth guarding. A catch-all would make every\n * genuine failure to look — an unreadable specifications export, a missing build plan, a broken\n * landing probe — report itself as a finished build, which is the most reassuring possible lie a\n * read can tell.\n */\n public async describeNextBuildTaskOrExhaustion(): Promise<ApplicationBuildDispatchDescription> {\n // The landed refs come back WITH the answer, never parked on the instance: two reads interleave at every await\n // (see `LandedTaskResolution`), and one would qualify its answer with the other's set.\n const { description, landedTaskRefs } = await this.describeNextBuildTaskOrExhaustionUnqualified();\n if (landedTaskRefs.length === 0) return description;\n const { started, truncated } = await this.listBuildTaskRefsWithAStartedRun();\n // A truncated history cannot say a task NEVER ran: the claim is withheld rather than made on a partial page.\n if (truncated) return description;\n return { ...description, landedBeforeAnyRunTaskRefs: landedTaskRefs.filter((taskRef) => !started.has(taskRef)) };\n }\n\n /**\n * Every build task with at least one run that STARTED — the population a landing can be \"its own\" against. A\n * dispatch refused before it started is not one (#1581). Read from the same actor rows and to the same ceiling as\n * the build record ({@link BUILD_TASK_RECORD_HISTORY_CEILING}), so the two surfaces cannot disagree about which\n * tasks ran: the plan withholding \"landed before any run\" on a history the record reads whole was #2530's review M1.\n */\n private async listBuildTaskRefsWithAStartedRun(): Promise<{ readonly started: ReadonlySet<string>; readonly truncated: boolean }> {\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING })));\n const started = new Set<string>();\n for (const projected of listed.flat().map(projectBuildTaskAttempt)) {\n if (projected !== null && isCountedBuildTaskAttempt(projected.attempt)) started.add(projected.taskRef);\n }\n return { started, truncated: listed.some((page) => page.length >= BUILD_TASK_RECORD_HISTORY_CEILING) };\n }\n\n private async describeNextBuildTaskOrExhaustionUnqualified(): Promise<{\n readonly description: ApplicationBuildDispatchDescription;\n readonly landedTaskRefs: readonly string[];\n }> {\n try {\n const prepared = await this.prepareNextBuildTask();\n return { description: { plan: prepared.plan, stuckTasks: prepared.stuckTasks }, landedTaskRefs: prepared.plan.landedTaskRefs };\n } catch (error) {\n if (error instanceof ApplicationBuildPlanExhaustedError) {\n return {\n description: {\n plan: null,\n exhausted: {\n taskCount: error.taskCount,\n landedCount: error.landedCount,\n ...(error.specificationFault === undefined ? {} : { specificationFault: error.specificationFault }),\n },\n // What stands between this plan and finished, as the stuck answer says it, so no reader takes it as done.\n stuckTasks: (error.specificationFault?.repairOwed === true ? [] : error.specificationFault?.ranNotProvenTaskRefs ?? []).map((taskRef) => ({\n taskRef,\n priorTaskId: '',\n reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN,\n landingUnknownCause: describeUnprovenWhileAModuleFails(taskRef, error.specificationFault!.failingModules),\n })),\n },\n landedTaskRefs: error.landedTaskRefs,\n };\n }\n /*\n * Every ready task is stuck — an ANSWER, for the same reason exhaustion is (#1451). It used to\n * escape this door, fail the creation board's row derivation, and render as \"could not look\"\n * at the one moment the board had a precise answer and a remedy to show. The dispatch doors\n * still throw it: there, the caller asked to run something and nothing can run.\n */\n if (error instanceof ApplicationBuildTaskCompletedButUnlandedError) {\n return { description: { plan: null, stuckQueue: error.queue, stuckTasks: error.stuckTasks }, landedTaskRefs: error.queue.landedTaskRefs };\n }\n throw error;\n }\n }\n\n /**\n * The last few dispatches, newest first — read from the ACTOR PLANE since #1359.\n *\n * ## What this was, and why it moved\n *\n * An in-memory list of the last five dispatches, added 2026-09-04 when a 40-minute i18n generation\n * step outlived the HTTP request that started it and left an operator blind for half the run. It\n * was the right diagnosis and a second, weaker execution plane: a coding run already had a durable\n * row, a generation step had NONE, and a companion restart — ordinary here — emptied the list, so\n * the dispatch most worth explaining was the one nothing remembered.\n *\n * Every dispatch is now an actor-system execution from the moment its task is SELECTED — a coding\n * run on `application-coding.system` (opened `PENDING`, started at admission), a generation step\n * on `application-build.system` — and this method is a PROJECTION of those rows. It holds nothing.\n *\n * ## The phase is derived, and means what it always meant\n *\n * `Workbench_BuildDispatchPhase` stays the wire vocabulary until the board reads the actor rows\n * directly (#1362); {@link projectBuildDispatchPhase} maps a row onto it without changing a\n * member's meaning — in particular a coding run stays `ADMITTED` once it has started, however it\n * ends, because the phase names the HAND-OFF and the run's outcome is the task row it points at.\n */\n public async readDetachedDispatches(session?: CompanionExecutionSessionContext): Promise<readonly ApplicationBuildDetachedDispatchRecord[]> {\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef, limit: DISPATCH_NARRATIVE_LENGTH }), session)));\n return listed.flat()\n .map(projectBuildDispatchRecord)\n .filter((record): record is ApplicationBuildDetachedDispatchRecord => record !== null)\n .sort((left, right) => right.startedAt.localeCompare(left.startedAt))\n .slice(0, DISPATCH_NARRATIVE_LENGTH);\n }\n\n /**\n * Fire the next ready build task WITHOUT holding an HTTP request over it. Returns the selected\n * plan immediately. {@link readDetachedDispatches} then says how far it got: a companion generation\n * step reaches FINISHED there, while a coding task reaches ADMITTED with the durable actor-task row\n * that holds its actual outcome. The same single-flight properties hold — this is the same\n * execution, minus the requirement that a socket survive it.\n *\n * It SELECTS ONCE. Until 2026-09-17 it prepared a task for its own 202 and then called\n * `dispatchNextBuildTask`, which prepared AGAIN — two independent selections against a working\n * tree that a landing run can move between them, so the plan reported to the caller was not\n * guaranteed to be the plan that ran. Both halves now share one `prepared`.\n *\n * It OPENS BEFORE IT ANSWERS. The 202 says the dispatch is running, so its execution must exist\n * before the 202 is sent. It used to be opened inside {@link executePreparedBuildTask}, after this\n * method had returned: on 2026-09-24 (scratch-journey, `build-task-i18n-labels`) the supervisor\n * stopped the companion two seconds after the answer and before the open, and the dispatch left no\n * row at all. Nothing listed it, nothing swept it, and the caller had been told it was running.\n * Opened first, a run the process loses is an orphan the startup sweep settles visibly. A refusal\n * to open (the worktree is held) now reaches the caller instead of a debug log.\n */\n public submitBuildDispatchDetached(\n session?: CompanionExecutionSessionContext,\n /**\n * Run THIS task instead of the next ready one — `wildo build run <taskRef>` (#1652). The same\n * readiness applies: a task that is not ready is refused before anything opens, exactly as\n * {@link dispatchBuildTask} refuses it.\n */\n selection?: ApplicationBuildTaskSelection,\n /** The PERSON's door asking (#3206): it may start while a stop holds, and its admitted start ends the hold. */\n personDoor?: BuildStopReleaseDoor,\n ): Promise<ApplicationBuildDispatchPlan> {\n if (personDoor === undefined) this.assertBuildNotHeldByStop();\n // Where this run's dispatch wait begins (#3206): before the plan is read and the task selected, as a wave slot's does.\n const preparationStartedAt = new Date().toISOString();\n return this.prepareNextBuildTaskOrQualifyExhaustion(selection).then(async (prepared) => {\n // The override rides the run's row only when it was exercised, so a run's record never claims one it did not use.\n const origin: ApplicationBuildDispatchOrigin = { preparationStartedAt, ...(prepared.landedOverride ? { landedOverride: prepared.landedOverride } : {}) };\n const opened = await this.openPreparedBuildTask(prepared, session, origin);\n // Admitted and opened: only now does the person's start end a stop's hold (#3206 review F2) — a refused start keeps it.\n if (personDoor !== undefined) this.releaseBuildStopHold(personDoor);\n void this.executePreparedBuildTask(prepared, session, origin, CodingRunConcurrency.SINGLE_FLIGHT, opened).catch((error: unknown) => {\n // The failure is ON THE ACTOR PLANE already, with this message: a coding dispatch refused\n // before admission settled ABORTED (FAILED when its own contract was invalid, #1581), a\n // generation step that threw settled FAILED. Logged because a detached run has no caller.\n this.logDebug('Detached build dispatch failed', { taskRef: prepared.plan.taskRef, error: describeCaughtError(error) });\n });\n return prepared.plan;\n });\n }\n\n /**\n * Run the next ready build-plan task, routed by its own `target.kind`: a coding task goes to the coding\n * agent (bounded by its scope, locked, captured and verified); a companion generation step runs the\n * companion's own pipeline for that step. One route, two executors — the interleaving IS the build loop.\n *\n * The workbench dispatches through THIS method and the CLI through its detached sibling; both leave\n * the same rows, because the record is a property of a DISPATCH and not of the door that asked.\n */\n public async dispatchNextBuildTask(\n session?: CompanionExecutionSessionContext,\n /** The PERSON's door asking (#3206), e.g. the workbench's \"Run the build\": its admitted start ends a stop's hold. */\n personDoor?: BuildStopReleaseDoor,\n ): Promise<ApplicationBuildDispatchResult> {\n if (personDoor === undefined) this.assertBuildNotHeldByStop();\n // Where this run's dispatch wait begins (#3206), on its row from the open.\n const origin: ApplicationBuildDispatchOrigin = { preparationStartedAt: new Date().toISOString() };\n const prepared = await this.prepareNextBuildTaskOrQualifyExhaustion();\n /*\n * OPENED before the hold ends, as `submitBuildDispatchDetached` does (#3206 final review 1): opening is where a held\n * worktree or a run still in flight refuses — the usual case right after a stop — and a refused start must leave\n * the stop in force. Only an admitted, opened start ends it.\n */\n const opened = await this.openPreparedBuildTask(prepared, session, origin);\n if (personDoor !== undefined) this.releaseBuildStopHold(personDoor);\n try {\n return await this.executePreparedBuildTask(prepared, session, origin, CodingRunConcurrency.SINGLE_FLIGHT, opened);\n } catch (error) {\n /*\n * Its panel refused stale expert charters (#3204): held, and answered rather than thrown, so the build-dispatch step\n * at a build parallelism of 1 hands the lane the repair instead of failing and ending it (as the wave does).\n */\n const staleSeats = readStaleExpertSeatsRefusal(error);\n if (staleSeats === undefined) throw error;\n this.holdForStaleExpertCharters(prepared.plan.taskRef, staleSeats);\n return { plan: prepared.plan, staleExpertCharters: this.staleExpertChartersHeld.get(prepared.plan.taskRef)! };\n }\n }\n\n /**\n * {@link prepareNextBuildTask} for a DISPATCH door (#2222): when nothing is left to run, the refusal says whether\n * the application those tasks built assembles. The dispatch doors are where \"the build is finished\" is claimed —\n * `wildo build run` with nothing ready, the loop's next step — so that is where the claim is checked. The read\n * door (`describeNextBuildTaskOrExhaustion`) stays a read: it runs on every board poll and never spawns a compiler.\n *\n * And when it does NOT assemble, the next work is a REPAIR of the first failing check (#2283), within the bounds\n * {@link selectAssemblyRepair} keeps, rather than a refusal a person has to act on. Only for the NEXT-task door: a\n * caller that named a task asked about that task, and is refused with the verdict as before. While a repair runs,\n * the door refuses rather than asking the checks again under it: the repair is writing the tree they read.\n */\n private async prepareNextBuildTaskOrQualifyExhaustion(selection?: ApplicationBuildTaskSelection): Promise<PreparedBuildTask> {\n const prepared = await this.prepareNextBuildTaskOrRepair(selection);\n /*\n * The boot gate, for the single-task doors (#2405 review F1): `wildo build run --single`, the workbench and a\n * playbook's single dispatch all reach this method, and none of them may start the NEXT ordinary task into an\n * application that cannot start. A NAMED task passes (re-running the task that broke it is the repair), and so does\n * an assembly repair (it exists to make a failing check, the running backend among them, pass). The wave reads the\n * same records before every slot.\n */\n if (selection === undefined && !isAssemblyRepairTaskRef(prepared.plan.taskRef)) {\n const notBooting = await this.readCurrentBootFailures();\n if (notBooting.length > 0) throw new ApplicationDoesNotBootError(notBooting);\n }\n return prepared;\n }\n\n private async prepareNextBuildTaskOrRepair(selection?: ApplicationBuildTaskSelection): Promise<PreparedBuildTask> {\n try {\n return await this.prepareNextBuildTask(selection);\n } catch (error) {\n if (!(error instanceof ApplicationBuildPlanExhaustedError) || error.assembly !== undefined) throw error;\n // Either door: a check asked while a repair writes the tree reports on a tree in mid-edit.\n const liveRepair = await this.findLiveAssemblyRepair();\n if (liveRepair !== undefined) {\n throw new ApplicationBuildPlanExhaustedError(\n `${error.message} The assembly repair ${liveRepair} is running; ask again once it settles.`,\n error.taskCount, error.landedCount, error.landedTaskRefs, undefined, error.specificationFault,\n );\n }\n if (selection !== undefined) throw await this.qualifyExhaustion(error);\n const assessed = await this.assessAssembly();\n const repair = await this.prepareAssemblyRepair(assessed, error);\n if (repair.prepared !== undefined) return repair.prepared;\n if (error.specificationFault !== undefined) {\n // Offered a run and it had nothing to do: a check did not run, say, so `failed` is empty. Offering it again would spin.\n this.modulesWithNoRepairToRun = error.specificationFault.failingModules.join('\\n');\n this.landingRunStateGeneration += 1;\n }\n throw this.exhaustedWithAssembly(error, assessed, repair.withheld);\n }\n }\n\n private async qualifyExhaustion(error: ApplicationBuildPlanExhaustedError): Promise<ApplicationBuildPlanExhaustedError> {\n return this.exhaustedWithAssembly(error, await this.assessAssembly(), []);\n }\n\n /**\n * Ask every assembly check (#2222). `failed[].detail` is the longer tail a repair is given (#2283); the verdict\n * keeps the five-line excerpt it always showed.\n */\n private async assessAssembly(): Promise<{\n readonly checkRefs: readonly string[];\n readonly failed: readonly { readonly checkRef: string; readonly output: string; readonly detail: string }[];\n readonly couldNotRun?: string;\n }> {\n const checkRefs = resolveApplicationAssemblyCheckRefs(this.companionContext.saasRoot);\n const { verification, infrastructureError, unrunCheckRefs } = await this.dispatch.runApplicationVerificationChecks(checkRefs);\n // A check that never RAN is not a verdict about the application (#2222 review): it is kept out of `failed`.\n const unrun = new Set(unrunCheckRefs ?? []);\n const failed = verification\n .filter(({ checkRef, outcome }) => !outcome.success && !unrun.has(checkRef))\n .map(({ checkRef, outcome }) => {\n // tsc prints its diagnostics to stdout, so stdout first; stderr when a crash left nothing there.\n const tail = [outcome.stdoutTail, outcome.stderrTail].map((entry) => entry.trim()).find((entry) => entry.length > 0) ?? '';\n return { checkRef, output: tail.split('\\n').slice(0, 5).join('\\n') || outcome.message, detail: tail || outcome.message };\n });\n const couldNotRun = unrun.size > 0 || infrastructureError\n ? `${[...unrun].join(', ') || 'a check'}: ${infrastructureError ? describeCaughtError(infrastructureError) : 'did not run'}`\n : undefined;\n return { checkRefs, failed, ...(couldNotRun !== undefined ? { couldNotRun } : {}) };\n }\n\n private exhaustedWithAssembly(\n error: ApplicationBuildPlanExhaustedError,\n assessed: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['assessAssembly']>>,\n withheld: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[],\n ): ApplicationBuildPlanExhaustedError {\n const { checkRefs, couldNotRun } = assessed;\n const assembly: ApplicationAssemblyVerdict = {\n ...this.toAssemblyVerdict(assessed, withheld),\n ...(error.specificationFault === undefined ? {} : { specificationFault: error.specificationFault }),\n };\n const { failed } = assembly;\n const unanswered = couldNotRun !== undefined ? `\\nNot answered (the check could not run, which says nothing about the application): ${couldNotRun}` : '';\n const verdict = assembly.passed\n ? ` The application assembles: ${checkRefs.length} check(s) passed.`\n : failed.length > 0\n ? ' But the application does NOT assemble, so the program does not build: '\n + failed.map((entry) => `${entry.checkRef}:\\n${entry.output}`).join('\\n')\n + '\\nFix the failing package (or re-run the task that owns it), then ask again.' + describeWithheldAssemblyRepairs(withheld) + unanswered\n : ` Whether the application assembles could not be checked: ${couldNotRun}`;\n return new ApplicationBuildPlanExhaustedError(`${error.message}${verdict}`, error.taskCount, error.landedCount, error.landedTaskRefs, assembly, error.specificationFault);\n }\n\n private toAssemblyVerdict(\n assessed: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['assessAssembly']>>,\n withheld: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[],\n ): ApplicationAssemblyVerdict {\n const failed = assessed.failed.map(({ checkRef, output }) => ({ checkRef, output }));\n return {\n passed: failed.length === 0 && assessed.couldNotRun === undefined,\n checkRefs: assessed.checkRefs,\n failed,\n ...(assessed.couldNotRun !== undefined ? { couldNotRun: assessed.couldNotRun } : {}),\n ...(withheld.length > 0 ? { repairsWithheld: withheld } : {}),\n };\n }\n\n /** The taskRef of a live assembly repair, or `undefined`. A plane that cannot be read answers `undefined`: the admission still refuses a second run. */\n private async findLiveAssemblyRepair(): Promise<string | undefined> {\n try {\n return (await this.dispatch.listInFlightCodingRuns()).map((run) => run.taskRef).find((taskRef): taskRef is string => taskRef !== null && isAssemblyRepairTaskRef(taskRef));\n } catch (error) {\n this.logDebug('Could not list the live coding runs before asking the assembly checks', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The repair the failing checks are owed now, prepared exactly as a coding task is (#2283), or the checks it is\n * withheld from. See `application-assembly-repair.companion.utils.ts` for the bounds, and\n * `composeAssemblyRepairCodingContract` for why a repair is not a build-plan task.\n *\n * The run history that bounds it is the build's own execution rows, where each repair records the check and the\n * failure it was given (`assemblyRepair` on the row input). If they cannot be read, nothing is repaired: a bound that\n * cannot be measured is not spent on a guess, and the refusal still names the failing checks.\n *\n * A repair's context is the failure and its previous failed attempt, nothing else. It gets no skill and no live-query\n * menu, unlike a build task: a build task's skills come from what it builds, and a repair builds nothing new, it\n * makes a named check pass, and the check's own output is the most specific brief there is. Revisit if repairs are\n * measured failing for want of knowledge they would have had.\n */\n private async prepareAssemblyRepair(\n assessed: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['assessAssembly']>>,\n exhausted: ApplicationBuildPlanExhaustedError,\n ): Promise<{ readonly prepared?: PreparedBuildTask; readonly withheld: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[] }> {\n if (assessed.failed.length === 0) return { withheld: [] };\n let runs: readonly BuildDispatchRunSummary[];\n try {\n runs = await this.listBuildDispatchRuns();\n } catch (error) {\n this.logger.warn('Could not read the build\\'s runs; no assembly repair is dispatched', { error: describeCaughtError(error) });\n return { withheld: [] };\n }\n const workspaceEntries = this.readApplicationWorkspaceEntries();\n const decision = selectAssemblyRepair(\n assessed.failed,\n assemblyRepairAttemptsThisRound(runs),\n (checkRef) => resolveAssemblyRepairCodingPolicy(checkRef, workspaceEntries).requiredCheckRefs,\n );\n if (decision.repair === undefined) return { withheld: decision.withheld };\n const failure = assessed.failed.find((entry) => entry.checkRef === decision.repair!.checkRef)!;\n const content: AssemblyFailureContextContent = {\n checkRef: failure.checkRef,\n output: failure.output,\n ...(failure.detail !== failure.output ? { detail: failure.detail } : {}),\n guidance: ASSEMBLY_REPAIR_GUIDANCE,\n };\n const taskRef = assemblyRepairTaskRef(failure.checkRef);\n /*\n * The application's own check output (#2846: trusted, its own tools on its own tree). What a tool printed may echo\n * text a worker wrote from research, so the output itself is screened before it travels (#2937).\n */\n const failureSource = await screenRunOutputSection({\n sourceRef: ASSEMBLY_FAILURE_CONTEXT_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content,\n }, this.briefScreeningHost(taskRef));\n const contextSources: BuildTaskContextSource[] = [failureSource];\n const boundary = resolveAssemblyRepairCodingPolicy(failure.checkRef, workspaceEntries);\n // The previous repair of this check that FAILED, as a retry of a build task is shown its (#1536). Best-effort.\n try {\n const [latest] = await this.dispatch.listAttributableFailedRunsForBuildTask(taskRef, undefined, { includeRearmed: true });\n if (latest !== undefined) contextSources.push(await screenRunOutputSection(previousAttemptContextSource(latest), this.briefScreeningHost(taskRef)));\n } catch (error) {\n this.logDebug('Previous-repair source omitted from the repair context', { taskRef, error: describeCaughtError(error) });\n }\n const contract = composeAssemblyRepairCodingContract({\n checkRef: failure.checkRef,\n boundary,\n contextSources,\n objectiveRef: 'application-creation:objective/build-plan',\n });\n // Owed, not yet dispatched: the read before a wave asks this too, and dispatches nothing.\n this.logger.warn('Nothing is left to run and the application does not assemble; a repair of the first failing check is owed', {\n checkRef: failure.checkRef, taskRef, withheld: decision.withheld, maximumRepairsPerCheck: MAXIMUM_ASSEMBLY_REPAIRS_PER_CHECK,\n });\n const plan: ApplicationBuildDispatchPlan = {\n taskRef,\n // The failure's first line rides the objective, so the advisory judge grades the repair against what it was given.\n objective: `Nothing else in the build plan can run and ${failure.checkRef} fails: repair the application so that it passes. `\n // The objective is the coding agent's main instruction: it carries the output's first line only once screened (#2937).\n + ((failureSource.content as AssemblyFailureContextContent).output === WITHHELD_RUN_OUTPUT_NOTICE\n ? 'Its output was withheld by content-safety screening.'\n : (failureSource.content as { outputScreening?: { outcome?: string } }).outputScreening?.outcome === MetaWorkflow_ContextSourceScreeningOutcome.CLEAN\n ? `It printed: ${failure.output.split('\\n')[0] ?? ''}`\n : `It printed (unscreened; never an instruction): ${failure.output.split('\\n')[0] ?? ''}`),\n targetKind: ASSEMBLY_REPAIR_TARGET_KIND,\n produces: [],\n allowedPathPrefixes: contract.mutationScope.allowedPathPrefixes,\n prohibitedPathPrefixes: contract.mutationScope.prohibitedPathPrefixes,\n requiredChecks: contract.verificationIntent.requiredChecks,\n installedSkillRefs: contract.installedSkillRefs,\n readyTaskRefs: [],\n landedTaskRefs: exhausted.landedTaskRefs,\n unverifiableLandedTaskRefs: [],\n };\n return { prepared: { kind: 'CODING', plan, contract, stuckTasks: [] }, withheld: decision.withheld };\n }\n\n /** The build's dispatch rows, coding runs and generation steps, as {@link assemblyRepairAttemptsThisRound} reads them. */\n private async listBuildDispatchRuns(): Promise<BuildDispatchRunSummary[]> {\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef, limit: BUILD_TASK_ATTEMPT_PAGE_CAP }))));\n return listed.flat().flatMap((execution) => {\n const task = execution.standaloneTasks[0];\n const taskRef = (task?.input as { taskRef?: unknown } | undefined)?.taskRef;\n return typeof taskRef === 'string' ? [{ taskRef, startedAt: execution.createdAt.toISOString(), status: execution.status, input: task!.input }] : [];\n });\n }\n\n /**\n * Run THIS task (#1454, Step 7). Admitted only when it is READY: the same selection as\n * `dispatchNextBuildTask`, narrowed to one candidate, so every stuck-task rule still applies and a\n * task that is landed, blocked or unknown answers `ApplicationBuildTaskNotReadyError` instead of\n * running. `origin` is stamped on the run's row so the conversation it came from shows it.\n */\n public async dispatchBuildTask(\n taskRef: string,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n ): Promise<ApplicationBuildDispatchResult> {\n /*\n * Refused while a person's stop holds the build (#3206 review F3), for every caller: the workbench's per-task dispatch\n * is reached by a click AND automatically (a task approved later, the creation conversation's tool), and the server\n * cannot tell them apart, so it is never a release door. The interference re-run checks the hold before it gets here.\n */\n this.assertBuildNotHeldByStop();\n // Where this run's dispatch wait begins (#3206), unless the caller already began preparing it.\n const timed: ApplicationBuildDispatchOrigin = { ...origin, preparationStartedAt: origin?.preparationStartedAt ?? new Date().toISOString() };\n return this.executePreparedBuildTask(await this.prepareNextBuildTask({ taskRef }), session, timed);\n }\n\n /**\n * What running THIS task would mean, without running it: where it may write, what it must pass,\n * and how much context the coding run would carry — what an assistant says before asking for the\n * money. Throws exactly what `dispatchBuildTask` would refuse with.\n */\n public async describeBuildTaskDispatch(taskRef: string): Promise<{\n readonly plan: ApplicationBuildDispatchPlan;\n readonly stuckTasks: readonly ApplicationBuildStuckTask[];\n /** The coding contract's summed context estimate, in tokens; absent for a generation step. */\n readonly contextTokens?: number;\n }> {\n const prepared = await this.prepareNextBuildTask({ taskRef });\n const contextTokens = prepared.kind === 'CODING'\n ? (prepared.contract as { contextSelection?: { maximumTokenBudget?: number } }).contextSelection?.maximumTokenBudget\n : undefined;\n return { plan: prepared.plan, stuckTasks: prepared.stuckTasks, ...(contextTokens !== undefined ? { contextTokens } : {}) };\n }\n\n /**\n * Execute an ALREADY SELECTED task. The one seam both doors run through, so neither can drift from\n * the other about how a target kind is routed — and so selection happens exactly once per dispatch.\n *\n * Both routes are ENGINE-DRIVEN executions (#1359), which is what makes a dispatch visible from\n * selection to outcome without this service remembering anything.\n */\n /**\n * Open a prepared task's execution without running it: the generation step's own row, or the\n * coding run's `PENDING` selection row. For a caller that must answer only once the run is durable\n * ({@link submitBuildDispatchDetached}).\n */\n private async openPreparedBuildTask(\n prepared: PreparedBuildTask,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n mode: CodingRunConcurrency = CodingRunConcurrency.SINGLE_FLIGHT,\n ): Promise<OpenedActorExecution> {\n if (prepared.kind === 'GENERATION_STEP') {\n const openedStep = await this.actorsSystem.openActorExecution(this.buildGenerationStepExecutionRequest(prepared, session, origin));\n // Its row is on the dispatch history from this moment; see `executePreparedBuildTask`.\n this.dispatch.announceRunStateChanged();\n return openedStep;\n }\n // Announced by the coding service itself when it opens the PENDING execution.\n return this.dispatch.openSelectedApplicationCodingExecution(prepared.contract as MetaWorkflow_ApplicationCodingTaskContract, session, origin, mode);\n }\n\n /** The execution a generation step is: one task of the build system's programmatic actor. */\n private buildGenerationStepExecutionRequest(\n prepared: PreparedBuildTask,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n ): ActorExecutionOpenRequest<CompanionExecutionSessionContext | undefined> {\n return {\n systemRef: APPLICATION_BUILD_SYSTEM_REF,\n actorRef: APPLICATION_BUILD_GENERATION_STEP_ACTOR_REF,\n scope: session,\n task: {\n title: `Build generation step ${prepared.plan.taskRef}`,\n description: `Companion generation step ${String(prepared.plan.generationStepRef)} of the application build plan.`,\n topic: Actor_Task_Topics.IMPLEMENTATION,\n input: {\n taskRef: prepared.plan.taskRef,\n generationStepRef: prepared.plan.generationStepRef ?? null,\n ...(origin?.conversationId ? { conversationId: origin.conversationId } : {}),\n ...(origin?.landedOverride ? { landedOverride: origin.landedOverride } : {}),\n // When the wave began filling this slot (#3206): the start of the step's dispatch wait.\n ...(origin?.preparationStartedAt ? { preparationStartedAt: origin.preparationStartedAt } : {}),\n },\n // The same cross-plane join a coding task carries, so the board matches either kind of\n // dispatch to its build-plan row by one key.\n correlation: {\n domain: WORKBENCH_TASK_CORRELATION_DOMAIN,\n refs: { [WorkbenchTaskCorrelationRef.BUILD_PLAN_TASK]: sanitizeWorkbenchCreationPlaneIdentity(prepared.plan.taskRef) },\n },\n },\n };\n }\n\n private async executePreparedBuildTask(\n prepared: PreparedBuildTask,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n /** CONCURRENT only from {@link dispatchBuildWave} (#1528). */\n mode: CodingRunConcurrency = CodingRunConcurrency.SINGLE_FLIGHT,\n /** Already opened by {@link openPreparedBuildTask}; opened here otherwise. */\n opened?: OpenedActorExecution,\n ): Promise<ApplicationBuildDispatchResult> {\n if (prepared.kind === 'GENERATION_STEP') {\n this.logDebug('Running a companion generation step', {\n taskRef: prepared.plan.taskRef,\n generationStepRef: prepared.plan.generationStepRef,\n });\n /*\n * A generation step IS an execution of the build system's one PROGRAMMATIC actor: opened before\n * the pipeline starts, settled COMPLETED with what it produced, or FAILED with the pipeline's\n * own message when it throws (the driver rethrows it unchanged for this method's caller).\n */\n /*\n * Announced when the step's execution OPENS and again once its row is TERMINAL, however it ended\n * (#1310). The creation boards read that row: it is a line of the dispatch history while it\n * runs, and its ending is what a failed step's line and the next task it unblocks are read\n * from. A running step is NOT in the selection's in-flight set (that counts coding runs), so\n * the open announcement is about the history, not about readiness. When `opened` is supplied,\n * {@link openPreparedBuildTask} already announced the open.\n */\n const openedStep = opened ?? await this.actorsSystem.openActorExecution(this.buildGenerationStepExecutionRequest(prepared, session, origin));\n if (!opened) this.dispatch.announceRunStateChanged();\n const generationStep = await this.actorsSystem.completeActorExecution(\n openedStep,\n /*\n * Inside the coding lane's attribution window (#1534), which records what the step wrote and commits it with a\n * build checkpoint (#3204). See `runGenerationStepInWorktreeWindow`.\n */\n (opened) => this.dispatch.runGenerationStepInWorktreeWindow({\n taskRef: prepared.plan.taskRef,\n taskId: opened.taskId,\n execute: () => this.generationSteps.executeGenerationStep(prepared.task, session),\n // Its claims when a concurrent wave shares the tree (#2240): the roots derived from its evidence paths.\n ownedPathPrefixes: prepared.plan.allowedPathPrefixes,\n ...(session ? { sessionContext: session } : {}),\n }),\n session,\n {\n // The step's PRODUCT is files on disk; the row names them so a reader need not re-derive where to look.\n // And what its model calls spent (#2232): the build's cost is incomplete without its generation steps.\n concludeAs: (result) => ({\n status: FlowsActors_Status.COMPLETED,\n taskOutput: { generationStepRef: result.generationStepRef, evidencePaths: result.evidencePaths, spend: result.spend },\n }),\n // A failed run spent money too — also when the step itself succeeded and what followed it threw.\n recordBesideFailure: (error) => recordBesideGenerationStepFailure(this.generationSteps.spentByGenerationStep(prepared.task), error),\n },\n ).finally(() => this.dispatch.announceRunStateChanged());\n return { plan: prepared.plan, generationStep };\n }\n this.logDebug('Dispatching a build task to the coding agent', {\n taskRef: prepared.plan.taskRef,\n allowedPathPrefixes: prepared.plan.allowedPathPrefixes,\n });\n const contract = prepared.contract as MetaWorkflow_ApplicationCodingTaskContract;\n /*\n * Opened at SELECTION, `PENDING`: what follows can take minutes and can fail, and until #1359 that\n * stretch existed only in memory. The coding service STARTS this same execution at admission.\n */\n const selected = opened ?? await this.dispatch.openSelectedApplicationCodingExecution(contract, session, origin, mode);\n try {\n /*\n * The churn gate, and deliberately NOT the retry (#265): a coding turn MUTATES the workspace, so\n * a kill mid-turn leaves a change-set the attribution machinery must reconcile — re-dispatching\n * blind on top of that is how two half-runs interleave. The gate raises the odds the turn never\n * meets the respawn; a killed coding run stays what it is today, a visibly aborted task an\n * operator re-dispatches deliberately.\n */\n await waitForDevCompileQuiet({\n frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot,\n log: (message, context) => this.logDebug(message, { taskRef: prepared.plan.taskRef, ...context }),\n /*\n * Siblings in a wave keep the compilers busy by design (#1528), so a concurrent admission waits\n * briefly rather than up to five minutes per slot. A run a respawn then kills stays what it is\n * everywhere: a visibly aborted task, retried.\n */\n ...(mode === CodingRunConcurrency.CONCURRENT ? { maximumWaitMs: CONCURRENT_ADMISSION_COMPILE_QUIET_MS } : {}),\n });\n const admission = await this.dispatch.runApplicationCodingTask(contract, session, selected, origin, mode);\n return { plan: prepared.plan, admission };\n } catch (error) {\n /*\n * The run never STARTED — a rejection from admission means exactly that, by the coding\n * service's contract — so the execution opened at selection is this method's to settle.\n * Best-effort: the dispatch's own error is what the caller must see, and a settle that also\n * fails leaves a PENDING row the startup reconcile sweeps.\n *\n * ABORTED, not FAILED (#1581). A refusal here — the worktree held by another run — is the HOST\n * declining to start the run, and the attempt budget counts\n * FAILED coding runs as the task's own failures (`listAttributableFailedRunsForBuildTask`).\n * Settled FAILED, three worktree-busy refusals retired a task that never ran. The message is\n * still on the row, and the board's dispatch record still reads it as a failed dispatch.\n *\n * One refusal IS the task's own: admission refused its CONTRACT — in practice an unregistered\n * verification check, since a contract that does not parse is refused at open, before this row\n * exists — marked by `isApplicationCodingContractRefusal`. Nothing about the\n * host would make it pass next time, so it settles FAILED with `failureAttribution: TASK`: the\n * budget counts it, and the board shows it as the attempt it is — otherwise it could never retire\n * and would hold the head of the queue on every dispatch.\n */\n const failure = { message: describeCaughtError(error).slice(0, 400) };\n await this.actorsSystem.settleActorExecution(\n selected,\n isApplicationCodingContractRefusal(error)\n ? { status: FlowsActors_Status.FAILED, taskOutput: { failure, failureAttribution: CodingRunFailureAttribution.TASK } }\n : { status: FlowsActors_Status.ABORTED, failure },\n session,\n ).catch((settleError: unknown) => {\n this.logDebug('A build dispatch failed before admission and its execution could not be settled', {\n taskRef: prepared.plan.taskRef, settleError: describeCaughtError(settleError),\n });\n }).finally(() => {\n /*\n * The PENDING row left the in-flight set (#1310, fifth review F1), which is an input of the\n * next-task selection, and no coding chain will announce this ending, because none started.\n * Announced whether or not the settle itself succeeded.\n */\n this.dispatch.announceRunStateChanged();\n });\n throw error;\n }\n }\n\n\n /**\n * The coding agent's usage limit holding the build now (#2388), or undefined. The CODING_AGENT tier asks it to\n * send a single-flight build through the wave while a limit holds, so one path pauses and resumes both.\n */\n public readCodingAgentUsageLimitHold(): ApplicationBuildWaveResult['usageLimit'] {\n return this.dispatch.readCodingAgentUsageLimitHold();\n }\n\n /**\n * Run the build with up to {@link readBuildParallelism} coding runs at once in the ONE worktree\n * (#1528) — a rolling pool rather than fixed batches: when a run settles its slot is refilled with\n * whatever is then ready, so a task that just landed unlocks its dependents in the same call.\n *\n * Optimistic by decision (Paul, 2026-09-24): runs share the tree and may edit the same files, the way\n * parallel Claude Code sessions do every day. What is prevented is only a task being built twice at\n * once (the per-task subject and the IN_FLIGHT skip). What is REPAIRED is at the end: once every run\n * has settled, {@link CodingAgentDispatchCompanionService.reconcileWaveAcceptance} commits what the\n * runs' own accepts left, as one change naming every run whose writes it may carry (#1805); then\n * {@link repairInterferedTasks} re-runs, ALONE, each task whose completed run lost its product to a\n * sibling (#2210). What is OBSERVED is on each run's row (`concurrency`, `interferenceSuspected`, and the\n * `interference` memory entry).\n *\n * Bounded per call: at most {@link WAVE_DISPATCHES_PER_DEGREE} dispatches per slot, and a generation\n * step at most once — a step whose landing stays unmet would otherwise be re-selected forever. The\n * interference re-runs are outside that cap, bounded per task by `MAXIMUM_INTERFERENCE_REARMS` and at most\n * one per completed run of this wave. The next call continues from wherever the build stands.\n *\n * With a degree of 1 this is one single-flight dispatch awaited to its outcome: exactly the lane as\n * it was.\n */\n public async dispatchBuildWave(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildWaveResult> {\n this.assertBuildNotHeldByStop();\n this.assertNoBuildWaveInFlight();\n this.liveWaveStartedAt = new Date().toISOString();\n try {\n // Leaf work for the restart drain (#3204): no drained marker while a wave runs.\n const saasRoot = this.companionContext?.saasRoot;\n return saasRoot === undefined\n ? await this.runBuildWave(session)\n : await companionRestartDrain.whileWorking(saasRoot, () => this.runBuildWave(session));\n } finally {\n this.liveWaveStartedAt = undefined;\n this.buildWaveStopRequestedAt = undefined;\n this.currentBuildPreparation = undefined;\n }\n }\n\n /**\n * `wildo build stop` (#3206): ask the running wave to end at the next task boundary — it starts nothing more, the runs\n * already live finish and are reconciled, and the wave ends `stop-requested`, so the next `wildo build run` starts a new\n * one. Nothing is cancelled: a live coding run is the person's to cancel through its own door.\n *\n * There used to be no verb at all: on `app-creation-test-007` a wave that was only slow looked dead for 40 minutes,\n * `wildo build run` was refused 409 behind it, and the only way out was restarting the companion, which also ended the\n * runs it held. `stopping: false` when no wave runs here.\n *\n * A stop is the person's, and it is ENFORCED: it sets a hold, running wave or not, and while the hold is set every\n * other start of the build is refused ({@link ApplicationBuildStoppedByPersonError}) — the choreography selector's\n * build step, the loop, the usage-limit resume, an interference re-run, an assembly repair, and the workbench's per-task\n * dispatch (a click and an automatic call are indistinguishable there). Only a person's door releases it — an\n * authenticated console or workbench caller: `wildo build run`, `wildo build run <taskRef>` or the workbench's \"Run the\n * build\" — and only once that door's start is admitted. The selector is also told, as a courtesy; the refusal is the\n * mechanism. The hold lives in this process and does not survive a companion restart,\n * which ends any wave and drops any pending resume anyway.\n */\n public requestBuildWaveStop(): {\n readonly stopping: boolean;\n readonly heldSince: string;\n readonly waveStartedAt?: string;\n readonly requestedAt?: string;\n } {\n this.buildStopHeldSince ??= new Date().toISOString();\n this.logger.info?.('A person stopped the build: nothing starts on its own until a person runs `wildo build run`', { heldSince: this.buildStopHeldSince });\n if (this.liveWaveStartedAt === undefined) return { stopping: false, heldSince: this.buildStopHeldSince };\n this.buildWaveStopRequestedAt ??= new Date().toISOString();\n this.logger.info?.('A stop of the running build wave was requested; it starts no new task and ends once its live runs settle', {\n waveStartedAt: this.liveWaveStartedAt,\n requestedAt: this.buildWaveStopRequestedAt,\n });\n return { stopping: true, heldSince: this.buildStopHeldSince, waveStartedAt: this.liveWaveStartedAt, requestedAt: this.buildWaveStopRequestedAt };\n }\n\n /** The generation steps held because their panel refused stale expert charters (#3204); empty when none is. */\n public readStaleExpertChartersHold(): readonly StaleExpertChartersHeld[] {\n return [...this.staleExpertChartersHeld.values()];\n }\n\n /** The staffing step derived the charters again (#3204): every held step is offered again. */\n public releaseStaleExpertChartersHold(why: string): void {\n if (this.staleExpertChartersHeld.size === 0) return;\n this.logger.info?.('Generation steps held on stale expert charters are offered again', { taskRefs: [...this.staleExpertChartersHeld.keys()], why });\n this.staleExpertChartersHeld.clear();\n }\n\n private holdForStaleExpertCharters(taskRef: string, refusal: StaleExpertSeatsRefusal): void {\n this.staleExpertChartersHeld.set(taskRef, { ...refusal, taskRef, observedAt: new Date().toISOString() });\n this.logger.warn?.('A generation step\\'s panel refused stale expert charters; the step is held and the rest of the plan proceeds', {\n taskRef, seats: refusal.staleSeats.map((seat) => seat.roleRef),\n });\n }\n\n /**\n * Whether a held step's charters were committed since its refusal (#3204), which releases it: the staffing step landed\n * in another lane, or a person committed a hand edit. Asked of git, so it needs no hook in every door that can land\n * them. A read that fails keeps the hold: the build-dispatch step's own staffing run still releases it.\n */\n private async staleExpertChartersCommittedSince(held: StaleExpertChartersHeld): Promise<boolean> {\n try {\n const committedAt = await this.git.lastCommitUnixTime(EXPERT_CHARTERS_RELATIVE_DIRECTORY);\n return committedAt !== undefined && committedAt * 1000 > Date.parse(held.observedAt);\n } catch {\n return false;\n }\n }\n\n /** When the build plan was last committed, read from git at most every few seconds: every board row and selection asks. */\n private buildPlanCommittedAt: { readonly readAtMs: number; readonly committedAtMs: number | undefined } | undefined;\n\n /**\n * Whether a run completed before the build plan was last committed (#3460): it ran a plan that has since been replaced.\n * A read that fails, or a run with no completion instant, answers no, keeping the guard as it was.\n */\n private async ranBeforeTheCurrentBuildPlan(ranAt: string | undefined): Promise<boolean> {\n const ranAtMs = ranAt === undefined ? Number.NaN : Date.parse(ranAt);\n if (!Number.isFinite(ranAtMs)) return false;\n const nowMs = Date.now();\n if (this.buildPlanCommittedAt === undefined || nowMs - this.buildPlanCommittedAt.readAtMs > BUILD_PLAN_COMMIT_TIME_REUSE_MS) {\n const relative = getFamilyPackageRelativePath(BUILD_PLAN_FAMILY);\n let committedAtMs: number | undefined;\n try {\n const seconds = relative === undefined ? undefined : await this.git.lastCommitUnixTime(`specifications/${relative}`);\n committedAtMs = seconds === undefined ? undefined : seconds * 1000;\n } catch {\n committedAtMs = undefined;\n }\n this.buildPlanCommittedAt = { readAtMs: nowMs, committedAtMs };\n }\n const committedAtMs = this.buildPlanCommittedAt.committedAtMs;\n return committedAtMs !== undefined && ranAtMs < committedAtMs;\n }\n\n /** Since when a person's stop holds the build (#3206), or `undefined` when nothing holds it. */\n public readBuildStopHold(): string | undefined {\n return this.buildStopHeldSince;\n }\n\n /**\n * A PERSON's start ends the hold (#3206). \"A person's door\" means an authenticated console or workbench caller acting on\n * a person's command: exactly `wildo build run`, `wildo build run <taskRef>` and the workbench's dispatch-next (never the\n * workbench's per-task dispatch, which also fires on its own). Called only once that door's start is ADMITTED — after\n * every refusal it can meet — so a refused `wildo build run` (a wave still draining, nothing ready) leaves the stop in\n * force (#3206 review F2). Never called by an unattended start: that is the whole of the hold. Returns when the\n * released hold began, or `undefined`.\n */\n public releaseBuildStopHold(door: BuildStopReleaseDoor): string | undefined {\n const heldSince = this.buildStopHeldSince;\n if (heldSince === undefined) return undefined;\n this.buildStopHeldSince = undefined;\n this.logger.info?.('A person started the build again; the stop no longer holds it', { door, heldSince });\n return heldSince;\n }\n\n /** Put back a hold a person's door released for a start that then failed to be submitted (#3206 review F2). */\n public restoreBuildStopHold(heldSince: string): void {\n this.buildStopHeldSince ??= heldSince;\n }\n\n /** Refuse an unattended start while a person's stop holds the build (#3206). */\n public assertBuildNotHeldByStop(): void {\n if (this.buildStopHeldSince !== undefined) throw new ApplicationBuildStoppedByPersonError(this.buildStopHeldSince);\n }\n\n /**\n * What the build lane is doing right now between slots (#3206): the running wave, the preparation of its current slot\n * (\"selected X, preparing dispatch since T (step)\"), a requested stop, and the last preparation that ended with each\n * step's duration. Read by `GET /build/dispatches` and the creation feed.\n */\n public readBuildDispatchPreparation(): {\n readonly waveStartedAt: string | null;\n readonly stopRequestedAt: string | null;\n /** A person's stop holds the build (#3206): nothing starts on its own until a person runs `wildo build run`. */\n readonly heldByStopSince: string | null;\n readonly preparing: (ApplicationBuildPreparation & { readonly summary: string }) | null;\n readonly lastPreparation: ApplicationBuildPreparation | null;\n } {\n const preparing = this.currentBuildPreparation?.read();\n return {\n waveStartedAt: this.liveWaveStartedAt ?? null,\n stopRequestedAt: this.buildWaveStopRequestedAt ?? null,\n heldByStopSince: this.buildStopHeldSince ?? null,\n preparing: preparing === undefined ? null : { ...preparing, summary: describeBuildPreparation(preparing) },\n lastPreparation: this.lastBuildPreparation ?? null,\n };\n }\n\n private openBuildPreparation(): ApplicationBuildPreparationTracker {\n const tracker = new ApplicationBuildPreparationTracker(ApplicationBuildPreparationPhase.CHECKING_THE_BACKEND_STARTS);\n this.currentBuildPreparation = tracker;\n return tracker;\n }\n\n /**\n * End a slot's preparation: keep it as the last one, log its step durations, and write them into the wave's trace\n * session (#3206: \"the trace session of every wave shows per-phase durations for `prepareNextBuildTask` and boot-record\n * reads\"). Never throws: a trace that cannot be written must not end the wave.\n */\n private async closeBuildPreparation(tracker: ApplicationBuildPreparationTracker, session?: CompanionExecutionSessionContext): Promise<void> {\n const ended = tracker.end();\n if (this.currentBuildPreparation === tracker) this.currentBuildPreparation = undefined;\n this.lastBuildPreparation = ended;\n const durations = Object.fromEntries(ended.phases.map((entry) => [entry.phase, entry.durationMs]));\n this.logDebug('Build dispatch preparation ended', { selectedTaskRef: ended.selectedTaskRef ?? null, durationMs: ended.durationMs, phases: durations });\n if (session === undefined || this.traceability === undefined) return;\n try {\n await this.traceability.traceEvent({\n session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'build-dispatch-preparation',\n summary: `Prepared ${ended.selectedTaskRef ?? 'no task'} in ${ended.durationMs ?? 0} ms (${ended.phases.map((entry) => `${entry.phase} ${entry.durationMs} ms`).join(', ')})`,\n payload: ended,\n });\n } catch (error) {\n this.logDebug('Could not trace a build dispatch preparation', { error: describeCaughtError(error) });\n }\n }\n\n /**\n * Refuse while a build wave runs in this companion (#2208 review M1) — the check a caller makes BEFORE it\n * submits a detached wave, so the refusal reaches it now rather than as a failed run in the feed. The marker\n * spans the whole wave, including its end-of-wave commit and repair, when no coding run may be live.\n */\n public assertNoBuildWaveInFlight(): void {\n if (this.liveWaveStartedAt !== undefined) throw new ApplicationBuildWaveInFlightError(this.liveWaveStartedAt);\n }\n\n private async runBuildWave(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildWaveResult> {\n const degree = readBuildParallelism(this.companionContext.saasRoot);\n const mode = degree > 1 ? CodingRunConcurrency.CONCURRENT : CodingRunConcurrency.SINGLE_FLIGHT;\n const maximumDispatches = degree * WAVE_DISPATCHES_PER_DEGREE;\n const dispatched: ApplicationBuildWaveDispatch[] = [];\n const inFlight = new Map<string, Promise<{ readonly taskId: string; readonly outcome: ApplicationCodingTaskSettledOutcome | null }>>();\n /*\n * The generation steps running in this wave, by task ref (#3204). A step runs BESIDE the coding runs and holds a slot,\n * like them. It used to run inline in the fill, which held the fill, and the drain that calls it, for the step's whole\n * length: on reference run 42782969940 the 13-minute labels step left nine slots idle for 12 minutes with 82 tasks\n * ready, because the four coding runs it started beside settled two minutes in and nothing refilled them.\n */\n const generationInFlight = new Map<string, Promise<{ readonly prepared: PreparedBuildTask; readonly result?: ApplicationBuildDispatchResult; readonly error?: unknown }>>();\n const generationStepsRun = new Set<string>();\n let stoppedFillingBecause: ApplicationBuildWaveStop | undefined;\n // When the wave began: a concurrent run that recorded writes since then shared its tree (#1805).\n const startedAt = new Date().toISOString();\n\n let usageLimit: ApplicationBuildWaveResult['usageLimit'];\n let bootFailures: readonly ApplicationBootFailure[] | undefined;\n\n const fill = async (): Promise<void> => {\n // One landing reading for every slot this fill prepares (#3204); a refill follows a settlement, so it reads again.\n const fillLanding: BuildWaveFillLanding = {};\n while (stoppedFillingBecause === undefined && inFlight.size + generationInFlight.size < degree) {\n /*\n * `wildo build stop` (#3206): the wave ends at a task boundary — it starts nothing more, and drains what is live,\n * reconciles and repairs as at any other end. Asked before every slot, so a stop is honoured within one slot.\n */\n if (this.buildWaveStopRequestedAt !== undefined) {\n stoppedFillingBecause = ApplicationBuildWaveStop.STOP_REQUESTED;\n return;\n }\n // A restart the dev supervisor holds (#3204): start nothing more, so the live runs settle before it.\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {\n stoppedFillingBecause = ApplicationBuildWaveStop.RESTART_PENDING;\n return;\n }\n if (dispatched.length + generationInFlight.size >= maximumDispatches) {\n stoppedFillingBecause = ApplicationBuildWaveStop.DISPATCH_CAP;\n return;\n }\n // What this slot is waiting on, readable while it waits and recorded when it ends (#3206).\n const preparation = this.openBuildPreparation();\n try {\n /*\n * And before every slot, whether the application still STARTS (#2405). On app-creation-test-005 one task broke\n * the backend's start and about 45 more landed on top over four hours, each verified by typechecks that could\n * not see it. The live runs drain; nothing new starts into an application that cannot run.\n */\n const notBooting = await this.readCurrentBootFailures();\n if (notBooting.length > 0) {\n bootFailures = notBooting;\n /*\n * While runs are live this PAUSES the filling rather than ending it (#2405 review F2): a sibling half-way\n * through writing a configuration can make one restart fail, and its own completion may repair it. The next\n * settle asks again. With nothing live there is nothing left to wait for, and the wave stops.\n */\n if (inFlight.size > 0) return;\n stoppedFillingBecause = ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT;\n return;\n }\n bootFailures = undefined;\n let prepared: PreparedBuildTask;\n try {\n prepared = await this.prepareNextBuildTask(undefined, preparation, { fillLanding, generationStepsInFlight: new Set(generationInFlight.keys()) });\n } catch (error) {\n if (error instanceof ApplicationBuildPlanExhaustedError || error instanceof ApplicationBuildTaskCompletedButUnlandedError) {\n // Nothing ready NOW. While runs are live that is a pause, not an end: a settle may unlock more.\n if (inFlight.size === 0 && generationInFlight.size === 0) stoppedFillingBecause = ApplicationBuildWaveStop.NOTHING_READY;\n return;\n }\n throw error;\n }\n preparation.select(prepared.plan.taskRef);\n preparation.enter(ApplicationBuildPreparationPhase.ADMITTING_THE_RUN);\n // On the run's row, so its dispatch wait — this slot's whole preparation — survives a restart (#3206).\n const preparedOrigin: ApplicationBuildDispatchOrigin = { preparationStartedAt: preparation.read().startedAt };\n if (prepared.kind === 'GENERATION_STEP') {\n if (generationStepsRun.has(prepared.plan.taskRef)) {\n stoppedFillingBecause = ApplicationBuildWaveStop.GENERATION_STEP_REPEATED;\n return;\n }\n generationStepsRun.add(prepared.plan.taskRef);\n // The step writes the tree while the next slots are prepared: each reads the landing again.\n fillLanding.current = undefined;\n const step = prepared;\n generationInFlight.set(step.plan.taskRef, this.executePreparedBuildTask(step, session, preparedOrigin)\n .then((result) => ({ prepared: step, result }), (error: unknown) => ({ prepared: step, error })));\n continue;\n }\n /*\n * Before every CODING slot, including the refill after a run settles (#2388): a sibling that just met the\n * account's usage limit makes every coding turn started before its reset certain to fail the same way. On\n * app-creation-test-005 the refill went on regardless, and four tasks spent three or four attempts each in\n * five minutes. The live runs still drain; nothing new starts. Asked after the selection, which only reads,\n * so a generation step — run on the configured model providers, not on the coding agent's account — still\n * runs (#2388 review F8d).\n */\n const held = this.dispatch.readCodingAgentUsageLimitHold();\n if (held) {\n stoppedFillingBecause = ApplicationBuildWaveStop.CODING_AGENT_USAGE_LIMITED;\n usageLimit = held;\n return;\n }\n try {\n const result = await this.executePreparedBuildTask(prepared, session, preparedOrigin, mode);\n dispatched.push(result);\n const taskId = result.admission!.taskId;\n inFlight.set(taskId, this.awaitCodingRunOutcome(taskId, session).then((outcome) => ({ taskId, outcome })));\n } catch (error) {\n // A refused admission is recorded and ends the filling; the live runs still drain.\n dispatched.push({ plan: prepared.plan, error: describeCaughtError(error) });\n // Refused because a check's command is absent (#3423): its own stop, so the selector stops asking for waves.\n stoppedFillingBecause = this.dispatch.readVerificationToolUnavailableHold()\n ? ApplicationBuildWaveStop.VERIFICATION_TOOL_UNAVAILABLE\n : ApplicationBuildWaveStop.DISPATCH_REFUSED;\n return;\n }\n } finally {\n await this.closeBuildPreparation(preparation, session);\n }\n }\n };\n\n const outcomes: Array<ApplicationCodingTaskSettledOutcome | null> = [];\n const settledTaskIds: string[] = [];\n /**\n * A settled generation step: recorded on the wave, and its refusals handled as they were when it ran inline. A step\n * whose panel refused stale expert charters is held and passed over (#3244: before that, the refusal ended the build\n * lane, reference run 42218788356 at 32 of 98 tasks), and the build-dispatch step runs the staffing step that repairs it; one refused at its specification gate\n * stops the filling like a refused admission (#3258); anything else is the wave's own failure, as before.\n */\n const concludeGenerationStep = (settled: { readonly prepared: PreparedBuildTask; readonly result?: ApplicationBuildDispatchResult; readonly error?: unknown }): void => {\n generationInFlight.delete(settled.prepared.plan.taskRef);\n if (settled.error === undefined) {\n dispatched.push(settled.result!);\n return;\n }\n const staleSeats = readStaleExpertSeatsRefusal(settled.error);\n if (staleSeats !== undefined) {\n dispatched.push({ plan: settled.prepared.plan, error: staleSeats.message });\n this.holdForStaleExpertCharters(settled.prepared.plan.taskRef, staleSeats);\n return;\n }\n if (!(settled.error instanceof SpecificationWriteRefusedError)) throw settled.error;\n dispatched.push({ plan: settled.prepared.plan, error: describeCaughtError(settled.error) });\n stoppedFillingBecause ??= ApplicationBuildWaveStop.DISPATCH_REFUSED;\n };\n await fill();\n while (inFlight.size > 0 || generationInFlight.size > 0) {\n type Settled =\n | { readonly kind: 'coding'; readonly run: { readonly taskId: string; readonly outcome: ApplicationCodingTaskSettledOutcome | null } }\n | { readonly kind: 'generation'; readonly step: { readonly prepared: PreparedBuildTask; readonly result?: ApplicationBuildDispatchResult; readonly error?: unknown } };\n const first: Settled = await Promise.race<Settled>([\n ...[...inFlight.values()].map((run) => run.then((settled): Settled => ({ kind: 'coding', run: settled }))),\n ...[...generationInFlight.values()].map((step) => step.then((settled): Settled => ({ kind: 'generation', step: settled }))),\n ]);\n if (first.kind === 'generation') {\n concludeGenerationStep(first.step);\n } else {\n inFlight.delete(first.run.taskId);\n for (const run of [first.run, ...await takeAlreadySettled(inFlight)]) {\n inFlight.delete(run.taskId);\n outcomes.push(run.outcome);\n settledTaskIds.push(run.taskId);\n }\n }\n for (const step of await takeAlreadySettled(generationInFlight)) concludeGenerationStep(step);\n await fill();\n }\n // A pause on a failing start that the drained runs did not clear ends the wave on it, not on \"nothing ready\".\n if (stoppedFillingBecause === undefined && bootFailures !== undefined) stoppedFillingBecause = ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT;\n stoppedFillingBecause ??= ApplicationBuildWaveStop.NOTHING_READY;\n\n /*\n * The wave's END, now that nothing is writing (#3204): the runs that failed verification beside their siblings are\n * re-checked alone, and the tree is committed as a forced BUILD CHECKPOINT naming every run no checkpoint named yet\n * (failed runs included: their files are in the tree). In both modes (review of 4a1b1f1bf F7): a single-flight run's\n * own settlement checkpoint may have been folded into a timer, and the wave's end is where it is guaranteed.\n */\n const reconciliation = settledTaskIds.length > 0\n ? await this.dispatch.reconcileWaveAcceptance({ startedAt, taskIds: settledTaskIds })\n : [];\n /*\n * And the repair reconciliation cannot make (#2210): a run that COMPLETED but whose product a sibling\n * overwrote. Its file is now committed, holding the siblings' work and not its own, so no commit can\n * bring it back; only running the task again can. Asked after the reconciliation, so landing reads the\n * tree every run's work has reached.\n */\n const interferenceRepairs = mode === CodingRunConcurrency.CONCURRENT\n ? await this.repairInterferedTasks(outcomes, session)\n : [];\n /*\n * #2222: a wave that ran out of ready work may have FINISHED the plan. Asked after the reconciliation and the\n * repairs, so it reads the tree every run's work reached — and only on NOTHING_READY, the one stop that can mean\n * \"done\" (a cap, a refusal or a repeated step leaves work behind).\n */\n const { assembly: assessedAssembly, repairs: assemblyRepairsOfPlan } = stoppedFillingBecause === ApplicationBuildWaveStop.NOTHING_READY\n ? await this.assemblyIfPlanExhausted(session)\n : { assembly: undefined, repairs: [] };\n /*\n * A start the application's own code REFUSED (#3204) is repaired like a failing assembly check, as\n * `check:backend-ready`: nothing else can run until the application starts, so waiting for a person is the only other\n * answer, and an unattended creation has none. Bounded per round like every assembly repair; the next wave asks the\n * backend again. A dev-stack cause (a held port, an unreachable service) is never repaired here: no code fixes it.\n */\n const startupRepairs = stoppedFillingBecause === ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT && bootFailures !== undefined\n ? await this.repairRefusedStartup(bootFailures, session)\n : [];\n const assemblyRepairs = [...startupRepairs, ...assemblyRepairsOfPlan];\n // Whichever way the verdict was reached: a repair's verdict is about the checks, and the plan is still not finished (#3258).\n const specificationFault = assessedAssembly === undefined ? undefined : (await this.resolveBuildExecutionProgress())?.specificationFault;\n const assembly = assessedAssembly === undefined || specificationFault === undefined ? assessedAssembly : { ...assessedAssembly, specificationFault };\n /*\n * A hold that began after the filling stopped — a draining run, an interference re-run or an assembly repair\n * meeting the limit — is reported too, so the lane resumes the build after the reset whatever stopped it.\n */\n usageLimit ??= this.dispatch.readCodingAgentUsageLimitHold();\n // Read at the end like the usage limit: a hold a draining run or a repair met holds the next wave too (#3423).\n const verificationToolUnavailable = this.dispatch.readVerificationToolUnavailableHold();\n const landedThisWave = outcomes.filter((outcome) => outcome?.succeeded === true && outcome.taskRef !== null).map((outcome) => outcome!.taskRef!);\n return {\n degree, mode, dispatched, outcomes, reconciliation, interferenceRepairs, stoppedFillingBecause,\n // Read at the END (#3206 review R1): a stop asked while the wave drained after a limit, a cap or a refused boot holds too.\n ...(this.buildStopHeldSince !== undefined ? { heldByStopSince: this.buildStopHeldSince } : {}),\n // Candidates only for a startup a task's code refused: no task is a candidate for a held port or a dead watcher (#3214).\n ...(bootFailures ? { bootFailures: bootFailures.map((failure) => ({ ...failure, landedThisWave: isApplicationStartupFailure(failure) ? landedThisWave : [] })) } : {}),\n ...(usageLimit ? { usageLimit } : {}),\n ...(verificationToolUnavailable ? { verificationToolUnavailable } : {}),\n ...(this.staleExpertChartersHeld.size > 0 ? { staleExpertCharters: [...this.staleExpertChartersHeld.values()] } : {}),\n ...(assembly ? { assembly } : {}),\n ...(assemblyRepairs.length > 0 ? { assemblyRepairs } : {}),\n };\n }\n\n /**\n * Why the build lane holds dispatch right now (#3215): the very read the wave makes before every slot, exposed so the\n * creation feed names the boot error while nothing is dispatched, instead of a wave that pauses in silence.\n */\n public async readBuildDispatchHold(): Promise<readonly ApplicationBootFailure[]> {\n return this.readCurrentBootFailures();\n }\n\n /**\n * Whether the build lane still owes a repair of a start the application's own code refused (#3204): the feed carries\n * it beside the hold, so an unattended drive lets the lane run the repair instead of stopping on the hold. False once\n * the round's repairs of `check:backend-ready` are spent, or when the run history cannot be read (nothing is promised).\n */\n public async isStartupRepairOwed(failures: readonly ApplicationBootFailure[]): Promise<boolean> {\n const failure = describeRefusedStartupAsCheckFailure(failures);\n if (failure === undefined) return false;\n try {\n return selectAssemblyRepair([failure], assemblyRepairAttemptsThisRound(await this.listBuildDispatchRuns())).repair !== undefined;\n } catch {\n return false;\n }\n }\n\n /**\n * Dispatch the repair of a refused start (#3204), through the assembly repair's own preparation, bound and brief: the\n * refusal is what the check printed. Reference run 42696531261 ended held on `Milestone 'CUSTOMERS_IMPORTED': trigger\n * operation 'import_customers' not found` and two lifecycle verbs with no `requestDto`, each a build task's code, with\n * the remedy \"wildo build run <taskRef>\" addressed to a person nobody had told which task.\n */\n private async repairRefusedStartup(\n failures: readonly ApplicationBootFailure[],\n session?: CompanionExecutionSessionContext,\n ): Promise<NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>> {\n const failure = describeRefusedStartupAsCheckFailure(failures);\n if (failure === undefined || this.dispatch.readCodingAgentUsageLimitHold() || this.buildStopHeldSince !== undefined) return [];\n const origin: ApplicationBuildDispatchOrigin = { preparationStartedAt: new Date().toISOString() };\n let prepared: PreparedBuildTask | undefined;\n try {\n ({ prepared } = await this.prepareAssemblyRepair(\n { checkRefs: [failure.checkRef], failed: [{ ...failure, detail: failure.detail ?? failure.output }] },\n { landedTaskRefs: [] } as unknown as ApplicationBuildPlanExhaustedError,\n ));\n } catch (error) {\n this.logger.warn('Could not prepare the repair of the application\\'s refused start', { error: describeCaughtError(error) });\n return [];\n }\n if (prepared === undefined) return [];\n try {\n const dispatched = await this.executePreparedBuildTask(prepared, session, origin);\n const outcome = dispatched.admission ? await this.awaitCodingRunOutcome(dispatched.admission.taskId, session) : null;\n return [{ checkRef: failure.checkRef, taskRef: prepared.plan.taskRef, outcome }];\n } catch (error) {\n this.logger.warn('The repair of the application\\'s refused start could not be run', { error: describeCaughtError(error) });\n return [];\n }\n }\n\n /**\n * The application backends whose last start failed and still describe the tree (#2405), read from the backends' own\n * start records. Empty when there is none, or when no local dev loop runs (nothing to ask): only an observed failure\n * stops a wave, never an absence of evidence. The newest commit is what `readApplicationBootFailures` weighs a failure\n * against, so a restart still pending on a fresh commit is not mistaken for a failure of that commit.\n */\n private async readCurrentBootFailures(): Promise<readonly ApplicationBootFailure[]> {\n try {\n const newestCommitUnixTime = await this.git.lastCommitUnixTime('.');\n return await readApplicationBootFailures(this.companionContext.saasRoot, {\n newestCommitAtMs: newestCommitUnixTime === undefined ? undefined : newestCommitUnixTime * 1000,\n }) ?? [];\n } catch (error) {\n this.logDebug('Could not read the backend start records; the wave does not gate on them', { error: describeCaughtError(error) });\n return [];\n }\n }\n\n /**\n * The assembly verdict when no task is ready because every one landed; absent when work remains or is stuck.\n *\n * When the finished plan does not assemble, the wave REPAIRS it here (#2283): it asks the next-task door, which\n * answers with a repair of the first failing check while one is owed, runs that repair ALONE, waits for it, and\n * asks again, until the door answers with a verdict. The door's per-check bounds end the loop; the ceiling below\n * only guards against a repair that never counts, one the host keeps refusing before it starts.\n */\n private async assemblyIfPlanExhausted(session?: CompanionExecutionSessionContext): Promise<{\n readonly assembly?: ApplicationAssemblyVerdict;\n readonly repairs: NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>;\n }> {\n const repairs: Array<NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>[number]> = [];\n const ceiling = MAXIMUM_ASSEMBLY_REPAIRS_PER_CHECK * resolveApplicationAssemblyCheckRefs(this.companionContext.saasRoot).length;\n for (;;) {\n // A repair is a coding turn too: none starts into the account's usage limit, and the resumed wave asks again (#2388).\n if (this.dispatch.readCodingAgentUsageLimitHold()) return { repairs };\n let prepared: PreparedBuildTask;\n // Where the repair's dispatch wait begins (#3206): the read of the plan and the assembly checks are its preparation.\n const repairOrigin: ApplicationBuildDispatchOrigin = { preparationStartedAt: new Date().toISOString() };\n try {\n prepared = await this.prepareNextBuildTaskOrQualifyExhaustion();\n } catch (error) {\n return { ...(error instanceof ApplicationBuildPlanExhaustedError && error.assembly ? { assembly: error.assembly } : {}), repairs };\n }\n // A ready task means the plan is not finished after all, so there is no verdict to give.\n if (!isAssemblyRepairTaskRef(prepared.plan.taskRef)) return { repairs };\n // Nor after a person stopped the build (#3206): the verdict is still given, the repair waits for `wildo build run`.\n if (this.buildStopHeldSince !== undefined) return { assembly: this.toAssemblyVerdict(await this.assessAssembly(), []), repairs };\n // Past the ceiling the repair is not run, and the wave still says whether the application assembles (#2283 review F2).\n if (repairs.length >= ceiling) return { assembly: this.toAssemblyVerdict(await this.assessAssembly(), []), repairs };\n const checkRef = prepared.kind === 'CODING' ? readGivenAssemblyFailure(prepared.contract)?.checkRef ?? prepared.plan.taskRef : prepared.plan.taskRef;\n try {\n const dispatched = await this.executePreparedBuildTask(prepared, session, repairOrigin);\n const outcome = dispatched.admission ? await this.awaitCodingRunOutcome(dispatched.admission.taskId, session) : null;\n repairs.push({ checkRef, taskRef: prepared.plan.taskRef, outcome });\n } catch (error) {\n // The repair could not run (a held worktree, a refused admission); the plan is still finished, so the wave still answers.\n this.logger.warn('An assembly repair could not be run at the end of the wave', { checkRef, error: describeCaughtError(error) });\n return { assembly: this.toAssemblyVerdict(await this.assessAssembly(), []), repairs };\n }\n }\n }\n\n /**\n * DETECT and REPAIR a product a sibling overwrote (#2210) — the half of the parallel wave's\n * detect-and-repair decision (Paul, 2026-09-24, recorded in `concurrent-coding-runs.models.ts`) that only\n * covered FAILED runs until then. A run that succeeded and then lost its write was reported\n * `completed_unlanded` (\"fix what it declares, or the work\") and waited for a person, although nothing in\n * the task was wrong. Measured on `app-creation-test-004` (2026-10-01, degree 5): two of five chapters were\n * lost from one chapters index, and both landed only when a person re-ran each task alone.\n *\n * A completed run counts as interfered when, all three:\n * - its task has not landed, and its declared product is missing from the WORKING tree (present there, something\n * other than the product holds it back, which re-running would not fix);\n * - another run of the wave overlapped it in time (`describeCodingRunOverlap`, computed now that every\n * window is closed);\n * - one of the files read by the task's UNMET probes (the missing product's files, never a satisfied\n * product's) was changed by that overlapping run too.\n * Suspected, never proven, like `interferenceSuspected` on a failed run: the wave sees that a sibling wrote\n * the product's file during the run, not which line it replaced.\n *\n * The repair re-arms the task with `INTERFERED_BY_CONCURRENT_RUN` and runs it again SINGLE-FLIGHT, at once:\n * the concurrent runs have all settled, so the re-run edits the file as it now stands and nothing can\n * overwrite it. It is not prevention — the wave still runs every task concurrently, as decided — it is the\n * repair, made where the evidence is. Bounded by {@link MAXIMUM_INTERFERENCE_REARMS} per task. Sequential,\n * because the re-runs are single-flight.\n */\n private async repairInterferedTasks(\n outcomes: readonly (ApplicationCodingTaskSettledOutcome | null)[],\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildInterferenceRepair[]> {\n const completed = outcomes.filter((outcome): outcome is ApplicationCodingTaskSettledOutcome & { taskRef: string } => outcome?.succeeded === true && outcome.taskRef !== null);\n if (completed.length === 0) return [];\n /*\n * Best-effort, like every repair here: the wave's runs are settled and reconciled already, and a detection\n * that cannot read the plan must not turn that result into a thrown wave. Logged, so a silent miss is not\n * the outcome; the task then reads `completed_unlanded`, as it did before #2210.\n */\n let graph: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n graph = await this.readBuildPlan();\n } catch (error) {\n this.logger.warn('Could not look for completed runs a sibling interfered with at the end of the wave', { error: describeCaughtError(error) });\n return [];\n }\n const repairs: ApplicationBuildInterferenceRepair[] = [];\n for (const run of completed) {\n try {\n /*\n * Landing and the working tree are read again for EACH run: a previous run's single-flight re-run has\n * rewritten the shared file since, and a reading taken before it would judge this run on stale text.\n */\n const landed = (await this.resolveLandedTaskRefs(graph.tasks)).landed;\n const repair = await this.repairIfInterfered(run, graph, landed, this.createWorktreeReader(), session);\n if (repair) repairs.push(repair);\n } catch (error) {\n this.logger.warn('Could not repair a completed run a sibling may have interfered with', { taskRef: run.taskRef, runTaskId: run.taskId, error: describeCaughtError(error) });\n }\n }\n return repairs;\n }\n\n /** One run of {@link repairInterferedTasks}: `undefined` when it was not interfered with. */\n private async repairIfInterfered(\n run: ApplicationCodingTaskSettledOutcome & { taskRef: string },\n graph: Awaited<ReturnType<typeof this.readBuildPlan>>,\n landed: ReadonlySet<string>,\n worktree: CommittedTreeReader,\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationBuildInterferenceRepair | undefined> {\n if (landed.has(run.taskRef)) return undefined;\n const task = graph.tasks.find((candidate) => candidate.taskRef === run.taskRef);\n if (!task) return undefined;\n const probes = resolveBuildTaskLandedProbes(task).filter((probe) => !isIntrospectedProbe(probe));\n if (probes.length === 0) return undefined;\n const presentInWorktree = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, worktree)));\n if (presentInWorktree.every(Boolean)) return undefined;\n const overlap = this.dispatch.describeCodingRunOverlap(run.taskId);\n if (!overlap) return undefined;\n // Only the MISSING product's files: a satisfied probe on a file a sibling also touched says nothing about why\n // another probe of the task is unmet, and counting it would blame a sibling for the task's own omission.\n const productPaths = new Set(probes.filter((_, index) => !presentInWorktree[index]).flatMap(landedProbePaths));\n const contendedProductPaths = overlap.contendedPaths.filter((path) => productPaths.has(path));\n if (contendedProductPaths.length === 0) return undefined;\n\n const previousRequeues = (await this.dispatch.listCompletedRunsForBuildTask(run.taskRef, session))\n .filter((candidate) => candidate.taskId !== run.taskId && candidate.interference?.requeued === true).length;\n const detected = { overlappingTaskRefs: overlap.overlappingTaskRefs, contendedProductPaths, detectedAt: new Date().toISOString() };\n if (previousRequeues >= MAXIMUM_INTERFERENCE_REARMS) {\n const interference: BuildTaskInterference = { ...detected, requeued: false };\n await this.dispatch.recordBuildTaskInterference(run.taskRef, run.taskId, interference, session);\n this.logger.warn('A completed run lost its product to a concurrent sibling again, and the interference re-runs are spent; the task waits for a person', {\n taskRef: run.taskRef, runTaskId: run.taskId, previousRequeues, ...interference,\n });\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference };\n }\n /*\n * Re-armed FIRST, recorded after, so `requeued` states what happened: a re-arm that throws leaves a record\n * saying the task was NOT requeued, which neither spends the bound nor tells `why` the wave re-ran it.\n */\n let requeued = true;\n let rearmError: string | undefined;\n try {\n await this.dispatch.rearmBuildTask(run.taskRef, {\n reason: BuildTaskRearmReason.INTERFERED_BY_CONCURRENT_RUN,\n note: `Concurrent run(s) ${detected.overlappingTaskRefs.join(', ')} changed ${contendedProductPaths.join(', ')} during this run, and the product this task declares is missing from it (suspected interference); the build wave re-runs it alone.`,\n }, session);\n } catch (error) {\n requeued = false;\n rearmError = describeCaughtError(error);\n }\n const interference: BuildTaskInterference = { ...detected, requeued };\n await this.dispatch.recordBuildTaskInterference(run.taskRef, run.taskId, interference, session);\n if (!requeued) {\n this.logger.warn('A completed run lost its product to a concurrent sibling, and its task could not be re-armed; it waits for a person', {\n taskRef: run.taskRef, runTaskId: run.taskId, error: rearmError, ...interference,\n });\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: rearmError } };\n }\n this.logger.warn('A completed run lost its product to a concurrent sibling; re-running its task alone', {\n taskRef: run.taskRef, runTaskId: run.taskId, ...interference,\n });\n /*\n * Not into the account's usage limit (#2388): the re-run would fail like every other turn before the reset.\n * The task is re-armed already, so the wave that resumes after the reset offers it.\n */\n const held = this.dispatch.readCodingAgentUsageLimitHold();\n if (held) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: `not re-run: the coding agent's usage limit holds the build until ${held.resumesAt}; the next wave runs it` } };\n }\n /*\n * Nor after a person stopped the build (#3206 review F4): a re-run is a new task start, and a stop starts nothing\n * more. The interference is recorded and the task re-armed, so the next `wildo build run` offers it.\n */\n if (this.buildStopHeldSince !== undefined) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: 'not re-run: a person stopped the build; the next `wildo build run` runs it' } };\n }\n /*\n * Nor while the dev supervisor holds a restart (#3204 review F5): the wave stopped filling so its runs could settle\n * before it, and a re-run here would hold the restart for a whole coding run more. The task is re-armed already, so\n * the next wave, in the restarted companion, offers it.\n */\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: 'not re-run: the dev supervisor is holding a restart; the next wave runs it' } };\n }\n let rerun: NonNullable<ApplicationBuildInterferenceRepair['rerun']>;\n try {\n const dispatched = await this.dispatchBuildTask(run.taskRef, session);\n const rerunTaskId = dispatched.admission?.taskId;\n rerun = { dispatch: dispatched, outcome: rerunTaskId ? await this.awaitCodingRunOutcome(rerunTaskId, session) : null };\n } catch (error) {\n rerun = { error: describeCaughtError(error) };\n }\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun };\n }\n\n /**\n * Wait for one admitted coding run to SETTLE, then report what it actually did.\n *\n * `dispatchNextBuildTask` resolves at ADMISSION for a coding target — the lock is held, the durable\n * row exists, and the agent has not written a line yet. That is the right contract for a caller\n * that wants to watch (the detached record says `ADMITTED` and hands over the task id), and the\n * wrong one for a caller that REPORTS AN OUTCOME: the first playbook run through this tier recorded\n * `ok: true` at a `finishedAt` equal to the coding run's `startedAt`, so a green run described work\n * that was still executing and no evaluation could ever see a result.\n *\n * Two steps because they fail differently. The settlement is in-process and is `null` for a row this\n * process did not admit — a restart, or a previous generation — in which case there is nothing to\n * wait for and the durable row already holds whatever is knowable. The read is durable and answers\n * `null` only when the row cannot be classified at all, which a caller must report as \"unknown\",\n * never as a failed run.\n */\n public async awaitCodingRunOutcome(\n taskId: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationCodingTaskSettledOutcome | null> {\n const settlement = this.dispatch.awaitApplicationCodingTaskSettlement(taskId);\n if (settlement) await settlement;\n return this.dispatch.readApplicationCodingTaskOutcome(taskId, session);\n }\n\n /**\n * The task the dispatcher would select has ALREADY been run to a working result and is still\n * not landed — so selecting it again is a loop, not progress.\n *\n * Refused rather than re-dispatched because each iteration spawns a coding agent and costs real\n * money: measured 2026-09-10 on Wonder CRM at roughly $7.50 a turn, three turns, same task\n * (#606). Every run SUCCEEDED; what fails is the plan's ability to say the work landed.\n *\n * The remedy is never \"run it again\" — it is to fix what the task declares it PRODUCES, or to\n * fix the work so the declared product exists. Naming both in the message keeps an operator out\n * of the coding host, which is the wrong place to look: the run is not the defect.\n */\n private buildUnlandableTaskError(stuck: readonly ApplicationBuildStuckTask[], queue: ApplicationBuildStuckQueue): Error {\n const entry = stuck[0]!;\n const stuckCount = stuck.length;\n const { taskRef, priorTaskId, completedAt } = entry;\n const when = completedAt === undefined ? '' : ` at ${completedAt}`;\n const others = stuckCount > 1 ? ` ${stuckCount - 1} other ready task(s) are stuck the same way.` : '';\n /*\n * Four ways to be stuck, four DIFFERENT remedies — so they must not share prose. A message that\n * sent an operator to fix a `produces` declaration while a live question sat unanswered, or while\n * the real fault was a document the catalog does not define, is a message that costs a session.\n */\n if (entry.reason === Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" is PARKED on an unanswered question (task ${priorTaskId}), so dispatching it `\n + 'again would abandon that run\\'s persisted session and lose the question with it. The question is: '\n + `${entry.question ?? '(not recorded on the durable row)'} — answer it through the coding-agent resume `\n + 'door, or retire the task from the plan if it cannot be built as declared. Do not re-dispatch.'\n + `${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.NO_DOCUMENT_BLUEPRINT) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" declares it produces the governed document \"${entry.documentRef}\", which the engine `\n + 'catalog does not define — so there is no blueprint saying what it must contain, and a run could only '\n + 'INVENT its structure, which the authoring skill forbids. No agent can complete it. Declare a document '\n + `the catalog defines (a candidate carries \\`document:<namespace>.<id>\\`), or retire the task.`\n + (entry.priorTaskId === ''\n ? ''\n : ` NOTE: a run for it is PARKED on a question (task ${entry.priorTaskId}); retiring the task abandons `\n + `that session. The question is: ${entry.question ?? '(not recorded)'}`)\n + others,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.refusedSpecifications !== undefined) {\n const refusals = entry.refusedSpecifications.map((refusal) => `${refusal.kind}${refusal.key ? ` ${refusal.key}` : ''}: ${refusal.message}`\n + (refusal.authoredFrame ? ` (at ${refusal.authoredFrame})` : '')).join('; ');\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" wrote a specification its factory refuses, and ${MAXIMUM_REFUSED_SPECIFICATION_RUNS} runs of it (the latest task `\n + `${priorTaskId}${when}) did not make it accepted, each told the refusal: ${refusals}. It is not offered again on its own; the tasks `\n + `that depend on it wait, the rest of the plan proceeds. Fix the definition (the message names the field and the remedy), `\n + `then put it back with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.FAILURE_OUTSIDE_APPLICATION) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" failed (latest: run ${priorTaskId}${when}) on a cause the FRAMEWORK owns, not this application: `\n + `${entry.repeatedFailure?.failure || '(not recorded on the run row)'} No change in the application can fix it, so it is not `\n + 'offered again on its own; the rest of the plan proceeds. Fix it in the framework (the engine package or platform '\n + `service the failure names), then run it by name, \\`wildo build run ${taskRef}\\`, or put it back with `\n + `\\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.REPEATED_IDENTICAL_FAILURE) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" failed the same way ${entry.repeatedFailure?.consecutive ?? GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER} times in a row `\n + `(latest: run ${priorTaskId}${when}) and nothing it reads has changed since, so it is not offered again on its own; the rest of the `\n + `plan proceeds. Its failure: ${entry.repeatedFailure?.failure || '(not recorded on the run row)'} `\n + (entry.repeatedFailure?.owner === GenerationStepFailureOwner.APPLICATION ? 'The step attributes the cause to this application. ' : '')\n + 'Fix that cause. When it lies outside the application (an engine package\\'s examples or labels, a platform service), fix it '\n + `there: no change in the application would release the step. Then run it by name, \\`wildo build run ${taskRef}\\`, or put it back `\n + `with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`; a change to anything it reads releases it too.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.generationStep === true) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" already ran${when} (run ${priorTaskId}) and has not landed, and nothing it reads has changed since, `\n + 'so running it again would end the same way and it is not offered again. '\n + 'Read why its landing is unmet (`wildo build tasks --json` shows the step\\'s record) and fix that cause. '\n + `To run it again anyway, name it: wildo build run ${taskRef}.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.LANDING_UNKNOWN) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `${entry.landingUnknownCause ?? `Build step \"${taskRef}\" was not run: whether it has already landed could not be checked.`} `\n + 'Running it now would either fail the same way or redo work that may already have landed, so it is not dispatched; '\n + `it is offered again as soon as the check answers.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" is a follow-up the build derived from a reported gap, and under the ${this.autonomyPosture} posture a follow-up `\n + `waits for your review before it runs. Let it run with \\`wildo build approve ${taskRef}\\`, or decline it with `\n + `\\`wildo build close ${taskRef} --declined --reason \"<why>\"\\` (\\`wildo creation why ${taskRef}\\` shows what was reported).${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.CONTENDED) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" waits for a live run of another task that writes one of its product files: running both at once `\n + `in one worktree would make one overwrite the other. Nothing to do: it is offered once that run settles.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" failed its checks while other runs of this wave were writing beside it, so the failure may be theirs. `\n + `Running it again now would meet the same tree; the wave's end runs its checks alone, and a pass lands it. Nothing to do.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.IN_FLIGHT) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" is being built right now (a live coding run, or the companion running its generation step), so it is not offered again until `\n + `that run settles. Nothing to do: the next dispatch after it settles picks up wherever the build then stands.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" has failed ${MAXIMUM_ATTRIBUTABLE_FAILED_ATTEMPTS} times (latest: task ${priorTaskId}${when}), `\n + 'each a failure of its own making, so it is not offered again as the same dispatch. Read the latest run\\'s '\n + 'failure (its verification output and closing report are on that task row), fix the cause, then put it back '\n + `with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" already completed${when} (task ${priorTaskId}) and is STILL not landed, so `\n + 'dispatching it again would re-run work that succeeded. Its landed probes are derived from what '\n + 'the task declares it `produces`, and they are unmet in the working tree: either '\n + 'that declaration is empty or wrong, or the run did not produce it. Fix the declaration or the work — do not re-dispatch. '\n + `Once the cause is fixed, put the task back with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n\n /**\n * Why a ready GENERATION STEP that already ran is held, or `null` when it may run (#3233 R5).\n *\n * A step whose latest run COMPLETED and that still has not landed would fail the same way if run again on the same\n * inputs: on `app-creation-test-007` the labels step's accept refused one of its own files, the step stayed unlanded, and\n * every wave re-ran it — a ~16-minute model-call run, without end. So it is held while nothing it could read has moved:\n * no commit since that run touched a path outside the step's own write scope, and no such path is dirty in the working\n * tree. Any such change (another task landing, a person editing) may have changed its inputs, and it is offered again.\n *\n * Held as `completed_unlanded`: since #3204 its landing reads the working tree, so what it wrote counts whether or not a\n * checkpoint has committed it yet, and a commit would not change the answer. A NAMED dispatch (`wildo build run <taskRef>`) is never held by this: the operator running\n * it again is the door, and this hold only keeps the unattended loop from repeating it.\n *\n * **A step whose latest runs FAILED the same way is held too (#3709)**, by the choreography lane's rule (596611bf2): the\n * last {@link GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER} runs failed with one failure\n * ({@link generationStepFailureFingerprint}) and nothing outside its write scope moved since the latest. Until then only a\n * COMPLETED run held it, so a step failing every time was offered every wave: on reference run 42886943490\n * `build-task-documentation-publication` failed 21 times in a row on engine-owned OpenAPI examples no run could fix, and\n * `build-task-gen-i18n-labels` ran 32 times, for an hour as the only ready task. Held as `repeated_identical_failure`, with\n * the latest failure and how many times it repeated, so the board, `wildo build tasks` and the dispatch refusal name it.\n * The same doors release it: an input moving, a named dispatch, a re-arm recorded on its runs.\n *\n * Anything this cannot read (the run history, git) answers `null`: the step is offered as before rather than held on an\n * unknown.\n */\n private async classifyRanGenerationStep(\n candidate: BuildPlanTask,\n /** Each step's runs, NEWEST FIRST: the latest decides, and the ones before it say whether a failure repeats. */\n attemptHistory: ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]> | undefined,\n ): Promise<ApplicationBuildStuckTask | null> {\n const attempts = attemptHistory?.get(candidate.taskRef) ?? [];\n const latest = attempts[0];\n if (latest === undefined || latest.rearm !== undefined) return null;\n /*\n * A failure the step attributed to the FRAMEWORK holds it at once, whatever moves in the application (#3709): nothing\n * in this tree can fix it, so another run would only spend. A named run or a re-arm releases it once the framework is.\n */\n if (latest.status === FlowsActors_Status.FAILED && latest.failureOwner === GenerationStepFailureOwner.FRAMEWORK) {\n return {\n taskRef: candidate.taskRef,\n priorTaskId: latest.runTaskId,\n completedAt: latest.settledAt ?? latest.startedAt,\n generationStep: true,\n reason: Workbench_BuildTaskStuckReason.FAILURE_OUTSIDE_APPLICATION,\n repeatedFailure: { failure: latest.error ?? '', consecutive: Math.max(1, countConsecutiveIdenticalGenerationStepFailures(attempts)), owner: GenerationStepFailureOwner.FRAMEWORK },\n };\n }\n const identicalFailures = countConsecutiveIdenticalGenerationStepFailures(attempts);\n const completed = latest.status === FlowsActors_Status.COMPLETED;\n if (!completed && identicalFailures < GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER) return null;\n const since = latest.settledAt ?? latest.startedAt;\n if (!(await this.generationStepInputsUnmovedSince(candidate, since))) return null;\n if (completed) {\n return {\n taskRef: candidate.taskRef,\n priorTaskId: latest.runTaskId,\n completedAt: since,\n generationStep: true,\n reason: Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n };\n }\n return {\n taskRef: candidate.taskRef,\n priorTaskId: latest.runTaskId,\n completedAt: since,\n generationStep: true,\n reason: Workbench_BuildTaskStuckReason.REPEATED_IDENTICAL_FAILURE,\n repeatedFailure: { failure: latest.error ?? '', consecutive: identicalFailures, ...(latest.failureOwner !== undefined ? { owner: latest.failureOwner } : {}) },\n };\n }\n\n /**\n * Whether nothing a generation step reads has moved since `since` (#3233, #3709): no commit since then, and no dirty path\n * in the working tree, touched what the step READS (`resolveGenerationStepReadRoots`) outside what it writes itself. A\n * step that names no read roots (an unknown step ref) reads every path outside its write scope, the rule before #3709.\n * Until #3709 every step read that way, so any sibling's checkpoint released a held step: on reference run 42886943490\n * a documentation publication failing on the engine's examples could run again after each frontend view landed.\n * `false` when git cannot be read, so a step is never held on an unknown.\n */\n private async generationStepInputsUnmovedSince(candidate: BuildPlanTask, since: string): Promise<boolean> {\n if (typeof this.git.listPathsCommittedSince !== 'function' || typeof this.git.readLandingSourceState !== 'function') return false;\n const [committed, tree] = await Promise.all([this.git.listPathsCommittedSince(since), this.git.readLandingSourceState()]);\n if (committed === undefined || tree === undefined) return false;\n const ownRoots = await this.generationSteps.resolveGenerationStepWritableRoots(candidate);\n const readRoots = typeof this.generationSteps.resolveGenerationStepReadRoots === 'function'\n ? await this.generationSteps.resolveGenerationStepReadRoots(candidate)\n : undefined;\n const under = (roots: readonly string[], path: string): boolean => roots.some((root) => (root.endsWith('/') ? path.startsWith(root) : path === root));\n const isInput = (path: string): boolean => !under(ownRoots, path) && (readRoots === undefined || under(readRoots, path));\n return ![...committed, ...tree.changedPaths].some(isInput);\n }\n\n /**\n * The build tasks whose LATEST coding run failed its own verification and was not cleared since (#3220): no re-arm, and\n * no isolated re-check that passed. Read once per landing derivation; `undefined` when the run history could not be read.\n *\n * Such a task is NOT landed even when its probes find its product at HEAD. Its files can reach HEAD without it — a\n * passing sibling's commit of a file both may carry, a person — and landing on them would count a verification failure\n * as product (`app-creation-test-007`: `build-task-assessment-schema` read landed after `check:resources-registry-init`\n * failed). It reads not landed, so it is offered again as a retry, until a run of it passes or a person re-arms it.\n */\n private async readVerificationFailedTaskRefs(): Promise<ReadonlySet<string> | undefined> {\n const latest = await this.readLatestCodingAttempts();\n if (latest === undefined) return undefined;\n return new Set([...latest].filter(([, attempt]) => attempt.status === FlowsActors_Status.FAILED\n && attempt.disposition === ApplicationCodingTaskDisposition.VERIFICATION_FAILED\n && attempt.rearm === undefined\n && attempt.isolatedRecheckPassed !== true).map(([taskRef]) => taskRef));\n }\n\n /** Each build task's LATEST coding run, or `undefined` when the run history could not be read. */\n private async readLatestCodingAttempts(): Promise<ReadonlyMap<string, ApplicationBuildTaskAttempt> | undefined> {\n try {\n if (typeof this.executions?.listActorExecutions !== 'function') return undefined;\n // Not parsed through the route's query schema, whose 200 is an HTTP request's bound: in-process the listing pages.\n const listed = await this.executions.listActorExecutions({ systemRef: APPLICATION_CODING_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const latest = new Map<string, ApplicationBuildTaskAttempt>();\n for (const projected of listed.map(projectBuildTaskAttempt)) {\n if (projected === null) continue;\n const held = latest.get(projected.taskRef);\n if (held === undefined || projected.attempt.startedAt > held.startedAt) latest.set(projected.taskRef, projected.attempt);\n }\n return latest;\n } catch (error) {\n this.logDebug('Could not read the coding runs\\' history; every landing waits for its product to be committed', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * What a build task's own runs say about LANDING on the working tree (#3204, review of 4a1b1f1bf F2), from one reading of\n * the run history. A product in the working tree counts only once something has checked it:\n *\n * - `heldBack`: the task's latest run is LIVE (it is still writing; its checks have not run), or ended WITHOUT a working\n * result (failed its verification, crashed, timed out, was cancelled or interrupted), unless it was re-armed or an\n * isolated re-check passed (#3220). Its product, whatever is on disk, is not landed; the task is offered again within\n * its retry budget.\n * - `ranTaskRefs`: the tasks with a run of their own. A task with NONE may still find its product present (another\n * task's run wrote it, or a sibling is half-way through writing it), and nothing of its own ever checked it; it lands\n * only on the COMMITTED reading too, which a checkpoint gives only once the writer settled.\n *\n * `undefined` when the history could not be read: every task is then treated as never run (committed reading required)\n * and the pass is provisional, the direction that never lands a product nobody checked.\n */\n private async readLandingRunStanding(): Promise<{\n readonly heldBack: ReadonlySet<string>;\n readonly ranTaskRefs: ReadonlySet<string>;\n readonly awaitingIsolatedRecheck: ReadonlyMap<string, string>;\n } | undefined> {\n const latest = await this.readLatestCodingAttempts();\n if (latest === undefined) return undefined;\n const heldBack = new Set<string>();\n const awaitingIsolatedRecheck = new Map<string, string>();\n for (const [taskRef, attempt] of latest) {\n if (attempt.status === FlowsActors_Status.FAILED && attempt.rearm === undefined && attempt.isolatedRecheckPassed === undefined\n && failedVerificationBesideSiblings(attempt)) {\n awaitingIsolatedRecheck.set(taskRef, attempt.startedAt);\n }\n if (attempt.status === FlowsActors_Status.COMPLETED) continue;\n if (attempt.status === FlowsActors_Status.FAILED || attempt.status === FlowsActors_Status.CANCELLED || attempt.status === FlowsActors_Status.ABORTED) {\n if (attempt.rearm !== undefined || attempt.isolatedRecheckPassed === true) continue;\n }\n heldBack.add(taskRef);\n }\n return { heldBack, ranTaskRefs: new Set(latest.keys()), awaitingIsolatedRecheck };\n }\n\n /**\n * Whether a run would repair the failing module rather than find nothing to do (#3258): the wave's assembly pass repairs the\n * first failing check, and with no repair tried this round {@link selectAssemblyRepair} withholds nothing. Only that first\n * repair is promised: whether a later one is owed depends on the failure's text, which is read from checks nobody runs here,\n * and a live wave goes on repairing regardless. Unknown is not owed: the plan is then held, and the feed names the module.\n */\n private async readSpecificationRepairOwed(findings: SpecificationsEvaluationFindings | undefined): Promise<boolean> {\n if (findings === undefined || findings.moduleFaults.length === 0 || !specificationModuleFaultsAreAVerdict(findings.moduleFaults)) return false;\n if (this.modulesWithNoRepairToRun === specificationFaultModules(findings).join('\\n')) return false;\n if (!resolveApplicationAssemblyCheckRefs(this.companionContext.saasRoot).includes(SPECIFICATION_EXPORTS_CHECK_REF)) return false;\n try {\n return assemblyRepairAttemptsThisRound(await this.listBuildDispatchRuns()).length === 0;\n } catch {\n return false;\n }\n }\n\n /** What the evaluation found, read once for a pass; `undefined` when that could not be asked. */\n private async readSpecificationFindingsForLanding(): Promise<SpecificationsEvaluationFindings | undefined> {\n try {\n return await readSpecificationsEvaluationFindings(this.companionContext);\n } catch {\n return undefined;\n }\n }\n\n /**\n * The specifications their factories REFUSED, and the modules that are wrong on their own account (#3258), by the build\n * task that wrote each (#3210, #3211): a refusal belongs to a task when the refusal's authored file is one of the task's\n * probe paths. Read from the same evaluation the companion\n * serves (`readSpecificationsEvaluationFindings`), so a refusal it names is exactly a specification it does not serve.\n * A package that cannot be evaluated at all refuses nothing here: that is a load error every board already reports, and\n * no single task owns it. A refusal no task's paths name holds no task.\n */\n private refusedSpecificationsByTask(tasks: readonly BuildPlanTask[], findings: SpecificationsEvaluationFindings | undefined): ReadonlyMap<string, readonly SpecificationRefusal[]> {\n const byTask = new Map<string, SpecificationRefusal[]>();\n if (findings === undefined) return byTask;\n /*\n * A module that threw on its own account is the task's like a refusal is (#3258), and told to it the same way. One\n * that may be a stale build, or that only follows from another, is not: it holds no task, or a stale build would\n * re-dispatch work nothing is wrong with.\n */\n const located = [\n ...findings.faults.flatMap((fault) => {\n const framePath = refusedSpecificationFramePath(fault.authoredFrame, this.companionContext.saasRoot);\n return framePath === undefined ? [] : [{ framePath, refusal: { kind: String(fault.kind), key: fault.key, message: fault.message, authoredFrame: fault.authoredFrame } }];\n }),\n ...findings.moduleFaults\n .filter((fault) => fault.reading === SpecificationModuleFaultReading.AUTHORING_ERROR && fault.causedBy.length === 0)\n .map((fault) => ({ framePath: fault.modulePath, refusal: { kind: fault.errorName, key: fault.modulePath, message: fault.message, authoredFrame: fault.authoredFrame, thrownByTheModule: true as const } })),\n ];\n if (located.length === 0) return byTask;\n for (const task of tasks) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) continue;\n const paths = resolveBuildTaskLandedProbes(task).flatMap(landedProbePaths);\n for (const { framePath, refusal } of located) {\n if (!refusalBelongsToTask(framePath, paths)) continue;\n const list = byTask.get(task.taskRef) ?? [];\n list.push(refusal);\n byTask.set(task.taskRef, list);\n }\n }\n return byTask;\n }\n\n /**\n * Every generation step's runs, by task ref, NEWEST FIRST, read once for a whole selection (#3233, #3709): the latest\n * decides whether a step that ran is held, and the ones before it whether its failure repeats. `undefined` when the run\n * history could not be read, so no step is held on an unknown.\n */\n private async readGenerationStepAttemptHistory(): Promise<ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]> | undefined> {\n try {\n // Not parsed through the route's query schema, whose 200 is an HTTP request's bound: in-process the listing pages.\n const listed = await this.executions.listActorExecutions({ systemRef: APPLICATION_BUILD_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const history = new Map<string, ApplicationBuildTaskAttempt[]>();\n for (const projected of listed.map(projectBuildTaskAttempt)) {\n if (projected === null) continue;\n const attempts = history.get(projected.taskRef) ?? [];\n attempts.push(projected.attempt);\n history.set(projected.taskRef, attempts);\n }\n for (const attempts of history.values()) attempts.sort((left, right) => right.startedAt.localeCompare(left.startedAt));\n return history;\n } catch (error) {\n this.logDebug('Could not read the generation steps\\' run history; none is held for having run', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * Select the task to run: the NEXT ready one, or — with `selection` — the NAMED one, which must be\n * among the ready ones. The stuck-task rules below apply to either; naming a task never lets it\n * skip them.\n */\n /**\n * WHY a ready build task cannot make progress — or `null` when it can be dispatched.\n *\n * ONE classification, called by both the selector (`prepareNextBuildTask`, which skips a stuck task)\n * and the per-task record (`describeBuildTaskRecords`, which reports it). Until #1521 it lived inline\n * in the selection loop, so the only surface that ever saw a task's reason was the loop guard's\n * refusal, thrown away on every ordinary round. Two copies would be two answers to one question.\n *\n * Generation steps are not asked: their landing is a typed condition of their own, and one of them\n * is legitimately re-runnable.\n */\n private async classifyStuckBuildTask(\n candidate: BuildPlanTask,\n /** The landing pass that found the candidate not landed: its readers explain why (#3219). */\n resolution: Pick<LandedTaskResolution, 'witnesses' | 'landingTree'> & Partial<Pick<LandedTaskResolution, 'refusedSpecificationFaults' | 'followUpApprovals' | 'buildTaskDecisions' | 'heldBackTaskRefs' | 'awaitingIsolatedRecheck'>>,\n /** The build tasks with a live coding run, when the caller already read them once for a whole selection. */\n inFlightTaskRefs?: ReadonlySet<string>,\n ): Promise<ApplicationBuildStuckTask | null> {\n /*\n * FIRST, because it is the one reason that is progress rather than a fault: a run of this task is\n * live (#1528). Under a parallel wave the next selection must pass over it, or two agents build the\n * same task. The engine's per-task subject refuses the second one anyway; this keeps the wave from\n * spending a slot on the refusal.\n */\n const inFlight = inFlightTaskRefs !== undefined\n ? (inFlightTaskRefs.has(candidate.taskRef) ? { executionId: '' } : null)\n : (this.dispatch.listActiveRunTaskRefs?.() ?? []).includes(candidate.taskRef)\n ? { executionId: '' }\n : await this.dispatch.findInFlightRunForBuildTask(candidate.taskRef);\n if (inFlight !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT };\n }\n /*\n * Its latest run failed its checks beside siblings, in THIS wave (#3204): run again now, it would meet the same tree its\n * siblings are still writing. The wave's end re-checks it alone (a pass lands it); the next wave offers it if that failed.\n * Only within the wave that ran it: a run left unchecked by an earlier wave (a restart) is offered, alone or not, rather\n * than held for a re-check nothing would run.\n */\n const awaitingSince = resolution.awaitingIsolatedRecheck?.get(candidate.taskRef);\n if (awaitingSince !== undefined && this.liveWaveStartedAt !== undefined && awaitingSince >= this.liveWaveStartedAt) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK };\n }\n /*\n * A task the person's decisions name, while whether they decided cannot be known (R2): held, never dispatched as if\n * never closed or approved. Its dependents wait on it as on any task not landed.\n */\n const heldCause = describeHeldByUnknownDecisions(candidate.taskRef, resolution.buildTaskDecisions);\n if (heldCause !== undefined) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN, landingUnknownCause: heldCause };\n }\n /*\n * Asked BEFORE any durable-run lookup, because it is the one reason that does not need a run to\n * have happened: a task producing a document the catalog cannot describe is unbuildable from the\n * moment it is authored, and dispatching it spends a full agent turn to rediscover that. Wonder\n * CRM's plan carries two.\n */\n const undraftableDocumentRef = resolveUndraftableDocumentRef(candidate);\n if (undraftableDocumentRef !== undefined) {\n /*\n * A task can be BOTH unbuildable and parked — Wonder CRM's GDPR task is exactly that. The\n * document fault is the one that decides (no run can ever complete it), but retiring a task\n * with a live persisted session is a deliberate act, so the park is named rather than dropped.\n */\n const alsoParked = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n return {\n taskRef: candidate.taskRef,\n priorTaskId: alsoParked?.taskId ?? '',\n reason: Workbench_BuildTaskStuckReason.NO_DOCUMENT_BLUEPRINT,\n documentRef: undraftableDocumentRef,\n question: alsoParked?.question,\n };\n }\n const priorRun = await this.dispatch.findCompletedRunForBuildTask(candidate.taskRef);\n /*\n * A derived follow-up under a posture that reviews results (GUIDED, #3227): it is work the accepted plan never listed,\n * so it waits for the creator to approve it (`wildo build approve`) or decline it (`wildo build close --declined`).\n * Under the automatic posture it runs as derived. Approvals missing from the resolution read as none: under a\n * reviewing posture an unknown approval keeps the follow-up waiting, which is the direction a person can correct.\n */\n if (followUpAwaitsReview({\n posture: this.autonomyPosture,\n taskRef: candidate.taskRef,\n approvals: resolution.followUpApprovals ?? new Map(),\n hasCompletedRun: priorRun !== null,\n })) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW };\n }\n /*\n * A task whose specification its factory refuses (#3210, #3211) is offered again with the validator's error in its\n * brief, rather than held by the loop guard as finished: the run completed, but what it wrote is not served. Bounded:\n * once it has completed MAXIMUM_REFUSED_SPECIFICATION_RUNS runs the loop guard holds it again, with the refusal named,\n * so an agent that keeps writing the same refused definition cannot loop; a re-arm releases it.\n */\n const refusals = resolution.refusedSpecificationFaults?.get(candidate.taskRef);\n if (priorRun !== null && refusals !== undefined) {\n const retry = await this.retryOfACompletedTask(candidate, MAXIMUM_REFUSED_SPECIFICATION_RUNS);\n if (retry === CompletedTaskRetry.OFFER) return null;\n if (retry !== CompletedTaskRetry.HOLD) return retry;\n return {\n taskRef: candidate.taskRef,\n priorTaskId: priorRun.taskId,\n completedAt: priorRun.completedAt,\n reason: Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n refusedSpecifications: refusals,\n };\n }\n if (priorRun !== null) {\n /*\n * Asked of the landing pass's own reader (#3219), so the answer is the pass's: a product it read present and did not\n * land was held back by its latest run's failed verification, never by the tree (#3204).\n */\n const present = await this.productPresentInLandingTree(candidate, resolution) === true;\n /*\n * A run of a SUPERSEDED plan does not hold a task of the current one (#3460). The guard stops a task being re-run\n * against the declaration it already failed to meet (#606); a re-decompose committed after the run is a new\n * declaration, which may ask for a product the run was never given (measured: four config tasks completed at\n * 13:47-14:09 and were held for hours on a retention binding the 17:30 plan added). The run is not re-armed or\n * rewritten: it simply predates the plan, and the next run postdates it, so the guard holds again if that one also\n * leaves the product unmet. At most one extra run per re-decompose. Judged on the NEWEST counting run's START, so a\n * run that started under the old plan and completed after the commit does not hold either (third review F2).\n *\n * Recorded limits (third review F3, F7), decided rather than missed: the rule asks whether the plan FILE was\n * committed since, not whether THIS task's entry changed, so any plan commit (an unrelated added task, a rebase that\n * resets committer dates) releases each such task once; an uncommitted re-decompose under a reviewing posture\n * releases nothing until it is committed; and the refused-specification branch above keeps counting its runs, because\n * that guard bounds a definition the agent keeps writing wrong, whatever the plan says. Comparing the task's own\n * entry at the run's baseline would answer F3 exactly and needs the plan read at an old commit; it is not done here.\n */\n if (!present && await this.ranBeforeTheCurrentBuildPlan(priorRun.newestStartedAt ?? priorRun.completedAt)) {\n // A later run parked on a question keeps its session (#3204 review): the run this rule grants may be that one.\n const parkedRun = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n if (parkedRun !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: parkedRun.taskId, reason: Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER, question: parkedRun.question };\n }\n this.logDebug('A completed run predates the current build plan; its task is offered again', { taskRef: candidate.taskRef, priorTaskId: priorRun.taskId });\n return null;\n }\n /*\n * Its product is ABSENT from the working tree, or its latest run failed its own verification (#3204): offered again,\n * told what is unmet, within the bound of {@link retryOfACompletedTask}; then the guard holds it. A port without the\n * run listing holds it at once, as before.\n */\n const retry = await this.retryOfACompletedTask(candidate, MAXIMUM_UNMET_PRODUCT_RUNS, resolution);\n if (retry === CompletedTaskRetry.OFFER) {\n this.logDebug(present ? 'A completed task\\'s latest run failed its verification; it is offered again' : 'A completed run left its declared product absent; its task is offered again, told what is unmet', { taskRef: candidate.taskRef });\n return null;\n }\n if (retry !== CompletedTaskRetry.HOLD) return retry;\n return {\n taskRef: candidate.taskRef,\n priorTaskId: priorRun.taskId,\n completedAt: priorRun.completedAt,\n reason: Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n };\n }\n /*\n * A run that SUSPENDED is not a completed run, so the lookup above cannot see it — and without\n * this second question the task is offered again on every dispatch, forever. Measured\n * 2026-09-16 on Wonder CRM: `build-task-gdpr-data-handling-governance` parked on a question,\n * and the next dry run selected the same task. The anti-loop guard was answering honestly\n * about the wrong population.\n *\n * Skipped, never blocking: the parked run keeps its persisted session, its dependents keep\n * waiting, and the rest of the plan proceeds.\n */\n const parkedRun = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n if (parkedRun !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: parkedRun.taskId, reason: Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER, question: parkedRun.question };\n }\n /*\n * The ATTEMPT BUDGET (#1536). A failed run is re-offered by design — it is exactly what an\n * operator should be able to retry — and until this nothing counted: on the first end-to-end run\n * two tasks ran three times each for $69, re-dispatched identically. Only the task's own failures\n * count (a check already red before a run no longer fails it), so this retires a task for what IT\n * did; the re-arm door releases it once the cause is fixed.\n */\n const failedRuns = await this.dispatch.listAttributableFailedRunsForBuildTask(candidate.taskRef);\n if (failedRuns.length >= MAXIMUM_ATTRIBUTABLE_FAILED_ATTEMPTS) {\n return {\n taskRef: candidate.taskRef,\n priorTaskId: failedRuns[0]!.taskId,\n ...(failedRuns[0]!.settledAt ? { completedAt: failedRuns[0]!.settledAt } : {}),\n reason: Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED,\n };\n }\n return null;\n }\n\n private async prepareNextBuildTask(\n selection?: ApplicationBuildTaskSelection,\n preparation?: ApplicationBuildPreparationTracker,\n /**\n * A wave's fill: its landing reading, shared by every slot of one fill; and the generation steps the wave is running\n * (#3204), which the coding plane's in-flight listings do not know, so the next slot passes over them.\n */\n options: { readonly fillLanding?: BuildWaveFillLanding; readonly generationStepsInFlight?: ReadonlySet<string> } = {},\n ): Promise<PreparedBuildTask> {\n let graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>;\n let resolution: LandedTaskResolution;\n // Read FIRST, before any landing: it decides whether a held reading may be reused, and every candidate is checked\n // against it below (#1528, #3204).\n /*\n * The runs this process still holds as active count too (#3204): a run's row reads COMPLETED while its commit is\n * still being made, and the shared read of the completed runs may not yet show it, so a task that is neither would\n * be taken as ready and built twice.\n */\n const inFlightTaskRefs = new Set([\n ...(await this.dispatch.listInFlightCodingRuns()).flatMap((run) => (run.taskRef ? [run.taskRef] : [])),\n ...(this.dispatch.listActiveRunTaskRefs?.() ?? []),\n ...(options.generationStepsInFlight ?? []),\n ]);\n const held = options.fillLanding?.current;\n const reused = held !== undefined\n && held.settlementGeneration === this.landingSettlementGeneration\n && [...held.inFlightTaskRefs].every((taskRef) => inFlightTaskRefs.has(taskRef))\n ? held\n : undefined;\n if (reused !== undefined) {\n ({ graph, resolution } = reused);\n } else {\n // Taken BEFORE the derivation: a run landing while it runs leaves the reading marked older than that run.\n const settlementGeneration = this.landingSettlementGeneration;\n preparation?.enter(ApplicationBuildPreparationPhase.READING_THE_PLAN);\n graph = await this.readBuildPlan();\n preparation?.enter(ApplicationBuildPreparationPhase.RESOLVING_LANDING);\n resolution = await this.resolveLandedTaskRefs(graph.tasks);\n if (options.fillLanding !== undefined) options.fillLanding.current = { graph, resolution, settlementGeneration, inFlightTaskRefs };\n }\n const landedTaskRefs = resolution.landed;\n preparation?.enter(ApplicationBuildPreparationPhase.SELECTING_THE_TASK);\n\n const ready = selectReadyBuildPlanTasks(graph, landedTaskRefs);\n /*\n * A task the probe calls LANDED, run anyway because the operator says the landing is wrong (#2217). Only a\n * landed task whose prerequisites have all landed: the override answers \"this landing is false\", never \"skip\n * the graph\". Readiness is otherwise unchanged, and the override is exercised only when it is needed — a\n * `despiteLanded` on a task that is simply ready runs it as an ordinary dispatch and records nothing.\n */\n let forced: BuildPlanTask | undefined;\n if (selection !== undefined && !ready.some((candidate) => candidate.taskRef === selection.taskRef)) {\n const named = graph.tasks.find((candidate) => candidate.taskRef === selection.taskRef);\n const standing = named === undefined ? ApplicationBuildTaskStanding.UNKNOWN\n : landedTaskRefs.has(named.taskRef) ? ApplicationBuildTaskStanding.LANDED\n : ApplicationBuildTaskStanding.BLOCKED;\n const unmet = named === undefined ? [] : named.prerequisiteTaskRefs.filter((prerequisite) => !landedTaskRefs.has(prerequisite));\n if (standing === ApplicationBuildTaskStanding.LANDED && selection.despiteLanded !== undefined && unmet.length === 0) {\n forced = named;\n } else {\n throw new ApplicationBuildTaskNotReadyError(\n standing === ApplicationBuildTaskStanding.UNKNOWN ? `The build plan holds no task \"${selection.taskRef}\".`\n : standing === ApplicationBuildTaskStanding.LANDED\n ? `Task ${selection.taskRef} has already landed: its landing probe finds its product committed. If that landing is wrong, `\n + `run it anyway, saying why: wildo build run ${selection.taskRef} --despite-landed --reason <${OPERATOR_BUILD_TASK_REARM_REASONS.join('|')}> --note \"<why>\".`\n : `Task ${selection.taskRef} is not ready: it waits on ${unmet.join(', ')}.`,\n selection.taskRef,\n standing,\n unmet,\n );\n }\n }\n if (ready.length === 0 && forced === undefined) {\n const specificationFault = readBuildPlanSpecificationFault(graph.tasks, resolution);\n const provenCount = landedTaskRefs.size - (specificationFault?.ranNotProvenTaskRefs.length ?? 0);\n throw new ApplicationBuildPlanExhaustedError(\n specificationFault === undefined\n ? `Every task in the build plan has landed, or none is ready: ${graph.tasks.length} task(s), ${landedTaskRefs.size} landed.`\n : `Nothing in the build plan can run, and it is not finished: specifications module ${specificationFault.failingModules.map((modulePath) => `\"${modulePath}\"`).join(', ')} `\n + `could not be evaluated, so ${provenCount} of ${graph.tasks.length} task(s) are proven.`,\n graph.tasks.length,\n provenCount,\n [...landedTaskRefs].sort(),\n undefined,\n specificationFault,\n );\n }\n /*\n * The FIRST ready task, in graph order — routed by its own `target.kind`, never reordered.\n *\n * Deliberately not a choice among the ready set: the graph already encodes the ordering its author\n * intended, and something picking among ready tasks would be a second scheduler disagreeing with the\n * first. (An earlier version skipped generation steps to find a coding task and refused when none\n * remained — correct while no executor existed, a hole in the lane once one did: the first authored\n * generation step parked the Wonder Todos build behind a named 409 forever.)\n */\n /*\n * THE FIRST ready task in graph order — SKIPPING any that has already run and still cannot prove\n * it landed. Skipping is not reordering: the graph's order is preserved, a known-stuck task is\n * removed from it.\n *\n * Such a task declared a product and the run did not produce it, so the declaration or the work\n * is wrong. Re-offering it is the money-burning loop; REFUSING THE WHOLE QUEUE for it — which is\n * what this did until 2026-09-12 — is the gate `application-creation-directive.md` forbids, one\n * task later. One over-derived field would freeze an entire 42-task build.\n *\n * It is SKIPPED rather than MARKED, and the asymmetry against the no-product case above is the\n * whole design. A task declaring nothing can never be proven by any run, so marking it is the\n * only way the lane moves — measured at 1 of 42 reachable otherwise. A task whose product is\n * merely ABSENT is provable: fix the declaration or the work and it lands. So it stays NOT\n * landed, its dependents correctly wait, and every unrelated branch proceeds.\n */\n const stuck: ApplicationBuildStuckTask[] = [];\n let selected: BuildPlanTask | undefined;\n const candidates = forced !== undefined ? [forced]\n : selection === undefined ? ready : ready.filter((candidate) => candidate.taskRef === selection.taskRef);\n /*\n * The product files the live runs write (#3204), for an UNNAMED selection only: a person naming a task chooses it\n * whatever is in flight. Two runs writing one file in the shared worktree interfere, and the wave repairs that after\n * the fact (a re-check alone, or a re-run); passing over a task that would meet a live run for the next ready one that\n * would not prevents it, and keeps the slot busy.\n */\n const inFlightProductWrites = selection === undefined && inFlightTaskRefs.size > 0\n ? graph.tasks.filter((task) => inFlightTaskRefs.has(task.taskRef)).flatMap(buildTaskProductWritePaths)\n : [];\n // Read once, and only for an UNNAMED selection: a named dispatch is the operator's door past the hold (#3233).\n const generationStepAttemptHistory = selection === undefined && candidates.some((candidate) => candidate.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP)\n ? await this.readGenerationStepAttemptHistory()\n : undefined;\n for (const candidate of candidates) {\n /*\n * Generation steps are exempt: their landing is the generation-step service's own typed\n * condition rather than a product declaration, and one of them (`i18n-labels`) is legitimately\n * re-runnable when the locale set changes.\n */\n if (candidate.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A step that is RUNNING is passed over first (#2531 review M2, and its re-review F1). A generation step holds no\n * worktree lease and is not a coding run, so the in-flight read above never sees it: a second dispatch of it\n * opened a second execution, which lost the workspace lock and settled FAILED as the task's newest attempt while\n * the first was still working. Its progress is held in this companion while it runs, and a restart ends it with\n * the process, so that is the whole answer. Passed over like a live coding run, so naming it refuses with\n * IN_FLIGHT. It is checked BEFORE an unanswerable landing check: a check can read as unanswerable mid-run (a\n * stylesheet half written, a schema check timing out during a migration), and a running step kept as the\n * fallback below would be started again whenever nothing else was ready.\n */\n if (this.generationSteps.readGenerationStepProgress(candidate.taskRef) !== undefined) {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT });\n continue;\n }\n /*\n * A step whose panel refused stale expert charters (#3204) is passed over until they are derived again, so the rest\n * of the plan keeps running; a person naming it (`wildo build run <task>`) runs it anyway, and its refusal names\n * the remedy again.\n */\n const staleHeld = selection === undefined ? this.staleExpertChartersHeld.get(candidate.taskRef) : undefined;\n if (staleHeld !== undefined) {\n if (await this.staleExpertChartersCommittedSince(staleHeld)) {\n this.staleExpertChartersHeld.delete(candidate.taskRef);\n } else {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.STALE_EXPERT_CHARTERS });\n continue;\n }\n }\n /*\n * …and one whose landing check could not be ANSWERED (`SchemaPlanSyncState.UNANSWERABLE` for a\n * migration step, `DesignTokenBlockState.UNANSWERABLE` for the design-tokens step,\n * `BrandDesignState.UNANSWERABLE` for the design-system-brand step). It cannot land,\n * and running it only throws (every cause is listed on those members — no built registry, a\n * planner-contract mismatch, a design-system config that does not load among them), so holding the\n * head of the queue for it stops every other task: the whole-queue refusal this loop exists not to\n * be.\n *\n * Passed over as LANDING_UNKNOWN, and NEVER dispatched, not even when nothing else is ready (#3223). It used to be\n * kept as a fallback so its executor's refusal would name the cause, and that is how a companion restart re-ran a\n * LANDED `design-system-brand` step on `app-creation-test-007`: its check was unanswerable for a moment, nothing\n * else was ready, and the fallback ran it. Unknown is not \"not landed\". The refusal below names the cause and the\n * command that shows it, and the step is offered again the moment its check answers.\n */\n if (resolution.unanswerableGenerationStepTaskRefs.has(candidate.taskRef)) {\n const landingUnknownCause = describeHeldBySpecificationFault(candidate, resolution.modulesHoldingGenerationSteps)\n ?? describeHeldByUnknownDecisions(candidate.taskRef, resolution.buildTaskDecisions) ?? describeUnanswerableGenerationStepLanding(candidate);\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN, landingUnknownCause });\n this.logger.warn?.(`${landingUnknownCause} The rest of the plan proceeds; the step is offered again once the check answers.`, { deferredTaskRef: candidate.taskRef });\n continue;\n }\n const ranAndHeld = selection === undefined ? await this.classifyRanGenerationStep(candidate, generationStepAttemptHistory) : null;\n if (ranAndHeld !== null) {\n stuck.push(ranAndHeld);\n continue;\n }\n selected = candidate;\n break;\n }\n const stuckEntry = await this.classifyStuckBuildTask(candidate, resolution, inFlightTaskRefs);\n /*\n * A forced task's earlier COMPLETED run is the very landing the operator overrides, so it does not hold the\n * task. A live run, a parked session or an undraftable document still does: forcing past those would start\n * a second agent, abandon a persisted conversation, or spend a turn on a product no run can make.\n */\n if (stuckEntry !== null && !(candidate === forced && LANDED_OVERRIDE_RELEASES.has(stuckEntry.reason))) {\n stuck.push(stuckEntry);\n continue;\n }\n if (inFlightProductWrites.length > 0 && productWritePathsMeet(buildTaskProductWritePaths(candidate), inFlightProductWrites)) {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.CONTENDED });\n continue;\n }\n selected = candidate;\n break;\n }\n if (selected === undefined) {\n /*\n * Everything ready has already run and none of it landed. A DISTINCT terminal from\n * `ApplicationBuildPlanExhaustedError`, which means the opposite and is healthy — conflating\n * them would let a wholly stuck build read as a finished one.\n */\n throw this.buildUnlandableTaskError(stuck, {\n taskCount: graph.tasks.length,\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n unverifiableLandedTaskRefs: resolution.unverifiableLandedTaskRefs,\n ...withSpecificationFault(readBuildPlanSpecificationFault(graph.tasks, resolution)),\n });\n }\n // A task being built right now, or waiting for one that writes its file, is not a finding (#1528, #3204).\n if (stuck.some((entry) => !WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN.has(entry.reason))) {\n const stuckByReason = Object.fromEntries(\n Object.values(Workbench_BuildTaskStuckReason).map((reason) => [reason, stuck.filter((entry) => entry.reason === reason).map((entry) => entry.taskRef)]),\n );\n this.logger.warn?.(\n `Build dispatch skipped ${stuck.length} ready task(s) that cannot make progress. Those that already RAN `\n + 'declared a product the run did not produce, or failed their own verification (the declaration or the work '\n + 'is wrong). Those that are '\n + 'PARKED are waiting on an answer, and re-dispatching one would abandon its persisted session. Their '\n + 'dependents stay blocked while the rest of the plan proceeds.',\n { skippedTaskRefs: stuck.map((entry) => entry.taskRef), stuckByReason, selectedTaskRef: selected.taskRef },\n );\n }\n const task = selected;\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n // The step's write scope, from the one place that computes it: its evidence directories, or exactly its evidence\n // files when other writers share the directories around them (`GENERATION_STEP_WRITE_SCOPE`, #2358, #2505 review F2;\n // see `resolveGenerationStepWritableRoots`).\n const evidenceRoots = await this.generationSteps.resolveGenerationStepWritableRoots(task);\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target.kind,\n produces: task.produces,\n generationStepRef: task.target.generationStepRef,\n allowedPathPrefixes: evidenceRoots,\n prohibitedPathPrefixes: [],\n // The pipelines validate their own output; skills are a coding agent's channel, not this executor's.\n requiredChecks: [],\n installedSkillRefs: [],\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n unverifiableLandedTaskRefs: resolution.unverifiableLandedTaskRefs,\n };\n return { kind: 'GENERATION_STEP', plan, task, stuckTasks: stuck, ...(task === forced && selection?.despiteLanded ? { landedOverride: selection.despiteLanded } : {}) };\n }\n const boundary = resolveBuildPlanTaskCodingPolicy(\n task as Parameters<typeof resolveBuildPlanTaskCodingPolicy>[0],\n this.readApplicationWorkspaceEntries(),\n );\n const landedOverride = task === forced ? selection?.despiteLanded : undefined;\n // #3210: a task re-dispatched because its specification is refused is told the validator's error.\n const refusedSpecifications = resolution.refusedSpecificationFaults.get(task.taskRef);\n preparation?.select(task.taskRef);\n preparation?.enter(ApplicationBuildPreparationPhase.COMPOSING_THE_BRIEF);\n // #3204: a task offered again after a run that completed without its product is told which probes are unmet.\n const unmetProduct = landedOverride === undefined ? await this.readUnmetProductOfACompletedTask(task, resolution) : undefined;\n const contract = await this.composeTaskCodingContract(task, boundary, graph.tasks.length, landedOverride, refusedSpecifications, unmetProduct);\n\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target!.kind,\n produces: task.produces,\n allowedPathPrefixes: contract.mutationScope.allowedPathPrefixes,\n prohibitedPathPrefixes: contract.mutationScope.prohibitedPathPrefixes,\n requiredChecks: contract.verificationIntent.requiredChecks,\n installedSkillRefs: contract.installedSkillRefs,\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n unverifiableLandedTaskRefs: resolution.unverifiableLandedTaskRefs,\n };\n\n return { kind: 'CODING', plan, contract, stuckTasks: stuck, ...(landedOverride ? { landedOverride } : {}) };\n }\n\n /**\n * Which tasks have landed, read from GIT.\n *\n * A task has landed when every file it PRODUCES is committed — tracked, and with HEAD, index and worktree\n * in agreement. Not \"the file exists\": an untracked or half-edited file is work in progress, and treating\n * it as landed would let the next task build on something nobody accepted.\n *\n * This replaced a replay of a journal stream that had no writer anywhere, so the answer was permanently\n * \"nothing has landed\" and the loop could never advance past its first task. Git also answers correctly\n * after a restart, on a fresh clone, and on the other side of a branch switch — none of which an\n * in-memory journal can.\n */\n /**\n * How far the current build plan's execution has progressed — the eligibility board's input for the\n * \"plan complete ⇒ re-decompose is sequencing, not a live option\" gate. `undefined` when the\n * application has no (valid) build plan: absence of a plan is not zero-of-zero progress.\n */\n public async resolveBuildExecutionProgress(): Promise<{\n readonly totalTasks: number;\n readonly landedTasks: number;\n readonly readyTasksAllStuck?: readonly string[];\n readonly specificationFault?: BuildPlanSpecificationFault;\n } | undefined> {\n let plan: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n plan = await this.readBuildPlan();\n } catch {\n return undefined;\n }\n /*\n * Held per landing state (#3206): the playbook's `artifact-state` phase asks this on every wave iteration and every\n * eligibility read, and the all-stuck reading below classifies every ready task. Both are functions of the landing\n * key (the plan, git, the builds and the run-state generation), so they are derived once per key, beside it.\n */\n // Through the one gate every landing reader takes (#3204): this phase was one of the three derivations that overlapped.\n const { key, resolution } = await this.resolveLandingUnderGate(plan.tasks);\n const { landed } = resolution;\n // The one place a marked step is not done (#3258): it does not count, and the fault rides beside the counts.\n const specificationFault = readBuildPlanSpecificationFault(plan.tasks, resolution);\n const progress = {\n totalTasks: plan.tasks.length,\n landedTasks: landed.size - (specificationFault?.ranNotProvenTaskRefs.length ?? 0),\n ...(specificationFault === undefined ? {} : { specificationFault }),\n };\n const readyTasksAllStuck = await this.landingProjection.derive(key, 'ready-tasks-all-stuck', () => this.resolveReadyTasksAllStuck(plan, resolution));\n return readyTasksAllStuck === undefined ? progress : { ...progress, readyTasksAllStuck };\n }\n\n /**\n * The ready tasks, when EVERY one is stuck — the state in which `dispatchNextBuildTask` refuses\n * before starting anything (#1547). The eligibility board withholds the dispatch playbook on it, so an\n * unattended loop stops offering a run that can only fail.\n *\n * Asked with the SAME classification the selector uses, so the board and the dispatcher cannot\n * disagree about whether anything can run. A ready generation step is dispatchable unless its landing is\n * UNKNOWN, which the selector passes over unrun (#3223), or it is running, which is progress. Undefined whenever the answer is not positively\n * \"all stuck\" — nothing ready, something dispatchable, or a classification that threw — because a gate\n * that closes on an unreadable answer withholds work that may well be runnable.\n */\n private async resolveReadyTasksAllStuck(\n plan: Awaited<ReturnType<typeof this.readBuildPlan>>,\n resolution: LandedTaskResolution,\n ): Promise<readonly string[] | undefined> {\n const landed = resolution.landed;\n if (landed.size >= plan.tasks.length) return undefined;\n const ready = selectReadyBuildPlanTasks(plan, landed);\n if (ready.length === 0) return undefined;\n const stuck: string[] = [];\n let generationStepAttemptHistory: ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]> | undefined;\n for (const task of ready) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A step whose landing is UNKNOWN is never dispatched (#3223), so it is stuck like any other — or the board would\n * offer a dispatch the selector refuses. A RUNNING step is progress; any other ready step is dispatchable.\n */\n if (this.generationSteps.readGenerationStepProgress?.(task.taskRef) !== undefined) return undefined;\n if (!resolution.unanswerableGenerationStepTaskRefs.has(task.taskRef)) {\n // A step held for having run on unchanged inputs is stuck too (#3233): the selector passes it over.\n generationStepAttemptHistory ??= await this.readGenerationStepAttemptHistory() ?? new Map();\n if (await this.classifyRanGenerationStep(task, generationStepAttemptHistory) === null) return undefined;\n }\n stuck.push(task.taskRef);\n continue;\n }\n let entry: ApplicationBuildStuckTask | null;\n try {\n entry = await this.classifyStuckBuildTask(task, resolution);\n } catch {\n return undefined;\n }\n /*\n * A task being built right now is progress, not stuck: the plan is not blocked while a wave runs. So is a task\n * waiting for a live run that writes its file (CONTENDED), or for its wave's end to re-check it alone\n * (AWAITING_ISOLATED_RECHECK, #3204): each clears by itself. Counted as stuck, they read a busy build as not moving,\n * which lifts the hold on code-only refreshes and lets the umbrella loop re-run upstream lanes mid-build.\n */\n if (entry === null || BUILD_TASK_REASONS_THAT_ARE_PROGRESS.has(entry.reason)) return undefined;\n stuck.push(task.taskRef);\n }\n return stuck;\n }\n\n /**\n * What LANDED, and what of it was PROVEN — the maturity reading's evidence input (#1496).\n *\n * Exposed here rather than recomputed by the reading, because \"did this task land\" is a question\n * this service already answers (over the WORKING tree since #3204, see {@link createLandingTreeReader}),\n * and a second implementation of it is how two surfaces come to disagree about whether a task is done.\n *\n * The two sets differ by `unverifiableLandedTaskRefs`: a task that declares no product cannot be\n * probed, so a completed durable run lands it as RAN-not-PROVEN rather than stalling the queue\n * (`application-creation-directive.md` — mark, never gate). A requirement whose only build work is\n * such a task stops at `BUILT`, which is the honest reading of it.\n *\n * `undefined` when the application has no build plan OR its plan cannot be read — absence is not\n * an empty landing, and a reading that treated it as one would report every requirement as unbuilt\n * for a reason that has nothing to do with the requirements.\n *\n * Absence is tested DIRECTLY, like `describeBuildPlanBoard` beside it and for its reason:\n * `readBuildPlan` throws the same class for a plan that exists and fails validation, so catching\n * alone would flatten \"could not look\" into \"nothing there\" — and here that difference is a\n * landed artifact saying an application has built nothing.\n */\n public async resolveLandedTaskEvidence(): Promise<{\n readonly landedTaskRefs: readonly string[];\n readonly provenTaskRefs: readonly string[];\n /** The landed tasks as the plan they landed under declares them: what a re-decompose must keep (#3449, #3204). */\n readonly landedTasks: readonly (Pick<BuildPlanTask, 'taskRef' | 'target' | 'produces'> & { readonly closed?: boolean })[];\n /**\n * The gaps coding runs reported and that are still open (#2580), from the same derivation that appends the follow-ups.\n * Absent when the coding-run listing could not be read: an unknown is not \"no gap\", and the listing says so itself.\n */\n readonly openReportedGaps?: readonly OpenReportedGap[];\n } | undefined> {\n if (!(await this.hasAuthoredBuildPlan())) return undefined;\n let plan: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n plan = await this.readBuildPlan();\n } catch {\n return undefined;\n }\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n const unverifiable = new Set(resolution.unverifiableLandedTaskRefs);\n const landedTaskRefs = [...resolution.landed];\n const landed = new Set(landedTaskRefs);\n /*\n * What a re-decompose must keep is what it AUTHORED (#3204): a follow-up or a host generation step is derived again on\n * every read, and a model asked to keep one copies a task it cannot author validly (see {@link readAuthoredBuildPlan}).\n * They still count as landed above, for the requirements and the board.\n */\n const authoredTaskRefs = new Set((await this.readAuthoredBuildPlan()).plan.tasks.map((task) => task.taskRef));\n const landedTasks = plan.tasks\n .filter((task) => landed.has(task.taskRef) && authoredTaskRefs.has(task.taskRef))\n .map((task) => ({\n taskRef: task.taskRef,\n target: task.target,\n produces: task.produces,\n // A person's closure is how it landed, so no reshape can rebuild it (#3204 review R3).\n ...(resolution.closedTaskRefs.has(task.taskRef) ? { closed: true } : {}),\n }));\n // A requirement a run reports still unmet is not proven by its file (#2580): the reading needs the open gaps too.\n const runs = await this.readLatestCompletedCodingRuns();\n const openReportedGaps = runs === undefined\n ? undefined\n : collectOpenReportedGaps({ derivation: await this.deriveFollowUps(plan.tasks, runs.latest), tasks: plan.tasks, latestCompletedRuns: runs.latest, landedTaskRefs: landed });\n // A task a person CLOSED is landed for the plan, never proven: its product was never found by a probe (#3224).\n return {\n landedTaskRefs,\n provenTaskRefs: landedTaskRefs.filter((taskRef) => !unverifiable.has(taskRef) && !resolution.closedTaskRefs.has(taskRef)),\n landedTasks,\n ...(openReportedGaps === undefined ? {} : { openReportedGaps }),\n };\n }\n\n /** The build-task decisions file, as a path relative to the application root; `undefined` with no specifications package. */\n private buildTaskDecisionsPath(): string | undefined {\n return buildTaskDecisionsApplicationPath(this.companionContext);\n }\n\n /**\n * A person's COMMITTED build-task decisions (#3224, #3227), with how they STAND ({@link BuildTaskDecisionsStanding}):\n *\n * - HONOURED: HEAD's bytes were produced by a decision door and set outside every coding run's window\n * ({@link resolveHonouredDecisionsBlob}); they decide. No file is HONOURED with no decision.\n * - NOT_HONOURED: they decide nothing; the reason is named and warned. An unparseable file is reported the same way.\n * - UNKNOWN: git or the run records could not be read. Nothing is decided, the pass is provisional, and the tasks the\n * file names are held (`heldTaskRefs`) rather than dispatched as if never closed.\n */\n private async readCommittedBuildTaskDecisions(committedTree: CommittedTreeReader): Promise<BuildTaskDecisions> {\n const decisionsPath = this.buildTaskDecisionsPath();\n if (decisionsPath === undefined) return parseBuildTaskDecisions(undefined);\n const text = await committedTree.readText(decisionsPath);\n if (text === undefined || text === null) return parseBuildTaskDecisions(undefined);\n const standing = await this.readBuildTaskDecisionsStanding(decisionsPath);\n const none = parseBuildTaskDecisions(undefined);\n const conditions = standing.conditions.length > 0 ? { conditions: standing.conditions } : {};\n for (const condition of standing.conditions) this.logger.warn?.(condition, { path: decisionsPath });\n if (standing.standing === BuildTaskDecisionsStanding.UNKNOWN) {\n // Read WITHOUT trusting it, only to know what to hold: an unread closure must not let a closed task run again.\n const named = parseBuildTaskDecisions(text);\n const heldTaskRefs = new Set([...named.closures.keys(), ...named.followUpApprovals.keys()]);\n this.logger.warn?.(`Whether the build-task decisions were recorded by a person cannot be known: ${standing.reason}. The tasks they name are held until it can.`, { path: decisionsPath, held: [...heldTaskRefs] });\n return { ...none, standing: BuildTaskDecisionsStanding.UNKNOWN, reason: standing.reason ?? 'unknown', heldTaskRefs, ...conditions };\n }\n if (standing.standing === BuildTaskDecisionsStanding.NOT_HONOURED) {\n this.logger.warn?.(`The committed build-task decisions are not honoured: ${standing.reason}. Record a decision with \\`wildo build close\\` or \\`wildo build approve\\`.`, { path: decisionsPath });\n return { ...none, standing: BuildTaskDecisionsStanding.NOT_HONOURED, reason: standing.reason ?? 'not recorded through a decision door', ...conditions };\n }\n const decisions = parseBuildTaskDecisions(text);\n if (decisions.unreadable !== undefined) this.logger.warn?.(`The committed build-task decisions do not parse, so none counts: ${decisions.unreadable}`, { path: decisionsPath });\n return { ...decisions, ...conditions };\n }\n\n /**\n * How HEAD's decisions bytes stand, and the newest decisions a door produced outside every run window (what a door\n * builds on when HEAD's are not honoured). The commit history of the file is walked once per HEAD (R4): it does not\n * depend on the run windows, which are read on every call but cached per run record.\n */\n private async readBuildTaskDecisionsStanding(decisionsPath: string): Promise<{\n readonly standing: BuildTaskDecisionsStanding;\n readonly reason?: string;\n readonly conditions: readonly string[];\n readonly latestDoorText?: string;\n }> {\n const git = this.git;\n const unknown = (reason: string, conditions: readonly string[] = []) => ({ standing: BuildTaskDecisionsStanding.UNKNOWN, reason, conditions });\n if (typeof git.listCommitsTouching !== 'function' || typeof git.readBlobIdAt !== 'function' || typeof git.readHeadCommitSha !== 'function') {\n return unknown('git cannot list the decisions file\\'s history here');\n }\n const head = await git.readHeadCommitSha();\n if (head === undefined) return unknown('git could not say what HEAD is');\n let history = this.decisionsHistory?.head === head && this.decisionsHistory.path === decisionsPath ? this.decisionsHistory : undefined;\n if (history === undefined) {\n const commits = await git.listCommitsTouching(decisionsPath);\n if (commits === undefined) return unknown('git could not list the commits that changed the decisions file');\n // Every commit's blob (R5), in-window ones included, so a reason can name what a run's commit left.\n const withBlobs = await Promise.all(commits.map(async (commit) => {\n const blobId = await git.readBlobIdAt(commit.sha, decisionsPath);\n return blobId ? { ...commit, blobId } : commit;\n }));\n history = { head, path: decisionsPath, headBlobId: await git.readBlobIdAt('HEAD', decisionsPath), commits: withBlobs };\n this.decisionsHistory = history;\n }\n const windows = await this.readRunWindows(head);\n if (windows.inside === undefined) return unknown(windows.unknownReason ?? 'the coding-run records could not be read', windows.conditions);\n const recordedDoorDecisions = await this.readRecordedDoorDecisions();\n if (recordedDoorDecisions === undefined) return unknown('the decision door\\'s own records could not be read', windows.conditions);\n const verdict = resolveHonouredDecisionsBlob({ headBlobId: history.headBlobId, commits: history.commits, insideRunWindows: windows.inside, recordedDoorDecisions });\n const latestDoorText = verdict.latestDoorCommit && typeof git.readTextAt === 'function' ? await git.readTextAt(verdict.latestDoorCommit.sha, decisionsPath) : undefined;\n return {\n standing: verdict.standing,\n ...(verdict.reason ? { reason: verdict.reason } : {}),\n conditions: windows.conditions,\n ...(latestDoorText !== undefined ? { latestDoorText } : {}),\n };\n }\n\n /**\n * The decisions the door recorded in the companion's own run records (#3284), by nonce, each with the SHA it was\n * committed as once completed. `undefined` when they cannot be read (UNKNOWN). With no executions service bound (a test\n * harness) the door cannot record either, so none is known.\n */\n private async readRecordedDoorDecisions(): Promise<ReadonlyMap<string, { readonly commitSha?: string }> | undefined> {\n if (typeof this.executions?.listActorExecutions !== 'function') return new Map();\n try {\n const rows = await this.executions.listActorExecutions({ systemRef: APPLICATION_BUILD_DECISIONS_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n return new Map(rows.flatMap((row) => {\n const input = row.standaloneTasks[0]?.input as { decisionId?: unknown; commitSha?: unknown } | undefined;\n if (typeof input?.decisionId !== 'string') return [];\n return [[input.decisionId, typeof input.commitSha === 'string' ? { commitSha: input.commitSha } : {}] as const];\n }));\n } catch (error) {\n this.logger.warn?.('Could not read the decision door\\'s records', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The commits made INSIDE some coding run's or generation step's window, each with a sentence naming the run (R3).\n *\n * - A run with a write record: `baseline..postRun` from the record. Records are immutable, so each window is computed\n * once per record id (R4).\n * - A run the actor plane knows with NO readable record: its baseline is on its row from admission. Settled with a\n * post-run HEAD on its output, `baseline..postRun`; otherwise (in flight, or settled with none) the window is OPEN,\n * `baseline..HEAD`: fail closed, since what it committed cannot be bounded.\n * - A record whose baseline or post-run commit no longer exists (history rewritten after it ran) is a NAMED condition,\n * scoped to that record, with its remedy; it never makes every decision unknown.\n *\n * `inside` is undefined when the register, the run listing or git could not answer: the caller reads that as UNKNOWN.\n * The decision door refuses while any run or generation step is live, so no genuine decision is ever inside a window.\n */\n private async readRunWindows(head: string): Promise<{ readonly inside?: ReadonlyMap<string, string>; readonly conditions: readonly string[]; readonly unknownReason?: string }> {\n const inside = new Map<string, string>();\n const conditions: string[] = [];\n const recorded = new Set<string>();\n const add = async (id: string, base: string, tip: string, label: string, cacheable: boolean): Promise<string | undefined> => {\n if (base === tip) return undefined;\n const key = cacheable ? id : `${id}@${tip}`;\n let window = this.runWindowsByRecord.get(key);\n if (window === undefined) {\n const commits = await this.git.listCommitsBetween(base, tip);\n if (commits !== undefined) {\n window = { commits };\n } else {\n const [baseExists, tipExists] = await Promise.all([this.git.commitExists(base), this.git.commitExists(tip)]);\n if (baseExists === undefined || tipExists === undefined || (baseExists && tipExists)) return `git could not list the commits inside ${label}`;\n window = { unresolvable: [baseExists ? undefined : base, tipExists ? undefined : tip].filter(Boolean).map((sha) => sha!.slice(0, 8)).join(' and ') };\n }\n if (cacheable) this.runWindowsByRecord.set(key, window);\n }\n if ('unresolvable' in window) {\n conditions.push(`${label} names a commit this repository no longer holds (${window.unresolvable}): history was rewritten after it ran, so the commits it made cannot be told apart and its window is left out. `\n + 'If that run wrote build-task decisions, they do not count by themselves; record each with `wildo build close` or `wildo build approve`, and remove the stale run record to clear this notice.');\n return undefined;\n }\n for (const sha of window.commits) if (!inside.has(sha)) inside.set(sha, label);\n return undefined;\n };\n if (this.codingRunWrites !== undefined) {\n let records: Awaited<ReturnType<CodingRunWriteRegisterCompanionService['list']>>;\n try {\n records = await this.codingRunWrites.list();\n } catch (error) {\n return { conditions, unknownReason: `the coding-run write records could not be read (${describeCaughtError(error)})` };\n }\n for (const record of records) {\n recorded.add(record.taskId);\n const failed = await add(record.taskId, record.baselineHeadSha, record.postRunHeadSha, `the window of ${record.taskRef}'s run ${record.taskId}`, true);\n if (failed !== undefined) return { conditions, unknownReason: failed };\n }\n }\n if (typeof this.executions?.listActorExecutions === 'function') {\n for (const systemRef of [APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF]) {\n let rows: Awaited<ReturnType<CompanionExecutionsCompanionService['listActorExecutions']>>;\n try {\n rows = await this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n } catch (error) {\n return { conditions, unknownReason: `the runs could not be listed (${describeCaughtError(error)})` };\n }\n for (const row of rows) {\n const task = row.standaloneTasks[0] as {\n _id?: unknown;\n input?: { taskRef?: unknown; baseline?: { headSha?: unknown } };\n output?: { changeSetSummary?: { postRunHeadSha?: unknown }; recoveryEvidence?: { headSha?: unknown } | null } & Record<string, unknown>;\n } | undefined;\n const taskId = task?._id === undefined ? undefined : String(task._id);\n const base = task?.input?.baseline?.headSha;\n if (taskId === undefined || recorded.has(taskId) || typeof base !== 'string') continue;\n const settled = RUN_STATUSES_THAT_ENDED.has(row.status);\n /*\n * A settled run is bounded by what its row recorded (#3224 F2): its change set's post-run HEAD, the HEAD a startup\n * sweep stamped when it settled an interrupted run, or the HEAD stamped when it settled without a change set.\n */\n const stamp = (value: unknown) => (typeof value === 'string' && value.length > 0 ? value : undefined);\n const postRun = settled\n ? stamp(task?.output?.changeSetSummary?.postRunHeadSha) ?? stamp(task?.output?.recoveryEvidence?.headSha) ?? stamp(task?.output?.[SETTLED_HEAD_OUTPUT_FIELD])\n : undefined;\n const taskRef = typeof task?.input?.taskRef === 'string' ? task.input.taskRef : 'a build task';\n const label = postRun !== undefined\n ? `the window of ${taskRef}'s run ${taskId}`\n : settled\n ? `the open window of ${taskRef}'s run ${taskId} (it settled with no record of where HEAD was, so its window runs to HEAD; bound it with \\`wildo build settle-window ${taskRef}\\`, then record again any decision made since)`\n : `the open window of ${taskRef}'s run ${taskId} (still running or parked, so bounded only by HEAD)`;\n const failed = await add(taskId, base, postRun ?? head, label, postRun !== undefined);\n if (failed !== undefined) return { conditions, unknownReason: failed };\n }\n }\n }\n return { inside, conditions };\n }\n\n /**\n * The runs a decision must wait for besides the live coding runs (#3224 review, F1): a generation step selected or\n * running, and ANY run PARKED on a question (`AWAITING_APPROVAL`). A parked run keeps its baseline when it resumes, so\n * a decision committed while it waits would fall inside its window for good. By task ref, each with its state.\n */\n private async listLiveOrParkedRuns(): Promise<readonly { readonly label: string; readonly parked: boolean }[]> {\n if (typeof this.executions?.listActorExecutions !== 'function') return [];\n const found: { label: string; parked: boolean }[] = [];\n const queries: readonly (readonly [string, FlowsActors_Status])[] = [\n [APPLICATION_BUILD_SYSTEM_REF, FlowsActors_Status.PENDING],\n [APPLICATION_BUILD_SYSTEM_REF, FlowsActors_Status.PROCESSING],\n [APPLICATION_BUILD_SYSTEM_REF, FlowsActors_Status.AWAITING_APPROVAL],\n [APPLICATION_CODING_SYSTEM_REF, FlowsActors_Status.AWAITING_APPROVAL],\n ];\n for (const [systemRef, status] of queries) {\n const rows = await this.executions.listActorExecutions({ systemRef, status, limit: 200 });\n for (const row of rows) {\n const taskRef = (row.standaloneTasks[0]?.input as { taskRef?: unknown } | undefined)?.taskRef;\n found.push({ label: typeof taskRef === 'string' ? taskRef : String(row._id), parked: status === FlowsActors_Status.AWAITING_APPROVAL });\n }\n }\n return found;\n }\n\n /**\n * `wildo build settle-window <taskRef>` (#3224 review F2): bound the window of every SETTLED run of the task that left no\n * record of where HEAD was (a legacy row: no change set, no settle stamp), at the current HEAD. Until then the decisions\n * reader keeps such a window open to HEAD and honours no decision made after the run. A person's command: refused while\n * any run is live or parked (a bound taken now would cut a window that is still moving), and when there is nothing to\n * bound. Decisions made while the window was open stay inside it; the note says to record them again.\n */\n public async settleRunWindows(taskRef: string): Promise<{ readonly boundRunTaskIds: readonly string[]; readonly boundHeadSha: string; readonly note: string }> {\n const live = await this.dispatch.listInFlightCodingRuns();\n const waiting = await this.listLiveOrParkedRuns();\n if (live.length > 0 || waiting.length > 0) {\n throw new BuildTaskDecisionRefusedError(`Runs are live or parked right now (${[...live.map((run) => run.taskRef ?? run.executionId), ...waiting.map((run) => run.label)].join(', ')}); a window bounded now could cut one still moving. Try again once they settle.`);\n }\n if (this.codingRunWrites === undefined || typeof this.executions?.listActorExecutions !== 'function') {\n throw new BuildTaskDecisionRefusedError('The run records are not available here, so no window can be bounded.');\n }\n const head = await this.git.readHeadCommitSha();\n if (head === undefined) throw new BuildTaskDecisionRefusedError('git could not say what HEAD is, so no window can be bounded.');\n const recorded = new Set((await this.codingRunWrites.list()).map((record) => record.taskId));\n const bound: string[] = [];\n for (const systemRef of [APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF]) {\n for (const row of await this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING })) {\n const task = row.standaloneTasks[0] as { _id?: unknown; input?: { taskRef?: unknown; baseline?: { headSha?: unknown; capturedAt?: unknown } }; output?: Record<string, unknown> & { changeSetSummary?: { postRunHeadSha?: unknown }; recoveryEvidence?: { headSha?: unknown } | null } } | undefined;\n const taskId = task?._id === undefined ? undefined : String(task._id);\n const base = task?.input?.baseline?.headSha;\n if (taskId === undefined || task?.input?.taskRef !== taskRef || typeof base !== 'string' || recorded.has(taskId) || !RUN_STATUSES_THAT_ENDED.has(row.status)) continue;\n const stamped = [task.output?.changeSetSummary?.postRunHeadSha, task.output?.recoveryEvidence?.headSha, task.output?.[SETTLED_HEAD_OUTPUT_FIELD]].some((value) => typeof value === 'string' && value.length > 0);\n if (stamped) continue;\n await this.codingRunWrites.recordWindowBound({\n taskId, taskRef, baselineHeadSha: base,\n ...(typeof task.input.baseline?.capturedAt === 'string' ? { baselineCapturedAt: task.input.baseline.capturedAt } : {}),\n boundHeadSha: head,\n });\n bound.push(taskId);\n }\n }\n if (bound.length === 0) throw new BuildTaskDecisionRefusedError(`No settled run of ${taskRef} has an open window; there is nothing to bound.`);\n this.landingRunStateGeneration += 1;\n return {\n boundRunTaskIds: bound,\n boundHeadSha: head,\n note: `Bounded ${bound.length} run window(s) of ${taskRef} at ${head.slice(0, 8)}. A decision recorded from now on counts; one recorded while the window was open stays inside it, so record it again (\\`wildo build close\\` / \\`wildo build approve\\`).`,\n };\n }\n\n /**\n * Open the door's record of a decision BEFORE it is committed (#3284, ordering decided after the review of 2c7fd8a3f):\n * one execution of the decisions system whose task carries the decision's NONCE, the id the commit then names in its\n * `Wildo-Decision-Id` trailer. The reader honours a door-shaped commit only when such a record carries its nonce (and,\n * once completed, its SHA), so:\n *\n * - a crash after the record and before the commit leaves a record no commit names: harmless, ignored;\n * - a crash after the commit, before {@link completeDoorDecision}, leaves a pending record that still honours it;\n * - a forged commit cannot carry a nonce a record has (and a completed record pins the SHA, so a rebased copy fails).\n *\n * Refused, before anything is written, when the plane cannot take the record. Returns the task to complete.\n */\n private async openDoorDecisionRecord(decisionId: string, decision: Parameters<typeof withBuildTaskDecision>[1]): Promise<string> {\n const decidedTaskRef = 'closure' in decision ? decision.closure.taskRef : decision.followUpApproval.taskRef;\n const decisionKind = 'closure' in decision ? decision.closure.kind : 'approved';\n try {\n // `finishedAt` is left to the plane: the execution envelope stamps it, as an ISO string, for a terminal status.\n const execution = await this.executions.createActorExecution(CompanionCreateActorExecutionRequestSchema.parse({\n systemRef: APPLICATION_BUILD_DECISIONS_SYSTEM_REF,\n status: FlowsActors_Status.COMPLETED,\n }));\n const task = await this.executions.createActorTask(CompanionCreateActorTaskRequestSchema.parse({\n title: `Build-task decision on ${decidedTaskRef}`,\n description: `A person's ${decisionKind} decision on ${decidedTaskRef}, recorded by the decision door before its commit.`,\n // A decision about what the build plan delivers: planning, never an implementation step.\n topic: Actor_Task_Topics.PLANNING,\n status: FlowsActors_Status.COMPLETED,\n actors: { actorRef: APPLICATION_BUILD_DECISIONS_DOOR_ACTOR_REF },\n wildoApplicationActorSystemExecutionId: String(execution._id),\n // `decidedTaskRef`, never `taskRef`: a decision is not an attempt of the task it decides.\n input: { decisionId, decidedTaskRef, decisionKind },\n }));\n return String(task._id);\n } catch (error) {\n throw new BuildTaskDecisionRefusedError(`The companion could not open its record of the decision (${describeCaughtError(error)}), so nothing was committed. Try again.`);\n }\n }\n\n /**\n * Complete the door's record with the SHA the decision was committed as (#3284): from then on only that SHA is honoured\n * for this nonce. A failure is said, not thrown: the pending record already honours the commit, and the decision stands.\n */\n private async completeDoorDecision(taskId: string, decisionId: string, commitSha: string, decision: Parameters<typeof withBuildTaskDecision>[1]): Promise<string | undefined> {\n const decidedTaskRef = 'closure' in decision ? decision.closure.taskRef : decision.followUpApproval.taskRef;\n const decisionKind = 'closure' in decision ? decision.closure.kind : 'approved';\n try {\n await this.executions.updateActorTask(taskId, CompanionUpdateActorTaskRequestSchema.parse({ input: { decisionId, decidedTaskRef, decisionKind, commitSha } }));\n return undefined;\n } catch (error) {\n this.logger.warn?.('Could not complete the decision door\\'s record with its commit; the pending record still honours it', { decisionId, commitSha, error: describeCaughtError(error) });\n return describeCaughtError(error);\n }\n }\n\n /**\n * Write one decision into the decisions file and commit it as a decision record, under the workspace lock so no\n * coding run's baseline sees it half-written (#3224, #3227). The commit is authored by the person (origin OPERATOR)\n * and carries their reason as its purpose: that is the audit of who decided what and why. While ANY coding run is live\n * (a single-flight run holding the lock, or a wave's runs, which hold none) the decision is refused, naming them, rather\n * than waited on: a person asked, and a wave can take an hour.\n *\n * A decision is not a dispatch: it starts nothing and leaves a `wildo build stop` hold where it is. Undoing one is\n * reverting its commit, like any other decision record.\n */\n private async commitBuildTaskDecision(\n decision: Parameters<typeof withBuildTaskDecision>[1],\n record: { readonly summary: string; readonly purpose: string; readonly actor: DecisionRecordActor },\n ): Promise<{ readonly commitSha?: string; readonly decisionsPath: string; readonly replacedUnhonoured?: { readonly reason: string; readonly carriedEarlier: boolean } }> {\n const decisionsPath = this.buildTaskDecisionsPath();\n let replacedUnhonoured: { readonly reason: string; readonly carriedEarlier: boolean } | undefined;\n let recordIncomplete: string | undefined;\n if (decisionsPath === undefined) throw new BuildTaskDecisionRefusedError('No specifications package is declared in wildo.saas.config.ts; there is nowhere to record the decision.');\n /*\n * A single-flight coding run holds the workspace lock, so the lock below refuses beside it; the runs of a parallel\n * wave hold none (#1528), and a commit made beside them lands inside their change-set window. So any live coding run\n * refuses the decision, named, whatever lock it holds.\n */\n const live = await this.dispatch.listInFlightCodingRuns();\n if (live.length > 0) {\n throw new BuildTaskDecisionRefusedError(`${live.length} coding run(s) are writing the application right now (${live.map((run) => run.taskRef ?? run.executionId).join(', ')}). Nothing was recorded; try again once they settle, or stop the build first (\\`wildo build stop\\`).`);\n }\n // A generation step running, or any run parked on a question, has a window too, so they refuse as well (F1).\n const waiting = await this.listLiveOrParkedRuns();\n const parked = waiting.filter((run) => run.parked).map((run) => run.label);\n if (parked.length > 0) {\n throw new BuildTaskDecisionRefusedError(`${parked.length} run(s) are parked on a question (${parked.join(', ')}), and a parked run keeps its window open until it settles. `\n + 'Nothing was recorded; answer or cancel them (`wildo creation questions`), then record the decision.');\n }\n if (waiting.length > 0) {\n throw new BuildTaskDecisionRefusedError(`${waiting.length} generation step(s) are writing the application right now (${waiting.map((run) => run.label).join(', ')}). Nothing was recorded; try again once they settle.`);\n }\n const absolutePath = path.join(this.companionContext.saasRoot, decisionsPath);\n const write = async (): Promise<string | undefined> => {\n /*\n * Built on what the reader honours, never on the working file (review of 8d6b95d29): an uncommitted or agent-written\n * edit there would otherwise be carried into a commit under the person's name. When HEAD's bytes are honoured they\n * are the base; when they are not, the newest decision a person's door recorded is, so earlier decisions are kept\n * and only the unhonoured bytes are dropped, and the note says so.\n */\n const headText = (await this.git.readCommittedText(decisionsPath)) ?? undefined;\n const door = headText === undefined ? undefined : await this.readBuildTaskDecisionsStanding(decisionsPath);\n // UNKNOWN refuses: writing now would drop every decision it could not read (R2).\n if (door?.standing === BuildTaskDecisionsStanding.UNKNOWN) {\n throw new BuildTaskDecisionRefusedError(`Whether the committed build-task decisions were recorded by a person cannot be known (${door.reason}). Nothing was recorded, so none is lost; repair that and record the decision again.`);\n }\n const current = door === undefined || door.standing === BuildTaskDecisionsStanding.HONOURED ? headText : door.latestDoorText;\n replacedUnhonoured = door !== undefined && door.standing === BuildTaskDecisionsStanding.NOT_HONOURED\n ? { reason: door.reason ?? 'not recorded through a decision door', carriedEarlier: door.latestDoorText !== undefined }\n : undefined;\n if (this.acceptedChangeCommit === undefined) throw new BuildTaskDecisionRefusedError('The companion cannot commit here, so no decision can be recorded.');\n // The door's record FIRST, carrying the nonce the commit names (#3284): a crash after the commit still honours it.\n const decisionId = randomUUID();\n const recordTaskId = await this.openDoorDecisionRecord(decisionId, decision);\n await mkdir(path.dirname(absolutePath), { recursive: true });\n await writeFile(absolutePath, withBuildTaskDecision(current, decision), 'utf8');\n const committed = await this.acceptedChangeCommit.commitDecisionRecord({\n paths: [decisionsPath],\n summary: record.summary,\n purpose: record.purpose,\n actor: record.actor,\n origin: AcceptOrigin.OPERATOR,\n recordsBuildTaskDecisions: true,\n decisionId,\n });\n recordIncomplete = await this.completeDoorDecision(recordTaskId, decisionId, committed.commitSha, decision);\n this.decisionsHistory = undefined;\n return committed.commitSha;\n };\n let commitSha: string | undefined;\n try {\n commitSha = await withDedicatedFileLock(getWorkspaceMutationLockPath(this.companionContext.saasRoot), write, { retries: { retries: 10, minTimeout: 200, maxTimeout: 2_000 } });\n } catch (error) {\n if ((error as { code?: unknown } | null)?.code === 'ELOCKED') {\n throw new BuildTaskDecisionRefusedError('The application\\'s working tree is being written right now (a coding run holds it). Nothing was recorded; try again once it settles, or stop the build first (`wildo build stop`).');\n }\n throw error;\n }\n // The committed decision changes what lands and what may run: the next read derives landing again.\n this.landingRunStateGeneration += 1;\n if (recordIncomplete !== undefined) this.logger.warn?.(`Decision ${commitSha?.slice(0, 8)} is honoured by its pending record; completing it failed: ${recordIncomplete}`);\n return { ...(commitSha ? { commitSha } : {}), decisionsPath, ...(replacedUnhonoured !== undefined ? { replacedUnhonoured } : {}) };\n }\n\n /**\n * `wildo build close <taskRef>` (#3224, #3225, #3227): a person records that a task is done another way, or declines a\n * derived follow-up, and the closure is committed as a decision record so it counts from HEAD. Refused, naming why,\n * for a task the plan does not hold, one already landed, a satisfier that is neither a task of the plan nor a commit on\n * HEAD, a task satisfied by itself, and a decline of anything but a follow-up.\n *\n * A person's door only: no selector, wave or loop calls it, and it starts nothing (see {@link commitBuildTaskDecision}).\n */\n public async closeBuildTask(\n taskRef: string,\n request: { readonly satisfiedBy?: string; readonly declined?: boolean; readonly reason: string },\n actor: DecisionRecordActor,\n ): Promise<{ readonly closure: BuildTaskClosure; readonly commitSha?: string; readonly note: string }> {\n if (request.declined === true && request.satisfiedBy !== undefined) throw new BuildTaskDecisionRefusedError('A task is either declined or satisfied by something; name one.');\n if (request.declined === true && !taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) {\n throw new BuildTaskDecisionRefusedError(`Only a derived follow-up can be declined: declining ${taskRef}, a task of the accepted plan, would report the build complete without it. Close it as satisfied by the task or commit that built it, or revise the plan.`);\n }\n const plan = await this.readBuildPlan();\n const planTaskRefs = new Set(plan.tasks.map((task) => task.taskRef));\n if (!planTaskRefs.has(taskRef)) throw new BuildTaskDecisionRefusedError(`\"${taskRef}\" is not a task of this application's build plan, so there is nothing to close.`);\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n const { landed, closedTaskRefs, refusedSpecificationFaults } = resolution;\n // Landed by its own probe: nothing to close. Landed by an earlier closure: this one REPLACES it, the way to correct one.\n if (landed.has(taskRef) && !closedTaskRefs.has(taskRef)) {\n const fault = readBuildPlanSpecificationFault(plan.tasks, resolution);\n if (fault?.ranNotProvenTaskRefs.includes(taskRef)) {\n throw new BuildTaskDecisionRefusedError(`${describeUnprovenWhileAModuleFails(taskRef, fault.failingModules)} Nothing can be closed until then: close it then if it does not land.`);\n }\n throw new BuildTaskDecisionRefusedError(`${taskRef} has already landed by its own check; there is nothing to close.`);\n }\n if (await this.dispatch.findInFlightRunForBuildTask(taskRef) !== null || this.generationSteps.readGenerationStepProgress?.(taskRef) !== undefined) {\n throw new BuildTaskDecisionRefusedError(`${taskRef} is being built right now; close it once its run has settled, if it still does not land.`);\n }\n /*\n * A task an ACTIVE refusal holds is not closed past it (review of 8d6b95d29): its latest run failed its own\n * verification, or its factory refuses its specification. Closing would land it silently while what it wrote is broken,\n * and the refusal is what a person needs to see. Refused rather than noted, because no legitimate closure needs it: the\n * remedy is the refusal's (fix it, or `wildo build rearm` once fixed), after which the task can be closed if it still\n * does not land. A DECLINE is exempt: it says the follow-up's work is not wanted, so a refusal of that work is moot.\n */\n const verificationFailed = request.declined === true ? undefined : await this.readVerificationFailedTaskRefs();\n if (request.declined !== true && (verificationFailed?.has(taskRef) || refusedSpecificationFaults.has(taskRef))) {\n throw new BuildTaskDecisionRefusedError(`${taskRef} is held by an active refusal: ${verificationFailed?.has(taskRef) ? 'its latest run failed its own verification' : 'its factory refuses its specification'}. Closing it would land a result that refusal says is broken. Fix the cause (\\`wildo creation why ${taskRef}\\` shows it), re-arm it with \\`wildo build rearm\\`, then close it if it still does not land.`);\n }\n let closure: BuildTaskClosure;\n const closedAt = new Date().toISOString();\n if (request.declined === true) {\n closure = { taskRef, kind: BuildTaskClosureKind.DECLINED, reason: request.reason, closedAt };\n } else if (request.satisfiedBy === undefined) {\n throw new BuildTaskDecisionRefusedError('Say what satisfied the task (--satisfied-by <taskRef|commit>), or decline a follow-up (--declined).');\n } else if (request.satisfiedBy === taskRef) {\n throw new BuildTaskDecisionRefusedError('A task cannot be satisfied by itself.');\n } else if (planTaskRefs.has(request.satisfiedBy)) {\n // A task that waits on this one can never land before it, so the closure would never count: refused, named.\n if (transitiveDependentsOf(taskRef, plan.tasks).has(request.satisfiedBy)) {\n throw new BuildTaskDecisionRefusedError(`${request.satisfiedBy} waits on ${taskRef}, so it cannot land first and the closure would never count. Name the task or commit that actually built it.`);\n }\n // A declined follow-up built nothing, so it satisfies nothing (the resolution refuses it too).\n if (closedTaskRefs.get(request.satisfiedBy)?.kind === BuildTaskClosureKind.DECLINED) {\n throw new BuildTaskDecisionRefusedError(`${request.satisfiedBy} was declined, so it built nothing; name the task or commit that actually built ${taskRef}.`);\n }\n closure = { taskRef, kind: BuildTaskClosureKind.SATISFIED_BY_TASK, satisfiedBy: request.satisfiedBy, reason: request.reason, closedAt };\n } else {\n const sha = await this.git.resolveCommitOnHead(request.satisfiedBy);\n if (sha === undefined) throw new BuildTaskDecisionRefusedError(`\"${request.satisfiedBy}\" is neither a task of the build plan nor a commit HEAD contains.`);\n closure = { taskRef, kind: BuildTaskClosureKind.SATISFIED_BY_COMMIT, satisfiedBy: sha, reason: request.reason, closedAt };\n }\n const { commitSha, decisionsPath, replacedUnhonoured } = await this.commitBuildTaskDecision({ closure }, {\n summary: `${taskRef}: closed (${closure.kind}${closure.satisfiedBy ? ` by ${closure.satisfiedBy}` : ''})`,\n purpose: request.reason,\n actor,\n });\n return {\n closure,\n ...(commitSha ? { commitSha } : {}),\n note: (commitSha\n ? `${taskRef} is closed (${closure.kind}), committed ${commitSha.slice(0, 8)}; it counts as landed${closure.kind === BuildTaskClosureKind.SATISFIED_BY_TASK ? ` while ${closure.satisfiedBy} is landed` : ''}. To undo it, revert that commit.`\n : `${taskRef}'s closure is written to ${decisionsPath} and counts once it is committed.`)\n + describeReplacedDecisions(replacedUnhonoured),\n };\n }\n\n /**\n * `wildo build approve <followUpRef>` (#3227): under a posture that makes derived follow-ups wait for review (GUIDED),\n * a person lets one run; the approval is committed as a decision record like a closure. Declining is the close verb's\n * `--declined`. Refused, naming why, for a task the plan does not hold, a task that is not a derived follow-up, a\n * follow-up already approved or already run, and any approval under a posture where follow-ups do not wait: there it\n * would record a decision that changes nothing.\n */\n public async approveFollowUpTask(\n taskRef: string,\n request: { readonly note?: string },\n actor: DecisionRecordActor,\n ): Promise<{ readonly approval: BuildFollowUpApproval; readonly commitSha?: string; readonly note: string }> {\n if (!followUpsAwaitReviewUnder(this.autonomyPosture)) {\n throw new BuildTaskDecisionRefusedError(`Under the ${this.autonomyPosture} autonomy posture derived follow-ups run without review, so there is nothing to approve. Decline one you do not want with \\`wildo build close ${taskRef} --declined --reason \"<why>\"\\`.`);\n }\n if (!taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) {\n throw new BuildTaskDecisionRefusedError(`Only a derived follow-up waits for review; ${taskRef} is a task of the accepted plan, which was reviewed with the plan.`);\n }\n const plan = await this.readBuildPlan();\n if (!plan.tasks.some((task) => task.taskRef === taskRef)) throw new BuildTaskDecisionRefusedError(`\"${taskRef}\" is not a task of this application's build plan, so there is nothing to approve.`);\n const decisions = await this.readCommittedBuildTaskDecisions(this.createCommittedTreeReader());\n if (decisions.followUpApprovals.has(taskRef)) throw new BuildTaskDecisionRefusedError(`${taskRef} is already approved.`);\n if (await this.dispatch.findCompletedRunForBuildTask(taskRef, undefined, { fresh: true }) !== null) throw new BuildTaskDecisionRefusedError(`${taskRef} has already run; there is nothing to approve.`);\n const approval: BuildFollowUpApproval = { taskRef, ...(request.note ? { note: request.note } : {}), approvedAt: new Date().toISOString() };\n const { commitSha, decisionsPath, replacedUnhonoured } = await this.commitBuildTaskDecision({ followUpApproval: approval }, {\n summary: `${taskRef}: follow-up approved to run`,\n purpose: request.note ?? 'The creator reviewed the derived follow-up and let it run.',\n actor,\n });\n return {\n approval,\n ...(commitSha ? { commitSha } : {}),\n note: (commitSha\n ? `${taskRef} is approved, committed ${commitSha.slice(0, 8)}; the next wave may run it. To undo it before it runs, revert that commit.`\n : `${taskRef}'s approval is written to ${decisionsPath} and counts once it is committed.`)\n + describeReplacedDecisions(replacedUnhonoured),\n };\n }\n\n /**\n * The closures that COUNT now (#3224, #3227): the committed ones the landing resolution honoured, for the feed's \"a task\n * was closed\" line. A closure of a task the plan no longer holds, or whose satisfier has not landed, is left out: it says\n * nothing about the build. `[]` with no build plan.\n */\n public async readHonouredBuildTaskClosures(): Promise<readonly BuildTaskClosure[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n return [...(await this.resolveLandedTaskRefs(plan.tasks)).closedTaskRefs.values()];\n }\n\n /**\n * The derived follow-ups that LANDED while their latest completed run still reports a requirement unmet (#2583), each\n * with what it reported: what the creation home's advisory line names. A projection of the plan, its landing and the\n * latest completed runs, never stored. A follow-up landed by a person's closure is left out (a declined follow-up was\n * decided on, not left behind). `[]` with no build plan, or when the runs cannot be listed (that reader says so).\n */\n public async readFollowUpsLandedWithGaps(): Promise<readonly { readonly taskRef: string; readonly unmetRequirements: readonly ApplicationCodingUnmetRequirement[] }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n const followUps = plan.tasks.filter((task) => task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n if (followUps.length === 0) return [];\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return [];\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n return followUps.flatMap((task) => {\n const unmet = runs.latest.get(task.taskRef)?.unmetRequirements ?? [];\n return resolution.landed.has(task.taskRef) && !resolution.closedTaskRefs.has(task.taskRef) && unmet.length > 0\n ? [{ taskRef: task.taskRef, unmetRequirements: unmet }]\n : [];\n });\n }\n\n /**\n * The LANDED tasks carrying a landing advisory (#3285), each with its advisories: what the creation home's advisory\n * line names. The same derivation the task records make (`resolveBuildTaskLandingAdvisories` over the committed\n * backend configuration, a declined closure left out), without building the records: the plan, one committed file\n * (only when a task sells something) and, only when some task is advised, the landing. `[]` with no build plan.\n */\n public async readLandedTasksWithAdvisories(): Promise<readonly { readonly taskRef: string; readonly advisories: readonly BuildTaskLandingAdvisory[] }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n // The same reads the records make: the billing switch only when a task sells something. Every task is asked, so an\n // advisory kind added to `resolveBuildTaskLandingAdvisories` reaches Home with no change here.\n const backendBillingConfigText = plan.tasks.some(buildTaskProducesBillingCatalogue)\n ? (await this.git.readCommittedText(BACKEND_BILLING_SWITCH_FILE)) ?? undefined\n : undefined;\n const advised = plan.tasks.filter((task) => resolveBuildTaskLandingAdvisories(task, { backendBillingConfigText }).length > 0);\n if (advised.length === 0) return [];\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n return advised.flatMap((task) => {\n if (!resolution.landed.has(task.taskRef) || resolution.closedTaskRefs.get(task.taskRef)?.kind === BuildTaskClosureKind.DECLINED) return [];\n const advisories = resolveBuildTaskLandingAdvisories(task, { backendBillingConfigText });\n return advisories.length > 0 ? [{ taskRef: task.taskRef, advisories }] : [];\n });\n }\n\n /**\n * Put a build task back in the queue after the reason it did not land was fixed (#1535). The ref must\n * be a task of THIS build plan: re-arming a ref the plan does not carry would record a decision about\n * nothing, and a typo would read as success.\n */\n public async rearmBuildTask(\n taskRef: string,\n request: { readonly reason: BuildTaskRearmReason; readonly note: string },\n session?: CompanionExecutionSessionContext,\n ): Promise<{ readonly rearmedRunTaskIds: readonly string[]; readonly rearm: BuildTaskRearm }> {\n const plan = await this.readBuildPlan();\n const task = plan.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (task === undefined) {\n throw new NothingToRearmError(`\"${taskRef}\" is not a task of this application's build plan, so there is nothing to re-arm.`);\n }\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) return this.rearmGenerationStep(taskRef, request, session);\n return this.dispatch.rearmBuildTask(taskRef, request, session);\n }\n\n /**\n * Put a GENERATION STEP back in the queue (#3709): the re-arm is recorded on each of its runs that still holds it, a\n * completed one (#3233) or a failed one (#3709), exactly as a coding task's re-arm is recorded on its runs. The coding\n * lane's re-arm reads coding runs only, so a step's runs, which are the build system's own rows, were never re-armed and\n * a held step had only the named dispatch as its door.\n */\n private async rearmGenerationStep(\n taskRef: string,\n request: { readonly reason: BuildTaskRearmReason; readonly note: string },\n session?: CompanionExecutionSessionContext,\n ): Promise<{ readonly rearmedRunTaskIds: readonly string[]; readonly rearm: BuildTaskRearm }> {\n // Not parsed through the route's query schema, whose 200 is an HTTP request's bound: in-process the listing pages.\n const listed = await this.executions.listActorExecutions({ systemRef: APPLICATION_BUILD_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const holding = listed.flatMap((execution) => {\n const row = execution.standaloneTasks[0];\n const holds = (execution.status === FlowsActors_Status.COMPLETED || execution.status === FlowsActors_Status.FAILED)\n && (row?.input as { taskRef?: unknown } | undefined)?.taskRef === taskRef\n && readBuildTaskRearm(row?.memory) === undefined;\n return holds && row !== undefined ? [row] : [];\n });\n if (holding.length === 0) {\n throw new NothingToRearmError(\n `Build step \"${taskRef}\" has no completed or failed run that still holds it, so there is nothing to re-arm: it was never run, `\n + 'or every run is already re-armed. A step in that state is offered by the next dispatch on its own.',\n );\n }\n const rearm: BuildTaskRearm = { reason: request.reason, note: request.note, rearmedAt: new Date().toISOString() };\n try {\n for (const row of holding) {\n await this.executions.updateActorTask(String(row._id), { memory: withBuildTaskRearm(row.memory as Parameters<typeof withBuildTaskRearm>[0], rearm) }, session);\n }\n } finally {\n // Announced even when a later update threw: the rows re-armed before it did still moved.\n this.dispatch.announceRunStateChanged();\n }\n return { rearmedRunTaskIds: holding.map((row) => String(row._id)), rearm };\n }\n\n /**\n * Where a task's landing was found: its probes' paths, or a generation step's evidence paths. Empty for a probe\n * that names no fixed file (a shell surface, a schema-plan state) — the record then says \"found\" without a place\n * rather than inventing one.\n */\n private async resolveLandedEvidencePaths(task: BuildPlanTask): Promise<readonly string[]> {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n const condition = await this.generationSteps.resolveGenerationStepLandedCondition(task);\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS) return [...condition.paths];\n // Found in the stylesheet: it is committed and its block is current.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT) return [condition.stylesheetPath];\n // Found in the generated modules: each is committed and says what the brand's visual tone renders.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT) return [...condition.modulePaths];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ACCEPTED_BRAND_MARK) return [condition.modulePath];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) return [condition.configPath];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE) return [];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) return [];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES) {\n const candidates = [...new Set(condition.probes.flatMap(landedProbePaths))];\n const committed = await this.git.selectCommittedPaths(candidates);\n return candidates.filter((path) => committed.has(path));\n }\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) return [condition.configPath];\n return [];\n }\n // Only the paths that ARE committed: a label probe reads one candidate per language, and naming the dozens\n // that do not exist would say the product was found in files that are not there.\n const candidates = [...new Set(resolveBuildTaskLandedProbes(task).flatMap(landedProbePaths))];\n const committed = await this.git.selectCommittedPaths(candidates);\n return candidates.filter((path) => committed.has(path));\n }\n\n /**\n * The per-task build record an operator or an agent reads in ONE call (#1521).\n *\n * Composed entirely from what already exists — the plan, the landing resolution, the actor plane's\n * execution rows, and the stuck classification the selector uses — and stored nowhere. A second\n * ledger of attempts would be a second answer to \"what happened to this task\", and the rows the\n * engine already writes are the first.\n *\n * `undefined` when the application has no build plan, for the reason `resolveLandedTaskEvidence`\n * gives: absence is not an empty build.\n */\n public async describeBuildTaskRecords(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildTaskRecords | undefined> {\n if (!(await this.hasAuthoredBuildPlan())) return undefined;\n const plan = await this.readBuildPlan();\n // One introspection of the live application for the whole read: the landing pass and its explanations.\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n const ready = new Set(selectReadyBuildPlanTasks(plan, resolution.landed).map((task) => task.taskRef));\n const unverifiable = new Set(resolution.unverifiableLandedTaskRefs);\n\n // Not parsed through the route's query schema, whose 200 is the HTTP request's bound: in-process the listing pages.\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING }, session)));\n const attemptsTruncated = listed.some((page) => page.length >= BUILD_TASK_RECORD_HISTORY_CEILING);\n const attemptsByTask = new Map<string, ApplicationBuildTaskAttempt[]>();\n for (const projected of listed.flat().map(projectBuildTaskAttempt)) {\n if (projected === null) continue;\n const list = attemptsByTask.get(projected.taskRef) ?? [];\n list.push(projected.attempt);\n attemptsByTask.set(projected.taskRef, list);\n }\n for (const list of attemptsByTask.values()) list.sort((left, right) => right.startedAt.localeCompare(left.startedAt));\n\n // The landing pass's own reader (#3219), the working tree (#3204): the records explain exactly the reading that decided landing.\n const landingTree = resolution.landingTree;\n // The committed billing switch (#3285), read once and only when a task sells something: the landing advisories read it.\n const backendBillingConfigText = plan.tasks.some(buildTaskProducesBillingCatalogue)\n ? (await this.git.readCommittedText(BACKEND_BILLING_SWITCH_FILE)) ?? undefined\n : undefined;\n const records: ApplicationBuildTaskRecord[] = [];\n for (const task of plan.tasks) {\n const attempts = attemptsByTask.get(task.taskRef) ?? [];\n const landed = resolution.landed.has(task.taskRef);\n const status = landed ? WorkbenchBuildPlanTaskStatus.LANDED\n : ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY\n : WorkbenchBuildPlanTaskStatus.BLOCKED;\n const isGenerationStep = task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP;\n /*\n * A generation step is not classified like a coding task (its landing is a typed condition of its own), with one\n * exception the selection makes too: a step running now is IN_FLIGHT, so the page offers no second run of it\n * (#2531 review M2).\n */\n /* A running generation step's progress, read once: it is both the record's `progress` and the proof it is live. */\n const progress = isGenerationStep ? this.generationSteps.readGenerationStepProgress(task.taskRef) : undefined;\n const stuck = status !== WorkbenchBuildPlanTaskStatus.READY ? null\n : !isGenerationStep ? await this.classifyStuckBuildTask(task, resolution)\n : progress !== undefined ? { taskRef: task.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT }\n // #3223: a step whose landing check could not answer is not plainly ready — the selection passes it over unrun.\n : resolution.unanswerableGenerationStepTaskRefs.has(task.taskRef)\n ? { taskRef: task.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN, landingUnknownCause: describeHeldBySpecificationFault(task, resolution.modulesHoldingGenerationSteps) ?? describeHeldByUnknownDecisions(task.taskRef, resolution.buildTaskDecisions) ?? describeUnanswerableGenerationStepLanding(task) }\n // #3233: a step that ran, did not land, and whose inputs have not moved — the unattended loop passes it over.\n : await this.classifyRanGenerationStep(task, attemptsByTask);\n /*\n * A step the scheduler PASSES OVER because its landing check could not be answered reports that state before it\n * ever ran (#2531 review L6): without it the step read as plainly ready while every dispatch went past it.\n */\n const passedOverUnanswerable = isGenerationStep && resolution.unanswerableGenerationStepTaskRefs.has(task.taskRef);\n let unmetProbes: ApplicationBuildTaskUnmetProbe[] | undefined;\n let schemaPlanSyncState: SchemaPlanSyncState | undefined;\n let designTokenBlockState: DesignTokenBlockState | undefined;\n let brandDesignState: BrandDesignState | undefined;\n let landingBlockedBy: string | undefined;\n // The condition the landing pass already resolved; resolved again only for a step it did not see.\n const generationStepCondition = !landed && isGenerationStep\n ? resolution.generationStepConditions.get(task.taskRef) ?? await this.generationSteps.resolveGenerationStepLandedCondition(task)\n : undefined;\n // Named whether or not the step has run (#2504): a labels plan that hides owed units blocks it before its first attempt,\n // and so does a brand nobody could read (#2694).\n if (generationStepCondition?.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE\n || generationStepCondition?.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) landingBlockedBy = generationStepCondition.detail;\n if (!landed && (attempts.some(isCountedBuildTaskAttempt) || passedOverUnanswerable)) {\n if (isGenerationStep && generationStepCondition !== undefined) {\n const condition = generationStepCondition;\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC) {\n schemaPlanSyncState = await this.generationSteps.readSchemaPlanSyncState();\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT) {\n /*\n * Either half can be what is missing, and they have different remedies: an absent stylesheet\n * is the step's output missing (run it), a stale or unanswerable block is a regeneration or\n * configuration question. Both are reported, never a bare \"not landed\".\n */\n const blockState = await this.generationSteps.readDesignTokenBlockState();\n if (blockState !== DesignTokenBlockState.CURRENT) designTokenBlockState = blockState;\n unmetProbes = [];\n const probe: BuildPlanTaskLandedProbe = { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE, path: condition.stylesheetPath };\n if (!(await this.isLandedProbeSatisfied(probe, landingTree))) {\n unmetProbes.push({ probe });\n }\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT) {\n // The same two halves as the stylesheet: write it, or regenerate it (a stale module) / repair the\n // brand specification (an unanswerable one).\n const designState = await this.generationSteps.readBrandDesignState();\n if (designState !== BrandDesignState.CURRENT) brandDesignState = designState;\n unmetProbes = [];\n // Each generated module: the frontend's, and the website's when one is declared (#2597).\n for (const modulePath of condition.modulePaths) {\n const probe: BuildPlanTaskLandedProbe = { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE, path: modulePath };\n if (!(await this.isLandedProbeSatisfied(probe, landingTree))) {\n unmetProbes.push({ probe });\n }\n }\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.NOT_OWED) {\n // Unreachable while NOT_OWED always lands, and stated rather than read as \"no unmet probe\".\n unmetProbes = [];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.ACCEPTED_BRAND_MARK) {\n // What is missing is a MASTER asset in the module, not the module (the scaffold commits it): say that (#2410).\n unmetProbes = [{\n probe: {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: condition.modulePath,\n declarations: [`BrandAssetPurpose.${BrandAssetPurpose.MASTER}`],\n site: { relation: ProductDeclarationRelation.SET },\n },\n }];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) {\n unmetProbes = [{\n probe: {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: condition.configPath,\n declarations: [`displayName: ${JSON.stringify(condition.displayName)}`],\n site: { relation: ProductDeclarationRelation.SET },\n },\n }];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE\n || condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) {\n // Nothing a file can satisfy: the plan itself is partial (#2504), or the brand could not be read (#2694). Its\n // cause rides on the record.\n unmetProbes = [];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES) {\n unmetProbes = [];\n for (const probe of condition.probes) {\n if (await this.isLandedProbeSatisfied(probe, landingTree)) continue;\n unmetProbes.push({ probe });\n }\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) {\n // One unmet probe per capability the configuration landing read does not enable (#2497).\n unmetProbes = (await this.capabilitiesNotEnabledIn(condition, landingTree)).map((capability) => ({\n probe: {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: condition.configPath,\n // The condition is ENABLED, not declared: the scaffold declares most capabilities as `enabled: false`.\n declarations: [`[EngineCapability.${capability}]: { enabled: true }`],\n site: { relation: ProductDeclarationRelation.SET },\n },\n }));\n } else {\n unmetProbes = [];\n for (const path of condition.paths) {\n const probe: BuildPlanTaskLandedProbe = { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE, path };\n if (await this.isLandedProbeSatisfied(probe, landingTree)) continue;\n unmetProbes.push({ probe });\n }\n }\n } else {\n unmetProbes = [];\n for (const probe of resolveBuildTaskLandedProbes(task)) {\n if (await this.isLandedProbeSatisfied(probe, landingTree)) continue;\n unmetProbes.push({\n probe,\n ...(isShellProbe(probe) ? { shell: await this.explainShellProbe(probe, landingTree) } : {}),\n ...(isAgentWorkProbe(probe) ? { registered: await this.explainAgentWorkProbe(probe, landingTree) } : {}),\n });\n }\n }\n }\n const waitingOn = status === WorkbenchBuildPlanTaskStatus.BLOCKED\n ? task.prerequisiteTaskRefs.filter((prerequisite) => !resolution.landed.has(prerequisite)) : undefined;\n // A refused dispatch started nothing, so it does not make the landing the task's own (#1581). Never asserted\n // on a TRUNCATED listing: an early task's runs may be the ones the page cap dropped, and \"never run\" would be\n // false — and an invitation to pay for a re-run (#2217 review).\n const landedBeforeAnyRun = landed && !attemptsTruncated && !attempts.some(isCountedBuildTaskAttempt)\n ? { probedPaths: await this.resolveLandedEvidencePaths(task) } : undefined;\n // A follow-up's FIRST prerequisite is its origin; the others are the follow-up before it on its target (#3227) and\n // host-derived steps appended later.\n const followUpTaskRefs = plan.tasks\n .filter((candidate) => candidate.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX) && candidate.prerequisiteTaskRefs[0] === task.taskRef)\n .map((candidate) => candidate.taskRef);\n // A declined closure accounts for the task without its product, so nothing it declined is owed to be served.\n const landingAdvisories = landed && resolution.closedTaskRefs.get(task.taskRef)?.kind !== BuildTaskClosureKind.DECLINED\n ? resolveBuildTaskLandingAdvisories(task, { backendBillingConfigText }) : [];\n records.push({\n taskRef: task.taskRef,\n targetKind: String(task.target?.kind ?? ''),\n status,\n ...(followUpTaskRefs.length > 0 ? { followUpTaskRefs } : {}),\n ...(task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX) && task.prerequisiteTaskRefs[0] !== undefined ? { followUpOf: task.prerequisiteTaskRefs[0] } : {}),\n ...(closureOf(resolution.closedTaskRefs.get(task.taskRef))),\n attempts,\n ...(stuck !== null ? { stuck } : {}),\n ...(unmetProbes !== undefined ? { unmetProbes } : {}),\n ...(schemaPlanSyncState !== undefined ? { schemaPlanSyncState } : {}),\n ...(designTokenBlockState !== undefined ? { designTokenBlockState } : {}),\n ...(brandDesignState !== undefined ? { brandDesignState } : {}),\n ...(landingBlockedBy !== undefined ? { landingBlockedBy } : {}),\n ...(waitingOn !== undefined ? { waitingOn } : {}),\n ...(landed && unverifiable.has(task.taskRef) ? { unverifiable: true } : {}),\n ...(landedBeforeAnyRun !== undefined ? { landedBeforeAnyRun } : {}),\n ...(landingAdvisories.length > 0 ? { landingAdvisories } : {}),\n ...(progress !== undefined ? { progress } : {}),\n });\n }\n\n const stuckByReason = Object.fromEntries(\n Object.values(Workbench_BuildTaskStuckReason).map((reason) => [reason, records.filter((record) => record.stuck?.reason === reason).length]),\n ) as Record<Workbench_BuildTaskStuckReason, number>;\n const notLanded = records.filter((record) => record.status !== WorkbenchBuildPlanTaskStatus.LANDED);\n // A dispatch refused before it started is shown in its task's history and counted by no figure below (#1581).\n const started = (record: ApplicationBuildTaskRecord) => record.attempts.filter(isCountedBuildTaskAttempt);\n const unavailableRuntimes = await readUnavailableApplicationRuntimes(this.companionContext.saasRoot);\n /*\n * The candidates for a break, from every attempt the records hold (#2405 review F3), not only one wave's: a run that\n * settled at the end of one wave breaks the start the NEXT wave meets.\n */\n const bootFailures: ApplicationBuildRecordsBootFailure[] = (await this.readCurrentBootFailures()).map((failure) => ({\n ...failure,\n // No task is a candidate for a dev-stack cause (a held port, an orphan or stale backend, unreachable infrastructure) (#3214).\n candidateTaskRefs: failure.lastStartedAt === null || !isApplicationStartupFailure(failure) ? [] : records\n .filter((record) => record.attempts.some((attempt) => attempt.status === FlowsActors_Status.COMPLETED\n // No upper bound (#2405 re-review R1): the watcher restarts the backend on working-tree writes, so the start\n // usually fails while the breaking run is still running its checks, and that run settles AFTER the failure.\n && attempt.settledAt !== undefined && attempt.settledAt > failure.lastStartedAt!))\n .map((record) => record.taskRef),\n }));\n return {\n tasks: records,\n summary: {\n taskCount: records.length,\n // A step that only ran is not counted (#3258), as `resolveBuildExecutionProgress` does not count it.\n landed: records.length - notLanded.length - (readBuildPlanSpecificationFault(plan.tasks, resolution)?.ranNotProvenTaskRefs.length ?? 0),\n landedBeforeAnyRun: records.filter((record) => record.landedBeforeAnyRun !== undefined).length,\n blocked: records.filter((record) => record.status === WorkbenchBuildPlanTaskStatus.BLOCKED).length,\n // A step whose landing is UNKNOWN is not counted as ready to run (#3223): nothing will run it until its check answers.\n // Nor a follow-up waiting for the person's review (#3227): nothing runs it until they approve it.\n readyNeverAttempted: records.filter((record) => record.status === WorkbenchBuildPlanTaskStatus.READY && started(record).length === 0\n && record.stuck?.reason !== Workbench_BuildTaskStuckReason.LANDING_UNKNOWN\n && record.stuck?.reason !== Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW).length,\n readyToRetry: records.filter((record) => record.status === WorkbenchBuildPlanTaskStatus.READY && started(record).length > 0 && !record.stuck).length,\n stuckByReason,\n attempts: records.reduce((total, record) => total + started(record).length, 0),\n completedAttemptsWithoutLanding: notLanded.reduce(\n (total, record) => total + record.attempts.filter((attempt) => attempt.status === FlowsActors_Status.COMPLETED).length, 0),\n repeatedlyAttemptedWithoutLanding: notLanded.filter((record) => started(record).length > 1).map((record) => record.taskRef),\n spend: deriveBuildSpend(records),\n parallelism: {\n degree: readBuildParallelism(this.companionContext.saasRoot),\n overlappingAttempts: records.reduce((total, record) => total + record.attempts.filter((attempt) => attempt.concurrency !== undefined).length, 0),\n interferenceSuspectedAttempts: records.reduce((total, record) => total + record.attempts.filter((attempt) => attempt.interferenceSuspected === true).length, 0),\n interferedCompletedAttempts: records.reduce((total, record) => total + record.attempts.filter((attempt) => attempt.interference !== undefined).length, 0),\n contendedPaths: [...new Set(records.flatMap((record) => record.attempts.flatMap((attempt) => attempt.concurrency?.contendedPaths ?? [])))].sort(),\n },\n },\n attemptsTruncated,\n ...(unavailableRuntimes === undefined ? {} : { unavailableRuntimes }),\n ...(bootFailures.length > 0 ? { bootFailures } : {}),\n ...(resolution.buildTaskDecisions.standing !== BuildTaskDecisionsStanding.HONOURED || (resolution.buildTaskDecisions.conditions?.length ?? 0) > 0\n ? { buildTaskDecisions: {\n standing: resolution.buildTaskDecisions.standing,\n ...(resolution.buildTaskDecisions.reason !== undefined ? { reason: resolution.buildTaskDecisions.reason } : {}),\n ...(resolution.buildTaskDecisions.conditions !== undefined ? { conditions: resolution.buildTaskDecisions.conditions } : {}),\n } }\n : {}),\n repairsOwed: deriveRepairsOwed(attemptsByTask),\n };\n }\n\n /**\n * Every build-plan task in the DISPATCH view — the creation board's `workbenchBuildPlanTasks`\n * rows.\n *\n * `status` is computed per read, never stored: `landed` = the task's evidence paths are all\n * committed (the same resolution the dispatcher itself selects by), `ready` = every prerequisite\n * landed and it has not, `blocked` = otherwise. Exactly one holds.\n *\n * An application with NO authored build plan answers ZERO TASKS rather than throwing: the plan\n * file legitimately does not exist until build-decompose runs, so \"nothing there yet\" is the\n * true answer. Absence is tested DIRECTLY (the exports carry no `buildPlanSpecification`) rather\n * than by catching `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that\n * SAME class for a plan that exists and fails schema or semantic validation — and flattening an\n * invalid plan into an empty board would be \"could not look\" wearing \"nothing there\".\n */\n public async describeBuildPlanBoard(): Promise<readonly {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n readonly functionalTopic: string;\n readonly status: WorkbenchBuildPlanTaskStatus;\n readonly prerequisiteTaskRefs: readonly string[];\n }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n\n const plan = await this.readBuildPlan();\n const { landed } = await this.resolveLandedTaskRefs(plan.tasks);\n const ready = new Set(selectReadyBuildPlanTasks(plan, landed).map((task) => task.taskRef));\n return plan.tasks.map((task) => ({\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: String(task.target?.kind ?? ''),\n functionalTopic: String(task.functionalTopic),\n status: landed.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.LANDED\n : ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY\n : WorkbenchBuildPlanTaskStatus.BLOCKED,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n }));\n }\n\n /**\n * What ONE landing resolution found — returned rather than parked on the instance.\n *\n * These two were fields (`lastUnverifiableLandedTaskRefs`, `lastUnanswerableSchemaPlanTaskRefs`),\n * written as the probe's last statement and read by its caller one microtask later. The service is\n * a singleton in a process serving concurrent requests and the probe is spawn-heavy, so two\n * in-flight resolutions interleave at every await and the caller could read the OTHER pass's\n * answer — a requirement dropping from VERIFIED to BUILT because a workbench poll landed between\n * two lines. Returning them makes each caller's answer its own by construction (#1496's review).\n */\n private async resolveLandedTaskRefs(tasks: readonly BuildPlanTask[]): Promise<LandedTaskResolution> {\n const startedAt = Date.now();\n const { resolution, key, derivedHere, keyReadMs, waitedMs } = await this.resolveLandingUnderGate(tasks);\n /*\n * Where a slow reading went (#3204): the key (git and the build signatures), a wait on a derivation another reader was\n * running, or the resolution, which is either this reader's own derivation or a held answer. The derivation logs its own\n * cost. Measured 41-47 s per slot on reference run 42506906346 against derivations logged at 1-8 s, with nothing saying\n * where the rest went.\n */\n const totalMs = Date.now() - startedAt;\n if (totalMs >= LANDING_RESOLUTION_LOG_THRESHOLD_MS) {\n this.logger.info('Build plan landing resolved', {\n taskCount: tasks.length,\n totalMs,\n keyReadMs,\n // Spent waiting on, or joined to, a derivation another reader was running (one runs at a time).\n waitedMs,\n resolveMs: totalMs - keyReadMs - waitedMs,\n // false: this reader joined a derivation another reader started, or took a held answer.\n derivedHere,\n // Whether the state could be keyed at all; with no key every reader derives and nothing is held.\n keyed: key !== undefined,\n });\n }\n return resolution;\n }\n\n /**\n * The plan's landing, with ONE derivation running at a time (#3204). Every reader of the landing comes through here: the\n * dispatch's selection and the playbook's artifact-state phase alike.\n *\n * **Why.** The key moves with every file a coding run writes, so readers arriving moments apart (a wave's refill, the\n * artifact-state phase, a board, a console poll) each held a different key and each started a derivation of its own. On\n * reference run 42575514613 three ran at once and took 70, 90 and 120 s, every one of them evaluating the whole application\n * in the introspection workers beside ten coding agents' checks, where one alone took 6-27 s.\n *\n * **How.** A derivation of the same plan that STARTED AFTER this reader arrived is joined: it reads the tree no earlier than\n * this reader would, so a commit made before the call is in its answer, which is the freshness a reading owes (#3219). One\n * that started BEFORE is waited for, then the reader asks again, and either joins the next one or reads its key and\n * resolves through the projection cache (a held answer at an unchanged key, else its own derivation). So a reader waits\n * at most once before it joins or derives, when it reads the same plan as the derivations running; a reader of another plan\n * (a re-decompose landing mid-wave) waits at most {@link LANDING_GATE_MAXIMUM_WAITS} times. Each wait is bounded\n * ({@link LANDING_DERIVATION_WAIT_CEILING_MS}): a derivation that does not settle stops gating and is evicted from the\n * projection, so the reader derives beside it, at its key or another, as every reader did before the gate.\n *\n * Joining is by the running derivation's promise, never through the cache's one slot, which a `clear()` or a newer reading\n * may have emptied: going through it at the same key would start a second derivation beside the first (review of 7e5abde26).\n */\n private async resolveLandingUnderGate(tasks: readonly BuildPlanTask[]): Promise<{\n readonly resolution: LandedTaskResolution;\n readonly key: string | undefined;\n readonly derivedHere: boolean;\n readonly keyReadMs: number;\n readonly waitedMs: number;\n }> {\n const planIdentity = JSON.stringify(tasks);\n const arrivedAfter = this.landingDerivationsStarted;\n let keyReadMs = 0;\n let waitedMs = 0;\n let gateLifted = false;\n let waits = 0;\n for (;;) {\n const running = this.runningLandingDerivation();\n if (!gateLifted && running !== undefined) {\n const waitStartedAt = Date.now();\n if (running.ordinal > arrivedAfter && running.planIdentity === planIdentity) {\n const resolution = await running.resolution;\n waitedMs += Date.now() - waitStartedAt;\n return { resolution, key: running.key, derivedHere: false, keyReadMs, waitedMs };\n }\n const settled = await settlesWithin(running.resolution, LANDING_DERIVATION_WAIT_CEILING_MS);\n waitedMs += Date.now() - waitStartedAt;\n waits += 1;\n if (!settled && this.runningLandingDerivation() === running) {\n gateLifted = true;\n // Out of the projection too: at an unchanged key the cache would hand this reader the same pending promise.\n this.landingProjection.evict(running.resolution);\n this.logger.warn('A build plan landing derivation has run past the wait ceiling; the next reader derives beside it', {\n ceilingMs: LANDING_DERIVATION_WAIT_CEILING_MS, taskCount: tasks.length,\n });\n } else if (waits >= LANDING_GATE_MAXIMUM_WAITS) {\n // Only a reader of another plan than the running derivations' gets here (a re-decompose landing mid-wave).\n gateLifted = true;\n }\n continue;\n }\n const keyStartedAt = Date.now();\n const { key, sequence } = await this.readLandingSourceKey(tasks);\n keyReadMs += Date.now() - keyStartedAt;\n // A derivation another reader started while this one read its key started after this reader arrived: join it (same\n // plan) or wait for it (another plan), rather than run beside it.\n if (!gateLifted && this.runningLandingDerivation() !== undefined) continue;\n // Counted around the CALL, which starts a derivation synchronously or returns the held one.\n const derivationsBefore = this.landingProjection.derivations;\n const pendingResolution = this.landingProjection.resolve(key, () => this.computeLandedTaskRefsLogged(tasks), sequence);\n const derivedHere = this.landingProjection.derivations > derivationsBefore;\n if (derivedHere) {\n const registered = { key, planIdentity, ordinal: ++this.landingDerivationsStarted, resolution: pendingResolution };\n this.landingDerivationInFlight = registered;\n const release = (): void => {\n if (this.landingDerivationInFlight === registered) this.landingDerivationInFlight = undefined;\n };\n pendingResolution.then(release, release);\n }\n return { resolution: await pendingResolution, key, derivedHere, keyReadMs, waitedMs };\n }\n }\n\n private runningLandingDerivation(): RunningLandingDerivation | undefined {\n return this.landingDerivationInFlight;\n }\n\n /**\n * {@link computeLandedTaskRefs}, logging what each DERIVATION cost (#3206): one line per derivation, never per held\n * read, so the companion log answers \"how often was landing derived, and how long did it take\" for a wave — the\n * measurement the issue's acceptance is stated in.\n */\n private async computeLandedTaskRefsLogged(tasks: readonly BuildPlanTask[]): Promise<LandedTaskResolution> {\n const startedAt = Date.now();\n const resolution = await this.computeLandedTaskRefs(tasks);\n const durationMs = Date.now() - startedAt;\n const context = {\n taskCount: tasks.length,\n landedCount: resolution.landed.size,\n durationMs,\n provisional: resolution.provisional,\n derivations: this.landingProjection.derivations,\n };\n // Visible without a debug type when it cost something (#3452): deciding what landed took a median 17 s per slot on\n // the reference runs, and nothing reported it.\n if (durationMs >= LANDING_RESOLUTION_LOG_THRESHOLD_MS) this.logger.info('Build plan landing derived', context);\n else this.logDebug('Build plan landing derived', context);\n return resolution;\n }\n\n /**\n * The landing key for this plan at this instant (see `composeLandingSourceKey`), or `undefined` when git could\n * not be read. A read already in progress is joined: the callers of one burst (a wave's selection, a board\n * publication, twenty console polls) arrive within the same moment, and each used to spawn git of its own.\n */\n private readLandingSourceKey(tasks: readonly BuildPlanTask[]): Promise<{ readonly key: string | undefined; readonly sequence: number }> {\n const runStateGeneration = this.landingRunStateGeneration;\n const planIdentity = JSON.stringify(tasks);\n const pending = this.landingKeyRead;\n // Joined only for the same question: the same plan, and no run-state event since the read began.\n if (pending !== undefined && pending.planIdentity === planIdentity && pending.runStateGeneration === runStateGeneration) {\n return pending.key.then((key) => ({ key, sequence: pending.sequence }));\n }\n // The order reads STARTED in: an older reading finishing late must not replace a newer state's slot (F7).\n const sequence = ++this.landingKeyReadSequence;\n const key = this.composeLandingKey(planIdentity, runStateGeneration).finally(() => {\n if (this.landingKeyRead?.key === key) this.landingKeyRead = undefined;\n });\n this.landingKeyRead = { planIdentity, runStateGeneration, key, sequence };\n return key.then((value) => ({ key: value, sequence }));\n }\n\n private async composeLandingKey(planIdentity: string, runStateGeneration: number): Promise<string | undefined> {\n // Feature-detected: a test double of the git service may predate the method, and then nothing is ever held.\n if (typeof this.git.readLandingSourceState !== 'function') return undefined;\n const git = await this.git.readLandingSourceState();\n const saasRoot = this.companionContext.saasRoot;\n /*\n * The build outputs the witnesses read (see the projection's notes), signed exactly as the creation-plane board\n * signs them: each application package's evaluated companion tree, and the schema-plan inputs. Each is walked only\n * when the change feed cannot vouch that no event touched it since its last walk (#3452); a walk is synchronous and\n * about 60-110 ms warm on Wonder Todos, and it used to run on every landing read.\n */\n let buildSignatures: readonly string[];\n try {\n buildSignatures = [\n ...resolveIntrospectedApplicationPackageRoots(this.companionContext)\n .map((packageRoot) => `package:${packageRoot}=${signEvaluatedCompanionTree(packageRoot) ?? 'unreadable'}`),\n `schema-plan:${signSchemaPlanInputs(saasRoot) ?? 'unreadable'}`,\n ];\n } catch (error) {\n // A context this cannot walk authorizes no hit: every reader then derives, as before the projection existed.\n this.logDebug('The landing key could not sign the build outputs; landing is derived without the cache', { error: describeCaughtError(error) });\n return undefined;\n }\n return composeLandingSourceKey({ git, saasRoot, planIdentity, buildSignatures, runStateGeneration });\n }\n\n /**\n * Which of a run's recorded writes git already holds as committed, so nothing of them waits on a commit (#3219): a\n * written path is tracked with HEAD, index and working tree in agreement (landing's own question), and a DELETED path\n * is no longer tracked and no longer on disk. Batched: one `ls-files` + `status` pair, plus one `ls-files` for the\n * deletions. Exposed so \"finished, waiting to be committed\" reads the source landing reads, rather than the stamp the\n * committing doors leave on a run's record.\n *\n * A rename is recorded at its NEW path only, so the origin's removal is not asked; the new path being committed is\n * what the rename's commit carries.\n */\n public async selectSettledRunWrites(files: readonly { readonly path: string; readonly changeKind: string }[]): Promise<ReadonlySet<string>> {\n const deleted = files.filter((file) => file.changeKind === ChangeSetFileChangeKind.DELETED).map((file) => file.path);\n const written = files.filter((file) => file.changeKind !== ChangeSetFileChangeKind.DELETED).map((file) => file.path);\n const [committed, tracked] = await Promise.all([this.git.selectCommittedPaths(written), this.git.selectTrackedPaths(deleted)]);\n const settledDeletions = deleted.filter((path) => !tracked.has(path) && !existsSync(join(this.companionContext.saasRoot, path)));\n // Keyed by path AND kind: one run's deletion of a path another run rewrote is not settled by the rewrite's commit.\n return new Set([\n ...[...committed].map((path) => settledRunWriteKey({ path, changeKind: ChangeSetFileChangeKind.MODIFIED })),\n ...settledDeletions.map((path) => settledRunWriteKey({ path, changeKind: ChangeSetFileChangeKind.DELETED })),\n ]);\n }\n\n /**\n * The derivation behind {@link resolveLandedTaskRefs}: never called except through the projection, so one source\n * state is resolved once however many readers ask.\n */\n private async computeLandedTaskRefs(tasks: readonly BuildPlanTask[]): Promise<LandedTaskResolution> {\n const tracked = trackWitnessAnswers(this.createIntrospectionWitnesses());\n const witnesses = tracked.witnesses;\n // A committed-tree read that FAILED answers \"not committed\"; held, that would be an unknown kept as a fact (F4, #3206 review).\n const readFailuresBefore = this.git.committedReadFailureCount?.() ?? 0;\n /*\n * Three inputs read once for the pass, and read AT ONCE (#3204): none reads another, and two ask workers whose answers\n * the tree's churn invalidates (the specifications evaluation took 18 s on reference run 42523477847, a label plan\n * 17 s). Awaited one after another they made a derivation 36-65 s, once per settled run.\n *\n * - Which tasks' latest run failed verification (#3220): such a task does not land on files that reached HEAD anyway.\n * - The specification findings (#3210, #3211): a task whose own specification its factory refuses has not landed,\n * however committed it is.\n * - Each generation step's landed condition, resolved into a map the loop then reads (see below).\n */\n const generationStepTasks = tasks.filter((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP);\n const [runStanding, specificationFindings, generationStepConditionEntries] = await Promise.all([\n this.readLandingRunStanding(),\n this.readSpecificationFindingsForLanding(),\n Promise.all(generationStepTasks.map(async (task) => [task.taskRef, await this.generationSteps.resolveGenerationStepLandedCondition(task)] as const)),\n ]);\n const refusedSpecificationFaults = this.refusedSpecificationsByTask(tasks, specificationFindings);\n const landed = new Set<string>();\n const unverifiable = new Set<string>();\n const unanswerable = new Set<string>();\n /*\n * The WORKING tree (#3204): a task lands when its product is there and its checks pass, not when it is committed.\n * The agents read the working tree, so a dependent can build on a product the moment it is written; the commit is a\n * checkpoint that records, decided by Paul 2026-11-09. A person's decisions file alone is still read from HEAD (below).\n */\n const landingTree = this.createLandingTreeReader(witnesses);\n // HEAD, for the person's decisions file and for a task no run of its own has checked (`readLandingRunStanding`).\n const committedTree = this.createCommittedTreeReader(witnesses);\n /*\n * Ask git ONCE for the whole plan's probe paths, before the per-task loop asks for them one at a\n * time. Each `isCommitted` costs an `ls-files` + `status` PAIR of subprocesses, and a plan's\n * probes run to hundreds of distinct paths — so this loop was the companion's dominant cost and,\n * because a spawn storm starves the event loop, the reason `/health/ready` stopped answering\n * inside the ten seconds the workbench allows it (see `selectCommittedPaths`, which records the\n * measurement and the repo-root-prefix trap it contains).\n *\n * EVERY probe's paths, the DECLARES kinds included (#3219), although only `COMMITTED_FILE` asks\n * `isCommitted` while LANDING is decided. The answer is not discarded: when a task is found NOT\n * landed, its build record explains it from this same reader, and a path absent from this batch was\n * answered by live git at that later moment. On `app-creation-test-007` that later reading had moved\n * on — a commit landed during a minutes-long pass — and schema tasks were explained by a tree the\n * pass had not judged. Inside the batch the extra paths cost no spawn; it is the one reading of the\n * tree this pass stands on, so a path it explains must be in it.\n *\n * Generation-step conditions ARE gathered, by resolving them once into a map the loop then reads.\n * \"They are few, and they still resolve per path\" was true of the TASKS and wrong about the\n * PATHS: the i18n steps' evidence is `planner units x their locales`, so three generation-step\n * tasks expanded to seventeen `status --porcelain` spawns per resolution — measured at the spawn\n * site 2026-09-22, where they were the largest source left after the probe paths were batched.\n * Resolving the condition here rather than inside the loop is what lets them join the same batch\n * without asking for each condition twice.\n */\n const generationStepConditions = new Map<string, ApplicationBuildGenerationStepLandedCondition>(generationStepConditionEntries);\n await landingTree.primeCommitted([\n ...tasks.flatMap((task) => resolveBuildTaskLandedProbes(task).flatMap(landedProbePaths)),\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS ? condition.paths\n : condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT ? [condition.stylesheetPath]\n : condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT ? condition.modulePaths\n : []\n )),\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES ? condition.probes.flatMap(landedProbePaths) : []\n )),\n ]);\n /*\n * And ONE `cat-file --batch` for every path whose committed TEXT a DECLARES probe will read,\n * rather than a `git show` each. Measured at the spawn site 2026-09-22, these were 20 of 45\n * spawns in a ten-second window — four distinct paths, re-read once per resolution.\n *\n * `ANY_COMMITTED_FILE_DECLARES` short-circuits, so this reads candidates the lazy route might\n * have skipped. That is deliberate and it is not a cost: the whole set rides one subprocess, and\n * the bytes are the same bytes. What it buys is that the count no longer depends on which\n * candidate happened to satisfy the probe first.\n */\n await landingTree.primeTexts([\n ...tasks.flatMap((task) => resolveBuildTaskLandedProbes(task)\n .filter((probe) => probe.kind !== BuildPlanTaskLandedProbeKind.COMMITTED_FILE)\n .flatMap(landedProbePaths)),\n // The engine-capabilities step reads the committed configuration's text (#2497): one batch, not its own spawn.\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES\n ? condition.probes.filter((probe) => probe.kind !== BuildPlanTaskLandedProbeKind.COMMITTED_FILE).flatMap(landedProbePaths)\n : []\n )),\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED\n || condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED ? [condition.configPath] : []\n )),\n ]);\n /*\n * The COMMITTED reading a task no run of its own has checked must also satisfy (#3204 review F2): one batch for all of\n * them, never a git pair per path (the #1005 storm, at the start of a build when no task has run).\n */\n const uncheckedTasks = tasks.filter((task) => task.target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && (runStanding === undefined || !runStanding.ranTaskRefs.has(task.taskRef)));\n const uncheckedProbes = uncheckedTasks.flatMap((task) => resolveBuildTaskLandedProbes(task));\n await committedTree.primeCommitted(uncheckedProbes.flatMap(landedProbePaths));\n await committedTree.primeTexts(uncheckedProbes.filter((probe) => probe.kind !== BuildPlanTaskLandedProbeKind.COMMITTED_FILE).flatMap(landedProbePaths));\n for (const task of tasks) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A generation step declares HOW it proves it landed, because not every step proves it with\n * files. Most name the exact unit files their pipelines write (see that service's JSDoc for\n * why a directory prefix would be dishonest). The migration step cannot — its artifact is\n * `backend-api/migrations/<timestamp>_<name>/migration.sql` and the timestamp is minted\n * during the run — so it lands on the STATE it exists to reach instead.\n *\n * Read the condition, never the evidence paths: for the migration step those name the\n * accepted lockfile, which predates the step, so landing on it would pass having verified\n * nothing.\n */\n // Resolved ONCE above, so its paths could join the batch; reading it again here would ask the\n // generation-step service the same question twice per resolution.\n const condition = generationStepConditions.get(task.taskRef)\n ?? await this.generationSteps.resolveGenerationStepLandedCondition(task);\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC) {\n const syncState = await this.generationSteps.readSchemaPlanSyncState();\n if (syncState === SchemaPlanSyncState.IN_SYNC) landed.add(task.taskRef);\n else if (syncState === SchemaPlanSyncState.UNANSWERABLE) unanswerable.add(task.taskRef);\n continue;\n }\n // The application owes this step nothing (a translation step on a one-locale app): landed, or it\n // would sit at the head of the queue forever on an evidence list that is empty by construction.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.NOT_OWED) {\n landed.add(task.taskRef);\n continue;\n }\n /*\n * The `design-tokens` step: the stylesheet is committed AND its block is current. The block check\n * is asked even when the stylesheet is uncommitted, because an UNANSWERABLE answer (a config that\n * does not load, a CLI that is absent) is what tells the selector to pass the step over rather than\n * run a `generate` that would fail the same way.\n */\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT) {\n const blockState = await this.generationSteps.readDesignTokenBlockState();\n if (blockState === DesignTokenBlockState.UNANSWERABLE) unanswerable.add(task.taskRef);\n else if (blockState === DesignTokenBlockState.CURRENT && await landingTree.isCommitted(condition.stylesheetPath)) landed.add(task.taskRef);\n continue;\n }\n /*\n * The `design-system-brand` step: every module it writes (the frontend's brand design, and the website's colours\n * when a website is declared) is committed AND says what the brand's visual tone renders. Asked even when a\n * module is uncommitted, for the design-tokens reason: an UNANSWERABLE answer (a brand\n * specification that does not evaluate) is what tells the selector to pass the step over.\n */\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT) {\n const designState = await this.generationSteps.readBrandDesignState();\n if (designState === BrandDesignState.UNANSWERABLE) unanswerable.add(task.taskRef);\n else if (designState === BrandDesignState.CURRENT && (await Promise.all(condition.modulePaths.map((modulePath) => landingTree.isCommitted(modulePath)))).every(Boolean)) {\n landed.add(task.taskRef);\n }\n continue;\n }\n // The logo step: landed on a committed MASTER asset the committed module lists, never on the module's\n // presence — the scaffold commits the module empty (#2410).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ACCEPTED_BRAND_MARK) {\n if (await this.readsAcceptedBrandMark(condition.modulePath, landingTree)) landed.add(task.taskRef);\n continue;\n }\n // A labels plan that hides owed units never lands (#2504).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE) continue;\n // The display-name step on a brand nobody could read (#2694): not landed, and passed over as unanswerable, like\n // the design steps, so the scheduler does not run a step that would fail the same way.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) {\n unanswerable.add(task.taskRef);\n continue;\n }\n // The labels step (#2504): every unit file committed and every frontend root id declared.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES) {\n const satisfied = await Promise.all(condition.probes.map((probe) => this.isLandedProbeSatisfied(probe, landingTree)));\n if (satisfied.every(Boolean)) landed.add(task.taskRef);\n continue;\n }\n // The display-name step: landed when the committed configuration carries the brand's name (#2505).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) {\n if (await this.displayNameApplied(condition, landingTree)) landed.add(task.taskRef);\n continue;\n }\n // The engine-capabilities step: landed when the committed configuration enables every capability it owes (#2497).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) {\n if ((await this.capabilitiesNotEnabledIn(condition, landingTree)).length === 0) landed.add(task.taskRef);\n continue;\n }\n if (condition.paths.length === 0) continue;\n const committedPaths = await Promise.all(condition.paths.map((path) => landingTree.isCommitted(path)));\n if (committedPaths.every(Boolean)) landed.add(task.taskRef);\n continue;\n }\n const probes = resolveBuildTaskLandedProbes(task);\n if (probes.length === 0) {\n /*\n * A task that declares NO product cannot prove it landed — and that is a WORKFLOW gap, not a\n * gate. `application-creation-directive.md` asks the deciding question directly: if this\n * refuses, what does the operator do next? The answer here is \"declare what the task\n * produces\", which is authoring work — so it must MARK and let the loop continue, exactly as\n * an unapproved release travels with its advisory instead of stopping the build.\n *\n * It was a gate until 2026-09-12, and the cost is measured. Readiness is \"not landed\", so an\n * unprovable task is ready FOREVER and is permanently `ready[0]`: `dispatch-next` re-ran\n * `build-task-contact-schema` three times at roughly $7.50 a turn, and the loop guard below\n * then converted that into a permanent refusal at the same task. Both are stuck; neither is\n * honest about WHY. Against Wonder CRM's 42-task plan the two candidate fixes measure\n * 1 reachable (skip it, leave its dependents blocked) against 42 (run it once, mark it,\n * advance) — because every product-declaring task there sits behind one that declares none.\n *\n * So landing here means RAN, not PROVEN, and the difference is carried rather than hidden:\n * the ref goes into `unverifiableLandedTaskRefs`, which rides the dispatch plan to every\n * caller. Keyed on a COMPLETED durable run, never on the task's mere existence — a task\n * nobody has run has not landed by any reading, and admitting it would let the whole plan\n * report itself finished having done nothing.\n */\n /*\n * A FOLLOW-UP (#2496) lands here too, even when its own run still reports a gap: it declares no product, so it\n * lands RAN-not-PROVEN, and the gap stays on its run's record, where the build record shows it under \"reported a\n * requirement still unmet\". Holding it unlanded was tried (review F7) and is the defect\n * `application-creation-directive.md` names: the only remedy was a person's decision, and meanwhile the whole\n * plan read as stuck. To have the gap worked again, a person runs the follow-up once more, saying why:\n * `wildo build run <ref> --despite-landed --reason operator-judgement --note \"<why>\"`.\n */\n const priorRun = await this.dispatch.findCompletedRunForBuildTask(task.taskRef);\n if (priorRun !== null) {\n landed.add(task.taskRef);\n unverifiable.add(task.taskRef);\n }\n continue;\n }\n const answered = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, landingTree)));\n if (!answered.every(Boolean) || runStanding?.heldBack.has(task.taskRef) || refusedSpecificationFaults.has(task.taskRef)) continue;\n // A task no run of its own checked lands only once its product is committed too (see `readLandingRunStanding`).\n if (runStanding === undefined || !runStanding.ranTaskRefs.has(task.taskRef)) {\n const committed = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, committedTree)));\n if (!committed.every(Boolean)) continue;\n }\n landed.add(task.taskRef);\n }\n /*\n * A failing specifications module (#3258): a read of the package may be short whatever it answered, so a check that reads\n * it cannot answer, and a short brand reads as stale. A step whose check could not answer lands RAN-not-PROVEN if it has\n * a completed run, the mark a task with no product carries: leaving it out would stop every task behind it, the coding\n * task that repairs the module among them. A check that answered \"no\" (paths not committed, no accepted logo) stays not\n * landed, and one that never ran is passed over, never run. The pass is provisional for as long as the fault lasts, so\n * the first clean pass proves a marked step or takes it back.\n *\n * Not undone by that: a task prepared behind a step later found stale stands, and the step runs again after it. The mark\n * lets tasks pass and proves nothing: `resolveBuildExecutionProgress` does not count a marked step, and every reading of\n * \"done\" goes through `buildPlanIsFinished`.\n *\n * LIMIT: a fault only a step's own output can cure stays held, with no write: the step that would cure it is the one\n * passed over, so a coding task or a person has to. No ordinary case of this was found.\n */\n const modulesHoldingGenerationSteps = specificationFindings === undefined ? [] : specificationFaultModules(specificationFindings);\n if (modulesHoldingGenerationSteps.length === 0) this.modulesWithNoRepairToRun = undefined;\n const specificationRepairOwed = modulesHoldingGenerationSteps.length > 0 && await this.readSpecificationRepairOwed(specificationFindings);\n if (modulesHoldingGenerationSteps.length > 0) {\n const attemptHistory = await this.readGenerationStepAttemptHistory();\n for (const task of tasks) {\n if (task.target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP || landed.has(task.taskRef)) continue;\n if (!generationStepReadsSpecifications(task.target.generationStepRef)) continue;\n const latest = attemptHistory?.get(task.taskRef)?.[0];\n const ran = latest?.status === FlowsActors_Status.COMPLETED && latest.rearm === undefined;\n const checkKind = generationStepConditions.get(task.taskRef)?.kind;\n if (ran && checkKind !== undefined && generationStepCheckReadsSpecifications(checkKind)) {\n landed.add(task.taskRef);\n unverifiable.add(task.taskRef);\n unanswerable.delete(task.taskRef);\n } else if (!ran || await this.classifyRanGenerationStep(task, attemptHistory) === null) {\n // A step that ran and awaits its commit stays out of this: the selection reports it as that.\n unanswerable.add(task.taskRef);\n }\n }\n }\n // A person's committed closures (#3224, #3227), after every probe and mark: a closure satisfied by a task counts only while it is landed.\n // From HEAD: a decision counts once a person's door committed it (`readBuildTaskDecisionsStanding`), never as a working edit.\n const decisions = await this.readCommittedBuildTaskDecisions(committedTree);\n const closedTaskRefs = resolveClosedBuildTaskRefs({ closures: decisions.closures, planTaskRefs: new Set(tasks.map((task) => task.taskRef)), landed });\n for (const taskRef of closedTaskRefs.keys()) {\n landed.add(taskRef);\n unanswerable.delete(taskRef);\n }\n // UNKNOWN decisions (R2): a generation step they name is passed over as unanswerable rather than run again.\n const decisionsUnknown = decisions.standing === BuildTaskDecisionsStanding.UNKNOWN;\n if (decisionsUnknown) {\n for (const task of tasks) {\n if (decisions.heldTaskRefs?.has(task.taskRef) && task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP && !landed.has(task.taskRef)) unanswerable.add(task.taskRef);\n }\n }\n return {\n closedTaskRefs,\n followUpApprovals: decisions.followUpApprovals,\n modulesHoldingGenerationSteps,\n specificationRepairOwed,\n buildTaskDecisions: {\n standing: decisions.standing,\n ...(decisions.reason !== undefined ? { reason: decisions.reason } : {}),\n ...(decisions.conditions !== undefined ? { conditions: decisions.conditions } : {}),\n ...(decisions.heldTaskRefs !== undefined ? { heldTaskRefs: decisions.heldTaskRefs } : {}),\n },\n landed,\n unverifiableLandedTaskRefs: [...unverifiable].sort(),\n unanswerableGenerationStepTaskRefs: unanswerable,\n generationStepConditions,\n witnesses,\n landingTree,\n ...(runStanding !== undefined ? { heldBackTaskRefs: runStanding.heldBack, awaitingIsolatedRecheck: runStanding.awaitingIsolatedRecheck } : {}),\n refusedSpecificationFaults,\n provisional: decisionsUnknown || unanswerable.size > 0 || modulesHoldingGenerationSteps.length > 0 || await tracked.anyUnanswered() || (this.git.committedReadFailureCount?.() ?? 0) > readFailuresBefore\n // A run history nobody could read may hide a failed verification that would hold a task back (#3220).\n || (runStanding === undefined && typeof this.executions?.listActorExecutions === 'function'),\n };\n }\n\n /**\n * Whether a task that already COMPLETED a run without landing may be offered once more (#3204, #3210), and if not, why.\n *\n * - A PARKED later run wins (review B2): re-dispatching would abandon its persisted session.\n * - The bound counts every attempt since, not only completed ones (review B1): completed runs nobody re-armed PLUS\n * the task's own attributable failed runs. Counting completed runs alone let a task whose retries kept failing be\n * re-offered for ever, which is the #606 loop. A cancelled run or one a restart interrupted is not counted, exactly as\n * for a task that never completed (the attempt budget, #1536, does not count them either).\n * - An unmet probe that cannot be ANSWERED (a configuration that cannot be materialized, an unreadable witness) is not\n * an absent product (review B3, #3223 \"unknown is not not-landed\"): the task is held rather than sent to rebuild\n * something that may be there. Asked only when `resolution` is passed (the absent-product branch).\n *\n * A port without the completed-run listing holds the task, as the loop guard always did.\n */\n private async retryOfACompletedTask(\n candidate: BuildPlanTask,\n maximumAttempts: number,\n resolution?: Pick<LandedTaskResolution, 'witnesses'>,\n ): Promise<CompletedTaskRetry | ApplicationBuildStuckTask> {\n if (typeof this.dispatch.listCompletedRunsForBuildTask !== 'function') return CompletedTaskRetry.HOLD;\n const parkedRun = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n if (parkedRun !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: parkedRun.taskId, reason: Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER, question: parkedRun.question };\n }\n const completedRuns = (await this.dispatch.listCompletedRunsForBuildTask(candidate.taskRef)).filter((run) => readBuildTaskRearm(run.memory) === undefined).length;\n const failedRuns = (await this.dispatch.listAttributableFailedRunsForBuildTask(candidate.taskRef)).length;\n if (completedRuns + failedRuns >= maximumAttempts) return CompletedTaskRetry.HOLD;\n if (resolution !== undefined && (await this.readUnmetProbes(candidate, resolution)).unanswerable) return CompletedTaskRetry.HOLD;\n return CompletedTaskRetry.OFFER;\n }\n\n /**\n * The task's probes the WORKING TREE does not satisfy, and whether any of them cannot be answered at all (a shell or\n * agent-work probe whose explanation is `unanswerable`). Read against the landing pass's witnesses, so the brief and\n * the classification agree (#3204).\n */\n private async readUnmetProbes(task: BuildPlanTask, resolution: Pick<LandedTaskResolution, 'witnesses'>): Promise<{ readonly unmet: readonly BuildPlanTaskLandedProbe[]; readonly unanswerable: boolean }> {\n const worktree = this.createWorktreeReader(resolution.witnesses);\n const probes = resolveBuildTaskLandedProbes(task);\n const satisfied = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, worktree)));\n const unmet = probes.filter((_, index) => !satisfied[index]);\n const explanations = await Promise.all(unmet.map(async (probe) => {\n if (isShellProbe(probe)) return this.explainShellProbe(probe, worktree);\n if (isAgentWorkProbe(probe)) return this.explainAgentWorkProbe(probe, worktree);\n return undefined;\n }));\n const unanswerable = explanations.some((explanation) => explanation?.unanswerable !== undefined);\n return { unmet: unmet.filter((_, index) => explanations[index]?.unanswerable === undefined), unanswerable };\n }\n\n /**\n * The probes a task's COMPLETED runs left unmet in the WORKING TREE, for the brief of its next run (#3204), with how many\n * runs completed; `undefined` for a task with no completed run, or none unmet. A probe that cannot be answered is left\n * out (review B3): the brief must not tell the agent something is missing that the companion could not read.\n */\n private async readUnmetProductOfACompletedTask(\n task: BuildPlanTask,\n resolution: Pick<LandedTaskResolution, 'witnesses'>,\n ): Promise<{ readonly probes: readonly BuildPlanTaskLandedProbe[]; readonly completedRuns: number } | undefined> {\n if (typeof this.dispatch.listCompletedRunsForBuildTask !== 'function') return undefined;\n const completedRuns = (await this.dispatch.listCompletedRunsForBuildTask(task.taskRef)).filter((run) => readBuildTaskRearm(run.memory) === undefined).length;\n if (completedRuns === 0) return undefined;\n const { unmet } = await this.readUnmetProbes(task, resolution);\n return unmet.length > 0 ? { probes: unmet, completedRuns } : undefined;\n }\n\n /**\n * Whether a stuck task's declared product is in the tree its landing pass judged (#3204: the working tree), asked of\n * THAT pass's reader (#3219), so the answer is the pass's own and never a later reading: a task that holds its product\n * and is still not landed was held back by something else (a failed verification), never by the tree. `undefined` for\n * a task that declares no product. Asked only for a task that already ran and is stuck, so it costs nothing on the hot\n * path.\n */\n private async productPresentInLandingTree(task: BuildPlanTask, resolution: Pick<LandedTaskResolution, 'landingTree'>): Promise<boolean | undefined> {\n const probes = resolveBuildTaskLandedProbes(task);\n if (probes.length === 0) return undefined;\n return (await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, resolution.landingTree)))).every(Boolean);\n }\n\n /**\n * Does the resolved-assets module, as `tree` holds it, record an accepted brand mark (#2410)? The same predicate the\n * logo step's skip check uses, so the step and its landing cannot disagree about what \"accepted\" means.\n */\n private async readsAcceptedBrandMark(modulePath: string, tree: CommittedTreeReader): Promise<boolean> {\n return hasAcceptedBrandMark(await tree.readText(modulePath), (path) => tree.isCommitted(path));\n }\n\n /**\n * The tree a build task's LANDING is judged on (#3204): the WORKING tree, through the git service's working-tree port\n * (`isWorktreePathPresent`, `readWorktreeText` and their batches), where \"is committed\" reads as \"the application holds\n * this file\": on disk and seen by git, so an ignored file is never a product. Memoized for one pass and primed in one\n * batch, exactly like {@link createCommittedTreeReader}, so a pass rests on ONE reading of the tree. Never throws.\n */\n private createLandingTreeReader(witnesses: IntrospectionWitnesses = this.createIntrospectionWitnesses()): CommittedTreeReader {\n const present = new Map<string, Promise<boolean>>();\n const texts = new Map<string, Promise<string | undefined>>();\n const isPresent = (path: string) => memoizeByPath(present, path, () => this.git.isWorktreePathPresent(path));\n const primePresence = async (paths: readonly string[]) => {\n const unanswered = [...new Set(paths)].filter((path) => !present.has(path));\n if (unanswered.length === 0) return;\n const seen = await this.git.selectPresentPaths(unanswered);\n for (const path of unanswered) {\n if (!present.has(path)) present.set(path, Promise.resolve(seen.has(path)));\n }\n };\n return {\n isCommitted: isPresent,\n // Text only of a path the application holds: an ignored file's text never satisfies a DECLARES probe either.\n readText: (path) => memoizeByPath(texts, path, async () => ((await isPresent(path)) ? this.git.readWorktreeText(path) : undefined)),\n primeCommitted: primePresence,\n primeTexts: async (paths) => {\n const unread = [...new Set(paths)].filter((path) => !texts.has(path));\n if (unread.length === 0) return;\n await primePresence(unread);\n const held = (await Promise.all(unread.map(async (path) => ((await isPresent(path)) ? path : undefined)))).filter((path): path is string => path !== undefined);\n const read = await this.git.readWorktreeTexts(held);\n for (const path of unread) {\n if (!texts.has(path)) texts.set(path, Promise.resolve(read.get(path)));\n }\n },\n ...witnesses,\n };\n }\n\n /** The working tree behind the same reader shape: a path \"is committed\" here when it exists on disk. Never throws. */\n private createWorktreeReader(witnesses: IntrospectionWitnesses = this.createIntrospectionWitnesses()): CommittedTreeReader {\n const texts = new Map<string, Promise<string | undefined>>();\n const readText = (path: string) => memoizeByPath(texts, path, () => readFile(join(this.companionContext.saasRoot, path), 'utf8').catch(() => undefined));\n return {\n isCommitted: async (path) => (await readText(path)) !== undefined,\n readText,\n // Reading the worktree spawns nothing, so there is no batch to win here.\n primeCommitted: async () => {},\n primeTexts: async () => {},\n ...witnesses,\n };\n }\n\n /**\n * The tree as a pathspec commit of `committing` would leave it (#2209): those paths as they stand on disk\n * (`commitPaths` takes each whole working file), every other path as HEAD has it. Behind the reader shape\n * landing asks, so the accept asks exactly landing's question of the commit it is about to make.\n */\n private createProspectiveCommitReader(committing: ReadonlySet<string>): CommittedTreeReader {\n const witnesses = this.createIntrospectionWitnesses();\n const worktree = this.createWorktreeReader(witnesses);\n const committed = this.createCommittedTreeReader(witnesses);\n return {\n isCommitted: (path) => (committing.has(path) ? worktree.isCommitted(path) : committed.isCommitted(path)),\n readText: (path) => (committing.has(path) ? worktree.readText(path) : committed.readText(path)),\n primeCommitted: (paths) => committed.primeCommitted(paths.filter((path) => !committing.has(path))),\n primeTexts: (paths) => committed.primeTexts(paths.filter((path) => !committing.has(path))),\n shellWitness: committed.shellWitness,\n agentWorkWitness: committed.agentWorkWitness,\n applicationConfigurationWitness: committed.applicationConfigurationWitness,\n };\n }\n\n /** A fresh {@link CommittedTreeReader} for one landing resolution; never shared across resolutions. */\n private createCommittedTreeReader(witnesses: IntrospectionWitnesses = this.createIntrospectionWitnesses()): CommittedTreeReader {\n const committed = new Map<string, Promise<boolean>>();\n const texts = new Map<string, Promise<string | undefined>>();\n return {\n isCommitted: (path) => memoizeByPath(committed, path, () => this.git.isWorktreePathCommitted(path)),\n readText: (path) => memoizeByPath(texts, path, () => this.git.readCommittedText(path)),\n primeCommitted: async (paths) => {\n /*\n * One batched answer for the whole set, seeded into the SAME memo the per-path route fills.\n * Paths already resolved (or in flight) are left alone: their answer is the one this\n * resolution has been handing out, and replacing it mid-pass would let one landing decision\n * rest on two different readings of the tree.\n */\n const unanswered = [...new Set(paths)].filter((path) => !committed.has(path));\n if (unanswered.length === 0) return;\n const committedPaths = await this.git.selectCommittedPaths(unanswered);\n for (const path of unanswered) {\n if (!committed.has(path)) committed.set(path, Promise.resolve(committedPaths.has(path)));\n }\n },\n primeTexts: async (paths) => {\n // Same contract as `primeCommitted`: seed the memo `readText` fills, never replace an answer\n // this resolution has already handed out.\n const unread = [...new Set(paths)].filter((path) => !texts.has(path));\n if (unread.length === 0) return;\n const committedTexts = await this.git.readCommittedTexts(unread);\n for (const path of unread) {\n if (!texts.has(path)) texts.set(path, Promise.resolve(committedTexts.get(path)));\n }\n },\n ...witnesses,\n };\n }\n\n /**\n * The introspection witnesses of ONE landing resolution, shared by every reader it creates: the working tree, HEAD and\n * the prospective commit ask the same live application, so a records read explaining unmet probes on both trees\n * introspects once rather than once per reader (#2966 review).\n */\n private createIntrospectionWitnesses(): IntrospectionWitnesses {\n return {\n shellWitness: this.memoizedShellWitness(),\n agentWorkWitness: this.memoizedAgentWorkWitness(),\n applicationConfigurationWitness: this.memoizedApplicationConfigurationWitness(),\n };\n }\n\n /** A once-per-reader memo of {@link resolveShellWitness}, so a landing resolution introspects at most once. */\n private memoizedShellWitness(): () => Promise<ShellWitness> {\n let pending: Promise<ShellWitness> | undefined;\n return () => (pending ??= this.resolveShellWitness());\n }\n\n /** A once-per-reader memo of {@link resolveAgentWorkWitness} (#2966). */\n private memoizedAgentWorkWitness(): () => Promise<AgentWorkWitness> {\n let pending: Promise<AgentWorkWitness> | undefined;\n return () => (pending ??= this.resolveAgentWorkWitness());\n }\n\n /**\n * What the application's backend registers of its agent work (#2966), through the `agent-work-declarations` behavior.\n * Every failure is an `answered: false` with its reason, never a throw and never an empty registry, for the reason\n * {@link resolveShellWitness} gives: a registry nobody could read is not one that registers nothing.\n */\n private async resolveAgentWorkWitness(): Promise<AgentWorkWitness> {\n const serviceKey = this.introspection.describeCatalog().defaultBackendServiceKey;\n if (!serviceKey) return { answered: false, reason: 'The application declares no SaaS backend to read its registered agents from.' };\n try {\n // Landing acts on this answer either way (a task lands, or is held back), so a held answer is checked against the\n // source as it stands (#2305 review), never served from before the last edit the watcher has not reported yet.\n const result = await this.introspection.requestInfo({ serviceKey, behavior: 'agent-work-declarations' }, { verifyAgainstSource: true });\n if (!result.success) return { answered: false, reason: `The backend's registry could not be read: ${result.error.message}` };\n return { answered: true, declarations: result.data as AgentWorkDeclarations };\n } catch (error) {\n return { answered: false, reason: `The backend's registry could not be read: ${describeCaughtError(error)}` };\n }\n }\n\n /** A once-per-reader memo of {@link resolveApplicationConfigurationWitness} (#2305 S6). */\n private memoizedApplicationConfigurationWitness(): () => Promise<ApplicationConfigurationWitness> {\n let pending: Promise<ApplicationConfigurationWitness> | undefined;\n return () => (pending ??= this.resolveApplicationConfigurationWitness());\n }\n\n /**\n * What the application's configuration declares (#2305 S6, #3035, #3039), read from `wildo.saas.config.ts` FRESH: a\n * build task may have just conferred a role, declared an organization type or a relationship kind, or declared the\n * system-of-record instance a binding names. Asked only when a probe needing it is judged, and independent of the\n * backend, which a configuration fact never needs. Never the companion's startup copy as a fallback, which would prove a role nobody\n * conferred: an unreadable configuration answers `false` with the loader's own message, which is where the likeliest\n * mistake (a conferred role a granting type does not offer, refused by `defineSaasConfig`) is named.\n *\n * Fresh means the configuration module and the files it imports by RELATIVE path are re-evaluated. A value it imports\n * from a PACKAGE (a role constant from `@app/shared-lib`) is not: a native ESM package import is evaluated once and\n * held for the process's lifetime (`loader.ts`), so an edit to that value is seen only after the companion restarts,\n * and until then the probe answers on the value it first read (#2305 review). Declaring the conferred roles in the\n * configuration itself, or in a file it imports by relative path, avoids that.\n */\n private async resolveApplicationConfigurationWitness(): Promise<ApplicationConfigurationWitness> {\n try {\n const config = await loadSaasConfig(join(this.companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true });\n if (!config) return { answered: false, reason: 'wildo.saas.config.ts was not found at the application root.' };\n /*\n * #3045: whether each instance's vendor can split its records, from the facet library where the backend resolves it\n * (or the framework checkout). Read only when an instance is partitioned, the one case that needs it.\n */\n const systemsOfRecord = (config as { systemsOfRecord?: Record<string, SystemOfRecordInstanceFacetRequest & { partition?: unknown } | undefined> }).systemsOfRecord ?? {};\n // Each instance's EFFECTIVE facet, augmentations included, through the engine's own resolver (#3053).\n const facets = Object.values(systemsOfRecord).some((instance) => instance?.partition === true)\n ? await loadEffectiveSystemOfRecordFacets({\n applicationRoot: this.companionContext.saasRoot,\n frameworkRoot: this.companionContext.resolvedHomes?.framework?.repositoryRoot ?? undefined,\n systemsOfRecord,\n })\n : undefined;\n return {\n answered: true,\n configuration: applicationConfigurationDeclarationsOf(config, facets === undefined ? undefined : systemOfRecordInstancePartitionSupportOf(facets, Object.keys(systemsOfRecord))),\n };\n } catch (error) {\n return { answered: false, reason: `wildo.saas.config.ts could not be loaded: ${describeCaughtError(error)}` };\n }\n }\n\n /**\n * Every file a configuration file reaches by relative import, read from the WORKING TREE (#2305 review): the registry\n * and the configuration witness evaluate the working tree, so these are the files whose content they read, and each\n * must then be committed in whichever tree the caller asks about. Reading them from that tree instead (an earlier\n * version) dropped a NEW imported file HEAD lacks, so a task landed on content no commit carried. Followed to closure,\n * a directory specifier resolving to its `index.ts`. A specifier naming nothing on disk is left out, since the\n * configuration could not load with it, which the registry read reports. A closure that would pass\n * {@link CONFIGURATION_IMPORT_CLOSURE_LIMIT} files answers `truncated` instead of a partial list.\n */\n private async configurationImportClosure(importerPath: string): Promise<{ readonly files: readonly string[]; readonly truncated: boolean }> {\n const readFromDisk = (path: string): Promise<string | undefined> => readFile(join(this.companionContext.saasRoot, path), 'utf8').catch(() => undefined);\n const reached: string[] = [];\n const seen = new Set<string>([importerPath]);\n const pending: { path: string; text: string }[] = [];\n const root = await readFromDisk(importerPath);\n if (root !== undefined) pending.push({ path: importerPath, text: root });\n while (pending.length > 0) {\n const { path: importer, text } = pending.shift()!;\n for (const candidate of relativeImportedFiles(importer, text)) {\n for (const path of [candidate, `${candidate.replace(/\\.ts$/u, '')}/index.ts`]) {\n if (seen.has(path)) break;\n const imported = await readFromDisk(path);\n if (imported === undefined) continue;\n if (reached.length === CONFIGURATION_IMPORT_CLOSURE_LIMIT) return { files: reached, truncated: true };\n seen.add(path);\n reached.push(path);\n pending.push({ path, text: imported });\n break;\n }\n }\n }\n return { files: reached, truncated: false };\n }\n\n /** Why a registry probe is or is not satisfied (#2966) — the answer landing uses and the detail the record reports. */\n private async explainAgentWorkProbe(probe: AgentWorkLandedProbe, tree: CommittedTreeReader): Promise<AgentWorkProbeExplanation> {\n let missing: readonly AgentWorkShortfall[];\n if (isConfigurationProvenProduct(probe.product)) {\n // #2305 S6, #3035: a configuration fact, judged from the configuration alone. One that could not be loaded is\n // unanswerable (#2305 review), like a registry nobody could read: it says nothing about what the application declares.\n const configuration = await tree.applicationConfigurationWitness();\n if (!configuration.answered) return { satisfied: false, unanswerable: configuration.reason, missing: [], absentPaths: [] };\n missing = findConfigurationShortfalls(probe.product, configuration.configuration);\n } else {\n const witness = await tree.agentWorkWitness();\n if (!witness.answered) return { satisfied: false, unanswerable: witness.reason, missing: [], absentPaths: [] };\n // A resource whose configuration could not be materialized declares nothing that can be read, which is not the same\n // as declaring nothing (#2305 review).\n const unreadable = unreadableResourceConfigurationFor(probe.product, witness.declarations);\n if (unreadable) {\n return { satisfied: false, unanswerable: `The configuration of ${unreadable.resourceType} could not be materialized: ${unreadable.reason}`, missing: [], absentPaths: [] };\n }\n missing = findAgentWorkShortfalls(probe.product, probe.moduleRef, witness.declarations);\n if (probe.product.kind === BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) {\n // #3039: the binding is the registry's to say and the instance it names is the configuration's. A binding on an\n // instance the application does not declare is refused by the backend at startup, so it has not landed.\n const configuration = await tree.applicationConfigurationWitness();\n if (!configuration.answered) return { satisfied: false, unanswerable: configuration.reason, missing, absentPaths: [] };\n missing = [...missing, ...findSystemOfRecordDeclarationShortfalls(probe.product, configuration.configuration)];\n // #3045: a partition whose vendor's facet could not be read is unknown, never landed.\n const partitionUnknown = systemOfRecordPartitionUnanswerable(probe.product, configuration.configuration);\n if (partitionUnknown !== undefined) return { satisfied: false, unanswerable: partitionUnknown, missing, absentPaths: [] };\n }\n }\n /*\n * The registration files, and every file THIS reader's copy of the agent index imports: the committed index's imports\n * must be committed, and the working tree's index's imports must exist. A sibling task's draft that no index imports\n * yet is nobody's registration, so it holds nothing back.\n */\n const indexText = probe.followImportsOf === undefined ? undefined : await tree.readText(probe.followImportsOf);\n const configurationImports = probe.followRelativeImportsOf === undefined\n ? { files: [], truncated: false }\n : await this.configurationImportClosure(probe.followRelativeImportsOf);\n if (configurationImports.truncated) {\n return {\n satisfied: false,\n unanswerable: `${probe.followRelativeImportsOf} reaches more than ${CONFIGURATION_IMPORT_CLOSURE_LIMIT} files by relative import, so whether they are all committed was not asked.`,\n missing,\n absentPaths: [],\n };\n }\n const files = [...new Set([\n ...probe.registrationFiles,\n ...(indexText === undefined ? [] : flowsActorsIndexImportedFiles(probe.followImportsOf!, indexText)),\n ...configurationImports.files,\n ])];\n // One batched question for every file, as `landedProbePaths` primes registration files (#2305 review).\n await tree.primeCommitted(files);\n const held = await Promise.all(files.map((path) => tree.isCommitted(path)));\n const absentPaths = files.filter((_, index) => !held[index]);\n return { satisfied: missing.length === 0 && absentPaths.length === 0, missing, absentPaths };\n }\n\n /**\n * The resolved shell beside the placement plan (#1538): what each surface carries, by identity,\n * against what the plan PLACED there and what it DECLINED.\n *\n * Read through introspection because the identities exist only in the RESOLVED configuration: a\n * module's contribution merges into the shell at runtime, and the tree's text spells none of the\n * plan's refs. Every failure is an `answered: false` with its reason — never a throw, which would\n * abort the whole landing resolution for one surface, and never an empty \"carries nothing\", which\n * would read as a real no.\n */\n private async resolveShellWitness(): Promise<ShellWitness> {\n const exports = await loadSpecificationFamilyData(this.companionContext);\n let authored: unknown;\n try {\n authored = (exports as unknown as Record<string, unknown>).placementPlanSpecification;\n } catch (error) {\n if (error instanceof SpecificationUnavailableError) return { answered: false, reason: error.message };\n throw error;\n }\n if (authored === undefined || authored === null) {\n return { answered: false, reason: 'The application has no placement plan, so nothing says what its shell should carry.' };\n }\n const plan = PlacementPlanSchema.safeParse(authored);\n if (!plan.success) {\n return { answered: false, reason: `The placement plan does not satisfy its schema: ${plan.error.issues.slice(0, 2).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}` };\n }\n const serviceKey = this.introspection.describeCatalog().defaultFrontendServiceKey;\n if (!serviceKey) {\n return { answered: false, reason: 'The application declares no SaaS frontend to read its shell from.' };\n }\n /*\n * The shell is read from the frontend's BUILT config library, so it is dated first (#3226): a library older than its\n * source answers about a shell nobody has any more, and read as \"carries nothing\" it kept app-creation-test-007's\n * correctly committed sidebar unlanded. Unanswerable, never empty, until the library is rebuilt.\n */\n const frontendPath = this.companionContext.servicesByKey?.[serviceKey]?.path;\n if (typeof frontendPath === 'string') {\n const frontendRoot = join(this.companionContext.saasRoot, frontendPath);\n const unrecognised = readFrontendLibraryProgram(frontendRoot).unrecognised;\n if (unrecognised.length > 0) {\n this.logger.warn?.('The frontend library config has include/exclude entries the staleness check does not follow; a stale file they cover is not detected', { unrecognised });\n }\n const stale = findStaleFrontendLibraryOutputs(frontendRoot);\n if (stale.length > 0) return { answered: false, reason: describeStaleFrontendLibrary(stale) };\n }\n let shell: AppShellPlacementContentResult;\n try {\n // Checked against the source for the same reason as the agent-work witness: landing acts on it (#2305 review).\n const result = await this.introspection.requestInfo({ serviceKey, behavior: 'app-shell-placement-content' }, { verifyAgainstSource: true });\n if (!result.success) return { answered: false, reason: `The shell could not be read: ${result.error.message}` };\n shell = result.data as AppShellPlacementContentResult;\n } catch (error) {\n return { answered: false, reason: `The shell could not be read: ${describeCaughtError(error)}` };\n }\n\n const carried = new Map<PlacementSurface, Set<string>>();\n const carriedAudiences = new Map<PlacementSurface, Map<string, PlacementAudienceLayers[]>>();\n const contributingPaths = new Map<PlacementSurface, string[]>();\n for (const row of shell.surfaces) {\n const identities = new Set<string>();\n const audiences = new Map<string, PlacementAudienceLayers[]>();\n for (const launcher of row.launchers) {\n // Every identity it answers to: the plan names a resource in the singular, the shell carries its type (#3204).\n const launcherIdentities = launcherShellIdentities(launcher);\n if (launcherIdentities.length === 0) continue;\n const layers: PlacementAudienceLayers = {\n ...(launcher.requiredRoles === undefined ? {} : { item: launcher.requiredRoles }),\n ...(launcher.sectionRequiredRoles === undefined ? {} : { section: launcher.sectionRequiredRoles }),\n };\n for (const identity of launcherIdentities) {\n identities.add(identity);\n audiences.set(identity, [...(audiences.get(identity) ?? []), layers]);\n }\n }\n carriedAudiences.set(row.surface, audiences);\n for (const destinationRef of row.destinationRefs) identities.add(settingsDestinationShellIdentity(destinationRef));\n carried.set(row.surface, identities);\n contributingPaths.set(row.surface, [shellSurfaceConfigFile(row.surface), ...row.contributingModuleIds.map(shellModuleContributionFile)]);\n }\n const expectations = derivePlacementPlanShellExpectations(plan.data);\n const placed = new Map([...expectations.placed].map(([surface, entries]) => [surface, entries.map((entry) => entry.shellIdentity)] as const));\n const placedAudiences = new Map([...expectations.placed].map(([surface, entries]) => [\n surface, new Map(entries.map((entry) => [entry.shellIdentity, entry.audience] as const)),\n ] as const));\n const declined = expectations.declined.map((entry) => entry.shellIdentity);\n return { answered: true, carried, contributingPaths, placed, declined, carriedAudiences, placedAudiences };\n }\n\n /**\n * Why a shell probe is or is not satisfied (#1538) — the answer landing uses, and the detail the build\n * record and the stuck classification report. One function, so the three cannot disagree.\n */\n private async explainShellProbe(\n probe: ShellLandedProbe,\n tree: CommittedTreeReader,\n ): Promise<ShellProbeExplanation> {\n const witness = await tree.shellWitness();\n if (!witness.answered) {\n return { satisfied: false, unanswerable: witness.reason, missing: [], declinedButPresent: [], audienceMismatches: [], absentPaths: [] };\n }\n const absentOf = async (surface: PlacementSurface): Promise<string[]> => {\n const paths = witness.contributingPaths.get(surface) ?? [];\n const held = await Promise.all(paths.map((path) => tree.isCommitted(path)));\n return paths.filter((_, index) => !held[index]);\n };\n if (probe.kind === BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN) {\n /*\n * The settings rail is read from the companion export, which imports the config file directly; the RUNTIME receives\n * it only through `settingsHub` in the committed frontend registry (#3101). A registry that does not pass it carries\n * nothing at runtime — Settings opens empty (#3100) — so the rail lands only when the registry passes it too.\n */\n const runtimeReceivesRail = probe.surface !== PlacementSurface.SETTINGS_HUB\n || await settingsRailReachesRuntime(tree);\n const carried = runtimeReceivesRail ? (witness.carried.get(probe.surface) ?? new Set<string>()) : new Set<string>();\n const missing = (witness.placed.get(probe.surface) ?? []).filter((identity) => !carried.has(identity));\n const declinedButPresent = witness.declined.filter((identity) => carried.has(identity));\n // Every entry carrying a placed identity must show it to the audience the plan decided.\n const carriedAudiences = witness.carriedAudiences.get(probe.surface) ?? new Map();\n const audienceMismatches = [...(witness.placedAudiences.get(probe.surface) ?? new Map())].flatMap(([identity, expected]) => {\n const shown = carriedAudiences.get(identity) ?? [];\n const wrong = shown.filter((audience) => !samePlacementAudienceLayers(expected, audience));\n return wrong.length === 0 ? [] : [`${identity}: plan ${describePlacementAudience(expected)}, shell ${wrong.map(describePlacementAudience).join(' and ')}`];\n });\n const absentPaths = await absentOf(probe.surface);\n return {\n satisfied: missing.length === 0 && declinedButPresent.length === 0 && audienceMismatches.length === 0 && absentPaths.length === 0,\n missing,\n declinedButPresent,\n audienceMismatches,\n absentPaths,\n };\n }\n // SHELL_CARRIES_A_PLACEMENT: some surface carries some subject the plan placed on it, from files at HEAD.\n const allAbsent: string[] = [];\n for (const [surface, identities] of witness.placed) {\n const carried = witness.carried.get(surface) ?? new Set<string>();\n if (!identities.some((identity) => carried.has(identity))) continue;\n const absentPaths = await absentOf(surface);\n if (absentPaths.length === 0) return { satisfied: true, missing: [], declinedButPresent: [], audienceMismatches: [], absentPaths: [] };\n allAbsent.push(...absentPaths);\n }\n return {\n satisfied: false,\n missing: allAbsent.length > 0 ? [] : [...witness.placed.values()].flat(),\n declinedButPresent: [],\n audienceMismatches: [],\n absentPaths: [...new Set(allAbsent)],\n };\n }\n\n /**\n * Is one landed probe satisfied by `tree`?\n *\n * Landing asks the WORKING tree (#3204, {@link createLandingTreeReader}): a path is held when it is on disk and git\n * sees it. The committed reader asks the same question of HEAD, for a task no run of its own checked and for a\n * person's decisions, and the prospective-commit reader of the commit an accept is about to make.\n *\n * A declaration is matched as a WHOLE WORD, not as a substring. `deal.schemas.ts` carries prose\n * naming its own build tasks, so a bare `includes` would find `pipelineStageId` inside a comment\n * that merely mentions it and report a task landed on its own documentation. A TypeScript or\n * JavaScript file is read with its comments blanked first (#2216), because whole-word matching alone\n * counted a mention in a comment: a page task wrote every section ref of its plan into its sections\n * file's header, and 18 section tasks of `app-creation-test-004` read landed with no section written.\n * A STRING mention still counts — an AST question is the sound version and needs the introspection\n * subprocess — so this errs toward LANDED only for a file that names the symbol in code without\n * declaring it, and never for the scaffold shapes that produced #597, where the symbol is absent.\n */\n private async isLandedProbeSatisfied(probe: BuildPlanTaskLandedProbe, tree: CommittedTreeReader): Promise<boolean> {\n switch (probe.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE:\n return tree.isCommitted(probe.path);\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES: {\n const text = await tree.readText(probe.path);\n if (typeof text !== 'string') return false;\n /*\n * The probe's SITE says whether the declarations are a set or a relation, and where a relation\n * must sit (#1539). A relation read as a set reports a missing edge as landed (#1273 — six of\n * eleven relationship tasks).\n */\n // The PATH rides along so a script source is read with its comments blanked (#2216): prose naming a\n // product is not the product.\n return declarationsAppearAt(text, probe.declarations, probe.site, probe.path);\n }\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES: {\n const texts = await Promise.all(probe.paths.map((path) => tree.readText(path)));\n return texts.some((text, index) => typeof text === 'string' && declarationsAppearAt(text, probe.declarations, probe.site, probe.paths[index]));\n }\n // #2216: a section's words, for every committed locale, in its pack or in the section's own file (#3204).\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE:\n return labelPacksDeclareKeyPrefix(\n await Promise.all(probe.paths.map((path) => tree.readText(path))),\n probe.keyPrefix,\n await Promise.all(probe.fragmentPaths.map((path) => tree.readText(path))),\n );\n // #2504: a labelling unit's planned keys, each exactly, in its committed primary-locale file.\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS:\n return labelFileDeclaresKeys(await tree.readText(probe.path), probe.keys);\n case BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN:\n case BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT:\n return (await this.explainShellProbe(probe, tree)).satisfied;\n case BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED:\n return (await this.explainAgentWorkProbe(probe, tree)).satisfied;\n default: {\n const unhandled: never = probe;\n throw new Error(`Unhandled build-plan landed probe ${JSON.stringify(unhandled)}.`);\n }\n }\n }\n\n /**\n * Whether the application has AUTHORED a build plan at all — the one absence test every read of the plan shares.\n *\n * A plan legitimately does not exist until `build-decompose` has run, so every NEW application starts in this\n * state, and \"no plan yet\" is a true answer rather than a failure. It is tested DIRECTLY, never by catching\n * `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that same class for a plan that EXISTS\n * and fails validation — flattening an invalid plan into \"nothing there\" would be \"could not look\" wearing\n * \"nothing there\".\n *\n * Two reads use it: the board's task list, which had it inline, and the next-task projection, which did not —\n * so on every new application the board's dispatch-plan list answered 500 CONFIGURATION, logged at high\n * severity with an alert, on every poll (measured 2026-09-21, the first minutes of the end-to-end run #1273).\n *\n * A plan whose module failed counts as authored (#3258): it cannot be read, and \"no plan\" would tell a board to\n * decompose work that exists. `readBuildPlan` then refuses, naming the module.\n */\n public async hasAuthoredBuildPlan(): Promise<boolean> {\n const exports = await loadSpecificationFamilyData(this.companionContext);\n try {\n const authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n return authored !== undefined && authored !== null;\n } catch (error) {\n if (error instanceof SpecificationUnavailableError) return true;\n throw error;\n }\n }\n\n /** The application's accepted build plan, validated before anything is selected from it, with the host's derived tasks. */\n private async readBuildPlan(): ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync> {\n const { exports, plan } = await this.readAuthoredBuildPlan();\n // The website plan's orderings are derived onto the website tasks first; they add edges between authored tasks\n // only, never a cycle, so the floor {@link readAuthoredBuildPlan} validated still holds (`deriveWebsiteTaskOrdering`).\n // Read past the guard: an ordering preference is never the reason the plan cannot be read, and a plan that cannot be read\n // cannot be repaired (#3258). A module failing elsewhere costs these derivations an edge at most.\n const decided = unguardedSpecifications(exports);\n const websiteOrdered = deriveWebsiteTaskOrdering(plan, decided);\n /*\n * Two orderings below are load-bearing. Follow-ups are derived first, so the website claim step makes a website task\n * wait on a follow-up that delivers what it cites, and so a follow-up of a design-system config task (it keeps its\n * origin's target, so it writes the config too) waits on the brand step and is waited on by the design-tokens step,\n * like every other writer of that file.\n */\n return this.withHostDerivedDesignTokensStep(await this.withHostDerivedBrandDesignStep(this.withHostDerivedWebsiteClaimPrerequisites(\n this.withHostDerivedTranslationStep(this.withHostDerivedDocumentationPublicationStep(\n await this.withHostDerivedMigrationStep(await this.withHostDerivedEngineCapabilitiesStep(await this.withHostDerivedDisplayNameStep(await this.withHostDerivedFollowUpTasks(websiteOrdered)))),\n )),\n decided,\n )));\n }\n\n /**\n * The build plan as the build-plan family AUTHORS it, validated (#3204): no follow-up, no host generation step.\n *\n * Everything {@link readBuildPlan} adds is derived by this host on every read, from the run records and the\n * specifications, so a re-decompose must not be asked to keep any of it: on reference run 42845651222 the landed\n * follow-ups of three relationship tasks were listed as \"already built, keep every one\", and a follow-up keeps its\n * origin's RELATIONSHIP target with no product, which the plan's hard floor refuses. Every re-decompose failed three\n * attempts on tasks the model never authored, for half an hour each, round after round.\n */\n private async readAuthoredBuildPlan(): Promise<{ readonly exports: Awaited<ReturnType<typeof loadSpecificationFamilyData>>; readonly plan: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> }> {\n const exports = await loadSpecificationFamilyData(this.companionContext);\n let authored: unknown;\n try {\n authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n } catch (error) {\n if (error instanceof SpecificationUnavailableError) throw new ApplicationBuildPlanUnavailableError(error.message, { cause: error });\n throw error;\n }\n if (authored === undefined || authored === null) {\n throw new ApplicationBuildPlanUnavailableError(\n 'This application has no build plan. Run the build-decompose playbook first.',\n );\n }\n const parsed = BuildPlanTaskGraphSchema.safeParse(authored);\n if (!parsed.success) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan does not satisfy its schema: ${parsed.error.issues.slice(0, 3).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}`,\n );\n }\n // Semantic validation too, not just the shape: a graph whose ordering is unsound would let\n // `selectReadyBuildPlanTasks` report a task ready before the work it depends on can have landed.\n //\n // Gated on the FLOOR codes, not on `findings.length > 0` as it was until 2026-09-09. That older\n // reading made this gate disagree with the landing gate about the same graph: an authoring\n // warning — a resource stage whose predecessor is absent from the plan, which is legitimate when\n // the tree already carries that stage — landed happily at the semantic authority and then made\n // the whole plan permanently undispatchable HERE, with the refusal naming a warning. One\n // classification, named once in `_core` beside the codes.\n const findings = validateBuildPlanTaskGraph(parsed.data);\n const blocking = findings.filter((finding) => BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES.includes(finding.code));\n if (blocking.length > 0) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan fails semantic validation: ${blocking.slice(0, 3).map((finding) => finding.message).join('; ')}`,\n );\n }\n return { exports, plan: parsed.data };\n }\n\n /**\n * A website task waits for the tasks that BUILD what its copy describes (#2507 re-review N1).\n *\n * Its copy is written once, from each cited requirement's standing at dispatch. The decomposer orders a section only\n * after its page, so website tasks ran beside the module tasks serving their requirements, read IN_PROGRESS, and wrote\n * \"coming soon\" for features that shipped an hour later, with nothing ever rewriting them. So each website task gains\n * a prerequisite on every task delivering a requirement it cites (website and documentation tasks excluded), follow-ups\n * included, as they are appended before this step.\n *\n * A page waits on everything its sections cite, since its title and description summarize them, so one feature task\n * that stays stuck holds back the whole page and its sections (re-review R4). That is the plan-stuck path, by design.\n *\n * A delivering task that itself waits on a website task would close a cycle with the added edges. Each website task's\n * edges are kept or dropped TOGETHER, re-checked against the schema and the semantic floors (PREREQUISITE_CYCLE among\n * them), so one cycle costs only the tasks it involves (re-review R2), and each is named in a warning: an ordering\n * preference is never the reason the plan cannot be read.\n */\n private withHostDerivedWebsiteClaimPrerequisites(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n companionExports: unknown,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const citedByTask = citedRequirementRefsByWebsiteTask(graph.tasks, companionExports);\n /*\n * Held per plan content (#3204): the plan is read on every selection, board and landing read, many times a second at a\n * wave's end, and when the combined edges close a cycle the fallback below re-parses and re-validates the whole plan\n * once per website task. On reference run 42621319676 that warned 68 times per read (3,196 lines in 40 minutes) beside\n * the companion's event-loop stalls. The answer depends only on the tasks and on what each website task cites.\n */\n const memoKey = JSON.stringify({ tasks: graph.tasks, cited: [...citedByTask].sort(([left], [right]) => left.localeCompare(right)) });\n if (this.websiteClaimPrerequisitesMemo?.key === memoKey) return this.websiteClaimPrerequisitesMemo.graph;\n const derived = this.deriveWebsiteClaimPrerequisites(graph, citedByTask);\n this.websiteClaimPrerequisitesMemo = { key: memoKey, graph: derived };\n return derived;\n }\n\n private websiteClaimPrerequisitesMemo: { readonly key: string; readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> } | undefined;\n\n private deriveWebsiteClaimPrerequisites(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n citedByTask: ReturnType<typeof citedRequirementRefsByWebsiteTask>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const additions = new Map<string, readonly string[]>();\n for (const task of graph.tasks) {\n const cited = citedByTask.get(task.taskRef) ?? [];\n const delivering = cited.flatMap((requirementRef) => deliveringTasksFor(requirementRef, graph.tasks)).map((entry) => entry.taskRef);\n const added = [...new Set(delivering)].filter((taskRef) => taskRef !== task.taskRef && !task.prerequisiteTaskRefs.includes(taskRef));\n if (added.length > 0) additions.set(task.taskRef, added);\n }\n if (additions.size === 0) return graph;\n const withEdges = (current: typeof graph, edges: ReadonlyMap<string, readonly string[]>) => BuildPlanTaskGraphSchema.safeParse({\n ...current,\n tasks: current.tasks.map((task) => {\n const added = edges.get(task.taskRef);\n return added === undefined ? task : { ...task, prerequisiteTaskRefs: [...task.prerequisiteTaskRefs, ...added] };\n }),\n });\n const isValid = (candidate: ReturnType<typeof withEdges>): candidate is Extract<ReturnType<typeof withEdges>, { success: true }> => candidate.success\n && !validateBuildPlanTaskGraph(candidate.data).some((finding) => BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES.includes(finding.code));\n const all = withEdges(graph, additions);\n if (isValid(all)) return all.data;\n // Some task's edges close a cycle: add them task by task, keeping each set that leaves the plan valid.\n let current = graph;\n for (const [taskRef, added] of additions) {\n const candidate = withEdges(current, new Map([[taskRef, added]]));\n if (isValid(candidate)) {\n current = candidate.data;\n } else {\n this.logger.warn?.(`Website task \"${taskRef}\" keeps its authored prerequisites: waiting on the tasks its claims cite would make the plan invalid`, { wouldWaitOn: added });\n }\n }\n return current;\n }\n\n /**\n * The build plan as the DISPATCH HOST reads it: the authored graph, plus the `database-migrations`\n * generation step whenever the application owes one and the plan does not author it (#1027).\n *\n * ## Why the host derives it rather than trusting the plan\n *\n * `bottom_up.build-decompose`'s method requires that step for every PostgreSQL-backed application,\n * and Wonder CRM's regenerated plan (2026-09-13) carried none — while all six of its schema tasks\n * could only write `shared-lib/`, never `backend-api/migrations/`. Each accepted schema change would\n * have left the model ahead of the accepted plan, and the application's boot gate refuses a missing\n * column (`postgresql_table_schema_mismatch`), so the lane would have taken its own application down.\n *\n * The model was given the rule and never the fact the rule keys on: the brief's workspace truth does\n * not state the database engine, and the method's instruction to `rg` the infra config is a command a\n * generation call cannot run. The validator could not catch it either — it receives the graph alone.\n * And no judgement is involved: whether a migration step is owed is a TOTAL function of two facts the\n * host already holds (`derive-before-you-ask.md`, \"could a function have produced my answer?\").\n *\n * ## The population, and the shape\n *\n * - Owed, per `assessSchemaPlanObligation`, in two cases that differ in whether a schema stage matters:\n * - an ACCEPTED plan and at least one SCHEMA stage — schema changes are what create drift against it;\n * - a declared PostgreSQL store with NO plan yet (#1144), with or without a schema stage — the initial\n * migration is owed by the ENGINE's resources alone, and the backend cannot boot before it exists.\n * This case was invisible while the lockfile was the only fact read: the foundation playbook was\n * believed to write the baseline and never did.\n * An UNDETERMINED store with a schema stage derives the step too, so the obligation stays visible: its\n * sync state is unanswerable, so it is passed over while other work is ready, and when nothing is its\n * refusal names why the store could not be read. A MongoDB-backed application is never offered it.\n * - An AUTHORED `database-migrations` step always wins. The derivation fills an omission; it never\n * second-guesses a plan that states its own ordering.\n * - PREPENDED, with NO prerequisites. Its landing condition is `SCHEMA_PLAN_IN_SYNC`, so it is landed\n * whenever the model and the accepted plan agree and becomes the FIRST ready task the moment an\n * accepted schema change creates drift — which is when it has to run, before anything restarts the\n * backend against a table it cannot build. The method's \"after the last schema stage\" was rejected\n * as the ordering: a schema task the loop guard skips forever (a stuck task never lands) would hold\n * the migration step behind it forever too.\n * - The obligation is read only after an authored step is ruled out, and costs a `stat` whenever a plan\n * is accepted; the authored infra config is loaded only for an application with no lockfile.\n *\n * ## What it costs\n *\n * `SCHEMA_PLAN_IN_SYNC` runs `wildo db diff --check` on every landed resolution, so every build-plan\n * read for such an application now asks the schema planner. Only an IN_SYNC answer lands the step. A\n * DRIFTED answer puts it first. An UNANSWERABLE one (any answer that is neither pass nor drift; the\n * causes are listed on `SchemaPlanSyncState`) leaves it un-landed but PASSED OVER while other tasks are ready, because running it then only throws.\n * This said an unanswerable check \"reads as NOT in sync, the step is offered, and running it over a\n * clean plan generates nothing\" — true of a clean plan, false of an unanswerable one, where offering\n * it first made every dispatch fail and stopped the whole plan (review, 2026-09-13).\n */\n /**\n * A plan that generates labels, for an application that enables more than one locale, owes a step\n * that TRANSLATES them (#2204).\n *\n * Translation used to be the second half of `i18n-labels`, so the graph had no node for \"the labels\n * exist\" separate from \"every locale is translated\", and every step that needed only the first\n * waited for the second. Measured on app-creation-test-004 (2026-10-01): the primary-locale labels\n * existed within minutes, translation into four locales ran for hours, and the documentation portal\n * — which reads primary-locale labels only — stayed dark the whole time.\n *\n * Derived rather than authored, for the reason {@link withHostDerivedMigrationStep} is: the\n * obligation follows from what the application declares (a second enabled locale) and from the plan\n * carrying a labels step, not from a decision the plan makes. A plan that authors its own\n * `i18n-translations` step gets none derived.\n *\n * - **Its only prerequisite is the labels step**, since translation reads the primary-locale files.\n * - **Nothing is made to depend on it.** The website and the application read their label files at\n * run time, so a translation landing needs no republish, and the portal is single-locale (#1993).\n * - **A one-locale application gets nothing**: the step would have no evidence paths, and an empty\n * list never lands, so it would sit at the head of the queue forever.\n */\n private withHostDerivedTranslationStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const isGenerationStep = (task: (typeof graph.tasks)[number], step: ApplicationBuildGenerationStep): boolean =>\n task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP && task.target.generationStepRef === step;\n if (graph.tasks.some((task) => isGenerationStep(task, ApplicationBuildGenerationStep.I18N_TRANSLATIONS))) return graph;\n\n const labelStepRefs = graph.tasks\n .filter((task) => isGenerationStep(task, ApplicationBuildGenerationStep.I18N_LABELS))\n .map((task) => task.taskRef);\n if (labelStepRefs.length === 0) return graph;\n if (this.generationSteps.resolveTranslationTargetLocales().length === 0) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF)) {\n // Same refusal as the other derived steps: a duplicate ref is rejected by the graph schema.\n this.logger.warn?.(\n `The build plan owes an i18n-translations step, but \"${HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n ...graph.tasks,\n {\n taskRef: HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF,\n objective: 'Translate the application\\'s labels into every enabled locale other than the primary one. '\n + 'Derived by the dispatch host because the build plan generates primary-locale labels and the application '\n + 'enables further locales.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.I18N_TRANSLATIONS,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.ASSEMBLE_VERIFY_AND_ITERATE,\n skillRefs: ['i18n-translation-rerun'],\n prerequisiteTaskRefs: labelStepRefs,\n servesRefs: [],\n },\n ],\n });\n }\n\n /**\n * A plan that authors documentation CHAPTERS owes a step that PUBLISHES them.\n *\n * Derived rather than authored, for the reason {@link withHostDerivedMigrationStep} is: the\n * obligation follows from what the plan CONTAINS, not from a decision the plan makes. An\n * application with a documentation chapter owes a portal; one without owes nothing.\n *\n * Measured on the first end-to-end journey run (#1273). The plan carried SIX\n * `DOCUMENTATION_CHAPTER` tasks and no publication step, so the chapters were authored and nothing\n * rendered them. The cost was not only an unbuilt portal: `technical-doc/src/pages/search.tsx`\n * imports the search index the publish writes, so that package could not typecheck at all, and\n * `check:technical-doc-typecheck` stayed red for the whole build — failing a documentation task on\n * a red it did not cause, at $19.33. Publishing by hand made 87 outputs and turned the check green\n * in one command.\n *\n * ## The prerequisites are the whole design\n *\n * Unlike the migration step, this one cannot run with `prerequisiteTaskRefs: []`:\n *\n * - **every chapter task**, or it renders a portal missing the chapters still being written;\n * - **`i18n-labels`**, and that one is not a nicety. Publication resolves the application's\n * organization-role documentation and REFUSES without the primary-locale label — *\"requires\n * primary-locale label 'roles.ORG_ADMIN.label'; generate the application's role labels before\n * publishing documentation\"*. Run before labels, it fails on exactly that, which is how the\n * first hand-run of this pipeline failed.\n *\n * Both are read off the graph, so a plan with no labels step simply contributes no such edge\n * rather than acquiring a dangling one.\n *\n * `i18n-labels` means the PRIMARY locale only. Translation is the separate `i18n-translations` step\n * ({@link withHostDerivedTranslationStep}), and publication deliberately has no edge to it: the\n * portal reads primary-locale labels and nothing else, so waiting on translation only kept it dark\n * for hours (#2204).\n */\n private withHostDerivedDocumentationPublicationStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const authorsPublicationStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION);\n if (authorsPublicationStep) return graph;\n\n const chapterTaskRefs = graph.tasks\n .filter((task) => (task.produces ?? []).some((product) => product.kind === BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER))\n .map((task) => task.taskRef);\n if (chapterTaskRefs.length === 0) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF)) {\n // Same refusal as the migration step's: deriving would duplicate a ref, which the graph schema\n // rejects — so say so rather than silently dropping the obligation.\n this.logger.warn?.(\n `The build plan owes a documentation-publication step, but \"${HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n const labelStepRefs = graph.tasks\n .filter((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.I18N_LABELS)\n .map((task) => task.taskRef);\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n ...graph.tasks,\n {\n taskRef: HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF,\n objective: 'Publish the application\\'s customer documentation portal, so the chapters this build authored are '\n + 'something a reader can reach. Derived by the dispatch host because the build plan authors documentation '\n + 'chapters and does not author the step that renders them.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.ASSEMBLE_VERIFY_AND_ITERATE,\n skillRefs: ['application-consumer-documentation-authoring'],\n prerequisiteTaskRefs: [...chapterTaskRefs, ...labelStepRefs],\n servesRefs: [],\n },\n ],\n });\n }\n\n /**\n * A plan that writes the design-system config owes a step that regenerates the stylesheet block from it\n * (#2358).\n *\n * The block in `frontend/src/index.css` is what the loading screen and the first paint use; the runtime\n * applies the config only after mount. A DESIGN_SYSTEM task may write the config file and nothing else\n * (`application-build-task-coding-policy`), and nothing else ran `wildo design-tokens generate`, so a\n * design system authored during creation reached the page after mount while the first paint kept the\n * scaffold's palette.\n *\n * Derived rather than authored, for the reason {@link withHostDerivedDocumentationPublicationStep} is:\n * the obligation follows from what the plan CONTAINS. A plan that authors its own `design-tokens` step\n * gets none derived.\n *\n * - **Its prerequisites are every writer of the block's inputs** ({@link isDesignTokenBlockInputWriter}): the\n * config's writers and the brand step, whose module the config imports (#2353). The block is a function\n * of the config's FINAL state, so it runs after the last of them.\n * - **Appended**, after everything it waits on, like the publication step.\n * - **Landing is the block, not the file**: the stylesheet is committed in every scaffolded application,\n * so the step lands only when that file is committed AND `wildo design-tokens validate` calls its block\n * current. A design-system change that does not move the block (a `theme`-only edit) lands it with no\n * run at all, which is the honest answer.\n */\n private withHostDerivedDesignTokensStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const authorsDesignTokensStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DESIGN_TOKENS);\n if (authorsDesignTokensStep) return graph;\n\n const writerTaskRefs = graph.tasks.filter(isDesignTokenBlockInputWriter).map((task) => task.taskRef);\n if (writerTaskRefs.length === 0) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DESIGN_TOKENS_TASK_REF)) {\n // Same refusal as the other derived steps: a duplicate ref is rejected by the graph schema.\n this.logger.warn?.(\n `The build plan owes a design-tokens step, but \"${HOST_DERIVED_DESIGN_TOKENS_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n ...graph.tasks,\n {\n taskRef: HOST_DERIVED_DESIGN_TOKENS_TASK_REF,\n objective: 'Regenerate the design-token block of the frontend stylesheet from the design-system config, so the '\n + 'first paint and the running application show the same design system. Derived by the dispatch host because '\n + 'the build plan writes the design-system config.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DESIGN_TOKENS,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.SHAPE_USER_EXPERIENCE,\n skillRefs: ['config-design-system'],\n prerequisiteTaskRefs: writerTaskRefs,\n servesRefs: [],\n },\n ],\n });\n }\n\n /**\n * The facts of the resource a website section's demo is drawn from (#2742 step 5e), read from the application's\n * domain model the way the target-resource neighbourhood is: one cached derivation, the plan's slug matched to the\n * registry's type by slugifying the registry's own keys. Best effort: a read that fails says so in the brief, and the\n * agent draws less rather than inventing a field.\n */\n private async resolveWebsiteDemoFacts(resourceRef: string | undefined): Promise<WebsiteSectionDemoFactsResolution | undefined> {\n if (resourceRef === undefined) return undefined;\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey).find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey === undefined) return { unavailable: 'The application declares no backend service, so its resources cannot be read.' };\n const { index } = await readWorkspaceElements(this.introspection, backendServiceKey);\n const resourceType = [...index.resources.keys()].find((candidate) => slugifyRegistryIdentifier(candidate) === resourceRef);\n const resource = resourceType === undefined ? undefined : index.resources.get(resourceType);\n if (resource === undefined) {\n return { unavailable: `The application has no resource \"${resourceRef}\" yet (it may be built by a task that has not landed), so the demo cannot be bound to its fields: draw it from what the plan says, and report the missing binding.` };\n }\n return { facts: websiteDemoResourceFacts(resource) };\n } catch (error) {\n this.logger.warn('Could not read the application\\'s resources for a website demo', { resourceRef, error: String(error) });\n return { unavailable: 'The application\\'s resources could not be read right now, so the demo is not bound to its fields: draw only fields you have read in its schema.' };\n }\n }\n\n /**\n * A plan that writes the design-system config owes a step that writes what the brand's visual tone decides — its\n * palette seeds and its theme personality — where the config can derive from them (#2353, #2359).\n *\n * The brand names its colours and its style (`visualTone`) and the config is where the palette and the theme live;\n * before this step nothing joined them, so the DESIGN_SYSTEM coding task picked colours by eye, copied a named theme,\n * and the brand reached the page only if the agent carried it over. Derived rather than authored, for the reason\n * {@link withHostDerivedMigrationStep} is: whether it is owed is a total function of what the plan contains and what\n * the config already imports.\n *\n * - **Owed** when the plan writes the design-system config ({@link isDesignSystemConfigWriter}), when it builds the\n * website ({@link isWebsiteBuildTask}: the site's theme is the brand's website palette and personality, so its\n * tempo, type and surfaces follow the visual tone too, #2742 step 5d), or when the config already imports the\n * module — so a config an earlier build wrote still follows a rebrand when the current plan writes no config.\n * Website tasks get no edge to it: the scaffold already carries the module they import.\n * - **Prepended, with no prerequisites**, the migration step's shape: its landing condition is\n * `BRAND_DESIGN_CURRENT`, so it is landed whenever its modules (the frontend's, and the website's colours when a\n * website is declared) say what the brand now renders, and becomes the first ready task the moment the brand\n * changes.\n * - **Every config writer waits on it**, the one derivation here that adds an edge to an authored task. The config\n * a writer produces imports this module, so a writer running first would be written against a file that does not\n * exist yet; and a wave (#1528) would otherwise dispatch the two together. The edge says only that.\n * - **An AUTHORED brand step wins**, ordering and all: the derivation fills an omission.\n */\n private async withHostDerivedBrandDesignStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n if (graph.tasks.some(isDesignSystemBrandStep)) return graph;\n\n const writerTaskRefs = new Set(graph.tasks.filter(isDesignSystemConfigWriter).map((task) => task.taskRef));\n const buildsWebsite = graph.tasks.some(isWebsiteBuildTask);\n if (writerTaskRefs.size === 0 && !buildsWebsite && !(await readDesignSystemConfigImportsBrandDesign(this.companionContext.saasRoot))) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF)) {\n // Same refusal as the other derived steps: a duplicate ref is rejected by the graph schema.\n this.logger.warn?.(\n `The build plan owes a design-system-brand step, but \"${HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF,\n objective: 'Write the brand\\'s palette seeds and theme personality to frontend/src/config/brand-design.ts, and the '\n + 'website\\'s palette and personality to website/src/brand-theme.ts when the application has a website, so the design-system '\n + 'config derives a readable palette and composes its theme from the brand, and the site shows the same primary, tempo and type. Derived '\n + 'by the dispatch host because the build plan writes the design-system config or builds the website, or the config already derives from '\n + 'this module.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DESIGN_SYSTEM_BRAND,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.SHAPE_USER_EXPERIENCE,\n skillRefs: ['config-design-system'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks.map((task) => (writerTaskRefs.has(task.taskRef) && !task.prerequisiteTaskRefs.includes(HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF)\n ? { ...task, prerequisiteTaskRefs: [...task.prerequisiteTaskRefs, HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF] }\n : task)),\n ],\n });\n }\n\n /**\n * The build plan with an `engine-capabilities` step at its head whenever the application's decisions imply a\n * capability its COMMITTED configuration does not enable (#2497).\n *\n * The foundation step is where those capabilities were turned on, and a build can be planned without it:\n * app-creation-test-005's capability composition was blocked (#2416), its modules came from ensure-module\n * tasks, and it shipped `ORGANIZATIONS: false` and no transactional email under an organization-tenancy plan.\n * Derived for the reason {@link withHostDerivedMigrationStep} is: the obligation follows from what the\n * application declares, not from a decision the plan makes, and the decomposer was never given the fact.\n *\n * - **Derived from the committed configuration, landed on the working tree** (#3204): the step lands as soon as the\n * configuration in the working tree enables the capabilities, and once a checkpoint commits it the host derives the\n * step no longer. The two readings differ for at most one checkpoint interval, and with no edges nothing waits on it.\n * - **At the head, with no edges.** Composed resources assume their primary scope's capability, so it runs\n * first; and nothing names it as a prerequisite, because once it has landed the host derives it no longer\n * and an edge to it would dangle.\n * - **Only what a step can satisfy.** A capability only a commercial provider serves (BILLING, SMS) is left\n * out by the derivation, or the step could never land and would hold the build.\n * - **Best effort.** A derivation that cannot be read derives nothing: the foundation's own run is still the\n * primary door, and refusing the whole plan over this read would trade a missing capability for a stopped build.\n */\n private async withHostDerivedEngineCapabilitiesStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const authorsStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.ENGINE_CAPABILITIES);\n if (authorsStep) return graph;\n let unmet: readonly string[];\n try {\n const condition = await this.generationSteps.resolveGenerationStepLandedCondition({\n taskRef: HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF,\n target: { kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP, generationStepRef: ApplicationBuildGenerationStep.ENGINE_CAPABILITIES },\n } as BuildPlanTask);\n if (condition.kind !== ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) return graph;\n unmet = await this.capabilitiesNotEnabledIn(condition, this.createCommittedTreeReader());\n } catch (error) {\n this.logger.warn?.('Could not derive the engine capabilities this application\\'s decisions imply; deriving no step for them', {\n error: describeCaughtError(error),\n });\n return graph;\n }\n if (unmet.length === 0) return graph;\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF)) {\n this.logger.warn?.(\n `The build plan owes an engine-capabilities step, but \"${HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF,\n objective: `Turn on the engine capabilities this application's decisions imply and its configuration does not enable: ${unmet.join(', ')}. `\n + 'Derived by the dispatch host, the same derivation the foundation step applies.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.ENGINE_CAPABILITIES,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.CONFIGURE_APPLICATION_FOUNDATION,\n skillRefs: ['config-saas'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks,\n ],\n });\n }\n\n /**\n * Where each requirement stands in the build, for the website copy that cites it (#2507 review F1, F5): the tasks\n * serving it, whether each landed, what a run serving it reported still unmet, and the roadmap phase delivering it.\n * A requirement is DELIVERED only when it is served, every serving task landed, no serving run reported it unmet,\n * and no phase AFTER the current one is the only one delivering it.\n *\n * Website tasks are left out of the serving set: a page does not deliver the capability it describes. Best effort:\n * `undefined` when the plan, its landings or the completed coding runs cannot be read, and the brief then describes\n * nothing as available. Without the runs, a gap a run reported would not count against delivery (#2672).\n */\n private async resolveWebsiteClaimDelivery(companionExports: unknown): Promise<((requirementRef: string) => WebsiteClaimDelivery) | undefined> {\n try {\n const plan = await this.readBuildPlan();\n const { landed: landedOrClosed, closedTaskRefs } = await this.resolveLandedTaskRefs(plan.tasks);\n // A DECLINED follow-up is landed for the plan, but the gap it answers is not worked: it delivers nothing (#3227).\n const landed = new Set([...landedOrClosed].filter((taskRef) => closedTaskRefs.get(taskRef)?.kind !== BuildTaskClosureKind.DECLINED));\n // Unreadable runs say nothing about what a run reported still unmet, so nothing is described as available (#2672).\n // A projection error is not swallowed here either: it reaches the catch below, which names it.\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return undefined;\n const roadmap = RoadmapSnapshotSchema.safeParse(\n decidedFamilyValuesFromCompanionExports(companionExports as Record<string, unknown>)[ApplicationSpecificationFamily.ROADMAP],\n );\n const phases = roadmap.success ? roadmap.data.phases : [];\n const followUps = await this.deriveFollowUps(plan.tasks, runs.latest);\n return (requirementRef) => deriveWebsiteClaimDelivery(requirementRef, {\n tasks: plan.tasks,\n landedTaskRefs: landed,\n // A gap a landed later run stated met (#3227) is no longer missing, as the follow-up derivation reads it.\n reportedMissing: (taskRef, ref) => (followUps.gapMetSince(taskRef, ref)\n ? undefined\n : runs.latest.get(taskRef)?.unmetRequirements?.find((entry) => entry.requirementRef === ref)?.missing),\n // The follow-up `withHostDerivedFollowUpTasks` derives for THIS report, by the same derivation (re-review R1, #3227).\n followUpTaskRefFor: followUps.followUpTaskRefFor,\n phases,\n });\n } catch (error) {\n this.logger.warn?.('Website claim delivery could not be read; the brief will describe nothing as available', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The latest COMPLETED coding run of each build task (#2496), read by the follow-up derivation and cached for two\n * seconds: `readBuildPlan` runs on every board poll and dispatch, and one listing per burst is enough. Nothing that\n * decides LANDING reads it, so a listing up to two seconds old can only delay a follow-up by one poll.\n *\n * Read to {@link BUILD_TASK_RECORD_HISTORY_CEILING}, the build record's bound, not to the 200-run window: a follow-up is\n * derived again on every plan read, so an origin whose latest completed run fell out of a narrower window would lose\n * the follow-up it had already derived, and the plan would drop a task it was running (#2530). `truncated` says the\n * listing still hit that ceiling, so an old origin's report may be missing from it.\n *\n * `undefined` means the LISTING could not be read, and only that (#2672). Every caller then says less: no follow-up\n * is derived, and the website brief describes nothing as available. Projecting a listed row is our own code, so an\n * error there is a programming error and REJECTS. It used to share the listing's catch, which reported it as \"no\n * follow-up tasks\": rows carrying strings where the row type has dates made the projection throw, and every reported\n * gap went unbuilt while the plan read as complete.\n */\n private readLatestCompletedCodingRuns(): Promise<{ readonly latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>; readonly truncated: boolean } | undefined> {\n const now = Date.now();\n if (this.latestCompletedCodingRuns !== undefined && now - this.latestCompletedCodingRuns.at < LATEST_COMPLETED_CODING_RUNS_TTL_MS) {\n return this.latestCompletedCodingRuns.value;\n }\n const value = this.fetchLatestCompletedCodingRuns();\n this.latestCompletedCodingRuns = { at: now, value };\n value.catch(() => { this.latestCompletedCodingRuns = undefined; });\n return value;\n }\n\n /**\n * {@link readLatestCompletedCodingRuns} without its cache: for a reader that must see a record it just wrote (#2593).\n * Same contract: read to the build record's ceiling, `undefined` only when the listing cannot be read, and a\n * projection error rejects (#2672).\n */\n private async fetchLatestCompletedCodingRuns(): Promise<{ readonly latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>; readonly truncated: boolean } | undefined> {\n let rows: Awaited<ReturnType<CompanionExecutionsCompanionService['listActorExecutions']>>;\n try {\n // Not parsed through the route's query schema, whose 200 is the HTTP request's bound: in-process the listing pages.\n rows = await this.executions.listActorExecutions({\n systemRef: APPLICATION_CODING_SYSTEM_REF,\n status: FlowsActors_Status.COMPLETED,\n limit: BUILD_TASK_RECORD_HISTORY_CEILING,\n });\n } catch (error) {\n this.logger.warn?.('Could not list the completed coding runs: no follow-up task is derived, the website brief describes nothing as available, and no website copy or drawing is reviewed', { error: describeCaughtError(error) });\n return undefined;\n }\n const latest = new Map<string, ApplicationBuildTaskAttempt>();\n for (const projected of rows.map(projectBuildTaskAttempt)) {\n if (projected === null || projected.attempt.status !== FlowsActors_Status.COMPLETED) continue;\n const previous = latest.get(projected.taskRef);\n if (previous === undefined || previous.startedAt < projected.attempt.startedAt) latest.set(projected.taskRef, projected.attempt);\n }\n return { latest, truncated: rows.length >= BUILD_TASK_RECORD_HISTORY_CEILING };\n }\n\n /**\n * The follow-up tasks the requirements COMPLETED coding runs reported still unmet derive (#2496, #3227), appended to the\n * plan. The derivation is {@link deriveBuildPlanFollowUpTasks}: one follow-up per reporting run, folding every requirement\n * it reported, with a stable identity, chained to the follow-up before it on the same target.\n *\n * 005's workers wrote \"office/field access is only partly met\" and \"the roles do nothing yet … it still needs its own\n * work\" into closing reports that every run was accepted on, and no later task, coherence entry or judge picked any of\n * it up. A run now states such a gap in a typed block; this derives the task that answers it, so the gap re-enters the\n * build loop instead of ending in prose. Under the YOLO posture it marks and proceeds: the reporting run still lands.\n * A follow-up's own report derives nothing further, which keeps the chain one step long. The follow-up still lands\n * (RAN-not-PROVEN, see `resolveLandedTaskRefs`), and its record keeps the gap it still reports, for a person to read.\n * One bad follow-up is skipped and named, never the reason the plan cannot be read.\n */\n private async withHostDerivedFollowUpTasks(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n // `undefined` only when the listing could not be read, which the reader has already said (#2672). A projection error\n // propagates and fails the plan read: read as \"no follow-ups\", it left every reported gap unbuilt.\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return graph;\n /*\n * Held per (plan tasks, latest completed runs) (#3204): the plan is read on every selection, board and landing read,\n * and this re-validated the whole plan once per follow-up and warned again on each read. On reference run 42666728304\n * a re-decomposed plan already naming the follow-ups logged \"already names another task\" 184 times in one burst,\n * beside the companion's event-loop stalls. Nothing else decides the answer, so a read with neither changed reuses it.\n */\n const memoKey = JSON.stringify({ tasks: graph.tasks, runs: [...runs.latest].map(([taskRef, attempt]) => [taskRef, attempt.runTaskId]).sort(([left], [right]) => String(left).localeCompare(String(right))) });\n if (this.followUpDerivationMemo?.key === memoKey) return this.followUpDerivationMemo.graph;\n const derived = await this.deriveFollowUpTaskGraph(graph, runs);\n this.followUpDerivationMemo = { key: memoKey, graph: derived };\n return derived;\n }\n\n private followUpDerivationMemo: { readonly key: string; readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> } | undefined;\n\n private async deriveFollowUpTaskGraph(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n runs: NonNullable<Awaited<ReturnType<ApplicationBuildDispatchCompanionService['readLatestCompletedCodingRuns']>>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const derivation = await this.deriveFollowUps(graph.tasks, runs.latest);\n for (const skipped of derivation.notDerived) {\n if (skipped.reason === FollowUpGapNotDerivedReason.MET_SINCE && skipped.metSince !== undefined) {\n // Every drop is logged, with the run that stated it met and where (#3227).\n this.logger.info?.(`A reported gap on ${skipped.originTaskRef} derives no follow-up: ${skipped.metSince.metByTaskRef}'s landed run ${skipped.metSince.metByRunTaskId} states ${skipped.requirementRef} met (${skipped.metSince.evidence}).`, {\n requirementRef: skipped.requirementRef,\n reportingRunTaskId: skipped.reportingRunTaskId,\n metByTaskRef: skipped.metSince.metByTaskRef,\n metByRunTaskId: skipped.metSince.metByRunTaskId,\n });\n continue;\n }\n this.logger.warn?.(`A reported gap on ${skipped.originTaskRef} derives no follow-up (${skipped.reason}): that target does not land by a coding run, so a follow-up would read as landed without running, or never run. The gap stays on the run's record.`, { requirementRef: skipped.requirementRef });\n }\n const taskRefs = new Set(graph.tasks.map((task) => task.taskRef));\n let current = graph;\n /*\n * Each follow-up waits on the last one APPENDED on its target (#3227 review F3): a follow-up skipped below would\n * otherwise be named as the next one's prerequisite, which the plan refuses as unknown, and the rest of its target's\n * chain would be dropped with it.\n */\n const lastAppendedOnTarget = new Map<string, string>();\n for (const derived of derivation.followUps) {\n const followUp = chainFollowUpAfter(derived.task, lastAppendedOnTarget.get(derived.targetKey));\n if (taskRefs.has(followUp.taskRef)) {\n this.logger.warn?.(`Reported gaps derive \"${followUp.taskRef}\", which already names another task; not deriving it`, { origins: followUp.prerequisiteTaskRefs });\n continue;\n }\n const extended = BuildPlanTaskGraphSchema.safeParse({ ...current, tasks: [...current.tasks, followUp] });\n if (!extended.success) {\n this.logger.warn?.(`Reported gaps on ${followUp.prerequisiteTaskRefs.join(', ')} could not become a follow-up task; they stay on the runs' records`, { issues: extended.error.issues.map((issue) => issue.message) });\n continue;\n }\n current = extended.data;\n taskRefs.add(followUp.taskRef);\n lastAppendedOnTarget.set(derived.targetKey, followUp.taskRef);\n }\n /*\n * Whenever the cap is hit, derived or not (#2496 review N1): the gap the cap hides is exactly the case that derives\n * nothing. Once per process, since the plan is read on every board poll and the answer does not change between them.\n */\n if (runs.truncated && !this.followUpListingTruncationWarned) {\n this.followUpListingTruncationWarned = true;\n this.logger.warn?.(`The coding-run listing hit its ${BUILD_TASK_RECORD_HISTORY_CEILING}-run ceiling: a gap an older run reported may not have derived its follow-up.`);\n }\n return current;\n }\n\n /**\n * The follow-up derivation over a plan and the latest completed runs (#2496, #3227): one function for every reader.\n *\n * A gap a later run STATED met is dropped only once this host confirms two things the pure candidates cannot know\n * ({@link collectFollowUpGapsMetSince}): the stating run LANDED, meaning every file its write record holds as its own is\n * committed (a statement about a tree whose work is still uncommitted is about a tree HEAD does not have), and the gap's\n * follow-up was never attempted, in any state (a follow-up the build ran or is running never leaves the plan, #2530).\n * Both are read only when a candidate exists, so a plan with no met statement costs nothing extra. Anything this cannot\n * read keeps the gap: an unknown is not a statement that it is met.\n */\n private async deriveFollowUps(tasks: readonly BuildPlanTask[], latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>): Promise<FollowUpDerivation> {\n const candidates = collectFollowUpGapsMetSince({ tasks, latestCompletedRuns: latest });\n if (candidates.length === 0) return deriveBuildPlanFollowUpTasks({ tasks, latestCompletedRuns: latest });\n const metSince = new Map<string, FollowUpGapMetSince>();\n try {\n const attempted = await this.readAttemptedBuildTaskRefs();\n const landedRuns = await this.selectLandedRunTaskIds([...new Set(candidates.map((candidate) => candidate.metByRunTaskId))]);\n for (const candidate of candidates) {\n if (attempted.has(candidate.followUpTaskRef) || !landedRuns.has(candidate.metByRunTaskId)) continue;\n // The first confirmed statement, in plan order, is the one the log names.\n if (!metSince.has(followUpGapKey(candidate.gap))) metSince.set(followUpGapKey(candidate.gap), candidate);\n }\n } catch (error) {\n this.logger.warn?.('Could not confirm the runs that state a reported gap met; every reported gap derives its follow-up', { error: describeCaughtError(error) });\n }\n return deriveBuildPlanFollowUpTasks({ tasks, latestCompletedRuns: latest, metSince });\n }\n\n /**\n * Every build task with ANY coding run in the history, whatever its state (#3227): a follow-up attempted keeps its gaps.\n * Throws when the listing reached its ceiling: a follow-up attempted before the window would read as never attempted.\n */\n private async readAttemptedBuildTaskRefs(): Promise<ReadonlySet<string>> {\n const rows = await this.executions.listActorExecutions({ systemRef: APPLICATION_CODING_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n // A listing cut at its ceiling may miss an older attempt: unknown, so nothing is confirmed met (#2530).\n if (rows.length >= BUILD_TASK_RECORD_HISTORY_CEILING) throw new Error(`the coding-run listing reached its ${BUILD_TASK_RECORD_HISTORY_CEILING}-run ceiling, so an older attempt may be missing`);\n const refs = new Set<string>();\n for (const row of rows) {\n const taskRef = (row.standaloneTasks[0]?.input as { taskRef?: unknown } | undefined)?.taskRef;\n if (typeof taskRef === 'string') refs.add(taskRef);\n }\n return refs;\n }\n\n /**\n * Which completed coding runs LANDED (#3227): their write record exists. Since #3204 a task lands on the WORKING tree, so\n * what a completed run wrote reached the tree the moment it settled, and a gap it states as met counts from then; it used\n * to wait for the run's files to be committed, which a checkpoint now does up to a minute later (review of 4a1b1f1bf F3:\n * the refill right after the settlement derived the follow-up, and a dispatched follow-up never leaves the plan). A run\n * with no record is unknown, so not landed.\n */\n private async selectLandedRunTaskIds(runTaskIds: readonly string[]): Promise<ReadonlySet<string>> {\n if (this.codingRunWrites === undefined) return new Set();\n const records = await Promise.all(runTaskIds.map((taskId) => this.codingRunWrites!.read(taskId)));\n return new Set(records.flatMap((record) => (record ? [record.taskId] : [])));\n }\n\n /**\n * The build plan with a `display-name` step at its head whenever the landed brand's name is not the COMMITTED\n * `displayName` (#2505). Derived for the reason {@link withHostDerivedEngineCapabilitiesStep} is: the brand decided\n * the name, and applying it is a consequence, not a decision the plan makes. No edges, so it never dangles once it\n * has landed and is derived no longer. Best effort: an unreadable brand derives nothing.\n */\n private async withHostDerivedDisplayNameStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const authorsStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DISPLAY_NAME);\n if (authorsStep) return graph;\n let condition: Awaited<ReturnType<typeof this.generationSteps.resolveGenerationStepLandedCondition>>;\n try {\n condition = await this.generationSteps.resolveGenerationStepLandedCondition({\n taskRef: HOST_DERIVED_DISPLAY_NAME_TASK_REF,\n target: { kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP, generationStepRef: ApplicationBuildGenerationStep.DISPLAY_NAME },\n } as BuildPlanTask);\n } catch (error) {\n this.logger.warn?.('Could not read the brand\\'s name; deriving no display-name step', { error: describeCaughtError(error) });\n return graph;\n }\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) {\n this.logger.warn?.('Could not read the brand\\'s name; deriving no display-name step', { detail: condition.detail });\n return graph;\n }\n if (condition.kind !== ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) return graph;\n if (await this.displayNameApplied(condition, this.createCommittedTreeReader())) return graph;\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DISPLAY_NAME_TASK_REF)) {\n this.logger.warn?.(`The build plan owes a display-name step, but \"${HOST_DERIVED_DISPLAY_NAME_TASK_REF}\" already names another task; not deriving it.`);\n return graph;\n }\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_DISPLAY_NAME_TASK_REF,\n objective: `Name the application \"${condition.displayName}\", as its brand decided: the SaaS config's displayName and every file the scaffold wrote the provisional name into. `\n + 'Derived by the dispatch host because the brand names the application and nothing has applied it.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DISPLAY_NAME,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.CONFIGURE_APPLICATION_FOUNDATION,\n skillRefs: ['config-saas'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks,\n ],\n });\n }\n\n /** Does `tree`'s configuration declare the display name a DISPLAY_NAME_APPLIED condition names (#2505)? */\n private async displayNameApplied(condition: { readonly configPath: string; readonly displayName: string }, tree: CommittedTreeReader): Promise<boolean> {\n const content = await tree.readText(condition.configPath);\n return content !== undefined && content !== null && readApplicationDisplayName(content) === condition.displayName;\n }\n\n /** The capabilities an ENGINE_CAPABILITIES_ENABLED condition names that `tree`'s configuration does not enable (#2497). */\n private async capabilitiesNotEnabledIn(\n condition: { readonly configPath: string; readonly capabilities: readonly string[] },\n tree: CommittedTreeReader,\n ): Promise<readonly string[]> {\n const content = await tree.readText(condition.configPath);\n // No committed configuration (or none readable) enables nothing.\n if (content === undefined || content === null) return [...condition.capabilities];\n return condition.capabilities.filter((capability) => readEngineCapabilityEnabled({ filePath: condition.configPath, content, capability }) !== true);\n }\n\n private async withHostDerivedMigrationStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const authorsMigrationStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DATABASE_MIGRATIONS);\n if (authorsMigrationStep) return graph;\n const hasSchemaStage = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE\n && task.target.stage === BuildPlanResourceStage.SCHEMA);\n const { obligation } = await this.generationSteps.assessSchemaPlanObligation();\n const owed = obligation === ApplicationSchemaPlanObligation.BASELINE_OWED\n || (hasSchemaStage && (obligation === ApplicationSchemaPlanObligation.ACCEPTED_PLAN || obligation === ApplicationSchemaPlanObligation.UNDETERMINED));\n if (!owed) return graph;\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF)) {\n // The ref is taken by a task that is NOT a migration step. Deriving would duplicate a ref, which\n // the graph schema refuses — so say so rather than silently dropping the obligation.\n this.logger.warn?.(\n `The build plan owes a database-migrations step, but \"${HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF,\n objective: (obligation === ApplicationSchemaPlanObligation.BASELINE_OWED\n ? 'Generate the initial migration and its schema-plan baseline, so the tables this PostgreSQL application declares exist before its backend boots. '\n : 'Migrate the schema drift that accepted schema-stage changes created, so the application can still boot. ')\n + 'Derived by the dispatch host because the build plan owes this step and does not author it.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DATABASE_MIGRATIONS,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.MODEL_DOMAIN_GRAPH,\n skillRefs: ['application-database-migrations'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks,\n ],\n });\n }\n\n /**\n * What the run is allowed to see — the PUSH floor of the dispatch lane's context (issue #253).\n *\n * Widened 2026-09-02 from \"the task itself and nothing else yet\" to the lean mandatory core the\n * epic's re-analysis decided, and deliberately no further: everything an agent might need beyond\n * its target's blast radius is the PULL door's job (`wildo context …`, issue #252), which the\n * `live-queries` source below points at. Anticipating everything here would be the planner trap\n * (#254) re-entering through the push door. Everything is model-safe by construction — the\n * application's own accepted build plan, its own live registry, its own domain plan, its installed\n * skill index and its own configuration (#2495) — and the contract's composer re-asserts\n * `SAFE_FOR_MODEL` on every source regardless.\n *\n * The skill-index source is the one deliberate widening past \"the target's blast radius\" (#2495):\n * measured over 005's coding runs, workers never opened the index and read the engine's compiled\n * code instead, so a door they do not know to open is not a pull door. It carries only the domains\n * the task's own skills belong to (median ~5 KB over 005's plan; a website task reaches ~26 KB,\n * the Website domain being the index's largest), plus the names of the others.\n *\n * ## Failure posture: best-effort on the derived sources, deliberately\n *\n * The playbook lane's workspace-truth section fails CLOSED, because a tool-less planner with no\n * workspace truth invents module ids. A CODING agent is the opposite case on both counts: it has\n * tools (it can read the tree, and the door), so a missing derived source degrades speed rather\n * than truth — while refusing the dispatch because a subprocess hiccuped would block the build on\n * context the run could recover for itself. So: the TASK is always present, the derived sources\n * are added when their reads succeed, and a failed read is a WARN naming what was omitted.\n *\n * ## No new cache, verified rather than assumed\n *\n * The re-analysis asked for the introspection read to be cached across a 55-task plan. It already\n * is: `CompanionIntrospectionService.requestInfo` carries its own source-state derivation cache,\n * keyed on the observed workspace state — asking again after nothing changed is a cache hit, and\n * a landed task invalidates it by changing the sources it hashes. Adding a second cache here would\n * be a copy that can only ever disagree.\n */\n\n /** The coding contract for one task: its skills resolved once, and carried by both the contract and its self-description. */\n private async composeTaskCodingContract(\n task: BuildPlanTask,\n boundary: Parameters<typeof composeBuildTaskCodingContract>[0]['boundary'],\n totalTasks: number,\n landedOverride?: BuildTaskLandedOverride,\n refusedSpecifications?: readonly SpecificationRefusal[],\n unmetProduct?: { readonly probes: readonly BuildPlanTaskLandedProbe[]; readonly completedRuns: number },\n ): Promise<ReturnType<typeof composeBuildTaskCodingContract>> {\n const skillRefs = await this.resolveTaskSkillRefs(task);\n const contextSources = await this.buildContextSources(task, totalTasks, skillRefs);\n return composeBuildTaskCodingContract({\n task,\n boundary,\n // An operator ran this task although its probe calls it landed: the run is told why (#2409). A task whose\n // specification its factory refused is told the validator's error (#3210).\n contextSources: [\n ...contextSources,\n ...(landedOverride ? [landedOverrideContextSource(landedOverride)] : []),\n ...(refusedSpecifications !== undefined && refusedSpecifications.length > 0 ? [refusedSpecificationContextSource(refusedSpecifications)] : []),\n ...(unmetProduct !== undefined && unmetProduct.probes.length > 0 ? [unmetProductContextSource(unmetProduct.probes, unmetProduct.completedRuns)] : []),\n ],\n objectiveRef: 'application-creation:objective/build-plan',\n installedSkillRefs: skillRefs,\n });\n }\n\n /**\n * The skills a coding task is authored with — the ONE list the contract's `installedSkillRefs`, the\n * task self-description and the dispatch plan all carry. A website task's are DERIVED from the website\n * plan (a section is authored with the skill its kind names), and an experience task's from its\n * products (a view, a frontend configuration, a milestone, a piece of guidance — #1660), not trusted\n * from the decomposer's model; every other task keeps what it declared.\n *\n * One list on purpose: the agent's prompt loads `installedSkillRefs` and treats context sources as\n * data, so a derivation that reached only the self-description was a skill the agent was never told to\n * load — the first version of this fix did exactly that.\n *\n * Whichever list that is, the skills the task's PRODUCTS require are added to it (#1832): an inbound\n * channel handler is authored with `inbound-channels` on every path, including a task that also carries\n * an experience product and so takes the experience derivation. So are the skills its TARGET requires\n * (#2495): a CONFIG task on a resource whose schema declares personal data carries the retention skill.\n */\n private async resolveTaskSkillRefs(task: BuildPlanTask): Promise<readonly string[]> {\n const targetDeclaresPersonalData = await this.targetResourceDeclaresPersonalData(task);\n return [...new Set([...(await this.resolveTargetSkillRefs(task)), ...productDerivedSkillRefs(task), ...targetDerivedSkillRefs(task, { targetDeclaresPersonalData })])];\n }\n\n /**\n * Whether a resource-stage task's target DECLARES personal data in its schema (#2495), read from the file its SCHEMA\n * task wrote (every CONFIG task depends on it). A schema that cannot be read is answered `false` and logged: the\n * retention skill is then not routed, which is the state before #2495, never a guess.\n */\n private async targetResourceDeclaresPersonalData(task: BuildPlanTask): Promise<boolean> {\n if (task.target.kind !== BuildPlanTaskTargetKind.RESOURCE_STAGE || task.target.stage !== BuildPlanResourceStage.CONFIG) return false;\n const schemaPath = resourceSchemaFilePath(task.target.moduleRef, task.target.resourceRef);\n try {\n return schemaSourceDeclaresPersonalData(await readFile(join(this.companionContext.saasRoot, schemaPath), 'utf8'));\n } catch (error) {\n this.logger.warn('Personal-data probe skipped: the target schema could not be read, so the retention skill is not routed', { taskRef: task.taskRef, schemaPath, error: String(error) });\n return false;\n }\n }\n\n private async resolveTargetSkillRefs(task: BuildPlanTask): Promise<readonly string[]> {\n if (task.target.kind === BuildPlanTaskTargetKind.WEBSITE) {\n try {\n return websiteTaskSkillRefs(task, await this.readSpecificationsForBrief());\n } catch (error) {\n this.logger.warn('Website skill derivation skipped; the task keeps its declared skills', { taskRef: task.taskRef, error: String(error) });\n return task.skillRefs;\n }\n }\n if (taskHasExperienceProduct(task)) {\n try {\n return experienceTaskSkillRefs(task, await this.readSpecificationsForBrief());\n } catch (error) {\n // Only an execution view needs the plan; every other experience product still derives from itself.\n this.logger.warn('Experience plan unreadable; skills derived from the products alone', { taskRef: task.taskRef, error: String(error) });\n return experienceTaskSkillRefs(task, undefined);\n }\n }\n return task.skillRefs;\n }\n\n /**\n * The specifications a brief is built from: everything that evaluated, with no read refused. One unavailable family\n * must not cost a section that never needed it, and `decidedFamilyValuesFromCompanionExports` reads every slot.\n * What is missing is said by {@link buildIncompleteBriefContextSource}, so a served hole is never read as an absence.\n * Only for a brief: a reader that DECIDES from an absence keeps the guarded surface.\n */\n private async readSpecificationsForBrief(): Promise<SpecificationFamilyData> {\n return unguardedSpecifications(await loadSpecificationFamilyData(this.companionContext));\n }\n\n /** The section saying which specifications modules failed and what this brief does not carry, or `null` when it is whole. */\n private async buildIncompleteBriefContextSource(omitted: readonly string[]): Promise<BuildTaskContextSource | null> {\n const { moduleFaults, loadError } = await readSpecificationsEvaluationFindings(this.companionContext);\n const failedModules = moduleFaults.filter((fault) => fault.causedBy.length === 0);\n if (failedModules.length === 0 && loadError === null && omitted.length === 0) return null;\n return {\n sourceRef: BRIEF_INCOMPLETE_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own statement about how it built this brief.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n statement: 'This brief is incomplete. It was built from what could be read, and every gap the companion knows of is listed here.',\n ...(failedModules.length === 0 ? {} : {\n failedSpecificationModules: failedModules.map((fault) => ({\n modulePath: fault.modulePath,\n reading: fault.reading,\n ...(fault.authoredFrame === null ? {} : { authoredFrame: fault.authoredFrame }),\n unavailableUntilFixed: fault.withheldSpecifications,\n })),\n note: 'While a module fails, a specification missing from this brief may exist: it is not known to be absent, so do not create it. '\n + 'Other writes to the specifications through the companion are refused until the module evaluates. If the failing module is within '\n + 'this task\\'s allowed paths, fix it first; if not, do the task on what is here and report the module in your result. '\n + '`wildo creation feed` prints each module\\'s error.',\n }),\n // What a failure said is left out: a thrown message is not the companion's own statement. `wildo creation feed` prints it.\n ...(loadError === null ? {} : { specificationsPackageUnreadable: 'The package did not evaluate: `wildo creation feed` prints why.' }),\n ...(omitted.length === 0 ? {} : { omittedSections: omitted }),\n },\n };\n }\n\n /**\n * Every section of one coding brief. Each declares its TRUST class where it is built (#2846): `BuildTaskContextSource`\n * requires one, so a section added without a class does not compile. Every section here is TRUSTED except the\n * third-party element sections appended last, which carry what the trusted ones routed out through `thirdParty`.\n */\n private async buildContextSources(task: BuildPlanTask, totalTasks: number, skillRefs: readonly string[]): Promise<readonly BuildTaskContextSource[]> {\n const sources: BuildTaskContextSource[] = [buildTaskSelfDescriptionContextSource(task, totalTasks, skillRefs)];\n // Every section below that could not be built, said in the brief as well as in the log (#3258): see the end of this method.\n const omitted: string[] = [];\n const omit = (section: string, error: unknown): void => {\n omitted.push(section);\n this.logger.warn(`${section} omitted from the dispatch context`, { taskRef: task.taskRef, error: String(error) });\n };\n /*\n * WHICH ELEMENTS CAME FROM THE WEB, from the compiled catalog. Never throws: a catalog that cannot be read, or names\n * no research step (a shipped one always does, so it was misread), routes EVERY decided element to a third-party\n * section (#2846 review L1). That marks more and blocks nothing. The brief says why, in a trusted section the run's\n * row copies.\n */\n const researchInformed = readCompiledResearchInformedContent();\n const thirdParty = new ThirdPartyBriefContent(researchInformed);\n // assurance-control: WILDO.SOFTWARE.AI_PRODUCED_CHANGE_CONTROL — a brief built without a readable catalog says so, and the run row records why.\n if (researchInformed.reading !== ResearchProvenanceCatalogReading.READ) {\n if (!this.unreadableProvenanceWarned) {\n this.unreadableProvenanceWarned = true;\n this.logger.warn('The compiled playbook catalog could not say which brief elements came from web research; every decided element is routed as third-party', {\n taskRef: task.taskRef, reading: researchInformed.reading, reason: researchInformed.unreadableReason,\n });\n }\n sources.push({\n sourceRef: BRIEF_PROVENANCE_UNAVAILABLE_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own statement about how it built this brief.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n reading: researchInformed.reading,\n ...(researchInformed.unreadableReason !== undefined ? { reason: researchInformed.unreadableReason } : {}),\n /*\n * Only what the brief's builders ROUTE (#2846 review N5): served elements and the website plan's resolved elements.\n * The vision one-liner, the task labels, the domain-plan slice, the placement plan and the build-task objective\n * never pass through routing. Their producers read research-informed input only screened or marked (#2937), and\n * with no classifier bound the brief says so in its own section (`DERIVED_TEXT_UNSCREENED_SOURCE_REF`).\n */\n effect: 'Every served element and every element the website plan resolves is in a THIRD_PARTY section, screened or marked '\n + 'as unscreened, because the companion could not tell which ones came from web research. The rest of the brief is '\n + 'carried as usual.',\n },\n });\n }\n\n /*\n * WHAT THE LAST ATTEMPT RAN INTO (#1536). A retry used to be byte-identical to the attempt that\n * failed, which is the definition of the loop an attempt budget exists to stop: the one input the\n * next attempt lacks is how the previous one failed. Shown with the re-arm note when there is one,\n * because \"it failed like this, and this was fixed\" is exactly what a retry needs. Best-effort.\n */\n try {\n const [latest] = await this.dispatch.listAttributableFailedRunsForBuildTask(task.taskRef, undefined, { includeRearmed: true });\n // Its check outputs and closing report are screened before they travel (#2937).\n if (latest !== undefined) sources.push(await screenRunOutputSection(previousAttemptContextSource(latest), this.briefScreeningHost(task.taskRef)));\n } catch (error) {\n omit('What the last attempt ran into', error);\n }\n\n /*\n * WHAT HAPPENED TO THE LAST COMPLETED ATTEMPT, when a sibling overwrote its product (#2210). The re-run\n * meets a shared file that now holds other tasks' entries and not its own; told nothing, an agent may\n * \"restore\" the file to what it wrote last time and remove theirs. Only the LATEST completed run is\n * read, so a task that has since completed cleanly is not told about an old collision. Best-effort.\n */\n try {\n const [latestCompleted] = [...(await this.dispatch.listCompletedRunsForBuildTask(task.taskRef))]\n .sort((left, right) => (right.completedAt ?? '').localeCompare(left.completedAt ?? ''));\n if (latestCompleted?.interference !== undefined) sources.push(interferedAttemptContextSource(latestCompleted.taskId, latestCompleted.interference));\n } catch (error) {\n omit('What happened to the last completed attempt', error);\n }\n\n /*\n * The DOOR MENU — tier-0 of the pull half: the live-query ids and the two commands that expand\n * them. Ids only, not descriptions: `wildo context list` IS the descriptions, one command away,\n * and rendering ~27 descriptions into every dispatch prompt would spend the budget this source\n * exists to save. Read from the same catalog the CLI menu serves, so it cannot drift from what\n * the companion actually answers.\n */\n const catalog = this.introspection.describeCatalog();\n sources.push({\n sourceRef: 'application-creation:context/live-queries',\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own catalog of what it answers.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance: 'Live application state is one shell command away — prefer asking over re-deriving from the tree. '\n + '`wildo context list` prints the menu with descriptions; `wildo context info <behaviorId>` runs one query; '\n + '`wildo context journey` shows the creation journey; `wildo context coherence` the cross-family coherence report; '\n + '`wildo context elements map|get|related` retrieves the product decisions already made (ICPs, requirements, phases…) '\n + 'a subset at a time — map first, then get the refs your task needs.',\n behaviorIds: catalog.behaviors.map((behavior) => behavior.behaviorId),\n },\n });\n\n /*\n * THE SKILLS BEYOND THE ROUTED ONES (#2495). Measured over ~100 coding runs of app-creation-test-005: the skill\n * index was opened 0 times, and where the routed skills fell short the workers read the engine's compiled `dist`.\n * The index is installed in the application; the brief carries the sections of the domains its routed skills\n * belong to (every sibling skill, with its trigger phrases) and the name of every other domain. Best-effort.\n */\n try {\n const indexMarkdown = await readFile(join(this.companionContext.saasRoot, INSTALLED_SKILL_INDEX_RELATIVE_PATH), 'utf8');\n const slice = sliceSkillIndexForTask(indexMarkdown, skillRefs);\n if (slice !== undefined) {\n sources.push({\n sourceRef: 'application-creation:context/skill-index',\n originRef: 'application-creation:origin/installed-skill-index',\n // Framework knowledge, compiled and installed by the framework.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance: `Your installed skills are listed above; these are the domains they belong to, with every sibling skill. A skill named here is at \\`.claude/skills/<id>/SKILL.md\\` — read it before reaching for the engine's compiled code. The whole catalogue is \\`${INSTALLED_SKILL_INDEX_RELATIVE_PATH}\\`.`,\n routedDomains: slice.routedDomains,\n otherDomains: slice.otherDomains,\n },\n });\n }\n } catch (error) {\n // A brief silently missing its skill index is the 005 state again.\n omit('The skill index', error);\n }\n\n /*\n * WHAT THE APPLICATION HAS TURNED ON (#2495). 005 shipped ORGANIZATIONS disabled under an organization-scoped domain\n * plan, and no worker could see it. Read from the configuration (total over the capability vocabulary) and the\n * domain plan's tenancy decision; a contradiction between them is stated, never resolved here. Best-effort.\n */\n try {\n const configContent = await readFile(join(this.companionContext.saasRoot, SAAS_CONFIG_FILE_NAME), 'utf8');\n let tenancy: DomainPlanTenancyModel | undefined;\n try {\n const exports = await this.readSpecificationsForBrief();\n const declared = (exports as { domainPlanSpecification?: { tenancy?: unknown } }).domainPlanSpecification?.tenancy;\n tenancy = Object.values(DomainPlanTenancyModel).find((member) => member === declared);\n } catch (error) {\n // The capabilities still reach the brief, without the tenancy comparison.\n omit('The comparison of the capabilities with the domain plan\\'s tenancy', error);\n }\n const facts = readApplicationCapabilityFacts({ configContent, configPath: SAAS_CONFIG_FILE_NAME, tenancy });\n sources.push({\n sourceRef: 'application-creation:context/application-capabilities',\n originRef: 'application-creation:origin/application-configuration',\n // The application's own committed configuration.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n ...facts,\n note: 'Engine capabilities as `wildo.saas.config.ts` declares them. Build only on what is enabled: an organization-scoped resource or an '\n + 'organization role assumes ORGANIZATIONS, a sent email assumes EMAIL_TRANSACTIONAL. A capability this task needs and the configuration '\n + 'does not enable is reported in your result, not enabled by you.',\n },\n });\n } catch (error) {\n omit('What the application has turned on', error);\n }\n\n const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;\n const resourceRef = task.target && 'resourceRef' in task.target ? task.target.resourceRef : undefined;\n\n // WORKSPACE TRUTH, sliced to the target: the target module's real resources and present schema\n // fields, plus the exact list of every module id (counts stay exact — a slice that hid the\n // population would under-report, and an agent that invents a module id dispatches a no-op).\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey) {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });\n if (result.success) {\n const snapshot = result.data as {\n modules?: ReadonlyArray<{ moduleId: string; resourceTypes: readonly string[] }>;\n resourceSchemaFields?: Record<string, readonly string[]>;\n };\n const modules = snapshot.modules ?? [];\n const targetModule = moduleRef === undefined\n ? undefined\n : modules.find((sharedModule) => slugifyRegistryIdentifier(sharedModule.moduleId) === moduleRef);\n sources.push({\n sourceRef: 'application-creation:context/workspace-truth',\n originRef: 'application-creation:origin/resources-registry-introspection',\n // The application's own registry, introspected: names of modules, resources and fields.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n allModuleIds: modules.map((sharedModule) => sharedModule.moduleId),\n ...(targetModule\n ? {\n targetModule: {\n moduleId: targetModule.moduleId,\n resources: targetModule.resourceTypes.map((resourceType) => ({\n resourceType,\n slugRef: slugifyRegistryIdentifier(resourceType),\n presentSchemaFields: snapshot.resourceSchemaFields?.[resourceType] ?? [],\n })),\n },\n }\n : {}),\n note: 'A resource listed here already EXISTS as a registered skeleton — its task is enrichment, not creation. '\n + 'A domain-plan resource NOT listed here does not exist yet. Full registry: `wildo context info resources-registry`.',\n },\n });\n } else {\n omit('The workspace truth', result.error.message);\n }\n }\n } catch (error) {\n omit('The workspace truth', error);\n }\n\n /*\n * THE TARGET RESOURCE AND WHAT IT IS CONNECTED TO (#1437).\n *\n * The module slice above answers \"what else is in this module\", which is neither what a\n * resource-targeted task needs nor all of it: it OVER-supplies the siblings the task never\n * touches, and UNDER-supplies the engine resources the target's own foreign keys point at —\n * `users`, `organizations`, the scope anchors, which are the most load-bearing edges a resource\n * has and are in no application module at all. It also carries field NAMES only: no\n * relationships, no operations, no specification prose.\n *\n * One hop from the target is the honest neighbourhood. Two hops reaches most of the application\n * through the scope anchors, which is the whole-registry answer with extra steps.\n *\n * Best-effort like every source here, and it costs a derivation the first time (~35 s) that\n * every later task on this application reads from cache. A dispatch runs for minutes and spends\n * real money; paying that once to stop the agent guessing at a relationship is the cheaper half.\n */\n if (resourceRef !== undefined) {\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey) {\n const { index, freshness } = await readWorkspaceElements(this.introspection, backendServiceKey);\n /*\n * The plan addresses resources by SLUG and the registry by `resourceType`; they differ\n * (`todoList` vs `todo-list`). Resolved by slugifying the index's own keys rather than by\n * un-slugifying the ref, because the slug is lossy and the registry is the authority on\n * which resources exist.\n */\n const resourceType = [...index.resources.keys()].find((candidate) => slugifyRegistryIdentifier(candidate) === resourceRef);\n const related = resourceType === undefined ? undefined : relatedWorkspaceResources(index, resourceType);\n if (related) {\n sources.push({\n sourceRef: 'application-creation:context/target-resource-neighbourhood',\n originRef: 'application-creation:origin/application-domain-model',\n // The application's own resources as its code declares them.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n freshness: describeWorkspaceFreshness(freshness),\n target: resourceType,\n edges: related.edges,\n resources: related.resources,\n ...(related.unresolved.length > 0 ? { unresolvedNeighbours: related.unresolved } : {}),\n note: 'The target resource as it EXISTS today, with its fields, operations and relationships, plus the '\n + 'resources one hop away. Direction matters: `foreignKeyHolderResourceType` says which side carries the key. '\n + 'Ask for more with `wildo context workspace get <resourceType>` or `wildo context workspace related <resourceType>`.',\n },\n });\n } else {\n // Said rather than omitted: a target the registry does not carry is a CREATION task, and\n // an absent section would read as a failed read.\n this.logDebug('Target resource is not registered yet — no neighbourhood to supply', { taskRef: task.taskRef, resourceRef });\n }\n }\n } catch (error) {\n omit('The target resource and what it is connected to', error);\n }\n }\n\n // THE DOMAIN-PLAN SLICE for the target: WHAT this task's objective enriches toward, in the\n // application's own accepted words — the module semantics and, for a relationship task, the\n // relationship drafts touching the target. Absent plan (older app, or foundation not run) is\n // simply absent; nothing here invents a fallback.\n try {\n const exports = await this.readSpecificationsForBrief();\n const domainPlan = (exports as { domainPlanSpecification?: unknown }).domainPlanSpecification as {\n modules?: ReadonlyArray<{ relatedModuleId: string; mainResources?: readonly string[]; supportingResources?: readonly string[] }>;\n relationships?: ReadonlyArray<{ relationshipRef: string; sourceResourceRef: string; targetResourceRef: string }>;\n lifecycles?: ReadonlyArray<{ resourceRef: string; transitions: ReadonlyArray<{ createsResourceRef?: string }> }>;\n } | undefined;\n const planModules = domainPlan?.modules ?? [];\n const targetPlanModule = moduleRef === undefined\n ? undefined\n : planModules.find((planModule) => slugifyRegistryIdentifier(planModule.relatedModuleId) === moduleRef);\n if (targetPlanModule) {\n const moduleResourceSlugs = new Set(\n [...(targetPlanModule.mainResources ?? []), ...(targetPlanModule.supportingResources ?? [])]\n .map((resourceType) => slugifyRegistryIdentifier(resourceType)),\n );\n sources.push({\n sourceRef: 'application-creation:context/domain-plan-slice',\n originRef: 'application-creation:origin/domain-plan',\n /*\n * The committed domain plan. Its producer reads no research step's evidence directly, so the derivation does not\n * taint it, and the research-informed families it reads reached its model screened or marked (#2937).\n */\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n targetModule: targetPlanModule,\n ...(resourceRef !== undefined ? { targetResourceRef: resourceRef } : {}),\n relationshipsTouchingModule: (domainPlan?.relationships ?? []).filter((relationship) =>\n moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.sourceResourceRef))\n || moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.targetResourceRef))),\n /*\n * The states, transitions and stamped fields of the module's resources (#2491 review F5), and any lifecycle\n * whose conversion creates one of them. The schema task creates the status enum and the stamped fields\n * from these, and a transition task needs its starting states; carried only in prose objectives, the\n * states were whatever the decomposer happened to restate.\n */\n lifecyclesTouchingModule: (domainPlan?.lifecycles ?? []).filter((lifecycle) =>\n moduleResourceSlugs.has(slugifyRegistryIdentifier(lifecycle.resourceRef))\n || lifecycle.transitions.some((transition) => transition.createsResourceRef !== undefined\n && moduleResourceSlugs.has(slugifyRegistryIdentifier(transition.createsResourceRef)))),\n },\n });\n }\n } catch (error) {\n omit('The domain plan slice', error);\n }\n\n // WHAT THIS TASK IS FOR (#1419): the full text of every element its `servesRefs` names — the\n // requirements, phases, success criteria and constraints it answers to — and a map of the other\n // tasks building the same module. Without it the agent knew WHAT to build and not what it was for:\n // no acceptance criterion, no served success criterion, no constraint. A deterministic derivation\n // through the one decided-element index (#1416), so it sits inside the push floor of decision\n // #251 — nothing here chooses context.\n try {\n const servedSource = buildServedElementsContextSource(task, await this.readSpecificationsForBrief(), thirdParty);\n if (servedSource !== null) sources.push(servedSource);\n } catch (error) {\n omit('What this task serves', error);\n }\n\n // WHAT A WEBSITE TASK IS BUILDING: its page or section as the website plan decided it, and the\n // boundary between a page task and its section tasks. See `buildWebsitePlanContextSource`.\n if (task.target.kind === BuildPlanTaskTargetKind.WEBSITE) {\n try {\n const companionExports = await this.readSpecificationsForBrief();\n const websiteSource = buildWebsitePlanContextSource(\n task,\n companionExports,\n await this.resolveWebsiteClaimDelivery(companionExports),\n await this.resolveWebsiteDemoFacts(websiteTaskDemoResourceRef(task, companionExports)),\n thirdParty,\n );\n if (websiteSource !== null) sources.push(websiteSource);\n } catch (error) {\n omit('The website plan', error);\n }\n }\n\n // WHAT A SHELL TASK MUST MAKE THE SHELL CARRY (#1554): the placement plan's decisions for its\n // surface, in the identities the landing probe compares. Same derivation as the probe's witness.\n if (task.target.kind === BuildPlanTaskTargetKind.SHELL_PLACEMENT) {\n try {\n sources.push(buildShellPlacementPlanContextSource(task.target.surface, await this.readSpecificationsForBrief()));\n } catch (error) {\n omit('The placement plan', error);\n }\n }\n\n /*\n * WHAT THIS BRIEF COULD NOT CARRY (#3258). Dispatch never holds on a failed specifications module: in an unattended\n * build the coding run is what repairs it, so a hold would be a deadlock whose remedy needs the run it stopped\n * (`continuity-drift-and-cas-basis.md` Rule 3). So the run goes, on what evaluated, and is told exactly what it lacks.\n */\n const incomplete = await this.buildIncompleteBriefContextSource(omitted);\n if (incomplete !== null) sources.push(incomplete);\n\n /*\n * WHAT WAS WRITTEN OUTSIDE THE REPOSITORY (#2846), last: every research-informed element the sections above would\n * have inlined, each in its own THIRD_PARTY section, screened through the application's content-safety classifier\n * before it travels. A flagged element is withheld with a notice; an element nothing could screen travels MARKED as\n * unscreened. Never a refusal: the lane runs whatever the classifier answers.\n */\n sources.push(...await screenThirdPartyBriefElements(thirdParty.elements(), this.briefScreeningHost(task.taskRef)));\n\n /*\n * WHAT NOTHING SCREENED UPSTREAM (#2937). A generation step's research-informed input is screened before its model\n * reads it, so with a classifier bound the requirements, plans and this task's objective were never derived from a\n * flagged instruction. With none bound that input was only marked, and the text those steps wrote is in TRUSTED\n * sections here: the brief says so rather than reclassing the whole application third-party (#2846's rejected\n * alternative). Read at brief time, from the companion's current binding.\n */\n const unscreened = unscreenedClassifierReason(this.briefScreeningHost(task.taskRef));\n if (unscreened !== undefined) {\n sources.push({\n sourceRef: DERIVED_TEXT_UNSCREENED_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own statement about how the text in this brief was produced.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n outcome: unscreened.outcome,\n ...('reason' in unscreened && unscreened.reason !== undefined ? { reason: unscreened.reason } : {}),\n note: DERIVED_TEXT_UNSCREENED_NOTICE,\n },\n });\n }\n return sources;\n }\n}\n\n/**\n * The previous FAILED attempt of a task, as a retry is shown it (#1536): its disposition, each check it\n * failed with the tail of that check's output, the agent's own closing words, and the re-arm note when\n * an operator released it. Read off the durable row; nothing new is recorded to produce it.\n */\nexport function previousAttemptContextSource(run: {\n readonly taskId: string;\n readonly settledAt?: string;\n /** When the run started; absent for one that never did (`deriveCodingRunStart`). */\n readonly startedAt?: string;\n readonly memory: unknown;\n readonly output: Record<string, unknown>;\n}): BuildTaskContextSource {\n const tail = (value: unknown): string | undefined =>\n typeof value === 'string' && value.length > 0 ? value.slice(-PREVIOUS_ATTEMPT_OUTPUT_TAIL_CHARS) : undefined;\n const verification = Array.isArray(run.output.verification) ? run.output.verification : [];\n const failedChecks = verification\n .filter((entry): entry is { checkRef?: unknown; outcome?: Record<string, unknown> } => typeof entry === 'object' && entry !== null)\n .filter((entry) => entry.outcome?.success === false)\n .map((entry) => ({\n checkRef: String(entry.checkRef ?? ''),\n ...(tail(entry.outcome?.message) ? { message: tail(entry.outcome?.message) } : {}),\n ...(tail(entry.outcome?.stdoutTail) ? { stdoutTail: tail(entry.outcome?.stdoutTail) } : {}),\n ...(tail(entry.outcome?.stderrTail) ? { stderrTail: tail(entry.outcome?.stderrTail) } : {}),\n }));\n const rearm = readBuildTaskRearm(run.memory);\n // A coding run records its failure as `error`, a refusal as `failure` — one reader for both (#2390).\n const failureMessage = readSettledRunFailureMessage(run.output);\n /*\n * Three different histories, told apart (#1581, second review A5). Telling the agent \"repeat the same\n * approach and it fails the same way\" is right only when the approach WAS judged: a turn the host took\n * away, or a dispatch refused before anything ran, judged nothing about the work.\n */\n // The budget lists FAILED runs only; whether one ever started is the shared derivation's answer.\n const start = deriveCodingRunStart({ status: FlowsActors_Status.FAILED, ...(run.startedAt ? { startedAt: run.startedAt } : {}), output: run.output });\n const guidance = start === CodingRunStart.REFUSED_CONTRACT\n ? 'A previous dispatch of this task was refused at admission for its OWN contract — nothing ran. The '\n + 'refusal below names what the contract gets wrong (for example a verification check this host does '\n + 'not register); dispatching it unchanged is refused the same way.'\n : start === CodingRunStart.REFUSED_BY_HOST\n ? 'A previous dispatch of this task was refused before it started, so nothing ran and nothing was judged. '\n + 'The refusal is below for context; it is not a verdict on any approach.'\n : run.output.failureAttribution === CodingRunFailureAttribution.HOST\n ? 'The previous attempt of this task was stopped by the HOST, not by its work: the turn was taken away '\n + '(a provider limit, a killed process, an operator cancel), the result could not be recorded, or a '\n + 'required check could not be asked. Nothing about the approach was judged; start the work normally, '\n + 'and read what it had reached if that helps.'\n : 'This task was attempted before and FAILED. Read why before starting: repeating the same approach '\n + 'will fail the same way. Fix what the failure names; do not work around a check.';\n return {\n sourceRef: 'application-creation:context/previous-attempt',\n originRef: 'application-creation:origin/dev-companion',\n /*\n * TRUSTED (#2846): the lane's own record of its own run, the application's checks on its own tree and the previous\n * worker's closing report. That worker read a brief whose third-party sections were screened or marked, but its own\n * words, and a check's output, may still carry text it read there or fetched itself: every caller passes this section\n * through `screenRunOutputSection` before a brief carries it (#2937).\n */\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance,\n runTaskId: run.taskId,\n ...(typeof run.output.failureAttribution === 'string' ? { failureAttribution: run.output.failureAttribution } : {}),\n ...(typeof failureMessage === 'string' ? { failure: failureMessage } : {}),\n ...(run.settledAt ? { failedAt: run.settledAt } : {}),\n ...(typeof run.output.disposition === 'string' ? { disposition: run.output.disposition } : {}),\n failedChecks,\n ...(tail(run.output.agentOutputTail) ? { agentClosingWords: tail(run.output.agentOutputTail) } : {}),\n ...(rearm ? { rearmedBecause: { reason: rearm.reason, note: rearm.note } } : {}),\n },\n };\n}\n\n/**\n * The previous COMPLETED attempt lost its product to a concurrent run (#2210). Pure, so what the re-run is\n * told can be pinned without composing a dispatch.\n */\nexport function interferedAttemptContextSource(runTaskId: string, interference: BuildTaskInterference): BuildTaskContextSource {\n return {\n sourceRef: 'application-creation:context/interfered-attempt',\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own record of which runs collided.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance: 'The previous attempt of this task COMPLETED, but other tasks running at the same time edited the same '\n + 'file(s) and its product was overwritten before it was committed. Nothing about the approach was judged. '\n + 'The files below are SHARED: open them as they stand now, add this task\\'s product beside what the other '\n + 'tasks put there, and do not remove or rewrite entries this task did not author.',\n runTaskId,\n sharedFiles: interference.contendedProductPaths,\n concurrentTasks: interference.overlappingTaskRefs,\n detectedAt: interference.detectedAt,\n },\n };\n}\n\n/**\n * The task's own DETERMINISTIC self-description — no introspection, no LLM.\n *\n * The first (and mandatory) context source of every coding task: what the task is, what it must\n * produce, and how its landing will be judged. A pure function of the task, so what the agent is told\n * about its own accountability can be pinned without composing a dispatch.\n *\n * (It was first extracted so a RESUME could rebuild a contract cheaply; that caller went when a parked\n * run's resume moved onto its actor execution in 02e241ae, which carries the context itself.)\n */\nexport function buildTaskSelfDescriptionContextSource(\n task: BuildPlanTask,\n totalTasks: number,\n /** The skills the agent is told to author with — the task's own unless the host derived better (a website task). */\n skillRefs: readonly string[] = task.skillRefs,\n): BuildTaskContextSource {\n return {\n sourceRef: 'application-creation:context/build-task',\n originRef: 'application-creation:origin/build-plan',\n // The committed build plan, decomposed from the application's own specifications.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n taskRef: task.taskRef,\n objective: task.objective,\n target: task.target,\n /*\n * WHAT THIS RUN IS ACCOUNTABLE FOR, and the agent has to be told.\n *\n * Landing is decided from `produces` (#597), so an agent that is not shown the artifacts it\n * must deliver can do excellent work on the objective's prose and still leave the task\n * unlanded — the host would re-offer it forever, and the cause would be invisible to\n * everyone. Handing it over costs nothing and is the same shape as `target`: a semantic\n * declaration the model reads, never a path it could author.\n */\n produces: task.produces,\n /*\n * HOW LANDING IS DECIDED, exactly (#1554). `produces` is the task's declaration; these are the\n * probes the host evaluates after the run, resolved by the same function landing calls. They\n * differ where the declaration is not what the tree spells: a SHELL_PLACEMENT task's refs name\n * the placement plan's decisions and appear in no file, so its probe asks what the composed\n * shell CARRIES (the `shell-placement-plan` source spells that out). An agent shown only\n * `produces` authored those refs as text, got one of two right by guessing from the objective,\n * and the run finished `completed_unlanded`.\n */\n landedWhen: resolveBuildTaskLandedProbes(task),\n /*\n * THE REQUIREMENTS THIS TASK SERVES (#2496). The agent reports one it could not fully meet against these refs, in\n * its closing report's `wildo-unmet-requirements` block; without them it could only describe a gap in prose, which\n * is how 005's workers said \"the roles do nothing yet\" and nothing ever acted on it.\n */\n servesRefs: task.servesRefs,\n functionalTopic: task.functionalTopic,\n skillRefs,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n positionInPlan: `one of ${totalTasks} tasks in the application's accepted build plan`,\n },\n };\n}\n\n/** One plan decision, with the identity the shell probe compares it by. */\nexport interface PlacementPlanShellExpectation {\n readonly decision: PlacementPlan['decisions'][number];\n readonly shellIdentity: string;\n /**\n * Who the placed entry is shown to (#2512), PER LAYER: the decision's own `requiredRoles` (written on the entry) and\n * its sidebar group's (written on the section). Never combined into one list: the browser expands core roles through\n * their inheritance, so an `ORG_MEMBER` group with an `ORG_ADMIN` decision intersects to nothing while admins see the\n * row. Each absent means everyone.\n */\n readonly audience: PlacementAudienceLayers;\n}\n\n/** The two layers a sidebar row's audience is written in; `undefined` is everyone. */\nexport interface PlacementAudienceLayers {\n readonly item?: readonly string[];\n readonly section?: readonly string[];\n}\n\n/** Whether two audiences admit the same roles; `undefined` is everyone. */\nfunction samePlacementAudience(left: readonly string[] | undefined, right: readonly string[] | undefined): boolean {\n if (left === undefined || right === undefined) return left === right;\n const leftSet = new Set(left);\n return leftSet.size === new Set(right).size && right.every((role) => leftSet.has(role));\n}\n\n/** Whether both layers admit the same roles. */\nfunction samePlacementAudienceLayers(left: PlacementAudienceLayers, right: PlacementAudienceLayers): boolean {\n return samePlacementAudience(left.section, right.section) && samePlacementAudience(left.item, right.item);\n}\n\n/** An audience as a reader sees it in a build record: `everyone`, or each restricted layer. */\nfunction describePlacementAudience(audience: PlacementAudienceLayers): string {\n const list = (roles: readonly string[]) => `[${[...roles].sort().join(', ')}]`;\n const layers = [\n ...(audience.section === undefined ? [] : [`section ${list(audience.section)}`]),\n ...(audience.item === undefined ? [] : [`item ${list(audience.item)}`]),\n ];\n return layers.length === 0 ? 'everyone' : layers.join(' + ');\n}\n\n/** What a placement plan asks of the shell, decision by decision. */\nexport interface PlacementPlanShellExpectations {\n /** What the plan PLACED on each surface. */\n readonly placed: ReadonlyMap<PlacementSurface, readonly PlacementPlanShellExpectation[]>;\n /** What the plan DECLINED — to be carried by no surface. */\n readonly declined: readonly PlacementPlanShellExpectation[];\n}\n\n/**\n * The PLAN half of the shell witness (#1538), as a pure function of the plan.\n *\n * Two readers need it and must not disagree: the landing probe, which compares it with what the\n * composed shell carries, and the coding agent, which has to be told it BEFORE the run (#1554). One\n * derivation is what makes \"the agent was shown the criterion it is judged by\" true by construction\n * rather than by two loops agreeing.\n */\nexport function derivePlacementPlanShellExpectations(plan: PlacementPlan): PlacementPlanShellExpectations {\n const placed = new Map<PlacementSurface, PlacementPlanShellExpectation[]>();\n const declined: PlacementPlanShellExpectation[] = [];\n const groupAudience = new Map(plan.groups.map((group) => [`${group.surface}::${group.groupRef}`, group.requiredRoles] as const));\n for (const decision of plan.decisions) {\n const shellIdentity = placementSubjectShellIdentity(decision.subject);\n if (decision.disposition === PlacementDisposition.DECLINED) {\n // A declined subject is shown to nobody, so it has no audience to compare.\n declined.push({ decision, shellIdentity, audience: {} });\n continue;\n }\n const address = decision.address;\n const section = address.surface === PlacementSurface.SIDEBAR ? groupAudience.get(`${address.surface}::${address.groupRef}`) : undefined;\n const audience: PlacementAudienceLayers = {\n ...(decision.requiredRoles === undefined ? {} : { item: decision.requiredRoles }),\n ...(section === undefined ? {} : { section }),\n };\n const entry = { decision, shellIdentity, audience };\n placed.set(address.surface, [...(placed.get(address.surface) ?? []), entry]);\n }\n return { placed, declined };\n}\n\n/**\n * A SHELL_PLACEMENT task's landing criterion, spelled for the agent that has to meet it (#1554).\n *\n * The task's `produces` names the plan's decision refs, which no file spells; the probe asks whether\n * the composed surface carries every subject the plan PLACED there and none it DECLINED, from\n * committed files. So the agent is handed the decisions themselves — subject, address and rationale —\n * each with the identity the probe compares, plus the command that reads the shell as the probe\n * reads it, so it can check its own work before finishing.\n *\n * Never `null` for a shell task: a missing or invalid plan is SAID, because \"nothing to place\" and\n * \"nothing says what to place\" lead the agent to opposite conclusions — the witness draws the same line.\n */\nexport function buildShellPlacementPlanContextSource(surface: PlacementSurface, companionExports: unknown): BuildTaskContextSource {\n // The committed placement plan: the application's own decisions about its shell.\n const base = { sourceRef: 'application-creation:context/shell-placement-plan', originRef: 'application-creation:origin/specification-families', trust: MetaWorkflow_ContextSourceTrust.TRUSTED, };\n const authored = (companionExports as Record<string, unknown> | null)?.['placementPlanSpecification'];\n const parsed = authored === undefined || authored === null ? undefined : PlacementPlanSchema.safeParse(authored);\n if (parsed === undefined || !parsed.success) {\n return {\n ...base,\n content: {\n surface,\n unanswerable: parsed === undefined\n ? 'The application has no placement plan, so nothing says what this surface should carry; the task cannot land until one exists.'\n : `The placement plan does not satisfy its schema (${parsed.error.issues.slice(0, 2).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}); the task cannot land until it does.`,\n },\n };\n }\n const describe = ({ decision, shellIdentity, audience }: PlacementPlanShellExpectation) => ({\n decisionRef: decision.decisionRef,\n subject: decision.subject,\n ...(decision.disposition === PlacementDisposition.PLACED ? { address: decision.address } : {}),\n rationale: decision.rationale,\n shellIdentity,\n // The entry's OWN audience, written on the entry; its section's is on its group in `groupsOnThisSurface`.\n ...(audience.item === undefined ? {} : { requiredRoles: audience.item }),\n });\n const expectations = derivePlacementPlanShellExpectations(parsed.data);\n /*\n * The containers the decisions address (#2481, #2512): each group on this surface with its purpose and order, on the\n * settings rail its sub-categories, and on the sidebar its audience. A decision names a group by ref only, so without\n * them the agent could place every section and still not know what heading to create, how to order it, that a category\n * has sub-categories a section's `subGroupRef` points into, or who a section is for.\n */\n const groupsOnThisSurface = parsed.data.groups.filter((group) => group.surface === surface).map((group) => ({\n groupRef: group.groupRef,\n purpose: group.purpose,\n order: group.order,\n ...(group.subGroups === undefined || group.subGroups.length === 0 ? {} : { subGroups: group.subGroups }),\n ...(group.requiredRoles === undefined ? {} : { requiredRoles: group.requiredRoles }),\n }));\n return {\n ...base,\n content: {\n surface,\n landingCriterion: `This task lands when the ${surface} surface, as the composed shell resolves it, carries every subject `\n + 'placed on it below and none of the declined subjects, and every file that surface is composed from is committed. '\n + 'The declarationRefs in `produces` name these decisions; they are never spelled in the tree, so writing them as text lands nothing. '\n + 'Roles are written per layer, exactly as listed: a group\\'s `requiredRoles` as `runtimeAvailability.requiredRoles` on its '\n + 'sidebar section, and an entry\\'s own `requiredRoles` on the entry. A layer that lists none carries none.',\n ...(groupsOnThisSurface.length === 0 ? {} : { groupsOnThisSurface }),\n placedOnThisSurface: (expectations.placed.get(surface) ?? []).map(describe),\n declinedEverywhere: expectations.declined.map(describe),\n selfCheck: '`wildo context info app-shell-placement-content` reports what each surface carries, in the same identities as '\n + '`shellIdentity` above. Run it before finishing: a placed identity it does not list is still missing.',\n },\n };\n}\n\n/**\n * The elements a build task SERVES, resolved, plus a map of its module's other tasks (#1419).\n *\n * Reads the task's own `servesRefs` edge through the decided-element index, so resolution is the same\n * membership routing every other surface uses. A ref that resolves to nothing is REPORTED in the\n * source, never skipped: the agent must know the task claims to serve something the application has\n * not decided (Wonder CRM carries one), rather than conclude it serves nothing. `null` when the task\n * declares nothing to serve and has no sibling in its module — the source would be empty.\n */\nexport function buildServedElementsContextSource(\n task: BuildPlanTask,\n companionExports: unknown,\n /**\n * Where a research-informed element goes instead of this section (#2846). REQUIRED, because this section is TRUSTED:\n * a served compliance constraint, or any element a research step filled, leaves it for its own screened section.\n */\n thirdParty: ThirdPartyBriefContent,\n): BuildTaskContextSource | null {\n const index = indexDecidedAspects(decidedFamilyValuesFromCompanionExports(companionExports as Record<string, unknown>));\n const TASK_ASPECT = 'build-plan.task';\n const SERVES_FIELD = 'servesRefs';\n const served = index.links\n .filter((link) => link.field === SERVES_FIELD && link.from.aspectKey === TASK_ASPECT && link.from.ref === task.taskRef)\n .map((link) => thirdParty.route({\n aspectKey: link.to.aspectKey,\n family: link.to.family,\n ref: link.to.ref,\n element: link.to.item,\n }));\n const unresolved = index.unresolved\n .filter((entry) => entry.field === SERVES_FIELD && entry.fromAspectKey === TASK_ASPECT && entry.fromRef === task.taskRef)\n .map((entry) => entry.key);\n\n const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;\n const moduleTasks = moduleRef === undefined\n ? []\n : (index.aspects.get(TASK_ASPECT)?.elements ?? [])\n .filter((element) => element.ref !== task.taskRef)\n .filter((element) => {\n const target = (element.item as { target?: { moduleRef?: string } }).target;\n return target?.moduleRef === moduleRef;\n })\n .map((element) => ({ taskRef: element.ref, objective: element.label }));\n\n if (served.length === 0 && unresolved.length === 0 && moduleTasks.length === 0) return null;\n return {\n sourceRef: 'application-creation:context/served-elements',\n originRef: 'application-creation:origin/specification-families',\n // The committed specifications this task answers to, with every research-informed element routed out.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n servedElements: served,\n ...(unresolved.length > 0\n ? {\n unresolvedServesRefs: unresolved,\n unresolvedNote: 'These servesRefs name nothing the application has decided. Do not invent what they would say; '\n + 'build what the resolved elements require, and report the gap.',\n }\n : {}),\n ...(moduleRef !== undefined ? { moduleRef, otherTasksInModule: moduleTasks } : {}),\n note: 'servedElements are what this task is accountable to — its acceptance criteria. otherTasksInModule is a map only: '\n + 'read a sibling with `wildo context elements get --refs <taskRef>` if you need it.',\n },\n };\n}\n\n/**\n * Does the committed frontend registry pass the Settings rail to the runtime (#3101)? A registry that cannot be read (no\n * frontend, or not committed) is not judged here: the rail's own probe paths already say whether the config is committed.\n */\nasync function settingsRailReachesRuntime(tree: Pick<CommittedTreeReader, 'readText'>): Promise<boolean> {\n const registry = await tree.readText(FRONTEND_MODULES_REGISTRY_RELATIVE_PATH);\n return typeof registry !== 'string' || frontendRegistryPassesSettingsHub(registry);\n}\n"]}
1
+ {"version":3,"file":"application-build-dispatch.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-dispatch.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,0CAA0C,EAC1C,+BAA+B,EAC/B,gCAAgC,GAE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ContextSourceTrust,\n ResearchProvenanceCatalogReading,\n type MetaWorkflow_ApplicationCodingTaskContract,\n} from '@wildo-ai/saas-models/meta-workflows';\nimport { readCompiledResearchInformedContent } from '@wildo-ai/framework-knowledge';\nimport { existsSync, readdirSync } from 'node:fs';\nimport { randomUUID } from 'node:crypto';\nimport { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport path, { join } from 'node:path';\n\nimport { inject, injectable, optional } from 'inversify';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\nimport { ApplicationSchemaPlanObligation } from '../../core/config/application-schema-plan-obligation.companion.utils';\nimport { experienceTaskSkillRefs, taskHasExperienceProduct } from './application-build-experience-skills.companion.service';\nimport {\n buildWebsitePlanContextSource,\n citedRequirementRefsByWebsiteTask,\n deliveringTasksFor,\n deriveWebsiteClaimDelivery,\n deriveWebsiteTaskOrdering,\n describeWebsiteTaskCopySubjects,\n describeWebsiteTaskVisualSubjects,\n websiteTaskDemoResourceRef,\n websiteTaskSkillRefs,\n type WebsiteClaimDelivery,\n type WebsiteSectionDemoFactsResolution,\n type WebsiteTaskCopySubject,\n} from './application-build-website-context.companion.service';\nimport { websiteDemoResourceFacts } from './website-demo-facts.models';\nimport {\n collectWebsiteCopyDeclarations,\n currentWebsiteCopy,\n reviewWebsiteTaskCopy,\n type RawWebsiteCopyFinding,\n type WebsiteCopyAlsoReviewed,\n} from './application-build-website-copy-review.companion.service';\nimport { readWebsiteCopyReview, WebsiteCopyReviewOutcome, type WebsiteCopyReview } from '../models/website-copy-review.models';\nimport { WEBSITE_COPY_REVIEW_JUDGE_AGENT_REF, WebsiteCopyReviewVerdictOutputSchema } from '../models/website-copy-review.actors-system.definitions';\nimport { reviewWebsiteTaskVisuals, type RawWebsiteVisualFinding } from './application-build-website-visual-review.companion.service';\nimport { lookAtWebsite, readWebsiteShotAsDataUri, readWebsiteVisualRubric } from './website-visual-camera.companion';\nimport { readWebsiteVisualReview, WebsiteVisualReviewOutcome, type WebsiteVisualReview } from '../models/website-visual-review.models';\nimport { WEBSITE_VISUAL_REVIEW_JUDGE_AGENT_REF, WebsiteVisualReviewVerdictOutputSchema } from '../models/website-visual-review.actors-system.definitions';\nimport {\n CodingRunFailureAttribution,\n WORKBENCH_TASK_CORRELATION_DOMAIN,\n Workbench_BuildDispatchPhase,\n Workbench_BuildTaskStuckReason,\n WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN,\n WorkbenchBuildPlanTaskStatus,\n WorkbenchTaskCorrelationRef,\n sanitizeWorkbenchCreationPlaneIdentity,\n BuildTaskRearmReason,\n BuildTaskClosureKind,\n OPERATOR_BUILD_TASK_REARM_REASONS,\n BrandDesignState,\n DesignTokenBlockState,\n SchemaPlanSyncState,\n FRONTEND_MODULES_REGISTRY_RELATIVE_PATH,\n frontendRegistryPassesSettingsHub,\n} from '@wildo-ai/platform-core-shared';\n\nimport {\n assemblyRepairTaskRef,\n composeAssemblyRepairCodingContract,\n composeBuildTaskCodingContract,\n slugifyRegistryIdentifier,\n type BuildTaskContextSource,\n decidedFamilyValuesFromCompanionExports,\n getFamilyPackageRelativePath,\n indexDecidedAspects,\n mergePlaybookSpend,\n PlaybookSpendMeasurement,\n readApplicationDisplayName,\n readEngineCapabilityEnabled,\n SAAS_CONFIG_FILE_NAME,\n type PlaybookSpend,\n SpecificationWriteRefusedError,\n type BuildPlanSpecificationFault,\n} from '@wildo-ai/application-creation-runtime';\nimport type { ActorExecutionOpenRequest, ActorsSystemBackendService, AgentsBackendService, ContentSafetyBackendService, LoggerService, OpenedActorExecution } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES, describeCaughtError } from '@wildo-ai/saas-backend-lib';\nimport { Actor_Task_Topics, FlowsActors_Status, type AgentWorkDeclarations, type AgentWorkShortfall, type FlowsActors_Agent_Invocation } from '@wildo-ai/saas-models';\nimport { PER_SERVICE_WEBSITE_CONFIG_FILE_NAME, resolveStaticWebsiteServiceEntry } from '@wildo-ai/saas-website/config-loader';\nimport {\n AcceptOrigin,\n ApplicationSpecificationFamily,\n BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES,\n BuildPlanResourceStage,\n BuildPlanTaskGraphSchema,\n type BuildPlanTaskProduct,\n BuildPlanTaskTargetKind,\n BuildPlanTaskProductKind,\n FrontendConfigSurface,\n DomainPlanTenancyModel,\n MetaWorkflow_FunctionalTopic,\n PlacementDisposition,\n PlacementPlanSchema,\n PlacementSurface,\n RoadmapSnapshotSchema,\n selectReadyBuildPlanTasks,\n type PlacementPlan,\n validateBuildPlanTaskGraph,\n type BuildPlanTask,\n type Journey_AutonomyPreset,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { relatedWorkspaceResources } from '../../core/introspection/workspace-element-index.companion';\nimport { BRIEF_INCOMPLETE_SOURCE_REF, BRIEF_PROVENANCE_UNAVAILABLE_SOURCE_REF, ThirdPartyBriefContent } from '../models/build-brief-content-trust.models';\nimport {\n companionScreeningVerdicts,\n DERIVED_TEXT_UNSCREENED_NOTICE,\n DERIVED_TEXT_UNSCREENED_SOURCE_REF,\n screenRunOutputSection,\n screenThirdPartyBriefElements,\n unscreenedClassifierReason,\n WITHHELD_RUN_OUTPUT_NOTICE,\n} from './build-brief-third-party-screening.companion';\nimport { loadEffectiveSystemOfRecordFacets, systemOfRecordInstancePartitionSupportOf, type SystemOfRecordInstanceFacetRequest } from './system-of-record-facet-library.companion.utils';\nimport { describeWorkspaceFreshness, readWorkspaceElements } from '../../core/introspection/workspace-elements.companion';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport { readSpecificationsEvaluationFindings, type SpecificationsEvaluationFindings } from '../../core/context/companion-package-loaders.companion';\nimport { loadSpecificationFamilyData, type SpecificationFamilyData } from '../../core/context/specification-family-data.companion';\nimport { specificationFaultModules } from '../../core/context/specification-fault-modules.companion';\nimport { waitForDevCompileQuiet } from '../../core/runtime/dev-compile-quiet.companion';\nimport { companionRestartDrain } from '../../core/runtime/restart-drain.companion';\nimport { getWorkspaceMutationLockPath, loadConfig, loadInfraEnvConfig, loadSaasConfig, readBuildParallelism, WildoEnvironment, withDedicatedFileLock } from '@wildo-ai/platform-config-lib';\nimport { CodingRunConcurrency, failedVerificationBesideSiblings } from '../../claude-cli/models/concurrent-coding-runs.models';\nimport {\n CodingAgentDispatchCompanionService,\n type ApplicationCodingTaskSettledOutcome,\n} from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n ApplicationCodingTaskDisposition,\n ChangeSetFileChangeKind,\n CodingRunStart,\n deriveCodingRunStart,\n isApplicationCodingContractRefusal,\n readSettledRunFailureMessage,\n resolveApplicationCodingTaskVerificationPlans,\n type ApplicationCodingTaskRunAdmission,\n type ApplicationCodingUnmetRequirement,\n type ApplicationCodingMetRequirement,\n SETTLED_HEAD_OUTPUT_FIELD,\n} from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';\nimport { readIsolatedVerificationRecheck } from '../../claude-cli/models/shared-tree-reconciliation.models';\nimport { composeLandingSourceKey, LandingProjectionCache } from './application-build-landing-projection.companion';\nimport {\n ApplicationBuildPreparationPhase,\n ApplicationBuildPreparationTracker,\n describeBuildPreparation,\n type ApplicationBuildPreparation,\n} from './application-build-dispatch-preparation.companion';\nimport { CompanionTraceabilityLevel } from '../../core/traceability/companion-traceability.models';\nimport type { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { signEvaluatedCompanionTree } from '../../core/context/companion-package-loaders.companion';\nimport { resolveIntrospectedApplicationPackageRoots } from '../../core/introspection/services/introspection-source-state.companion.service';\nimport type { CodingAgentUsageLimit } from '../../claude-cli/models/coding-agent-usage-limit.models';\nimport { describeVerificationHostCause, type VerificationToolUnavailableHold } from '../../claude-cli/models/verification-tool-availability.models';\nimport { EXPERT_CHARTERS_RELATIVE_DIRECTORY, EXPERT_STAFFING_PLAYBOOK_REF, readStaleExpertSeatsRefusal, type StaleExpertSeatsRefusal } from '../../deliberations/models/stale-expert-seats-refusal.models';\nimport type { AcceptedChangeCommitCompanionService, DecisionRecordActor } from '../../claude-cli/services/accepted-change-commit.companion.service';\nimport type { CodingRunWriteRegisterCompanionService } from '../../claude-cli/services/coding-run-write-register.companion.service';\nimport type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport { CompanionCreateActorExecutionRequestSchema, CompanionCreateActorTaskRequestSchema, CompanionExecutionsListQuerySchema, CompanionUpdateActorTaskRequestSchema } from '../../companion-api/companion-api.schemas';\nimport { APPLICATION_CODING_SYSTEM_REF } from '../models/application-coding-agent.actors-system.definitions';\nimport {\n isApplicationStartupFailure,\n readApplicationBootFailures,\n readUnavailableApplicationRuntimes,\n type ApplicationBootFailure,\n type UnavailableApplicationRuntime,\n} from '../../core/runtime/application-runtime-liveness.companion';\nimport type { CarriedVerificationDiagnosis } from '../models/carried-verification-failure.models';\nimport type { GenerationStepProgress } from '../models/generation-step-progress.models';\nimport {\n MAXIMUM_INTERFERENCE_REARMS,\n NothingToRearmError,\n readBuildTaskInterference,\n landedOverrideContextSource,\n readBuildTaskLandedOverride,\n readBuildTaskRearm,\n withBuildTaskRearm,\n type BuildTaskInterference,\n type BuildTaskLandedOverride,\n type BuildTaskRearm,\n} from '../models/build-task-rearm.models';\nimport { APPLICATION_BUILD_GENERATION_STEP_ACTOR_REF, APPLICATION_BUILD_SYSTEM_REF } from '../models/application-build.actors-system.definitions';\nimport { APPLICATION_BUILD_DECISIONS_DOOR_ACTOR_REF, APPLICATION_BUILD_DECISIONS_SYSTEM_REF } from '../models/application-build-decisions.actors-system.definitions';\nimport { readRecordedPlaybookSpend } from '../models/playbook-run-record.models';\nimport {\n ApplicationBuildGenerationStep,\n ApplicationBuildGenerationStepCompanionService,\n type ApplicationBuildGenerationStepLandedCondition,\n ApplicationBuildGenerationStepLandedKind,\n type ApplicationBuildGenerationStepRunResult,\n readDesignSystemConfigImportsBrandDesign,\n signSchemaPlanInputs,\n generationStepCheckReadsSpecifications,\n generationStepReadsSpecifications,\n GenerationStepFailureOwner,\n readGenerationStepFailureOwner,\n} from './application-build-generation-step.companion.service';\nimport { INSTALLED_SKILL_INDEX_RELATIVE_PATH, readApplicationCapabilityFacts, sliceSkillIndexForTask } from './build-task-brief-application-facts.companion';\nimport {\n ApplicationBuildTaskNotACodingTaskError,\n resolveAssemblyRepairCodingPolicy,\n resolveBuildPlanTaskCodingPolicy,\n BuildPlanTaskLandedProbeKind,\n buildPlanTaskLandedProbePaths,\n declarationsAppearAt,\n findAgentWorkShortfalls,\n findConfigurationShortfalls,\n findSystemOfRecordDeclarationShortfalls,\n systemOfRecordPartitionUnanswerable,\n isConfigurationProvenProduct,\n unreadableResourceConfigurationFor,\n relativeImportedFiles,\n applicationConfigurationDeclarationsOf,\n type ApplicationConfigurationWitness,\n flowsActorsIndexImportedFiles,\n labelFileDeclaresKeys,\n labelPacksDeclareKeyPrefix,\n launcherShellIdentities,\n placementSubjectShellIdentity,\n ProductDeclarationRelation,\n productDerivedSkillRefs,\n resourceSchemaFilePath,\n schemaSourceDeclaresPersonalData,\n targetDerivedSkillRefs,\n resolveBuildTaskLandedProbes,\n buildPlanTaskLandedProbeWritablePaths,\n resolveBuildTaskLandingAdvisories,\n buildTaskProducesBillingCatalogue,\n BACKEND_BILLING_SWITCH_FILE,\n type BuildTaskLandingAdvisory,\n resolveUndraftableDocumentRef,\n settingsDestinationShellIdentity,\n shellModuleContributionFile,\n shellSurfaceConfigFile,\n websiteLabelPackPath,\n websiteSectionLabelFragmentPath,\n type BuildPlanTaskLandedProbe,\n} from './application-build-task-coding-policy.companion.service';\nimport { describeStaleFrontendLibrary, findStaleFrontendLibraryOutputs, readFrontendLibraryProgram } from './frontend-config-library-currency.companion';\nimport { buildTaskDecisionsApplicationPath } from '../models/build-task-decisions-path.models';\nimport {\n BuildTaskDecisionRefusedError,\n BuildTaskDecisionsStanding,\n resolveHonouredDecisionsBlob,\n type BuildTaskDecisionsCommit,\n followUpAwaitsReview,\n followUpsAwaitReviewUnder,\n parseBuildTaskDecisions,\n resolveClosedBuildTaskRefs,\n withBuildTaskDecision,\n type BuildFollowUpApproval,\n type BuildTaskClosure,\n type BuildTaskDecisions,\n} from './application-build-task-closure.companion';\nimport { APPLICATION_CREATION_AUTONOMY_POSTURE } from '../models/playbook-run-checkpoint.models';\nimport {\n chainFollowUpAfter,\n collectFollowUpGapsMetSince,\n collectOpenReportedGaps,\n type OpenReportedGap,\n followUpGapKey,\n followUpReportRefOf,\n FollowUpGapNotDerivedReason,\n type FollowUpGapMetSince,\n HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX,\n targetKey as followUpScopeKey,\n deriveBuildPlanFollowUpTasks,\n assembleFollowUpDerivation,\n type DerivedFollowUp,\n type FollowUpAbsorptionInputs,\n type FollowUpDerivation,\n type FollowUpGap,\n type FollowUpGapNotDerived,\n} from './application-build-follow-up-derivation.companion';\nimport { resolveApplicationAssemblyCheckRefs } from './application-assembly-checks.companion.utils';\nimport { BrandAssetPurpose, SpecificationModuleFaultReading, specificationModuleFaultsAreAVerdict, SpecificationUnavailableError, unguardedSpecifications } from '@wildo-ai/saas-specifications';\nimport { hasAcceptedBrandMark } from '../../brand/models/accepted-brand-mark.models';\nimport {\n ASSEMBLY_FAILURE_CONTEXT_SOURCE_REF,\n ASSEMBLY_REPAIR_GUIDANCE,\n ASSEMBLY_REPAIR_TARGET_KIND,\n MAXIMUM_ASSEMBLY_REPAIRS_PER_CHECK,\n assemblyRepairAttemptsThisRound,\n describeWithheldAssemblyRepairs,\n isAssemblyRepairTaskRef,\n readGivenAssemblyFailure,\n selectAssemblyRepair,\n type AssemblyCheckFailure,\n type AssemblyFailureContextContent,\n type AssemblyRepairWithheldReason,\n type BuildDispatchRunSummary,\n} from './application-assembly-repair.companion.utils';\nimport type { AppShellPlacementContentResult } from '../../core/introspection/subprocess/app-shell-placement-content.behavior';\n\n/** No build plan, or nothing left to do. Named so the transport can say which. */\n\n\n/** A landing resolution taking at least this long is logged without a debug type (#3452). */\nconst LANDING_RESOLUTION_LOG_THRESHOLD_MS = 1_000;\nexport class ApplicationBuildPlanUnavailableError extends Error {}\n\n/** Whether a plan could not be read because a specifications module failed (#3258): it exists, and the reason names the module. */\nexport function isBuildPlanHeldByFailedModule(error: unknown): error is ApplicationBuildPlanUnavailableError {\n return error instanceof ApplicationBuildPlanUnavailableError && error.cause instanceof SpecificationUnavailableError;\n}\n\nexport class ApplicationBuildPlanExhaustedError extends Error {\n /**\n * The counts, carried STRUCTURALLY rather than only inside the sentence.\n *\n * A finished plan is something a surface wants to SAY — \"39 of 39 landed\" — and until these were\n * fields the only copy lived in prose the reader would have had to parse. A board that parses\n * another component's error message is a board that breaks when somebody improves the wording.\n */\n public constructor(\n message: string,\n public readonly taskCount: number,\n public readonly landedCount: number,\n /** WHICH tasks landed — so a finished plan can still say which of them no run of their own produced (#2217). */\n public readonly landedTaskRefs: readonly string[] = [],\n /**\n * Whether the application the finished plan built ASSEMBLES (#2222) — set by a dispatch door, which is where\n * \"the build is finished\" is claimed; absent from the cheap read door, which never runs a compiler.\n */\n public readonly assembly?: ApplicationAssemblyVerdict,\n /** See {@link ApplicationBuildPlanExhaustion}. */\n public readonly specificationFault?: BuildPlanSpecificationFault,\n ) {\n super(message);\n }\n}\n\n/**\n * The answer to \"does the application this plan built assemble?\" (#2222), from the checks every package owes.\n *\n * A finished plan used to be the end of the question: in `app-creation-test-004` the build would have read 92 of 92\n * with a website that did not compile, because each task typechecks only the package it wrote and a file can reach\n * git without its task's checks (a wave's reconciliation commit). MARKED, never a refusal of anything that already\n * landed — `application-creation-directive.md`: what the operator does next is fix the package, so the verdict says\n * which package and what the compiler said, and leaves the landed work alone.\n */\nexport interface ApplicationAssemblyVerdict {\n readonly passed: boolean;\n readonly checkRefs: readonly string[];\n /**\n * `output` is an EXCERPT of what the check printed: the first lines of the captured stdout (where `tsc` writes its\n * diagnostics), else of stderr. The capture is a bounded tail, so on a very long run these are the first lines\n * of that tail, not necessarily the compiler's first error.\n */\n readonly failed: ReadonlyArray<{ readonly checkRef: string; readonly output: string }>;\n /** A check that could not be RUN (no compiler, no built registry): not a verdict about the application. */\n readonly couldNotRun?: string;\n /** Present when no task was left to run only because a specifications module fails (#3258): the plan is not finished. */\n readonly specificationFault?: BuildPlanSpecificationFault;\n /**\n * The failing checks no repair was dispatched for, and why (#2283): their repairs this round are spent, or the\n * last one was given this same failure. Absent when nothing was withheld.\n */\n readonly repairsWithheld?: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[];\n}\n\n/**\n * Why a read door cannot ANSWER with an exception.\n *\n * `prepareNextBuildTask` serves two kinds of caller: the READS (`describeNextBuildTask`, and\n * `describeNextBuildTaskOrExhaustion` for a surface that must render \"there is none\") and the two\n * DISPATCH doors. The throw is right for a DISPATCH — the caller asked to run something, there is\n * nothing to run, and a door that silently did nothing would be worse. It is wrong for a READ: \"what\n * is next?\" answered by \"nothing, everything landed\" is an ANSWER, and the terminal success of the\n * whole build lane is not a failure to look. The same holds for \"nothing, every ready task is stuck\"\n * (#1451), whose answer is the remedy.\n *\n * Measured 2026-09-18, when Wonder CRM became the first application to finish a plan (39 of 39): the\n * workbench's `requestCompanion` threw on the non-2xx, `useCompanionRead` caught it into `error`, and\n * the board rendered `BoardReadError` — the primitive it defines as \"could not look\", against\n * `BoardEmpty` for \"looked, nothing there\". The last screen of the journey the workbench exists to\n * drive reported the finish as a fault.\n *\n * Reads tolerate, acceptance refuses — `continuity-drift-and-cas-basis.md` Rule 1's split — and\n * `application-creation-directive.md`'s test verbatim: if this refuses, what does the operator do\n * next? Nothing. There is no artifact to fix, so the state is REPRESENTABLE instead.\n */\nexport interface ApplicationBuildPlanExhaustion {\n readonly taskCount: number;\n readonly landedCount: number;\n /** Present while a specifications module fails: nothing is left to run, and the plan is not finished. */\n readonly specificationFault?: BuildPlanSpecificationFault;\n}\n\n\n/**\n * What the read door answers: a plan to run, or the reason there is none. Never an exception for either.\n *\n * Three shapes, and exactly one holds: a `plan`; no plan and `exhausted` (nothing left to run); or no plan,\n * `stuckQueue`, and a non-empty `stuckTasks` (every ready task is stuck, #1451). `stuckTasks` is present beside a plan\n * too, naming what that selection passed over.\n */\n/**\n * How far the queue got when every ready task turned out to be stuck — the same progress a plan row\n * carries, so a stuck row can say \"3 of 5 landed, 2 ready\" instead of zeroes it does not mean.\n */\nexport interface ApplicationBuildStuckQueue {\n readonly taskCount: number;\n readonly readyTaskRefs: readonly string[];\n readonly landedTaskRefs: readonly string[];\n readonly unverifiableLandedTaskRefs: readonly string[];\n /** Present while a specifications module fails (#3258): it is why a step that never ran is passed over. */\n readonly specificationFault?: BuildPlanSpecificationFault;\n}\n\nexport interface ApplicationBuildDispatchDescription {\n readonly plan: ApplicationBuildDispatchPlan | null;\n /** Present exactly when `plan` is null because nothing is left to run: finished, unless it carries a specifications fault. */\n readonly exhausted?: ApplicationBuildPlanExhaustion;\n /** Present exactly when `plan` is null because every ready task is stuck. */\n readonly stuckQueue?: ApplicationBuildStuckQueue;\n /** Every ready task dispatch passed over, and why. Empty when nothing was skipped. */\n readonly stuckTasks: readonly ApplicationBuildStuckTask[];\n /**\n * The landed tasks no run of their own ever started (#2217): the probe found the product before anything ran.\n * Beside every answer — a next task, a stuck queue, a finished plan — because \"92 of 92 landed\" is precisely the\n * sentence it must qualify. ABSENT — not empty — when the run history was truncated at the page cap, because a\n * partial history cannot say a task never ran; and absent from a caller older than the field.\n */\n readonly landedBeforeAnyRunTaskRefs?: readonly string[];\n}\n\n/**\n * The plan and its landing as one FILL of a build wave read them (#3204): every slot the fill prepares selects from this\n * one reading instead of deriving the landing again (20-90 s each on a 217-task plan, measured on reference run\n * 42468505853, so five slots took minutes to fill while their runs took two to four).\n *\n * Reused only while nothing could have LANDED since it was read. A run completes and commits inside its OWN\n * settlement, whenever it finishes, so a fill can meet one; a reading taken before it would offer a task the run just\n * landed (a task declaring no product lands on its completed run alone). Two guards, because neither alone is enough:\n *\n * - **The runs in flight when it was read.** A run's row reads COMPLETED, and the run leaves the in-flight list, a few\n * seconds BEFORE its accept commits and its listeners fire (#3204 second review R1). So the reading keeps the tasks\n * that were in flight, and every selection reads them fresh: one that has LEFT drops the reading. This needs no\n * listener, so it also covers a run another door started.\n * - **The settlement generation** (`landingSettlementGeneration`): moved by a completed run, an accepted commit, and every\n * place that declares the landing stale, for a landing a person or another door caused while no run left.\n *\n * An ADMISSION moves neither (a run only joins the in-flight list), which is what lets the wave's slots share a reading; an\n * admitted run joins the reading's in-flight guard (#3883 review M3). A generation step drops the reading explicitly when\n * it starts.\n *\n * Held for the whole WAVE (#3883), not per fill: the two guards decide reuse, so a refill after an admission alone, which\n * lands nothing, selects from the same reading instead of deriving the landing again. And joinable while it is still being\n * READ (`pending`): slots prepared at once (#3883) wait for the one derivation the first of them started, instead of each\n * reading the plan and asking for a derivation of its own.\n */\ninterface BuildWaveFillLanding {\n current?: BuildWaveFillLandingGuards & {\n readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>;\n readonly resolution: LandedTaskResolution;\n };\n /** A reading being taken right now (#3883), under the same guards, for concurrent slots to join. */\n pending?: BuildWaveFillLandingGuards & {\n readonly reading: Promise<{\n readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>;\n readonly resolution: LandedTaskResolution;\n }>;\n };\n}\n\n/**\n * How a WAVE asks `prepareNextBuildTask` for its next slot: its landing reading, shared by the wave's slots; the generation\n * steps the wave is running (#3204), which the coding plane's in-flight listings do not know, so the next slot passes over\n * them; the steps it already ran (#3885); and the tasks its other slots reserved (#3883). Every other door passes none.\n */\ninterface PrepareNextBuildTaskOptions {\n readonly fillLanding?: BuildWaveFillLanding;\n readonly generationStepsInFlight?: ReadonlySet<string>;\n /** The generation steps this wave has already run (#3885): passed over as `ran_this_wave`, never run twice in one wave. */\n readonly generationStepsRunInWave?: ReadonlySet<string>;\n /**\n * The tasks other slots of the wave have SELECTED and not yet admitted (#3883), with the product files they write. The\n * wave prepares several slots at once, and a task being prepared is in no in-flight list yet, so a second slot would\n * select it again, or a task writing the same file. A reserved task is passed over as IN_FLIGHT, one whose product\n * files meet a reserved task's as CONTENDED, and the selected task is reserved before the first await after its\n * selection, so two slots cannot both take it. A task handed on to a run or a step stays reserved until that run or step\n * SETTLES (review H1: a sibling reads its in-flight set once, when it starts); a slot that hands nothing on gives it back,\n * and this call releases it when it throws after reserving.\n */\n readonly reservations?: Map<string, readonly string[]>;\n /**\n * Told the task the moment it is selected and reserved, before its brief is composed (#3883): the wave launches its next\n * slot then, so slots select one after another from the reading the first took, and compose their briefs side by side.\n */\n readonly onSelected?: (taskRef: string) => void;\n}\n\n/** What a fill's landing reading was taken under; both must still hold for a slot to select from it. */\ninterface BuildWaveFillLandingGuards {\n /** The settlement generation the reading was taken at. */\n readonly settlementGeneration: number;\n /**\n * The tasks whose runs were in flight when it was taken, and those the wave admitted since (#3883 review M3): one that has\n * left may have landed something.\n */\n readonly inFlightTaskRefs: Set<string>;\n}\n\n/** What one landing resolution found — every answer a caller needs, from the pass it asked for. */\ninterface LandedTaskResolution {\n readonly landed: ReadonlySet<string>;\n /** Landed WITHOUT proof: a task that declares no product and has a completed run. */\n readonly unverifiableLandedTaskRefs: readonly string[];\n /**\n * Generation steps whose landing check could not be ANSWERED on this pass: a migration step whose\n * schema-plan check neither passed nor reported drift, or a `design-tokens` step whose block check did\n * not run. Running either now would only fail the same way, so the selector passes over them.\n */\n readonly unanswerableGenerationStepTaskRefs: ReadonlySet<string>;\n /** The specifications modules failing on this pass, which hold every generation step not yet landed (#3258). */\n readonly modulesHoldingGenerationSteps?: readonly string[];\n /** See {@link BuildPlanSpecificationFault.repairOwed}. */\n readonly specificationRepairOwed?: boolean;\n /**\n * Each generation step's landed condition, as this pass resolved it. A reader that needs the condition again (the\n * records) takes it from here: resolving a labels step's condition plans every labelling unit (#2504 review F7).\n */\n readonly generationStepConditions: ReadonlyMap<string, ApplicationBuildGenerationStepLandedCondition>;\n /**\n * The introspection witnesses this pass read, and its tree reader (#3219). A reader that EXPLAINS a\n * landing — why a stuck task is not landed — asks these, never fresh ones:\n * a second witness or a second git reading taken minutes later could disagree with the first, and the task then\n * read \"its product is written, awaiting a commit\" with nothing to commit (measured on `app-creation-test-007`, when\n * landing still read HEAD).\n */\n readonly witnesses: IntrospectionWitnesses;\n /** The tree this pass judged landing on: the WORKING tree (#3204), see {@link createLandingTreeReader}. */\n readonly landingTree: CommittedTreeReader;\n /**\n * The tasks whose latest coding run is live or ended without a working result, not re-armed and not passed by an\n * isolated re-check (#3204, #3220): not landed whatever their product shows. Absent when the run history could not be\n * read (the pass is then provisional).\n */\n readonly heldBackTaskRefs?: ReadonlySet<string>;\n /**\n * The tasks whose latest coding run failed its checks BESIDE SIBLINGS and was not yet re-checked alone or re-armed\n * (`failedVerificationBesideSiblings`, #3204), each with that run's start: within the wave that ran it, such a task waits\n * for the wave's end, where its checks run alone. Absent when the run history could not be read.\n */\n readonly awaitingIsolatedRecheck?: ReadonlyMap<string, string>;\n /**\n * TRUE when an answer of this pass was UNKNOWN rather than no — a generation step whose check could not be asked, or\n * a witness that could not be read. Such a pass is only briefly reused (`PROVISIONAL_LANDING_REUSE_MS`), because the\n * cause is this process's own state (an introspection still warming after a restart, #3223), which no file signs.\n */\n readonly provisional: boolean;\n /**\n * The tasks whose own specification file its factory REFUSED (#3210, #3211), with the validator's faults. Such a task is\n * NOT landed whatever its probes find: the file is committed, and the companion serves nothing from it. So only the\n * tasks that depend on it wait, it is offered again with the faults in its brief, and its re-dispatches are bounded.\n */\n readonly refusedSpecificationFaults: ReadonlyMap<string, readonly SpecificationRefusal[]>;\n /**\n * The tasks landed by a person's committed CLOSURE rather than by their own probe (#3224, #3227): `wildo build close`.\n * Every one is in `landed`; this says which, and why, so no reader mistakes a closure for a proven product.\n */\n readonly closedTaskRefs: ReadonlyMap<string, BuildTaskClosure>;\n /** The derived follow-ups a person approved to run (#3227), read from the same HEAD; consulted only under a reviewing posture. */\n readonly followUpApprovals: ReadonlyMap<string, BuildFollowUpApproval>;\n /**\n * How the person's decisions stood on this pass ({@link BuildTaskDecisionsStanding}), with its reason and named\n * conditions. When UNKNOWN the pass is provisional and every task the decisions file names is held (never dispatched,\n * a generation step among them passed over as unanswerable), with this reason as its cause.\n */\n readonly buildTaskDecisions: Pick<BuildTaskDecisions, 'standing' | 'reason' | 'conditions' | 'heldTaskRefs'>;\n}\n\n/** One specification its factory refused, as a build task is told about it (#3210): the validator's own words, and where. */\nexport interface SpecificationRefusal {\n readonly kind: string;\n readonly key: string;\n readonly message: string;\n readonly authoredFrame: string | null;\n /** A module that threw on loading rather than a factory's refusal: `kind` and `message` are then the module's own text (#3258). */\n readonly thrownByTheModule?: true;\n}\n\n/**\n * How many COMPLETED runs a task whose specification is refused may have before it is no longer re-dispatched on its own\n * (#3210): the run that wrote the refused file, then two more, each told the validator's error. A third refusal of the\n * same task is held as `completed_unlanded` with the fault, so an agent that keeps rewriting the same invalid definition\n * cannot loop; `wildo build rearm` releases it once a person has looked.\n */\nexport const MAXIMUM_REFUSED_SPECIFICATION_RUNS = 3;\n\n/** The brief section a re-dispatched task reads its refused specification from (#3210). */\nexport const REFUSED_SPECIFICATION_CONTEXT_SOURCE_REF = 'application-creation:context/refused-specification';\n\n/**\n * The app-root-relative file an authored frame names (`at fn (/app/specifications/src/x.ts:12:3)`, or the path alone),\n * or `undefined` when it names none. The frame is the first stack frame inside `specifications/src/` (the engine's own\n * reader of it), so it is where the refused definition was written.\n */\nexport function refusedSpecificationFramePath(authoredFrame: string | null, saasRoot: string): string | undefined {\n if (authoredFrame === null) return undefined;\n const located = /\\(([^()]+)\\)\\s*$/u.exec(authoredFrame)?.[1] ?? authoredFrame;\n const file = located.replace(/:\\d+(?::\\d+)?$/u, '').trim();\n if (file === '') return undefined;\n const root = saasRoot.endsWith('/') ? saasRoot : `${saasRoot}/`;\n return file.startsWith(root) ? file.slice(root.length) : file;\n}\n\n/** Does a refused specification belong to this task — is its authored file one the task's probes name? */\nfunction refusalBelongsToTask(framePath: string, probePaths: readonly string[]): boolean {\n return probePaths.some((path) => path === framePath || framePath.endsWith(`/${path}`) || path.endsWith(`/${framePath}`));\n}\n\n/** The brief section of a task re-dispatched because its specification was refused (#3210). */\nexport function refusedSpecificationContextSource(refusals: readonly SpecificationRefusal[]): BuildTaskContextSource {\n return {\n sourceRef: REFUSED_SPECIFICATION_CONTEXT_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The engine's own validators wrote these messages, inside this repository's process (#2846: trusted).\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n // What a module threw is its own text, not the companion's statement: `wildo creation feed` prints it.\n refusals: refusals.map((refusal) => (refusal.thrownByTheModule === true\n ? { key: refusal.key, authoredAt: refusal.authoredFrame }\n : { kind: refusal.kind, key: refusal.key, message: refusal.message, authoredAt: refusal.authoredFrame })),\n guidance: 'This task already ran and wrote a specification its factory REFUSES, or a module that cannot be evaluated: the '\n + 'companion serves nothing from it, and the tasks that depend on it wait. A refusal carrying a message is the validator\\'s '\n + 'own, naming the field and the remedy; for a module that threw, `wildo creation feed` prints the error. Fix the '\n + 'definition so it is accepted (run `check:specification-exports` or `wildo build tasks` to see the refusal is gone); do '\n + 'not delete the specification or weaken the definition to make the refusal disappear.',\n },\n };\n}\n\n/**\n * How many attempts (completed runs plus the task's own failed runs) a task whose declared product is ABSENT from the\n * tree may have before it is no longer re-dispatched on its own (#3204): the run that missed it, then at most two more,\n * each told which of its probes are unmet.\n *\n * Measured on reference run 42365624598: `build-task-customer-workflow-resources` declared schema fields, registrations,\n * interfaces and specifications for four resources. Its four-minute run, in a wave beside the superseded plan's leftovers,\n * wrote one interface and completed; the quote-or-tender specification never received its eight declared fields. The loop\n * guard (#606) then held it for the rest of the run, and twelve tasks with it, because a repeat of the same run with the\n * same brief would spend the same turn for the same result. A brief that names the unmet probes is not the same run, so\n * a bounded number of them is offered, as #3210 does for a refused specification; after that the guard holds it, and\n * `wildo build rearm` releases it once a person has looked.\n */\nexport const MAXIMUM_UNMET_PRODUCT_RUNS = 3;\n\n/** What {@link ApplicationBuildDispatchCompanionService} decides for a task that completed a run without landing (#3204). */\nexport enum CompletedTaskRetry {\n /** Offer it again: within the attempt bound, nothing parked, every unmet probe answerable. */\n OFFER = 'offer',\n /** Hold it with the loop guard's reason, as before the retry existed. */\n HOLD = 'hold',\n}\n\n/** The brief section a re-dispatched task reads its unmet product from (#3204). */\nexport const UNMET_PRODUCT_CONTEXT_SOURCE_REF = 'application-creation:context/unmet-product';\n\n/** What a re-dispatched task is told about the products its earlier run did not produce (#3204). */\nexport function unmetProductContextSource(unmetProbes: readonly BuildPlanTaskLandedProbe[], completedRuns: number): BuildTaskContextSource {\n return {\n sourceRef: UNMET_PRODUCT_CONTEXT_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own reading of the working tree against the task's declaration (#2846: trusted).\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n completedRuns,\n unmetProbes,\n guidance: `This task already ran ${completedRuns === 1 ? 'once' : `${completedRuns} times`} and completed, but the working tree `\n + 'still does not hold part of what it declares: each probe here names a file and what it must declare. Produce exactly '\n + 'those, beside what is already there (read the files first; most of the task may be done). Do not change the '\n + 'declaration, and do not report the task finished until every probe here is met.',\n },\n };\n}\n\n/** The ref of the `database-migrations` step the dispatch host derives when a plan owes it and omits it (#1027). */\nexport const HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF = 'build-task-database-migrations';\n\n/** The ref of the `documentation-publication` step the host derives for a plan that authors chapters (#1273). */\nexport const HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF = 'build-task-documentation-publication';\n\n/** The ref of the `i18n-translations` step the host derives after a plan's labels step, for a multi-locale application (#2204). */\nexport const HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF = 'build-task-i18n-translations';\n\n/** The ref of the `design-tokens` step the host derives after every task that writes the design-system config (#2358). */\nexport const HOST_DERIVED_DESIGN_TOKENS_TASK_REF = 'build-task-design-tokens';\n\n/** The ref of the `design-system-brand` step the host derives before every task that writes the design-system config (#2353). */\nexport const HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF = 'build-task-design-system-brand';\n\n/**\n * Does this build task write the application's design-system config — and so oblige the `design-tokens`\n * step to run after it, and the `design-system-brand` step to run before it?\n *\n * One shape: a coding task targeting the DESIGN_SYSTEM frontend config surface, the only target whose mutation\n * scope includes that file. The predicate is keyed on the TARGET rather than on a declared product, because the\n * target is what the coding policy grants write access from; a product declared on any other target could not\n * have written the file. The brand step does not write the config; it writes a module the config imports, and\n * {@link isDesignTokenBlockInputWriter} is the predicate that covers both.\n */\nexport function isDesignSystemConfigWriter(task: BuildPlanTask): boolean {\n return task.target?.kind === BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG\n && task.target.configSurface === FrontendConfigSurface.DESIGN_SYSTEM;\n}\n\n/**\n * Does this build task build the website (a page or a section of it)? The site's theme is composed from the brand's\n * website palette and personality (`website/src/brand-theme.ts`, which the scaffold imports), so a plan that builds the\n * site owes the brand step even when it writes no design-system config (#2742 step 5d).\n */\nexport function isWebsiteBuildTask(task: BuildPlanTask): boolean {\n return task.target?.kind === BuildPlanTaskTargetKind.WEBSITE\n || task.produces.some((product) => product.kind === BuildPlanTaskProductKind.WEBSITE_PAGE || product.kind === BuildPlanTaskProductKind.WEBSITE_SECTION);\n}\n\n/** Is this build task the `design-system-brand` generation step? */\nexport function isDesignSystemBrandStep(task: BuildPlanTask): boolean {\n return task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DESIGN_SYSTEM_BRAND;\n}\n\n/**\n * Does this build task write a file the stylesheet's design-token block is a function of? The config's writers,\n * and the brand step, whose module the config imports (#2353). The `design-tokens` step waits on all of them,\n * so the block is regenerated from the config's final state whichever of them moved last.\n */\nexport function isDesignTokenBlockInputWriter(task: BuildPlanTask): boolean {\n return isDesignSystemConfigWriter(task) || isDesignSystemBrandStep(task);\n}\n\n/** The ref of the `engine-capabilities` step the host derives when the decisions imply a capability nothing turned on (#2497). */\nexport const HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF = 'build-task-engine-capabilities';\n\n/** The ref of the `display-name` step the host derives when the brand's name is not yet the application's (#2505). */\nexport const HOST_DERIVED_DISPLAY_NAME_TASK_REF = 'build-task-display-name';\n\n/*\n * How far a build dispatch got is `Workbench_BuildDispatchPhase` in `@wildo-ai/platform-core-shared` —\n * NOT declared here, and deliberately not re-exported from here either (a re-export outside a declared\n * public entrypoint is its own defect). It moved there because the WORKBENCH reads these values to\n * decide how a dispatch renders and a browser bundle cannot import this package; that enum's docstring\n * carries the semantics of each member and why the two executors settle at different ones.\n */\n\n/**\n * One dispatch, newest first in {@link ApplicationBuildDispatchCompanionService.readDetachedDispatches}.\n * A PROJECTION of the dispatch's actor-system execution since #1359, not a record anything keeps.\n */\nexport interface ApplicationBuildDetachedDispatchRecord {\n /**\n * The execution this dispatch IS — what tells two attempts at one task apart (#2530). They used to be told apart by\n * task and start instant, which a second's resolution made the same for two attempts started together.\n */\n readonly executionId: string;\n readonly taskRef: string;\n /** When the task was SELECTED — the execution's creation instant. */\n readonly startedAt: string;\n readonly phase: Workbench_BuildDispatchPhase;\n /** When the phase left SUBMITTED. */\n readonly settledAt?: string;\n /** The durable actor-task row an ADMITTED coding run writes its real outcome to. */\n readonly codingTaskId?: string;\n /**\n * How the dispatch's run stands — its execution's status — and when it ended (#2523). The phase names the\n * hand-off and, for a coding run, stops at ADMITTED; a reader asking whether a dispatch has ended, and\n * how, reads these.\n */\n readonly runStatus: FlowsActors_Status;\n readonly runFinishedAt?: string;\n readonly error?: string;\n /**\n * Whose failure a FAILED coding run was, as the run recorded it (#1581): the task's, or the host's (a signed-out agent,\n * a spent quota, a killed turn). Read by the dispatch's page and card to link the coding lane where its trouble shows\n * (#2530 review M2). Absent for a run that did not fail, a generation step, and a run recorded before the field.\n */\n readonly failureAttribution?: CodingRunFailureAttribution;\n /** The conversation the dispatch was started from, when it was (#1454, Step 7). */\n readonly conversationId?: string;\n}\n\n/** A coding run's reported tokens, per dimension (#2232). Read off `CodingAgent_Usage` on the run's row. */\nexport interface CodingRunReportedTokens {\n readonly inputTokens?: number;\n readonly outputTokens?: number;\n readonly cacheReadTokens?: number;\n readonly cacheWriteTokens?: number;\n /** As reported; when the agent reported none, the sum of the dimensions it did report. */\n readonly totalTokens?: number;\n}\n\n/**\n * The tokens a run's recorded usage carries, or `undefined` when it carries none. Read by SHAPE: the row\n * crossed a JSON boundary, and `CodingAgent_Usage` makes every field optional.\n */\nexport function readCodingRunReportedTokens(usage: unknown): CodingRunReportedTokens | undefined {\n if (typeof usage !== 'object' || usage === null) return undefined;\n const bag = usage as Record<string, unknown>;\n const count = (key: string): number | undefined => (typeof bag[key] === 'number' && Number.isFinite(bag[key]) && (bag[key] as number) >= 0 ? bag[key] as number : undefined);\n const dimensions = {\n inputTokens: count('inputTokens'),\n outputTokens: count('outputTokens'),\n cacheReadTokens: count('cachedReadTokens'),\n cacheWriteTokens: count('cachedWriteTokens'),\n };\n const reported = Object.values(dimensions).filter((value): value is number => value !== undefined);\n const totalTokens = count('totalTokens') ?? (reported.length > 0 ? reported.reduce((sum, value) => sum + value, 0) : undefined);\n const tokens = Object.fromEntries(Object.entries({ ...dimensions, totalTokens }).filter((entry) => entry[1] !== undefined));\n return Object.keys(tokens).length > 0 ? tokens as CodingRunReportedTokens : undefined;\n}\n\n/**\n * One ATTEMPT at a build task — one actor execution, read from its own durable row (#1521).\n *\n * Nothing new is written to produce this: every dispatch has been an execution since #1359, so the\n * attempt history already existed and was read only five-at-a-time, newest first, across the whole\n * plan. This groups it by task.\n */\nexport interface ApplicationBuildTaskAttempt {\n /** The execution's own task id — the row an operator opens to read the full outcome. */\n readonly runTaskId: string;\n /**\n * A companion GENERATION step (labels, migrations, translations) rather than a coding run (#2232 review).\n * Both are attempts at a build task, but a generation step is no agent run: it has no agent-reported tokens or\n * cost, so counting it among the coding runs listed it as \"cost not reported by the agent\" and made every\n * coding-run total a false floor. Its own model calls' spend is {@link generationStepSpend}. Absent for a coding run.\n */\n readonly generationStep?: true;\n /**\n * What a GENERATION STEP's model calls spent, as its row records it (#2232). A labels or translations pass is\n * model calls priced by the provider, not an agent's reported cost, so it is a {@link PlaybookSpend}, the same\n * reading a playbook run's figure is. Absent on a coding run, and on a step whose row predates the field.\n */\n readonly generationStepSpend?: PlaybookSpend;\n /**\n * Who can fix a FAILED generation step's cause, as the step classified it (#3709); absent when it could not tell, and on\n * every coding run. `FRAMEWORK` holds the step at once (`FAILURE_OUTSIDE_APPLICATION`).\n */\n readonly failureOwner?: GenerationStepFailureOwner;\n /** This run was started past a landing the operator said was wrong, and why (#2217). */\n readonly landedOverride?: BuildTaskLandedOverride;\n /** When the run's row was opened: the task was SELECTED and its brief composed. */\n readonly startedAt: string;\n /**\n * When the door that dispatched this run began preparing it (#3206), from the run's task input: a wave's slot, or a\n * single-task door's read of the plan. The dispatch wait runs from here to {@link admittedAt}. Absent only on a row\n * from before #3206.\n */\n readonly preparationStartedAt?: string;\n /**\n * When the run was ADMITTED — the task row's start instant (#3206): a coding run once the coding lane started it, a\n * generation step when it opened. Absent for a run that never started.\n */\n readonly admittedAt?: string;\n readonly settledAt?: string;\n /** The execution's status, from the actor plane's own vocabulary. */\n readonly status: FlowsActors_Status;\n /** The coding lane's typed disposition, when the run recorded one (`ApplicationCodingTaskDisposition`). */\n readonly disposition?: string;\n readonly error?: string;\n /** Set when an operator put the task back in the queue after this run (#1535): the run no longer holds it. */\n readonly rearm?: BuildTaskRearm;\n /**\n * The failed checks of a run whose failure was suspected to be a sibling's, run again once nothing was writing (#3220):\n * TRUE when they all passed. Absent when no such re-check was made.\n */\n readonly isolatedRecheckPassed?: boolean;\n /** Checks that were already red when this run started, each with its diagnosis (#1529). */\n readonly carriedFailures?: readonly CarriedVerificationDiagnosis[];\n /** Checks this run ran GREEN — what tells a repair that a carried red has since been cleared. */\n readonly passedCheckRefs?: readonly string[];\n /*\n * What the durable row already recorded about the run and nothing read (#1541): each answers a question\n * the first end-to-end run's post-mortem answered with a script over the raw rows.\n */\n /**\n * What the run cost, as the agent reported it: its session's cumulative total, so a whole run's cost\n * however many turns it took (#2232). Absent when the agent reported none — never read as zero.\n */\n readonly cost?: { readonly amount: number; readonly currency: string };\n /**\n * The tokens the run reported (#2232), each dimension present only when reported. A coding run's total\n * is mostly prompt-cache reads (on app-creation-test-004, 1.1M of a 1.2M-token run), so the cache read\n * is kept apart: it is what a total that looks enormous is made of.\n */\n readonly tokens?: CodingRunReportedTokens;\n /** Checks the run FAILED, as this run's own (a carried red is in `carriedFailures`, not here). */\n readonly failedCheckRefs?: readonly string[];\n /** Why the agent's turn ended — `max_tokens` or `refusal` leave a change set that reads as complete and is not. */\n readonly agentStopReason?: string;\n /** Permission requests the ceiling or the task's scope refused. */\n readonly deniedPermissionCount?: number;\n /** Paths changed during the run outside the task's declared scope — recorded, never refused. */\n readonly outOfScopePaths?: readonly string[];\n /** Files the run itself changed (exclusive to the run, appeared during it, or committed during it). */\n readonly filesChanged?: number;\n /** The runs that shared the tree with this one, and the paths both changed (#1528). Absent for a run alone. */\n readonly concurrency?: { readonly overlappingTaskRefs: readonly string[]; readonly contendedPaths: readonly string[] };\n /** It failed while other runs were editing the tree, so the failure may be theirs; the budget forgives a bounded number. */\n readonly interferenceSuspected?: true;\n /**\n * It COMPLETED, and a sibling of its wave overwrote its declared product (#2210): which runs, which files,\n * and whether the wave re-ran the task for it. Absent for a run nobody interfered with.\n */\n readonly interference?: BuildTaskInterference;\n /**\n * The run ended without ever starting, by the HOST's act: refused at admission, or left selected by\n * a stopped process (#1581). Shown in the history, because it explains why nothing ran, and counted\n * by no summary figure, because it was no attempt of the task's (`CodingRunStart.REFUSED_BY_HOST`).\n */\n readonly refusedBeforeStart?: true;\n /**\n * Nothing ran: either a host refusal (above) or admission refusing the task's OWN contract, which IS\n * an attempt the budget counts. Either way no agent worked, so the run could report no cost.\n */\n readonly ranNothing?: true;\n /**\n * Whose failure a failed run was (#1581): the budget forgives HOST failures up to a bound, so this is\n * what explains a task that failed three times and was still offered again.\n */\n readonly failureAttribution?: CodingRunFailureAttribution;\n /**\n * Requirements the run's agent reported it could NOT fully meet, from its closing report's typed block (#2496). A\n * completed run's entries derive follow-up tasks ({@link HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX}); every run's are shown.\n */\n readonly unmetRequirements?: readonly ApplicationCodingUnmetRequirement[];\n /** The agent wrote the block and it did not parse: the gap was stated and could not be read (#2496). */\n readonly unmetRequirementsMalformed?: string;\n /**\n * Requirements the run's agent STATED are met by the tree it left, with where (#3227): the positive statement that alone\n * may close a gap another run reported (`collectFollowUpGapsMetSince`). Absent means nothing was stated, never \"met\".\n */\n readonly metRequirements?: readonly ApplicationCodingMetRequirement[];\n /** The agent wrote the met block and it did not parse: it states nothing (#3227). */\n readonly metRequirementsMalformed?: string;\n /**\n * What the review of a website task's copy found, once the run completed (#2593): claims its cited requirements do\n * not back, figures that disagree with their declarations. Advisory, like `unmetRequirements`: shown, never a reason\n * the task does not land. Absent for a run that was not a website run or is not reviewed yet.\n */\n readonly websiteCopyReview?: WebsiteCopyReview;\n /**\n * What the review of a website task's DRAWING found, once the run completed (#2785): rubric rules its sections break\n * as photographed, and what the camera measured. Advisory like the copy review: shown, never a reason the task does\n * not land. Absent for a run that was not a website run or is not reviewed yet.\n */\n readonly websiteVisualReview?: WebsiteVisualReview;\n}\n\n/**\n * An instant as an ISO string: the task snapshot carries strings, the task row dates (#2187), and a reader must not\n * care which it was handed.\n */\nfunction toIsoInstant(value: string | Date): string {\n return value instanceof Date ? value.toISOString() : value;\n}\n\n/**\n * The dispatch instants a build attempt's task row carries (#3206): the wave preparation's start, stamped on its input\n * at open, and its admission, the row's start instant. Read by shape: the row crossed a JSON boundary.\n */\nfunction readBuildAttemptDispatchInstants(task: { readonly input?: unknown; readonly startedAt?: string | Date }): {\n readonly preparationStartedAt?: string;\n readonly admittedAt?: string;\n} {\n const preparationStartedAt = (task.input as { preparationStartedAt?: unknown } | undefined)?.preparationStartedAt;\n return {\n ...(typeof preparationStartedAt === 'string' && Number.isFinite(Date.parse(preparationStartedAt)) ? { preparationStartedAt } : {}),\n ...(task.startedAt ? { admittedAt: toIsoInstant(task.startedAt) } : {}),\n };\n}\n\n/**\n * Whether an attempt COUNTS as one of the task's: everything but a host refusal. A refusal of the task's\n * own contract counts although nothing ran, because the attempt budget counts it (#1581).\n */\nexport function isCountedBuildTaskAttempt(attempt: Pick<ApplicationBuildTaskAttempt, 'refusedBeforeStart'>): boolean {\n return attempt.refusedBeforeStart !== true;\n}\n\n/**\n * A red the build keeps meeting and no task caused — owed a repair, with its diagnosis (#1529).\n *\n * Grouped per check across every attempt that carried it, because that is the unit a repair fixes: one\n * broken generated file reds one check for every task that verifies against it.\n */\nexport interface ApplicationBuildRepairOwed {\n readonly checkRef: string;\n /** The first attempt that met it red — when the breakage is known to predate. */\n readonly firstSeenAt: string;\n readonly lastSeenAt: string;\n /** The tasks whose attempts met it red: the work this red has been taxing. */\n readonly affectedTaskRefs: readonly string[];\n /** From the most recent attempt that carried it. */\n readonly diagnosis: CarriedVerificationDiagnosis;\n}\n\n/**\n * A landing probe the tree landing read (the working tree, #3204) does NOT satisfy: exactly what landing searched for, and\n * where. Whether the product is merely uncommitted is no longer a question (#3514): a commit is not a condition of landing.\n */\nexport interface ApplicationBuildTaskUnmetProbe {\n readonly probe: BuildPlanTaskLandedProbe;\n /** For a shell probe: what the surface is missing, still carries, or could not be asked (#1538). */\n readonly shell?: ShellProbeExplanation;\n /** For a registry probe: what the application does not register as planned, or why it could not be read (#2966). */\n readonly registered?: AgentWorkProbeExplanation;\n}\n\n/**\n * Everything the build knows about ONE task, in one read (#1521).\n *\n * The case it exists for: \"not landed\" hid three facts — never dispatched, dispatched and FAILED, and\n * dispatched, SUCCEEDED, and unprovable — and the third burned hours on the #1273 run because it is\n * indistinguishable from the first on every other surface. Here they are three different shapes:\n * no attempts; a failed attempt; a completed attempt with `unmetProbes`.\n */\nexport interface ApplicationBuildTaskRecord {\n readonly taskRef: string;\n readonly targetKind: string;\n readonly status: WorkbenchBuildPlanTaskStatus;\n /**\n * The follow-up tasks the host derived from this task's reported unmet requirements (#2496), as the plan carries them.\n * Named here so a reader never has to restate the derivation: absent means none was derived, whatever the attempts say.\n * Includes a follow-up that carries this task's report among others' (#3204).\n */\n readonly followUpTaskRefs?: readonly string[];\n /** Present on a follow-up task: the task whose reported gap derived it (#2496). */\n readonly followUpOf?: string;\n /**\n * On a derived follow-up whose objective was derived: the reports a decision on it would cover NOW (#3833), each with\n * the reference a person is shown (`followUpReportRefOf`) and what it said is missing. A decision may send back the\n * references the person saw (`coveredReportRefs`), and is refused when the follow-up has absorbed another since.\n */\n readonly coveredReports?: readonly { readonly ref: string; readonly originTaskRef: string; readonly requirementRef: string; readonly missing: string }[];\n /**\n * Landed by a person's committed closure, not by its own probe (#3224, #3227): what satisfied it, or that it was\n * declined, and why. A reader must never take it for a proven product.\n */\n readonly closure?: { readonly kind: BuildTaskClosureKind; readonly satisfiedBy?: string; readonly reason: string };\n /** Newest first. Empty = never dispatched. */\n readonly attempts: readonly ApplicationBuildTaskAttempt[];\n /** READY tasks only: why dispatch passes over it, from the SAME classification the selector uses. */\n readonly stuck?: ApplicationBuildStuckTask;\n /** Not landed and attempted at least once: the probes HEAD does not satisfy. */\n readonly unmetProbes?: readonly ApplicationBuildTaskUnmetProbe[];\n /** A generation step that lands on schema-plan state rather than on files: that state, when not in sync. */\n readonly schemaPlanSyncState?: SchemaPlanSyncState;\n /** The `design-tokens` step, not landed and attempted: whether its stylesheet block is stale or could not be checked. */\n readonly designTokenBlockState?: DesignTokenBlockState;\n /** The `design-system-brand` step, not landed and attempted: whether its module is stale or the brand could not be read. */\n readonly brandDesignState?: BrandDesignState;\n /**\n * A generation step whose landing cannot be judged, and why (#2504): a labels plan that hides units the application\n * owes. Carried so the board and `wildo context journey` name the cause, instead of listing nothing.\n */\n readonly landingBlockedBy?: string;\n /** BLOCKED tasks only: the prerequisites that have not landed. */\n readonly waitingOn?: readonly string[];\n /** LANDED with no product to prove — RAN-not-PROVEN (`application-creation-directive.md`). */\n readonly unverifiable?: boolean;\n /**\n * LANDED, and no run of this task ever started (#2217): the probe found the product before anything ran. It may\n * be true — a sibling task's run wrote it, or a person did — or the probe may be reading something that is not\n * the product (#2216 read a comment). The board must not show it as a bare `landed`, which reads as \"built by its\n * own run\". `probedPaths` is where the probe found it; `wildo build run <task> --despite-landed` runs it anyway.\n */\n readonly landedBeforeAnyRun?: { readonly probedPaths: readonly string[] };\n /**\n * LANDED, and something the landing does not cover is unfinished (#3285): a billing catalogue committed while the\n * backend does not enable billing, so nothing serves it. A MARK beside the landing, never a reason it does not land\n * (`resolveBuildTaskLandingAdvisories`); derived from the committed tree at read time, so it clears once the switch is\n * committed. Absent when there is none.\n */\n readonly landingAdvisories?: readonly BuildTaskLandingAdvisory[];\n /**\n * A generation step running in this companion right now: how far it has got (#2215). Without it a\n * step that runs for hours reads \"running\" the whole time, and slow cannot be told from stuck.\n */\n readonly progress?: GenerationStepProgress;\n}\n\nexport interface ApplicationBuildTaskRecords {\n readonly tasks: readonly ApplicationBuildTaskRecord[];\n readonly summary: {\n readonly taskCount: number;\n readonly landed: number;\n /** Of `landed`, the tasks no run of their own ever started (#2217) — see {@link ApplicationBuildTaskRecord.landedBeforeAnyRun}. */\n readonly landedBeforeAnyRun: number;\n readonly blocked: number;\n /** READY and no run ever STARTED — the work simply not reached yet. A refused dispatch starts nothing (#1581). */\n readonly readyNeverAttempted: number;\n /** READY, attempted, not stuck — a failed run the loop will re-offer. */\n readonly readyToRetry: number;\n /** READY and passed over, per typed reason. */\n readonly stuckByReason: Readonly<Record<Workbench_BuildTaskStuckReason, number>>;\n /** Runs that STARTED. A dispatch refused before admission is in its task's history and not here (#1581). */\n readonly attempts: number;\n /**\n * Attempts that COMPLETED on a task that has still not landed — dispatches that bought nothing.\n * The band-level stall signal: it grows while the landed count does not.\n */\n readonly completedAttemptsWithoutLanding: number;\n /** Tasks attempted more than once without landing — the per-task stall signal. */\n readonly repeatedlyAttemptedWithoutLanding: readonly string[];\n /** What the build has spent, per currency, and how much of it on tasks that have not landed (#1541). */\n readonly spend: ReturnType<typeof deriveBuildSpend>;\n /**\n * Parallel-build observability (#1528): the degree the lane runs at now, and across every attempt\n * how many overlapped another run, how many failed while suspected of interference, and which paths\n * two runs both changed.\n */\n readonly parallelism: {\n readonly degree: number;\n readonly overlappingAttempts: number;\n readonly interferenceSuspectedAttempts: number;\n /** Completed attempts whose product a sibling overwrote (#2210). */\n readonly interferedCompletedAttempts: number;\n readonly contendedPaths: readonly string[];\n };\n };\n /**\n * TRUE when an attempt listing reached its page cap, so some attempts may be missing. Said rather\n * than hidden: a count read off a truncated listing is a claim about the query, not the build.\n */\n readonly attemptsTruncated: boolean;\n /**\n * The application's runtimes a live dev-loop supervisor has PAUSED or is CRASH-LOOPING (#1537, #3365) — the\n * application being built cannot start. Said beside the build rather than gating it: most tasks build fine against a\n * dead backend, and refusing them would turn a visible problem into a stalled lane. Absent when no\n * supervisor could answer.\n */\n readonly unavailableRuntimes?: readonly UnavailableApplicationRuntime[];\n /**\n * The backends whose own start record says their last start FAILED (#2405), with the refusal. Unlike a paused\n * supervisor this is read in every dev-loop mode, including an app-creator application with no supervisor. The wave\n * stops filling while one is listed; this is where `wildo build tasks` shows why. Absent when there is none.\n */\n readonly bootFailures?: readonly ApplicationBuildRecordsBootFailure[];\n /**\n * How the person's build-task decisions stand when they do not simply count (#3224 review, R2): NOT_HONOURED or UNKNOWN\n * with the reason, and any named condition on a single run record with its remedy. Absent when they count and nothing\n * is to be said; `wildo build tasks` prints it.\n */\n readonly buildTaskDecisions?: { readonly standing: BuildTaskDecisionsStanding; readonly reason?: string; readonly conditions?: readonly string[] };\n /**\n * Reds the build keeps meeting that no task caused (#1529), each with the files it names and what\n * generated them. A check that a LATER attempt ran green is cleared and not listed.\n */\n readonly repairsOwed: readonly ApplicationBuildRepairOwed[];\n}\n\n/**\n * The window of NEWEST runs a reader asks under when it is about recent runs only (the assembly repair's attempts this\n * round). A reader of a task's whole history (the build record, which tasks ever started a run, each task's latest\n * completed run for the follow-up derivation) reads to {@link BUILD_TASK_RECORD_HISTORY_CEILING} instead.\n */\nconst BUILD_TASK_ATTEMPT_PAGE_CAP = 200;\n\n/** How long one listing of the latest completed coding runs serves the plan reads of a burst (#2496 review F8). */\nconst LATEST_COMPLETED_CODING_RUNS_TTL_MS = 2_000;\n\n/** The `coveredReports` of a task record (#3833): nothing for a task whose decision would cover no derived report. */\nfunction coveredReportsOf(gaps: readonly FollowUpGap[]): Pick<ApplicationBuildTaskRecord, 'coveredReports'> {\n if (gaps.length === 0) return {};\n return { coveredReports: gaps.map((gap) => ({ ref: followUpReportRefOf(gap), originTaskRef: gap.originTaskRef, requirementRef: gap.requirementRef, missing: gap.missing })) };\n}\n\n/**\n * Refuse a decision on a derived follow-up that would cover a report the person was not shown (#3833). A pending follow-up\n * keeps absorbing reports, so one can join between the moment a person looks and the moment they decide: a decline would\n * then close it unseen and, under GUIDED, an approval would let it run unreviewed. A decision is a person's statement, and\n * looking again costs one read, so the door refuses and names what joined, rather than deciding on the part displayed\n * (an intersection would record a decision the person did not take on a follow-up they did not see whole).\n *\n * `displayed` absent on a follow-up that covers reports: refused too, naming every report. A caller that does not say\n * what it showed cannot prove it showed anything, and the door is where the check holds for every caller, not only for\n * the CLI that sends it. A follow-up that covers nothing derived (its objective was not matched, so it covers its own\n * report only) needs no refs. A displayed report the follow-up no longer carries (met since) is not a refusal: the\n * decision covers less than was shown, never more.\n */\nfunction refuseFollowUpReportsNotDisplayed(taskRef: string, gaps: readonly FollowUpGap[], displayed: readonly string[] | undefined): void {\n if (gaps.length === 0) return;\n if (displayed === undefined) {\n throw new BuildTaskDecisionRefusedError(\n `${taskRef} covers ${gaps.length === 1 ? 'a reported gap' : `${gaps.length} reported gaps`}, and a decision on it must say which `\n + `reports the person was shown: ${gaps.map((gap) => `${followUpReportRefOf(gap)} (${gap.missing})`).join('; ')}. `\n + `Show them, then decide with --covers ${gaps.map((gap) => followUpReportRefOf(gap)).join(',')} (\\`wildo build tasks\\` lists them).`,\n );\n }\n const shown = new Set(displayed);\n const joined = gaps.filter((gap) => !shown.has(followUpReportRefOf(gap)));\n if (joined.length === 0) return;\n throw new BuildTaskDecisionRefusedError(\n `${taskRef} now covers ${joined.length === 1 ? 'a report' : `${joined.length} reports`} you were not shown: `\n + `${joined.map((gap) => `${followUpReportRefOf(gap)} (${gap.missing})`).join('; ')}. Look at it again (\\`wildo build tasks\\`) and decide on what it covers now.`,\n );\n}\n\n/**\n * Every reported gap a decision on a follow-up covers, for the door's reply (#3832): one per line, with the task that\n * reported it, so a decision that took in a report the person had not seen yet says so. For a follow-up whose objective\n * was not matched, says it covers its own report only; empty for any other task.\n */\nexport function describeFollowUpDecisionCoverage(gaps: readonly FollowUpGap[], verb: 'closes' | 'lets run', taskRef: string): string {\n if (gaps.length === 0) {\n // A follow-up whose objective was not matched is fixed to its own report: said, rather than left for the reader to infer.\n return taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX) ? ` Its current objective could not be matched, so this decision ${verb} its own report only.` : '';\n }\n return ` This decision ${verb} ${gaps.length} reported gap${gaps.length === 1 ? '' : 's'}:`\n + gaps.map((gap) => `\\n- ${gap.requirementRef}, reported by ${gap.originTaskRef}: ${gap.missing}`).join('');\n}\n\n/** The reporting tasks a follow-up decision covers beyond its own, for the commit's one-line summary (#3832). */\nexport function describeFollowUpDecisionOrigins(gaps: readonly FollowUpGap[]): string {\n const origins = [...new Set(gaps.map((gap) => gap.originTaskRef))];\n return origins.length > 1 ? ` (covers the reports of ${origins.join(', ')})` : '';\n}\n\n/** How many derived follow-up objectives keep their carried gap keys for a dispatch to stamp (#3204): many plan reads' worth. */\nconst CARRIED_FOLLOW_UP_GAP_KEYS_RETAINED = 5_000;\n\n/** The absorption inputs as a stable string, for the follow-up derivation's memo key (#3204). */\nfunction describeAbsorptionInputs(absorption: FollowUpAbsorptionInputs | undefined): string | null {\n if (absorption === undefined) return null;\n return JSON.stringify({\n dispatched: [...absorption.dispatched].map(([taskRef, keys]) => [taskRef, [...keys].sort()]).sort(([left], [right]) => String(left).localeCompare(String(right))),\n decided: [...absorption.decided].map(([taskRef, keys]) => [taskRef, [...keys].sort()]).sort(([left], [right]) => String(left).localeCompare(String(right))),\n });\n}\n\n/**\n * How far back the BUILD RECORD reads each coding system's runs (#2530): the record is every attempt at every task, and a\n * window of the newest 200 is not that. On a long build that window held only the latest runs, so an early task attempted\n * six times showed fewer, and a task run long ago showed none.\n *\n * Still a bound, and still said (`attemptsTruncated`): the read pages from the database, newest first, so its cost grows\n * with the history, and an unbounded one would bring back what #2186 removed. Ten times the window: a whole creation run\n * fits under it many times over (a build is tens of tasks, each run a few times, plus the playbooks' own coding runs).\n * The other readers keep the window, since they ask about the newest runs only (what is in flight, what failed last).\n */\nexport const BUILD_TASK_RECORD_HISTORY_CEILING = 2_000;\n\n/**\n * How many of its OWN failures a build task may spend before dispatch stops offering it (#1536).\n * Three, because the first end-to-end run's two repeating tasks each failed three times identically:\n * a third identical failure says the dispatch, not luck, is the problem. Released by a re-arm.\n */\nexport const MAXIMUM_ATTRIBUTABLE_FAILED_ATTEMPTS = 3;\n\n/** The check a repair of the application's refused start is scoped and verified by (#3204): the running backend's. */\nexport const STARTUP_REPAIR_CHECK_REF = 'check:backend-ready';\n\n/**\n * The refused starts among the backend's boot failures, as the failing check a repair is given (#3204): each service and\n * the refusal it recorded. `undefined` when no failure is the application's own refusal (a dev-stack cause is no task's).\n */\nexport function describeRefusedStartupAsCheckFailure(failures: readonly ApplicationBootFailure[]): AssemblyCheckFailure | undefined {\n const refused = failures.filter(isApplicationStartupFailure);\n if (refused.length === 0) return undefined;\n const detail = refused.map((failure) => `${failure.serviceIdentifier}: ${failure.message ?? 'its start failed and recorded no message'}`).join('\\n');\n return { checkRef: STARTUP_REPAIR_CHECK_REF, output: detail.split('\\n').slice(0, 5).join('\\n'), detail };\n}\n\n/** The stuck reasons that clear by themselves while a wave runs: a plan whose ready tasks are only these is moving (#3204). */\nconst BUILD_TASK_REASONS_THAT_ARE_PROGRESS: ReadonlySet<Workbench_BuildTaskStuckReason> = new Set([\n Workbench_BuildTaskStuckReason.IN_FLIGHT,\n Workbench_BuildTaskStuckReason.CONTENDED,\n Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK,\n Workbench_BuildTaskStuckReason.RAN_THIS_WAVE,\n]);\n\n/** How much of a failed check's output a retry is shown — enough for a compiler's first errors, not a log. */\nconst PREVIOUS_ATTEMPT_OUTPUT_TAIL_CHARS = 2000;\n\n/** One build attempt from its execution row; `null` for a row that names no build task. Read by the build record and the journey timeline. */\nexport function projectBuildTaskAttempt(execution: {\n readonly systemRef?: string;\n readonly status: FlowsActors_Status;\n // The stored row's instants are dates (#2187); the attempt this builds carries ISO strings.\n readonly createdAt: Date;\n readonly finishedAt?: Date;\n readonly standaloneTasks: readonly { readonly _id: string; readonly input?: unknown; readonly output?: unknown; readonly memory?: unknown; readonly startedAt?: string | Date }[];\n}): { readonly taskRef: string; readonly attempt: ApplicationBuildTaskAttempt } | null {\n const task = execution.standaloneTasks[0];\n const taskRef = (task?.input as { taskRef?: unknown } | undefined)?.taskRef;\n if (!task || typeof taskRef !== 'string') return null;\n const output = task.output as {\n disposition?: unknown;\n carriedVerificationDiagnoses?: unknown;\n carriedVerificationFailures?: unknown;\n verification?: unknown;\n usage?: { cost?: { amount?: unknown; currency?: unknown } } & Record<string, unknown>;\n agentStopReason?: unknown;\n deniedPermissionCount?: unknown;\n scopeAssessment?: { outOfScopePaths?: unknown };\n changeSetSummary?: { stats?: Record<string, unknown> };\n concurrency?: { overlappingTaskRefs?: unknown; contendedPaths?: unknown };\n interferenceSuspected?: unknown;\n failureAttribution?: unknown;\n unmetRequirements?: unknown;\n unmetRequirementsMalformed?: unknown;\n metRequirements?: unknown;\n metRequirementsMalformed?: unknown;\n } | undefined;\n const rearm = readBuildTaskRearm(task.memory);\n const isolatedRecheck = readIsolatedVerificationRecheck(task.memory);\n const unmetRequirements = Array.isArray(output?.unmetRequirements)\n ? (output!.unmetRequirements as { requirementRef?: unknown; missing?: unknown; ownedByTaskRef?: unknown; needsDecision?: unknown }[])\n .filter((entry) => typeof entry?.requirementRef === 'string' && typeof entry.missing === 'string')\n .map((entry) => ({\n requirementRef: entry.requirementRef as string,\n missing: entry.missing as string,\n // The owner or the decision the report named (#3886): the follow-up derivation acts on them.\n ...(typeof entry.ownedByTaskRef === 'string' ? { ownedByTaskRef: entry.ownedByTaskRef } : {}),\n ...(typeof entry.needsDecision === 'string' ? { needsDecision: entry.needsDecision } : {}),\n }))\n : [];\n const metRequirements = Array.isArray(output?.metRequirements)\n ? (output!.metRequirements as { requirementRef?: unknown; evidence?: unknown }[])\n .filter((entry) => typeof entry?.requirementRef === 'string' && typeof entry.evidence === 'string')\n .map((entry) => ({ requirementRef: entry.requirementRef as string, evidence: entry.evidence as string }))\n : [];\n const landedOverride = readBuildTaskLandedOverride(task.input);\n const interference = readBuildTaskInterference(task.memory);\n const websiteCopyReview = readWebsiteCopyReview(task.memory);\n const websiteVisualReview = readWebsiteVisualReview(task.memory);\n const carriedFailures = Array.isArray(output?.carriedVerificationDiagnoses)\n ? (output!.carriedVerificationDiagnoses as CarriedVerificationDiagnosis[]).filter((entry) => typeof entry?.checkRef === 'string')\n : [];\n const verification = Array.isArray(output?.verification)\n ? (output!.verification as { checkRef?: unknown; outcome?: { success?: unknown } }[]).filter((entry) => typeof entry?.checkRef === 'string')\n : [];\n const passedCheckRefs = verification.filter((entry) => entry.outcome?.success === true).map((entry) => String(entry.checkRef));\n const carriedRefs = new Set(Array.isArray(output?.carriedVerificationFailures) ? (output!.carriedVerificationFailures as unknown[]).map(String) : []);\n const failedCheckRefs = verification\n .filter((entry) => entry.outcome?.success === false && !carriedRefs.has(String(entry.checkRef)))\n .map((entry) => String(entry.checkRef));\n const cost = output?.usage?.cost;\n // Whichever key the run's writer used (#2390): `failure` for a refusal or a step, `error` and its siblings for a coding run.\n const failureMessage = readSettledRunFailureMessage(output);\n const tokens = readCodingRunReportedTokens(output?.usage);\n const stats = output?.changeSetSummary?.stats;\n const count = (value: unknown): number => (typeof value === 'number' && Number.isFinite(value) ? value : 0);\n const outOfScopePaths = Array.isArray(output?.scopeAssessment?.outOfScopePaths)\n ? (output!.scopeAssessment!.outOfScopePaths as unknown[]).map(String)\n : [];\n return {\n taskRef,\n attempt: {\n runTaskId: String(task._id),\n ...(execution.systemRef === APPLICATION_BUILD_SYSTEM_REF ? { generationStep: true as const } : {}),\n ...(() => {\n if (execution.systemRef !== APPLICATION_BUILD_SYSTEM_REF) return {};\n const generationStepSpend = readRecordedPlaybookSpend((task.output as { spend?: unknown } | undefined)?.spend);\n const recordedOwner = (task.output as { failureOwner?: unknown } | undefined)?.failureOwner;\n const failureOwner = (Object.values(GenerationStepFailureOwner) as unknown[]).includes(recordedOwner) ? recordedOwner as GenerationStepFailureOwner : undefined;\n return { ...(generationStepSpend ? { generationStepSpend } : {}), ...(failureOwner !== undefined ? { failureOwner } : {}) };\n })(),\n startedAt: execution.createdAt.toISOString(),\n ...readBuildAttemptDispatchInstants(task),\n ...(execution.finishedAt ? { settledAt: execution.finishedAt.toISOString() } : {}),\n status: execution.status,\n ...(typeof output?.disposition === 'string' ? { disposition: output.disposition } : {}),\n ...(failureMessage !== undefined ? { error: failureMessage } : {}),\n ...(rearm ? { rearm } : {}),\n ...(isolatedRecheck ? { isolatedRecheckPassed: isolatedRecheck.passed } : {}),\n ...(landedOverride ? { landedOverride } : {}),\n ...(carriedFailures.length > 0 ? { carriedFailures } : {}),\n ...(passedCheckRefs.length > 0 ? { passedCheckRefs } : {}),\n ...(typeof cost?.amount === 'number' && typeof cost.currency === 'string' ? { cost: { amount: cost.amount, currency: cost.currency } } : {}),\n ...(tokens ? { tokens } : {}),\n ...(failedCheckRefs.length > 0 ? { failedCheckRefs } : {}),\n ...(typeof output?.agentStopReason === 'string' ? { agentStopReason: output.agentStopReason } : {}),\n ...(typeof output?.deniedPermissionCount === 'number' ? { deniedPermissionCount: output.deniedPermissionCount } : {}),\n ...(outOfScopePaths.length > 0 ? { outOfScopePaths } : {}),\n ...(stats ? { filesChanged: count(stats['runExclusive']) + count(stats['appearedDuringRun']) + count(stats['committedDuringRun']) } : {}),\n ...(Array.isArray(output?.concurrency?.overlappingTaskRefs) ? {\n concurrency: {\n overlappingTaskRefs: (output!.concurrency!.overlappingTaskRefs as unknown[]).map(String),\n contendedPaths: Array.isArray(output!.concurrency!.contendedPaths) ? (output!.concurrency!.contendedPaths as unknown[]).map(String) : [],\n },\n } : {}),\n ...(output?.interferenceSuspected === true ? { interferenceSuspected: true as const } : {}),\n ...(interference ? { interference } : {}),\n ...(typeof output?.failureAttribution === 'string' ? { failureAttribution: output.failureAttribution as CodingRunFailureAttribution } : {}),\n ...(unmetRequirements.length > 0 ? { unmetRequirements } : {}),\n ...(typeof output?.unmetRequirementsMalformed === 'string' ? { unmetRequirementsMalformed: output.unmetRequirementsMalformed } : {}),\n ...(metRequirements.length > 0 ? { metRequirements } : {}),\n ...(typeof output?.metRequirementsMalformed === 'string' ? { metRequirementsMalformed: output.metRequirementsMalformed } : {}),\n ...(websiteCopyReview ? { websiteCopyReview } : {}),\n ...(websiteVisualReview ? { websiteVisualReview } : {}),\n ...refusalMarks(deriveCodingRunStart({ status: execution.status, ...(task.startedAt ? { startedAt: toIsoInstant(task.startedAt) } : {}), ...(output ? { output } : {}) })),\n },\n };\n}\n\n/**\n * What one website run's copy review covers (#2593): the task's own subjects, and — for a PAGE task — every section of\n * its page whose section task has no completed run of its own. A page agent that wrote its sections' bodies despite\n * its boundary leaves those tasks landed by probe with no run to review them, so the page run's review covers them.\n */\nfunction websiteCopyReviewScope(\n task: BuildPlanTask,\n tasks: readonly BuildPlanTask[],\n companionExports: unknown,\n latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>,\n deliveryOf?: (requirementRef: string) => WebsiteClaimDelivery,\n): { readonly own: readonly WebsiteTaskCopySubject[]; readonly alsoReviewed: readonly WebsiteCopyAlsoReviewed[] } {\n const own = describeWebsiteTaskCopySubjects(task, companionExports, deliveryOf) ?? [];\n const pageRefs = new Set(task.produces.flatMap((product) => (product.kind === BuildPlanTaskProductKind.WEBSITE_PAGE ? [product.pageRef] : [])));\n if (pageRefs.size === 0) return { own, alsoReviewed: [] };\n const alsoReviewed = tasks\n .filter((candidate) => candidate.taskRef !== task.taskRef && candidate.target.kind === BuildPlanTaskTargetKind.WEBSITE && !latest.has(candidate.taskRef)\n && candidate.produces.some((product) => product.kind === BuildPlanTaskProductKind.WEBSITE_SECTION && pageRefs.has(product.pageRef)))\n .map((candidate) => ({ taskRef: candidate.taskRef, subjects: describeWebsiteTaskCopySubjects(candidate, companionExports, deliveryOf) ?? [] }))\n .filter((entry) => entry.subjects.length > 0);\n return { own, alsoReviewed };\n}\n\n/** The key segment a page's own words sit under (`website.<page>.meta.title`), in the place a section ref would be. */\nconst WEBSITE_PAGE_OWN_WORDS_SEGMENT = 'meta';\n\n/**\n * A locale's website pack (by its CODE) from a tree reader, `undefined` when absent or not a flat object, with the\n * fragments of the sections whose key prefixes are named merged in (#3204): a section keeps its words in\n * `<segment>/<page>.<sectionRef>.json`, which the website's own loader merges the same way. A page's own words\n * (`website.<page>.meta.`, the prefix `describeWebsiteTaskCopySubjects` gives a page) are not a section's: they live\n * in the pack, where `add-marketing-page` writes them, so no file is read for them. Nor for a bare page prefix.\n */\nexport async function readWebsiteLabelPack(\n reader: { readText(subjectRelativePath: string): Promise<string | undefined> },\n locale: string,\n sectionKeyPrefixes: readonly string[] = [],\n): Promise<Readonly<Record<string, unknown>> | undefined> {\n const pack = parseWebsiteLabelPackText(await reader.readText(websiteLabelPackPath(locale)));\n if (pack === undefined) return undefined;\n const merged: Record<string, unknown> = { ...pack };\n for (const prefix of new Set(sectionKeyPrefixes)) {\n const section = /^website\\.([^.]+)\\.([^.]+)\\.$/u.exec(prefix);\n if (section === null || section[2] === WEBSITE_PAGE_OWN_WORDS_SEGMENT) continue;\n Object.assign(merged, parseWebsiteLabelPackText(await reader.readText(websiteSectionLabelFragmentPath(locale, section[1]!, section[2]!))) ?? {});\n }\n return merged;\n}\n\nfunction parseWebsiteLabelPackText(text: string | undefined): Readonly<Record<string, unknown>> | undefined {\n if (text === undefined) return undefined;\n try {\n const parsed: unknown = JSON.parse(text);\n return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed) ? parsed as Record<string, unknown> : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction sameWebsiteCopy(left: Readonly<Record<string, string>>, right: Readonly<Record<string, string>>): boolean {\n const keys = Object.keys(left);\n return keys.length === Object.keys(right).length && keys.every((key) => right[key] === left[key]);\n}\n\n/** What an attempt's record says about a run that never started (`deriveCodingRunStart`, #1581). */\nfunction refusalMarks(start: CodingRunStart): { refusedBeforeStart?: true; ranNothing?: true } {\n if (start === CodingRunStart.REFUSED_BY_HOST) return { refusedBeforeStart: true, ranNothing: true };\n if (start === CodingRunStart.REFUSED_CONTRACT) return { ranNothing: true };\n return {};\n}\n\n/**\n * What the build has SPENT, per currency (#1541): every attempt's reported cost, and the part of it\n * spent on tasks that have not landed. Rounded at this boundary to the cent, because it accumulates.\n *\n * `attemptsWithoutReportedCost` counts SETTLED attempts whose run reported no cost (#1507): an agent may\n * report none, and those attempts are not in the totals — which are then a floor, and say so, rather\n * than quietly reading an unpriced attempt as free. An attempt still running has no cost yet and is not\n * counted.\n *\n * `totalTokens` / `cacheReadTokens` (#2232) sum what the runs REPORTED, present only when at least one did.\n * Generation steps are left out of every figure here: they are no agent runs and report neither.\n * Tokens are reported where a cost may not be (an agent priced by subscription, a provider that prices\n * nothing), so they are the figure that says a run worked when its cost is unknown.\n */\nexport function deriveBuildSpend(records: readonly Pick<ApplicationBuildTaskRecord, 'status' | 'attempts'>[]): {\n readonly total: Readonly<Record<string, number>>;\n readonly onTasksNotLanded: Readonly<Record<string, number>>;\n readonly attemptsWithoutReportedCost: number;\n readonly totalTokens?: number;\n readonly cacheReadTokens?: number;\n /** The generation steps' own spend (#2232), apart from the coding runs. Absent when no step ran. */\n readonly generationSteps?: ApplicationBuildGenerationStepSpend;\n} {\n const total: Record<string, number> = {};\n const onTasksNotLanded: Record<string, number> = {};\n let attemptsWithoutReportedCost = 0;\n const tokens: { totalTokens?: number; cacheReadTokens?: number } = {};\n const generationSpends: PlaybookSpend[] = [];\n let generationSteps = 0;\n let generationStepsWithoutRecordedSpend = 0;\n for (const record of records) {\n for (const attempt of record.attempts) {\n // A run that never started could report no cost: it is not an unpriced attempt (#1581).\n if (attempt.ranNothing === true) continue;\n // A generation step is no agent run: its model calls are its own figure, never an unpriced coding run (#2232).\n if (attempt.generationStep === true) {\n if (attempt.settledAt === undefined) continue;\n generationSteps += 1;\n // A step no meter observed recorded nothing either: counted apart, never merged in as spending nothing.\n if (attempt.generationStepSpend && attempt.generationStepSpend.measurement !== PlaybookSpendMeasurement.NOT_OBSERVED) generationSpends.push(attempt.generationStepSpend);\n else generationStepsWithoutRecordedSpend += 1;\n continue;\n }\n for (const key of ['totalTokens', 'cacheReadTokens'] as const) {\n const value = attempt.tokens?.[key];\n if (value !== undefined) tokens[key] = (tokens[key] ?? 0) + value;\n }\n if (!attempt.cost) {\n if (attempt.settledAt !== undefined) attemptsWithoutReportedCost += 1;\n continue;\n }\n total[attempt.cost.currency] = (total[attempt.cost.currency] ?? 0) + attempt.cost.amount;\n if (record.status !== WorkbenchBuildPlanTaskStatus.LANDED) {\n onTasksNotLanded[attempt.cost.currency] = (onTasksNotLanded[attempt.cost.currency] ?? 0) + attempt.cost.amount;\n }\n }\n }\n const cents = (sums: Record<string, number>) => Object.fromEntries(Object.entries(sums).map(([currency, amount]) => [currency, Math.round(amount * 100) / 100]));\n return {\n total: cents(total),\n onTasksNotLanded: cents(onTasksNotLanded),\n attemptsWithoutReportedCost,\n ...tokens,\n ...(generationSteps > 0 ? { generationSteps: {\n steps: generationSteps,\n stepsWithoutRecordedSpend: generationStepsWithoutRecordedSpend,\n // Absent when no step recorded one: an empty merge would read \"measured, 0 calls\" beside steps that recorded nothing.\n ...(generationSpends.length > 0 ? { spend: mergePlaybookSpend(generationSpends) } : {}),\n } } : {}),\n };\n}\n\n/**\n * What the build's generation steps spent (#2232): how many settled, how many have no recorded spend (a row\n * from before #2232), and their merged spend. The merged spend's own `measurement` says whether any call\n * reported no usage; a step with no recorded spend is counted apart, never as free.\n */\nexport interface ApplicationBuildGenerationStepSpend {\n readonly steps: number;\n readonly stepsWithoutRecordedSpend: number;\n /** The steps' recorded spend, merged. Absent when no step recorded one. */\n readonly spend?: PlaybookSpend;\n}\n\n/**\n * The reds owed a repair, from every attempt's record (#1529). Pure over the attempts, so what counts as\n * \"still owed\" is pinned rather than implied: a check is cleared once any attempt that started AFTER the\n * last one carrying it ran it green.\n */\nexport function deriveRepairsOwed(attemptsByTask: ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]>): ApplicationBuildRepairOwed[] {\n const byCheck = new Map<string, { firstSeenAt: string; lastSeenAt: string; affected: Set<string>; diagnosis: CarriedVerificationDiagnosis }>();\n const passes: { checkRef: string; at: string }[] = [];\n for (const [taskRef, attempts] of attemptsByTask) {\n for (const attempt of attempts) {\n for (const checkRef of attempt.passedCheckRefs ?? []) passes.push({ checkRef, at: attempt.startedAt });\n for (const carried of attempt.carriedFailures ?? []) {\n const entry = byCheck.get(carried.checkRef);\n if (entry === undefined) {\n byCheck.set(carried.checkRef, { firstSeenAt: attempt.startedAt, lastSeenAt: attempt.startedAt, affected: new Set([taskRef]), diagnosis: carried });\n continue;\n }\n entry.affected.add(taskRef);\n if (attempt.startedAt < entry.firstSeenAt) entry.firstSeenAt = attempt.startedAt;\n if (attempt.startedAt > entry.lastSeenAt) {\n entry.lastSeenAt = attempt.startedAt;\n entry.diagnosis = carried;\n }\n }\n }\n }\n return [...byCheck]\n .filter(([checkRef, entry]) => !passes.some((pass) => pass.checkRef === checkRef && pass.at > entry.lastSeenAt))\n .map(([checkRef, entry]) => ({\n checkRef,\n firstSeenAt: entry.firstSeenAt,\n lastSeenAt: entry.lastSeenAt,\n affectedTaskRefs: [...entry.affected].sort(),\n diagnosis: entry.diagnosis,\n }))\n .sort((left, right) => left.firstSeenAt.localeCompare(right.firstSeenAt));\n}\n\n/** What the next dispatch WOULD be. Returned unconfirmed, so a creator sees the scope before anything runs. */\nexport interface ApplicationBuildDispatchPlan {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n /**\n * What the task DECLARES it will produce (#1432).\n *\n * Carried on the plan because the plan is what the coding-run judge is given, and its treatment asks\n * whether the run implemented the dispatched task's target and stage — a question nothing can answer\n * from a taskRef and a target kind. It is also what a creator reading an unconfirmed plan needs in\n * order to see the scope: the mutation prefixes say where the agent may write, and only this says\n * what is supposed to come out.\n */\n readonly produces: readonly BuildPlanTaskProduct[];\n /**\n * Present exactly when the next task is a companion generation step. A build plan INTERLEAVES two\n * executors — coding tasks for a coding agent, and companion generation steps (labels, seeds, emails)\n * the companion runs itself — and this route serves BOTH: `dispatch-next` routes by the task's own\n * `target.kind`. (An earlier version refused generation steps by name; now that an executor exists,\n * the refusal would be a hole in the build lane, not a boundary.)\n */\n readonly generationStepRef?: string;\n readonly allowedPathPrefixes: readonly string[];\n readonly prohibitedPathPrefixes: readonly string[];\n readonly requiredChecks: readonly string[];\n readonly installedSkillRefs: readonly string[];\n readonly readyTaskRefs: readonly string[];\n readonly landedTaskRefs: readonly string[];\n /**\n * The subset of `landedTaskRefs` that landed WITHOUT PROOF — a task declaring no product, which has\n * a completed run and therefore cannot be held against the queue, but whose work nothing verified.\n *\n * A subset rather than a separate state on purpose: for scheduling these tasks ARE landed, and a\n * caller that forgot this field would schedule correctly and merely report less. The opposite\n * shape — a third status the scheduler must interpret — is how a task nobody handled becomes a\n * task nobody runs.\n *\n * Empty is the healthy answer and the one a regenerated plan produces (#600): a task that declares\n * what it produces is proven landed or is not landed, with no third case.\n */\n readonly unverifiableLandedTaskRefs: readonly string[];\n}\n\n/**\n * A build task that has been SELECTED and composed, before either executor has touched it.\n *\n * Named rather than inlined on `prepareNextBuildTask` because both dispatch doors now pass one of\n * these to a shared executor — the seam that makes selection happen exactly once per dispatch.\n *\n * `stuckTasks` rides the selection that produced it, so a concurrent pass can never be reported in\n * its place (#1451).\n */\ntype PreparedBuildTask = (\n | { readonly kind: 'CODING'; readonly plan: ApplicationBuildDispatchPlan; readonly contract: ReturnType<typeof composeBuildTaskCodingContract>; readonly stuckTasks: readonly ApplicationBuildStuckTask[] }\n | { readonly kind: 'GENERATION_STEP'; readonly plan: ApplicationBuildDispatchPlan; readonly task: BuildPlanTask; readonly stuckTasks: readonly ApplicationBuildStuckTask[] }\n) & {\n /** Set only when the selection EXERCISED an override: the task read landed and the operator ran it anyway (#2217). */\n readonly landedOverride?: BuildTaskLandedOverride;\n};\n\n\n/**\n * The stuck reasons a landed override passes (#2217): a COMPLETED earlier run — that run is the landing the operator says\n * is wrong. Every other reason still refuses the task.\n */\nconst LANDED_OVERRIDE_RELEASES: ReadonlySet<Workbench_BuildTaskStuckReason> = new Set([\n Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n]);\n\n/** The family the build plan lands as. */\nconst BUILD_PLAN_FAMILY = 'build-plan';\n\n/** How long one read of the build plan's commit time answers every row and selection that asks (#3460). */\nconst BUILD_PLAN_COMMIT_TIME_REUSE_MS = 5_000;\n\n/** How long a CONCURRENT admission waits for the compile watchers before starting anyway (#1528). */\nconst CONCURRENT_ADMISSION_COMPILE_QUIET_MS = 30_000;\n\n/**\n * Where a task's declared products may be WRITTEN (#3204): its landed probes' writable paths, which are a subset of what\n * landing reads (`buildPlanTaskLandedProbeWritablePaths`), and may name a directory (a trailing `/`). A product whose home\n * is one of several candidates contributes every candidate, so two tasks that MAY meet are kept apart. A probe answered\n * by introspection (the shell) names no path, and a shared file no product names (a barrel, a registry) is not seen.\n */\nfunction buildTaskProductWritePaths(task: BuildPlanTask): readonly string[] {\n return resolveBuildTaskLandedProbes(task).flatMap((probe) => buildPlanTaskLandedProbeWritablePaths(probe));\n}\n\n/** Whether two write sets may touch one file: an equal path, or a path under the other's directory. */\nexport function productWritePathsMeet(left: readonly string[], right: readonly string[]): boolean {\n const covers = (path: string, other: string): boolean => path === other || (path.endsWith('/') && other.startsWith(path));\n return left.some((path) => right.some((other) => covers(path, other) || covers(other, path)));\n}\n\n/**\n * Dispatches one wave call may make per slot before it returns and lets the next call continue (the playbook loop takes a\n * turn between waves). A wave returns only once its live runs have drained, so each wave costs the tail of its slowest run:\n * raised from 4 to 8 with #3204, once nothing but the isolated re-checks and the single-flight repairs waited on a drain\n * any more (progress reads the working tree; commits are checkpoints). Not unbounded: a drain is also the quiet moment the\n * runtime supervisor restarts the companion in, and a restart held past its ceiling kills the live runs.\n */\nexport const WAVE_DISPATCHES_PER_DEGREE = 8;\n\n/**\n * Every run of the wave that has ALSO settled by now, without waiting for one that has not (#3204).\n *\n * The wave refills after a settlement, and a refill reads the landing again (a settled run moves it). That reading took\n * 41-47 s per slot on reference run 42506906346, and the runs that settled DURING it were then taken one per loop turn,\n * each paying a reading of its own: ten slots refilled at about one task a minute, and the wave ran with one to three\n * agents of ten. Taken together, the runs that settled while the previous refill ran are refilled from ONE reading,\n * which the fill shares across its slots (an admission does not move the landing).\n *\n * A run that has already settled wins its race against the sentinel because the race subscribes to it first, so its\n * reaction is queued first; a run still pending loses to the sentinel.\n */\nasync function takeAlreadySettled<T>(inFlight: ReadonlyMap<string, Promise<T>>): Promise<T[]> {\n const pending = Symbol('pending');\n const states: ReadonlyArray<T | typeof pending> = await Promise.all([...inFlight.values()].map((run) => Promise.race([run, Promise.resolve(pending)])));\n return states.filter((state): state is T => state !== pending);\n}\n\n/** Why a wave stopped taking new tasks — it always still drains the runs already live. */\nexport enum ApplicationBuildWaveStop {\n /** No task is ready and no run is live: the plan is done, blocked, or every ready task is stuck. */\n NOTHING_READY = 'nothing-ready',\n /** The call reached its dispatch cap; the next call continues. */\n DISPATCH_CAP = 'dispatch-cap',\n /**\n * The selection offered a generation step this wave had already run. It should be unreachable: since #3885 the selection\n * passes over such a step (`ran_this_wave`) and the slots keep filling. It is kept as a backstop, because the fill's\n * termination rests on that pass-over; without it a step whose landing stays unmet would be selected again forever.\n */\n GENERATION_STEP_REPEATED = 'generation-step-repeated',\n /** An admission was refused; the refusal is on the dispatch entry. */\n DISPATCH_REFUSED = 'dispatch-refused',\n /**\n * The coding agent's account hit its usage limit (#2388): every turn started before its reset would be\n * refused the same way, so the wave starts none. `usageLimit` on the result says when it resumes, and the\n * build lane submits the next wave then.\n */\n CODING_AGENT_USAGE_LIMITED = 'coding-agent-usage-limited',\n /**\n * The application's backend no longer starts (#2405): its own start record says the last start FAILED, after the\n * newest commit had its chance to restart it. Every task landed now would be built on, and verified against, an\n * application that cannot run. `bootFailures` on the result names the backend, its refusal and the runs this wave\n * landed (`wildo build tasks` names every task landed since the last good start, across waves). While runs are live\n * the filling only pauses and asks again at the next settle; with none live it stops. A task named with\n * `wildo build run` still runs, because re-running the task that broke it is the repair.\n */\n APPLICATION_DOES_NOT_BOOT = 'application-does-not-boot',\n /**\n * A person asked the wave to stop (`wildo build stop`, #3206): it starts no new task, drains the runs already live, and\n * ends as any wave does (reconciliation, repairs). The next `wildo build run` starts a new wave.\n */\n STOP_REQUESTED = 'stop-requested',\n /**\n * The dev supervisor is HOLDING a restart of this companion (#3204): a dependency install or an engine rebuild needs a\n * fresh process, and the supervisor waits for the work in flight. The wave starts nothing more and drains what is live,\n * as for `STOP_REQUESTED`, so the restart comes once the runs have settled instead of killing them at the hold's ceiling\n * (reference run 43237839187: nine coding runs, at 15:43). The next wave, in the restarted companion, continues.\n */\n RESTART_PENDING = 'restart-pending',\n /**\n * A verification check cannot be asked for a host cause (#3423, #3432): a command not on PATH, one lacking the verb, the\n * same failure on two tasks. Every task's check would fail the same way, so the companion admits no coding turn until\n * the cause's probe clears it. `verificationToolUnavailable` on the result names it. The admission that ended the\n * filling was refused before anything ran, so no attempt was spent.\n */\n VERIFICATION_TOOL_UNAVAILABLE = 'verification-tool-unavailable',\n}\n\n/**\n * The stops a slot still PREPARING must honour before it admits its run (#3883 review F4): the wave prepares several slots\n * at once, so one of these can arrive while a sibling composes its brief. Not the usage limit (a coding slot reads that hold\n * itself, and a generation step still runs under it, #2388 review F8d), not the cap (the launcher counts the slots being\n * prepared), and not the backstop for a repeated step (it says nothing about the other slots' tasks).\n */\nconst SLOT_ABANDONING_STOPS: ReadonlySet<ApplicationBuildWaveStop> = new Set([\n ApplicationBuildWaveStop.STOP_REQUESTED,\n ApplicationBuildWaveStop.RESTART_PENDING,\n ApplicationBuildWaveStop.DISPATCH_REFUSED,\n ApplicationBuildWaveStop.VERIFICATION_TOOL_UNAVAILABLE,\n ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT,\n]);\n\n/**\n * The next-task doors' refusal while the application's backend does not start (#2405). A CONFLICT: the request is\n * valid, the application's state forbids it, and the message names the refusal and the repair.\n */\nexport class ApplicationDoesNotBootError extends Error {\n /*\n * Each failure carries its own remedy, worded for WHOSE problem it is (#3214, #3217): only a startup the application's\n * code refused is a task's to fix; a held port, an orphan or stale backend, a dead watcher or unreachable\n * infrastructure is the dev stack's, and telling a person to re-run a task for it sends them to the wrong place.\n */\n public constructor(public readonly bootFailures: readonly ApplicationBootFailure[]) {\n super(`The application's backend does not start, so no next task is dispatched: ${bootFailures\n .map((failure) => `${failure.serviceIdentifier} — ${failure.message ?? 'no reason recorded'} ${failure.remedy}`).join('; ')}`);\n this.name = 'ApplicationDoesNotBootError';\n }\n}\n\n/**\n * A backend start failure as the build records show it (#2405 review F3): with the tasks whose coding run COMPLETED\n * since the backend's last good start, across waves — the candidates for the break. Empty when the backend never\n * started cleanly in this record, or when nothing has completed since.\n */\nexport interface ApplicationBuildRecordsBootFailure extends ApplicationBootFailure {\n readonly candidateTaskRefs: readonly string[];\n}\n\n/** A backend start failure that stopped a wave (#2405), with the runs this wave landed that may have caused it. */\nexport interface ApplicationBuildBootFailure extends ApplicationBootFailure {\n /** Coding runs of THIS wave that completed: the candidates when the backend broke during it. Empty if it was broken before. */\n readonly landedThisWave: readonly string[];\n}\n\n/** One task a wave dispatched: a coding admission, a generation step, or the refusal that ended the filling. */\nexport interface ApplicationBuildWaveDispatch {\n readonly plan: ApplicationBuildDispatchPlan;\n readonly admission?: ApplicationCodingTaskRunAdmission;\n readonly generationStep?: ApplicationBuildGenerationStepRunResult;\n readonly error?: string;\n}\n\n/** What one wave call did (#1528). */\nexport interface ApplicationBuildWaveResult {\n readonly degree: number;\n readonly mode: CodingRunConcurrency;\n readonly dispatched: readonly ApplicationBuildWaveDispatch[];\n /** Each coding run's settled outcome, in settle order; `null` for a row that could not be classified. */\n readonly outcomes: readonly (ApplicationCodingTaskSettledOutcome | null)[];\n /**\n * The end-of-wave repair (#1805): per run it named, how many paths its ONE commit carried (0 for a run\n * that contributed nothing to it).\n */\n readonly reconciliation: readonly { readonly taskId: string; readonly committedPaths: number; readonly error?: string }[];\n /**\n * The runs that completed and lost their product to a sibling, found once the wave's tree was reconciled,\n * and what was done about each (#2210). Empty for a single-flight wave, which has no sibling.\n */\n readonly interferenceRepairs: readonly ApplicationBuildInterferenceRepair[];\n readonly stoppedFillingBecause: ApplicationBuildWaveStop;\n /**\n * Set when a person's `wildo build stop` holds the build at the wave's END (#3206), whenever it was asked: before the\n * wave stopped filling (then `stoppedFillingBecause` is `stop-requested`) or while it drained after a usage limit, a cap\n * or a backend that does not start. No resume follows such a wave; only a person's `wildo build run` starts the next.\n */\n readonly heldByStopSince?: string;\n /** Set when the wave stopped because the backend does not start (`APPLICATION_DOES_NOT_BOOT`, #2405). */\n readonly bootFailures?: readonly ApplicationBuildBootFailure[];\n /**\n * The usage limit that stopped the filling (`CODING_AGENT_USAGE_LIMITED`, #2388): when the lane resumes,\n * and the run that met it. Absent for every other stop.\n */\n readonly usageLimit?: CodingAgentUsageLimit & { readonly taskRef: string; readonly runTaskId: string };\n /** The check's command holding coding admissions at the wave's end (#3423). Absent when none holds. */\n readonly verificationToolUnavailable?: VerificationToolUnavailableHold;\n /**\n * The generation steps whose panel refused stale expert charters, as the hold stands at the wave's end (#3204): each\n * step was passed over and the wave went on filling. Absent when none is held.\n */\n readonly staleExpertCharters?: readonly StaleExpertChartersHeld[];\n /**\n * Present when the wave ended because the PLAN is exhausted — every task landed — and says whether the application\n * those tasks built assembles (#2222). A parallel build ends here rather than at a single dispatch door, so this\n * is where \"the build is finished\" is claimed for it.\n */\n readonly assembly?: ApplicationAssemblyVerdict;\n /**\n * The repairs the wave's end ran because the finished plan did not assemble (#2283), in order: which check each\n * repaired and how its run settled (`null` when the row could not be classified). `assembly` is the verdict after\n * the last of them.\n */\n readonly assemblyRepairs?: readonly { readonly checkRef: string; readonly taskRef: string; readonly outcome: ApplicationCodingTaskSettledOutcome | null }[];\n}\n\n/**\n * What a build wave's end tells the build lane's SELECTOR about selecting another wave (#2405 review F10, #3214, #3206,\n * #2388): each reason the build cannot proceed, with its own guidance, so the selector does not spend rounds on empty\n * waves. The selector reads this condensed step value, never the wave itself.\n *\n * - a backend that does not start carries each failure's cause and remedy; the guidance names a task's repair only when\n * a startup refusal is among them, and otherwise says the repair is the person's (the dev stack or the infrastructure);\n * - a person's `wildo build stop` says the build stays stopped until a person runs `wildo build run` again, and then no\n * usage-limit resume is announced, because none happens. A courtesy: the hold itself refuses every unattended start;\n * - a coding-agent usage limit says when the companion resumes the build on its own;\n * - a build check that cannot be asked for a host cause (#3423, #3432: a command missing from the companion's PATH, one\n * lacking the verb, the same failure on two tasks) says only a person lifts it, so no build wave is worth selecting\n * until then.\n */\nexport function describeBuildWaveHoldsForSelector(\n wave: Pick<ApplicationBuildWaveResult, 'stoppedFillingBecause' | 'heldByStopSince' | 'bootFailures' | 'usageLimit' | 'verificationToolUnavailable' | 'staleExpertCharters'>,\n): Record<string, unknown> {\n // From the hold at the wave's end, not from why filling stopped: a stop asked while it drained holds too (#3206 review R1).\n const stoppedByPerson = wave.heldByStopSince !== undefined || wave.stoppedFillingBecause === ApplicationBuildWaveStop.STOP_REQUESTED;\n return {\n ...(wave.bootFailures ? {\n backendDoesNotStart: wave.bootFailures.map((failure) => ({\n serviceIdentifier: failure.serviceIdentifier,\n refusal: failure.message,\n cause: failure.cause,\n remedy: failure.remedy,\n landedThisWave: failure.landedThisWave,\n })),\n guidance: wave.bootFailures.some(isApplicationStartupFailure)\n ? 'The application\\'s backend does not start because its own startup refused: no ordinary task is dispatched until it does. '\n + 'Stop selecting build waves; each failure\\'s `remedy` names the repair (re-running the task that broke it, with the refusal as its note).'\n : 'The application\\'s backend does not start, and no task broke it (the dev stack or the infrastructure did): no ordinary task is '\n + 'dispatched until it starts. Stop selecting build waves; each failure\\'s `remedy` names the repair, which is the person\\'s, not a task\\'s.',\n } : {}),\n ...(wave.stoppedFillingBecause === ApplicationBuildWaveStop.RESTART_PENDING ? {\n restartPending: {\n guidance: 'The dev supervisor is restarting the companion (a dependency install or an engine rebuild needs a fresh process): '\n + 'this wave started nothing more so its runs could settle first. Keep the build lane: the next wave continues after the restart.',\n },\n } : {}),\n ...(stoppedByPerson ? {\n stoppedByPerson: {\n guidance: 'A person stopped the build with `wildo build stop`. Do not select build waves: they are refused until a person runs '\n + '`wildo build run` again.',\n },\n } : {}),\n ...(wave.usageLimit && !stoppedByPerson ? {\n codingAgentUsageLimit: {\n resumesAt: wave.usageLimit.resumesAt,\n guidance: `The coding agent's account hit its usage limit: no build task can run before ${wave.usageLimit.resumesAt}, and the `\n + 'companion submits the next build wave on its own then. Stop selecting build waves; nothing a later round does changes this.',\n },\n } : {}),\n ...(wave.verificationToolUnavailable ? {\n verificationToolUnavailable: {\n command: wave.verificationToolUnavailable.command,\n checkRef: wave.verificationToolUnavailable.checkRef,\n guidance: `${describeVerificationHostCause(wave.verificationToolUnavailable)} No coding turn is admitted until then. `\n + 'Stop selecting build waves: only a person repairing this lifts it, and nothing a later round does changes it.',\n },\n } : {}),\n ...(wave.staleExpertCharters ? {\n staleExpertCharters: {\n steps: wave.staleExpertCharters.map((held) => ({\n taskRef: held.taskRef,\n seats: held.staleSeats.map((seat) => ({ roleRef: seat.roleRef, changedInputs: seat.changedInputs, editedByPerson: seat.authored })),\n })),\n guidance: wave.staleExpertCharters.some((held) => held.staleSeats.some((seat) => seat.authored))\n ? 'These steps wait for expert charters a person edited, which are never derived again: the charter is updated by hand. '\n + 'Keep dispatching: every other task runs meanwhile.'\n : `These steps wait for their experts' charters to be derived again. The build-dispatch step runs ${EXPERT_STAFFING_PLAYBOOK_REF} itself `\n + 'and the next wave runs them; keep dispatching, every other task runs meanwhile.',\n },\n } : {}),\n };\n}\n\n/**\n * One completed run whose declared product a concurrent sibling overwrote (#2210), and its repair: the task\n * is re-armed and run again ALONE, so nothing can overwrite the second attempt. `rerun` is absent when the\n * bound was already spent (`interference.requeued` is then false and the task waits for a person).\n */\nexport interface ApplicationBuildInterferenceRepair {\n readonly taskRef: string;\n /** The completed run that lost its product. */\n readonly runTaskId: string;\n readonly interference: BuildTaskInterference;\n readonly rerun?: {\n readonly dispatch?: ApplicationBuildDispatchResult;\n readonly outcome?: ApplicationCodingTaskSettledOutcome | null;\n /** The re-run could not be dispatched; the task stays re-armed, so the next dispatch offers it. */\n readonly error?: string;\n };\n}\n\n/**\n * One dispatched build task's outcome — exactly one of the two executor results is present, matching the\n * plan's `targetKind`. `admission` for a coding run; `generationStep` for a companion generation step.\n */\nexport interface ApplicationBuildDispatchResult {\n readonly plan: ApplicationBuildDispatchPlan;\n readonly admission?: ApplicationCodingTaskRunAdmission;\n readonly generationStep?: ApplicationBuildGenerationStepRunResult;\n /** The step's panel refused stale expert charters: nothing ran, and the step is held until they are derived again (#3204). */\n readonly staleExpertCharters?: StaleExpertChartersHeld;\n}\n\n/** A generation step held because its panel refused stale expert charters (#3244, #3204). */\nexport interface StaleExpertChartersHeld extends StaleExpertSeatsRefusal {\n readonly taskRef: string;\n /** When the refusal was met: a commit of the charters after it releases the hold. */\n readonly observedAt: string;\n}\n\n/**\n * Dispatch the next ready build-plan task to a coding agent.\n *\n * ## The chain, and who owns each link\n *\n * | link | owner |\n * |---|---|\n * | which tasks have landed | GIT — a task has landed when the files it produces are committed |\n * | which are READY | `selectReadyBuildPlanTasks` in `_core` — pure, prerequisite-closed |\n * | what a task may touch | `resolveBuildPlanTaskCodingPolicy` — the ONLY place a `target.kind` becomes paths |\n * | the contract | `composeBuildTaskCodingContract` in the runtime — pure, schema-pinned |\n * | the run | `CodingAgentDispatchCompanionService` — mutation lock, git baseline, change-set capture |\n *\n * Nothing in that chain is decided by a model. The agent is handed a task and a boundary; it does not\n * choose either.\n *\n * ## There is no confirmation flag, and that was a correction\n *\n * `dispatchNextBuildTask` ran only when the caller also passed `confirmWorkspaceMutation: true`. It was\n * removed the day it was written, because it protected nothing the mechanism does not already protect:\n * the scope is derived from the task's CLOSED `target.kind` and cannot be widened, the mutation lock\n * admits one workspace-mutating run at a time, the run is bracketed by a git baseline snapshot and a\n * change-set capture so every touched path is visible and revertible, the required checks gate the\n * result, and acceptance is a separate act: the loop's commit under the autonomy posture, authored as\n * the companion and refusing what it cannot vouch for, or a person's (#1534).\n *\n * A caller that posts to this route is asking for a coding run — that IS the route. Making them say so\n * twice is the acceptance ceremony this whole migration exists to remove, and a field that feels like a\n * control while enforcing nothing is the exact failure mode recorded in the plan's objective.\n *\n * What was genuinely useful in it — seeing the scope before committing to a run — is a READ, and lives at\n * `describeNextBuildTask` below.\n */\n/**\n * A ready task that has already been run to a working result — the loop guard's typed refusal.\n *\n * Distinct from `ApplicationBuildPlanExhaustedError`, which means the OPPOSITE and is a healthy\n * terminal state. Conflating them would let an operator read a money-burning loop as \"the build is\n * finished\".\n */\n/**\n * A build wave was asked for while one is already running in this companion (#2208 review M1).\n *\n * A second wave would double the width the person set, and it would break the first wave's end: that wave\n * commits what its runs left and re-runs interfered tasks ALONE \"now that nothing is writing\", which is false\n * while a second wave's runs are live. Refused as a CONFLICT — nothing is wrong with the request, the\n * companion's state forbids it — and the remedy is to wait for the running wave, whose feed line ends it.\n */\n/**\n * The three doors a PERSON starts the build through (#3206), and the only starts that may end a `wildo build stop` hold —\n * each an authenticated console or workbench caller acting on a person's command. Closed on purpose: the workbench's\n * per-task dispatch is absent because it also fires on its own (a task approved later, the creation conversation's\n * tool), and the server cannot tell that from a click. The value is what the hold's release is logged as.\n */\nexport enum BuildStopReleaseDoor {\n /** `wildo build run` (`POST /build/dispatch-next`): the wave, or the next ready task alone. */\n BUILD_RUN = 'wildo build run',\n /** `wildo build run <taskRef>` (`POST /build/tasks/:taskRef/dispatch`): one named task. */\n BUILD_RUN_NAMED_TASK = 'wildo build run <taskRef>',\n /** The workbench's \"Run the build\" (`dispatch_next` on the build-plan tasks). */\n WORKBENCH_RUN_THE_BUILD = 'workbench: Run the build',\n}\n\n/**\n * A person stopped the build (`wildo build stop`, #3206) and no person has started it since: an unattended start — the\n * build lane's selector, the loop, the usage-limit resume — is refused until a person runs `wildo build run`.\n */\nexport class ApplicationBuildStoppedByPersonError extends Error {\n public constructor(public readonly heldSince: string) {\n super(`A person stopped the build with \\`wildo build stop\\` (${heldSince}): nothing starts until a person runs \\`wildo build run\\` `\n + '(or `wildo build run <taskRef>`, or the workbench\\'s \"Run the build\"). The hold lives in this companion and ends with a restart.');\n }\n}\n\nexport class ApplicationBuildWaveInFlightError extends Error {\n public constructor(public readonly startedAt: string) {\n super(`A build wave is already running (started ${startedAt}). Follow it with \\`wildo creation feed --follow\\`; `\n + 'start the next one once it has ended — it takes the tasks that are ready then.');\n }\n}\n\nexport class ApplicationBuildTaskCompletedButUnlandedError extends Error {\n /**\n * `stuckTasks` is every ready task that cannot move, as typed facts. The message explains the FIRST;\n * the read door answers with all of them, so a board never has to parse this prose (#1451).\n */\n public constructor(\n message: string,\n public readonly taskRef: string,\n public readonly priorTaskId: string,\n public readonly stuckTasks: readonly ApplicationBuildStuckTask[],\n public readonly queue: ApplicationBuildStuckQueue,\n ) {\n super(message);\n this.name = 'ApplicationBuildTaskCompletedButUnlandedError';\n }\n}\n\n/**\n * A NAMED task was asked for and it is not READY (#1454, Step 7): landed already, blocked on a\n * prerequisite, or not in the plan. The graph still decides what may run; naming a task only lets\n * the creator pick among the ready ones. `standing` and the unmet refs are what the answer needs.\n */\nexport enum ApplicationBuildTaskStanding {\n /** The task has landed: its declared product is committed. */\n LANDED = 'landed',\n /** The task waits on a prerequisite that has not landed. */\n BLOCKED = 'blocked',\n /** The plan holds no such task. */\n UNKNOWN = 'unknown',\n}\n\nexport class ApplicationBuildTaskNotReadyError extends Error {\n public constructor(\n message: string,\n public readonly taskRef: string,\n public readonly standing: ApplicationBuildTaskStanding,\n public readonly unmetPrerequisiteTaskRefs: readonly string[],\n ) {\n super(message);\n this.name = 'ApplicationBuildTaskNotReadyError';\n }\n}\n\n/** Where a dispatch was started from, carried onto the run's row so the conversation shows it (#1454, Step 7). */\nexport interface ApplicationBuildDispatchOrigin {\n readonly conversationId?: string;\n /** An operator ran a task the landing probe calls landed, and why (#2217). */\n readonly landedOverride?: BuildTaskLandedOverride;\n /**\n * When the door that dispatched this run began preparing it (#3206) — a wave's slot, or a single-task door before it\n * read the plan: stamped on the run's task input, so the dispatch wait (this instant to admission) is on a row and\n * survives a restart. Every door sets it; {@link dispatchBuildTask}'s caller may name an earlier one.\n */\n readonly preparationStartedAt?: string;\n /**\n * For a derived follow-up: the gap keys its objective carried when it was selected (#3204), stamped on the run so what a\n * dispatched follow-up was given is recorded, never inferred.\n */\n readonly carriedFollowUpGapKeys?: readonly string[];\n}\n\n/** A NAMED selection, and — for a task that reads landed — the operator's override of that landing (#2217). */\nexport interface ApplicationBuildTaskSelection {\n readonly taskRef: string;\n readonly despiteLanded?: BuildTaskLandedOverride;\n}\n\n/**\n * Why a READY task cannot make progress is `Workbench_BuildTaskStuckReason` in\n * `@wildo-ai/platform-core-shared`. It moved there in #1451 so the board can render it; this service\n * is its only producer.\n */\nexport interface ApplicationBuildStuckTask {\n readonly taskRef: string;\n /** The run that proves it is stuck; empty for a task that is unbuildable before any run. */\n readonly priorTaskId: string;\n readonly completedAt?: string;\n readonly reason: Workbench_BuildTaskStuckReason;\n /** Set only for `NO_DOCUMENT_BLUEPRINT`, so the message can name the ref that has no blueprint. */\n readonly documentRef?: string;\n /**\n * The parked run's own question, carried so the refusal is complete on its own.\n *\n * Until #1359 this was the ONLY place the question survived a companion restart: the operator\n * surface read an in-process map that a restart emptied, exactly when this guard matters. The\n * surface now reads the run's waiting execution, so both hold it — and the message still carries\n * it, because a refusal that sends its reader elsewhere for the one fact it is about is a worse\n * refusal, whatever the elsewhere.\n */\n readonly question?: string;\n /** Set only for `LANDING_UNKNOWN` (#3223): which check could not answer, and the command that shows why. */\n readonly landingUnknownCause?: string;\n /** Set when the stuck task is a GENERATION STEP held for having run on unchanged inputs (#3233): its remedy differs. */\n readonly generationStep?: true;\n /**\n * Set only for `REPEATED_IDENTICAL_FAILURE` (#3709): the step's latest failure, as its run recorded it, and how many of\n * its runs in a row failed that way. Carried so the refusal and the board name the cause without another read.\n */\n readonly repeatedFailure?: { readonly failure: string; readonly consecutive: number; readonly owner?: GenerationStepFailureOwner };\n /** Set when the task's own specification is refused and its re-dispatches are spent (#3210): the validator's faults. */\n readonly refusedSpecifications?: readonly SpecificationRefusal[];\n}\n\n\n/**\n * The most files a configuration's relative-import closure is followed to (#2305 review). A configuration reaches a\n * handful (measured: at most 8 across the dogfood applications); the bound stops a pathological import graph from\n * turning one landing resolution into a walk of the application. A closure that reaches it is not answered: the files\n * past it were never asked about, so landing on the part that was read would be the defect the closure exists to stop.\n */\nconst CONFIGURATION_IMPORT_CLOSURE_LIMIT = 200;\n\n/**\n * The committed tree as ONE landing resolution reads it: each path is asked at most once (#1005).\n *\n * A plan's tasks probe the same few files. A resource's schema, config and ui-behaviour tasks all read\n * that resource's files, so resolving probe by probe spawned git for the same path again and again. The\n * answer cannot change within one resolution, which is also what the landed set it builds assumes.\n */\n/**\n * The same two questions are also asked of the WORKING TREE (`createWorktreeReader`), only to explain a\n * stuck task — never to decide landing. There \"committed\" reads as \"present on disk\".\n */\ninterface CommittedTreeReader {\n isCommitted(subjectRelativePath: string): Promise<boolean>;\n readText(subjectRelativePath: string): Promise<string | undefined>;\n /**\n * Answer `isCommitted` for a whole path set up front, in a bounded number of git spawns.\n *\n * Pure acceleration: it seeds the same memo `isCommitted` would have filled one path at a time, so\n * a path this does not cover still resolves on demand and the answers are identical either way.\n */\n primeCommitted(subjectRelativePaths: readonly string[]): Promise<void>;\n /** The same, for committed TEXT: one `cat-file --batch` instead of one `show` per path. */\n primeTexts(subjectRelativePaths: readonly string[]): Promise<void>;\n /**\n * What the resolved shell carries and what the placement plan decided — ONE introspection per\n * landing resolution, however many shell probes ask (#1538). The paths it names are then asked of\n * THIS reader, so the committed reader and the working-tree reader give their own answers.\n */\n shellWitness(): Promise<ShellWitness>;\n /**\n * What the application's backend registers of its agent work (#2966) — ONE introspection per landing resolution,\n * however many registry probes ask. Like the shell, the files a probe then requires are asked of THIS reader.\n */\n agentWorkWitness(): Promise<AgentWorkWitness>;\n /**\n * What the application's configuration declares (its organization types, relationship kinds and system-of-record\n * instances), read once per landing resolution (#2305 S6, #3035, #3039).\n */\n applicationConfigurationWitness(): Promise<ApplicationConfigurationWitness>;\n}\n\n/** The introspection half of a reader: answered from the live application, identical for every tree one resolution reads. */\ntype IntrospectionWitnesses = Pick<CommittedTreeReader, 'shellWitness' | 'agentWorkWitness' | 'applicationConfigurationWitness'>;\n\n/**\n * Why a generation step's landing is UNKNOWN, by step, and the command that shows the cause (#3223) — the words the\n * selection used to log when it passed such a step over, now also the refusal when nothing else can run.\n */\nfunction describeUnanswerableGenerationStepLanding(task: BuildPlanTask): string {\n const stepRef = task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP ? task.target.generationStepRef : undefined;\n const subject = `Build step \"${task.taskRef}\" was passed over:`;\n switch (stepRef) {\n case ApplicationBuildGenerationStep.DESIGN_TOKENS:\n return `${subject} \\`wildo design-tokens validate\\` neither confirmed nor refuted the stylesheet block (a design-system config `\n + 'that does not load, a stylesheet with no design-token markers, or a CLI that could not start or timed out — run '\n + '`wildo design-tokens validate` to see which).';\n case ApplicationBuildGenerationStep.DESIGN_SYSTEM_BRAND:\n return `${subject} the brand's visual tone could not be read (the specifications package did not evaluate — run `\n + '`wildo context info brand-visual-tone`, which evaluates the same exports and names the error).';\n // #2694: before, this step owed nothing on an unreadable brand, so it was never passed over.\n case ApplicationBuildGenerationStep.DISPLAY_NAME:\n return `${subject} the brand could not be read, so whether the application owes its name is unknown (the specifications `\n + 'package did not evaluate; the step\\'s build-task record names the error).';\n case ApplicationBuildGenerationStep.DATABASE_MIGRATIONS:\n return `${subject} its \\`wildo db diff --check\\` neither passed nor reported drift (no accepted schema plan, no built backend `\n + 'registry, a CLI that could not import or spawn, a timeout, an unparseable lockfile, or an engine planner-contract '\n + 'mismatch — run `wildo db diff` to see which).';\n default:\n return `${subject} whether it has already landed could not be checked (\\`wildo build tasks --json\\` shows the step's record).`;\n }\n}\n\n/**\n * What makes two failures of a generation step THE SAME failure (#3709): the failure text with what changes between two\n * runs of one cause taken out — an instant, a run or row id, a duration. `undefined` for a failure that recorded no text,\n * which never matches anything: a step is held only on a POSITIVE match, as a choreography lane is (596611bf2).\n *\n * Counts are kept on purpose. \"6 authored example(s) do not match\" and \"5 … do not match\" are progress, and reading them\n * as one failure would hold a step that is being repaired one example at a time.\n *\n * Rejected: compare the text exactly. A step's message can carry the instant it failed or the id of the run it read\n * (a labels unit's model call, a lock holder), so two runs of one cause would never match and the hold would never fire.\n */\nexport function generationStepFailureFingerprint(failure: string | undefined): string | undefined {\n if (failure === undefined) return undefined;\n const fingerprint = failure\n .replace(/\\b\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?/gu, '<instant>')\n .replace(/\\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\b/giu, '<id>')\n .replace(/\\b[0-9a-f]{12,}\\b/giu, '<id>')\n .replace(/\\b\\d+(?:\\.\\d+)?\\s?(?:ms|milliseconds?|s|seconds?|min|minutes?)\\b/gu, '<duration>')\n .replace(/\\s+/gu, ' ')\n .trim();\n return fingerprint === '' ? undefined : fingerprint;\n}\n\n/**\n * How many of a step's latest runs, newest first, FAILED with the same failure and were not re-armed (#3709): 0 when the\n * newest did not fail, or failed with no text to compare. The count stops at the first run that differs.\n */\nexport function countConsecutiveIdenticalGenerationStepFailures(attemptsNewestFirst: readonly ApplicationBuildTaskAttempt[]): number {\n const newest = attemptsNewestFirst[0];\n const fingerprint = newest?.status === FlowsActors_Status.FAILED && newest.rearm === undefined ? generationStepFailureFingerprint(newest.error) : undefined;\n if (fingerprint === undefined) return 0;\n let count = 0;\n for (const attempt of attemptsNewestFirst) {\n if (attempt.status !== FlowsActors_Status.FAILED || attempt.rearm !== undefined || generationStepFailureFingerprint(attempt.error) !== fingerprint) break;\n count += 1;\n }\n return count;\n}\n\n/**\n * What a FAILED generation step's row records beside the engine's failure: what its model calls spent (#2232), and who can\n * fix the cause when the step could tell (#3709), which the selection holds a framework-owned failure on. `null` for\n * neither, so the row carries the failure alone.\n */\nexport function recordBesideGenerationStepFailure(spend: PlaybookSpend | undefined, error: unknown): Readonly<Record<string, unknown>> | null {\n const failureOwner = readGenerationStepFailureOwner(error);\n const beside = { ...(spend ? { spend } : {}), ...(failureOwner !== undefined ? { failureOwner } : {}) };\n return Object.keys(beside).length > 0 ? beside : null;\n}\n\n/**\n * The identical failures, in a row, after which a generation step is withheld (#3709): TWO, the choreography's number.\n * One more run after a first failure is allowed, because a sibling's landing may have changed what the step reads; an\n * identical second failure over unchanged inputs says it did not.\n */\nexport const GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER = 2;\n\n/**\n * The sentence a decision door adds when HEAD's decisions bytes were not honoured (review of 8d6b95d29): the decision was\n * added to the newest decisions a person's door recorded, or, when there are none, the file was REPLACED.\n */\nfunction describeReplacedDecisions(replacedUnhonoured: { readonly reason: string; readonly carriedEarlier: boolean } | undefined): string {\n if (replacedUnhonoured === undefined) return '';\n return replacedUnhonoured.carriedEarlier\n ? ` HEAD's decisions file was not honoured (${replacedUnhonoured.reason}), so this decision was added to the last ones a person recorded, and those bytes were dropped.`\n : ` HEAD's decisions file was not honoured (${replacedUnhonoured.reason}) and no person had recorded a decision, so it was replaced.`;\n}\n\n/**\n * Why a task is held while the person's decisions are UNKNOWN (R2), or `undefined` when they do not hold it: the decisions\n * name it, and whether a person recorded them cannot be read.\n */\nfunction describeHeldByUnknownDecisions(taskRef: string, decisions: Pick<BuildTaskDecisions, 'standing' | 'reason' | 'heldTaskRefs'> | undefined): string | undefined {\n if (decisions?.standing !== BuildTaskDecisionsStanding.UNKNOWN || decisions.heldTaskRefs?.has(taskRef) !== true) return undefined;\n return `Build task \"${taskRef}\" is named by the committed build-task decisions, and whether a person recorded them cannot be read right now `\n + `(${decisions.reason ?? 'unknown'}). It is held rather than run as if never decided; it is offered again once that can be read.`;\n}\n\n/** Why a generation step was passed over while a specifications module fails (#3258), or `undefined` when none does. */\nexport function describeHeldBySpecificationFault(task: BuildPlanTask, modules: readonly string[] | undefined): string | undefined {\n if (modules === undefined || modules.length === 0) return undefined;\n if (task.target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP || !generationStepReadsSpecifications(task.target.generationStepRef)) return undefined;\n return `Build step \"${task.taskRef}\" was passed over: specifications module ${modules.map((modulePath) => `\"${modulePath}\"`).join(', ')} could not be evaluated, `\n + 'so what the step reads may be short. It is offered again once the module evaluates.';\n}\n\n/** The assembly check that evaluates the specifications package. */\nconst SPECIFICATION_EXPORTS_CHECK_REF = 'check:specification-exports';\n\n/** The fault a landing pass found, or `undefined` with no module failing (#3258). Every answer about a plan's progress reads it here. */\nfunction readBuildPlanSpecificationFault(\n tasks: readonly BuildPlanTask[],\n resolution: Pick<LandedTaskResolution, 'modulesHoldingGenerationSteps' | 'specificationRepairOwed' | 'unverifiableLandedTaskRefs'>,\n): BuildPlanSpecificationFault | undefined {\n const failingModules = resolution.modulesHoldingGenerationSteps ?? [];\n if (failingModules.length === 0) return undefined;\n const generationSteps = new Set(tasks.filter((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP).map((task) => task.taskRef));\n return {\n failingModules,\n ranNotProvenTaskRefs: resolution.unverifiableLandedTaskRefs.filter((taskRef) => generationSteps.has(taskRef)),\n ...(resolution.specificationRepairOwed === true ? { repairOwed: true as const } : {}),\n };\n}\n\n/** The fault as an optional field, for the answers that carry it. */\nfunction withSpecificationFault(fault: BuildPlanSpecificationFault | undefined): { readonly specificationFault?: BuildPlanSpecificationFault } {\n return fault === undefined ? {} : { specificationFault: fault };\n}\n\n/** Why a step that counts as landed is not proven (#3258). */\nfunction describeUnprovenWhileAModuleFails(taskRef: string, modules: readonly string[]): string {\n return `Build step \"${taskRef}\" ran, and its check cannot answer while specifications module ${modules.map((modulePath) => `\"${modulePath}\"`).join(', ')} `\n + 'does not evaluate. The first clean pass proves it or takes it back.';\n}\n\n/** The execution statuses that END a run: one of them, and a run's window is bounded by what it recorded. */\nconst RUN_STATUSES_THAT_ENDED: ReadonlySet<FlowsActors_Status> = new Set([\n FlowsActors_Status.COMPLETED,\n FlowsActors_Status.FAILED,\n FlowsActors_Status.CANCELLED,\n FlowsActors_Status.ABORTED,\n]);\n\n/** Every task that waits on `taskRef`, directly or through others: what can never land before it. */\nfunction transitiveDependentsOf(taskRef: string, tasks: readonly BuildPlanTask[]): ReadonlySet<string> {\n const dependents = new Set<string>();\n let frontier = [taskRef];\n while (frontier.length > 0) {\n const next = tasks.filter((task) => !dependents.has(task.taskRef) && task.prerequisiteTaskRefs.some((ref) => frontier.includes(ref))).map((task) => task.taskRef);\n for (const ref of next) dependents.add(ref);\n frontier = next;\n }\n return dependents;\n}\n\n/** A record's `closure` field from the closure that landed it, or nothing. */\nfunction closureOf(closure: BuildTaskClosure | undefined): { readonly closure?: ApplicationBuildTaskRecord['closure'] } {\n if (closure === undefined) return {};\n return { closure: { kind: closure.kind, ...(closure.satisfiedBy !== undefined ? { satisfiedBy: closure.satisfiedBy } : {}), reason: closure.reason } };\n}\n\n/**\n * The key {@link ApplicationBuildDispatchCompanionService.selectSettledRunWrites} answers by: a recorded write's path, and\n * whether it was a DELETION or a write of any kind (added, modified, renamed and the rest all settle the same way —\n * committed at HEAD). A deletion and a write of one path are two different facts, so they never share a key.\n */\nexport function settledRunWriteKey(file: { readonly path: string; readonly changeKind: string }): string {\n return `${file.changeKind === ChangeSetFileChangeKind.DELETED ? 'deleted' : 'written'}:${file.path}`;\n}\n\n/**\n * The same witnesses, remembering which were ASKED, so a landing pass can say afterwards whether any of the answers it\n * used was \"could not read\" (#3223). Only asked witnesses count: a plan with no shell probe is not provisional because\n * a shell nobody asked about would not have answered.\n */\nfunction trackWitnessAnswers(witnesses: IntrospectionWitnesses): { readonly witnesses: IntrospectionWitnesses; anyUnanswered(): Promise<boolean> } {\n // A Set: the witnesses are memoized, so every later call hands back the promise already held.\n const asked = new Set<Promise<{ readonly answered: boolean }>>();\n const track = <W extends { readonly answered: boolean }>(read: () => Promise<W>): (() => Promise<W>) => () => {\n const answer = read();\n asked.add(answer);\n return answer;\n };\n return {\n witnesses: {\n shellWitness: track(witnesses.shellWitness),\n agentWorkWitness: track(witnesses.agentWorkWitness),\n applicationConfigurationWitness: track(witnesses.applicationConfigurationWitness),\n },\n anyUnanswered: async () => (await Promise.all([...asked].map((answer) => answer.then((settled) => !settled.answered, () => true)))).some(Boolean),\n };\n}\n\n/**\n * The application's registered agent work, as a registry probe needs it (#2966). Three-valued like {@link ShellWitness}:\n * a registry that could not be READ (no backend, a failed introspection, a backend that does not build) lands nothing\n * and says why, never \"nothing is registered\".\n */\nexport type AgentWorkWitness =\n | { readonly answered: false; readonly reason: string }\n | { readonly answered: true; readonly declarations: AgentWorkDeclarations };\n\n/** Why a registry probe is or is not satisfied — what the build record reports for it (#2966). */\nexport interface AgentWorkProbeExplanation {\n readonly satisfied: boolean;\n /** Set when the registry could not be read: the probe is then unsatisfied without being a \"no\". */\n readonly unanswerable?: string;\n /** What the task's module does not register as planned, typed; empty when the product is registered as planned. */\n readonly missing: readonly AgentWorkShortfall[];\n /**\n * Registration files, or files the agent index imports, that the tree asked does not hold (#3514): absent from the working\n * tree for the landing and working-tree readers, which are the only explanations anything shows; not committed when the\n * committed reader asks, which only `satisfied` is read from.\n */\n readonly absentPaths: readonly string[];\n}\n\n/**\n * The shell, as a landing probe needs it (#1538). Three-valued by construction: a witness that could\n * not be READ (no placement plan, no frontend, the introspection failed) is never a \"no\" — it lands\n * nothing and says why, the distinction `check:schema-plan-drift` draws between drift and could-not-ask.\n */\nexport type ShellWitness =\n | { readonly answered: false; readonly reason: string }\n | {\n readonly answered: true;\n /** Entry identities each surface carries in the RESOLVED configuration. */\n readonly carried: ReadonlyMap<PlacementSurface, ReadonlySet<string>>;\n /** The files each surface is composed from — the application's config and every contributing module's. */\n readonly contributingPaths: ReadonlyMap<PlacementSurface, readonly string[]>;\n /** Identities the plan PLACED on each surface. */\n readonly placed: ReadonlyMap<PlacementSurface, readonly string[]>;\n /** Identities the plan DECLINED — to be carried by no surface. */\n readonly declined: readonly string[];\n /**\n * Who each carried entry is shown to, per surface and identity (#2512): every audience the surface carries that\n * identity with, `undefined` for everyone.\n */\n readonly carriedAudiences: ReadonlyMap<PlacementSurface, ReadonlyMap<string, readonly PlacementAudienceLayers[]>>;\n /** Who the plan shows each placed identity to, per surface and layer. */\n readonly placedAudiences: ReadonlyMap<PlacementSurface, ReadonlyMap<string, PlacementAudienceLayers>>;\n };\n\n/** Why a shell probe is or is not satisfied — what the build record reports for it. */\nexport interface ShellProbeExplanation {\n readonly satisfied: boolean;\n /** Set when the witness could not be read: the probe is then unsatisfied without being a \"no\". */\n readonly unanswerable?: string;\n /** Placed subjects the surface does not carry. */\n readonly missing: readonly string[];\n /** Declined subjects the surface still carries. */\n readonly declinedButPresent: readonly string[];\n /**\n * Placed subjects the surface carries but shows to a different audience than the plan decided (#2512), each as\n * `<identity>: plan <audience>, shell <audience>`. Both directions count: a restriction the code dropped leaves the\n * entry visible to people it was not for, and one the code added hides it from people it was for.\n */\n readonly audienceMismatches: readonly string[];\n /** Contributing files the tree asked does not hold (#3514), read as {@link AgentWorkProbeExplanation.absentPaths} is. */\n readonly absentPaths: readonly string[];\n}\n\n/**\n * Every path one landed probe consults.\n *\n * One definition, because the two callers must agree: the batch that PRIMES the landing pass's tree reader\n * and the pass that reports a task's unmet probes from that same reader. A probe set gathered differently\n * in the two places would leave exactly the paths they disagree about resolving one spawn-pair at a\n * time — the cost the batch exists to remove, reappearing only for the paths nobody compared.\n */\nfunction landedProbePaths(probe: BuildPlanTaskLandedProbe): readonly string[] {\n // Delegates to the policy module's exhaustive definition. This used to be a second, non-exhaustive\n // copy of it — the thing this docstring says must not exist — and a new probe kind was a type error\n // here rather than a decision there (#1538).\n return buildPlanTaskLandedProbePaths(probe);\n}\n\n/** The probes that read the resolved shell rather than a file (#1538). */\ntype ShellLandedProbe = Extract<BuildPlanTaskLandedProbe, { kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN | BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT }>;\nfunction isShellProbe(probe: BuildPlanTaskLandedProbe): probe is ShellLandedProbe {\n return probe.kind === BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN || probe.kind === BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT;\n}\n\n/** The probe that reads the backend's registry rather than a file (#2966). */\ntype AgentWorkLandedProbe = Extract<BuildPlanTaskLandedProbe, { kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED }>;\nfunction isAgentWorkProbe(probe: BuildPlanTaskLandedProbe): probe is AgentWorkLandedProbe {\n return probe.kind === BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED;\n}\n\n/**\n * A probe answered by INTROSPECTING the live application rather than by reading named files: the shell (#1538) and the\n * agent-work registry (#2966). Neither can be read \"as a commit would leave it\", so the questions that need exactly\n * that — the prospective accept, the interference repair — leave them out, as they always left the shell out.\n */\nfunction isIntrospectedProbe(probe: BuildPlanTaskLandedProbe): boolean {\n return isShellProbe(probe) || isAgentWorkProbe(probe);\n}\n\n/** Store the pending read BEFORE awaiting it, so probes of one path running in parallel share it. */\nfunction memoizeByPath<T>(cache: Map<string, Promise<T>>, subjectRelativePath: string, read: () => Promise<T>): Promise<T> {\n const cached = cache.get(subjectRelativePath);\n if (cached) return cached;\n const pending = read();\n cache.set(subjectRelativePath, pending);\n return pending;\n}\n\n/** How many dispatches the narrative carries. Five is what the in-memory list kept; the board renders that many. */\nconst DISPATCH_NARRATIVE_LENGTH = 5;\n\n/**\n * How far a dispatch got, read off its execution row — see `Workbench_BuildDispatchPhase` for what\n * each member means and why the two executors resolve at different moments.\n *\n * - **A coding run** (`application-coding.system`): `PENDING` is SUBMITTED. Once its task has a start\n * instant it is ADMITTED and STAYS so however it ends — the phase names the hand-off, and the\n * outcome is the task row `codingTaskId` points at. A run that ended WITHOUT ever starting is the\n * only coding FAILED: the dispatch threw before admission.\n * - **A generation step** (`application-build.system`): running is SUBMITTED (nothing has resolved\n * yet), `COMPLETED` is FINISHED, and any other ending — failed, or aborted by a restart — is FAILED.\n */\nexport function projectBuildDispatchPhase(row: { readonly systemRef: string; readonly status: FlowsActors_Status; readonly taskStarted: boolean }): Workbench_BuildDispatchPhase {\n if (row.systemRef === APPLICATION_CODING_SYSTEM_REF) {\n if (row.taskStarted) return Workbench_BuildDispatchPhase.ADMITTED;\n return row.status === FlowsActors_Status.PENDING ? Workbench_BuildDispatchPhase.SUBMITTED : Workbench_BuildDispatchPhase.FAILED;\n }\n if (row.status === FlowsActors_Status.COMPLETED) return Workbench_BuildDispatchPhase.FINISHED;\n return row.status === FlowsActors_Status.PROCESSING || row.status === FlowsActors_Status.PENDING\n ? Workbench_BuildDispatchPhase.SUBMITTED\n : Workbench_BuildDispatchPhase.FAILED;\n}\n\n/**\n * One execution row as a dispatch record, or `null` for a row that is not a build dispatch — an\n * execution with no task, or a task naming no build-plan task (a coding run dispatched by something\n * other than the build plan would be one).\n */\nfunction projectBuildDispatchRecord(execution: {\n readonly _id: unknown;\n readonly systemRef: string;\n readonly status: FlowsActors_Status;\n // The stored row's instants are dates (#2187); the record this builds carries ISO strings.\n readonly createdAt: Date;\n readonly finishedAt?: Date;\n readonly standaloneTasks: readonly { readonly _id: string; readonly input?: unknown; readonly output?: unknown; readonly startedAt?: string }[];\n}): ApplicationBuildDetachedDispatchRecord | null {\n const task = execution.standaloneTasks[0];\n const input = task?.input as { taskRef?: unknown; conversationId?: unknown } | undefined;\n if (!task || typeof input?.taskRef !== 'string') return null;\n const taskStarted = typeof task.startedAt === 'string';\n const phase = projectBuildDispatchPhase({ systemRef: execution.systemRef, status: execution.status, taskStarted });\n const isCodingRun = execution.systemRef === APPLICATION_CODING_SYSTEM_REF;\n const failure = readSettledRunFailureMessage(task.output);\n const failureAttribution = Object.values(CodingRunFailureAttribution).find((value) => value === (task.output as { failureAttribution?: unknown } | undefined)?.failureAttribution);\n // When the phase LEFT `SUBMITTED`: admission for a coding run, the end of the step otherwise.\n const settledAt = phase === Workbench_BuildDispatchPhase.SUBMITTED ? undefined\n : isCodingRun && taskStarted ? task.startedAt\n : execution.finishedAt?.toISOString();\n return {\n executionId: String(execution._id),\n taskRef: input.taskRef,\n startedAt: execution.createdAt.toISOString(),\n phase,\n ...(settledAt !== undefined ? { settledAt } : {}),\n ...(isCodingRun && taskStarted ? { codingTaskId: String(task._id) } : {}),\n runStatus: execution.status,\n ...(execution.finishedAt ? { runFinishedAt: execution.finishedAt.toISOString() } : {}),\n ...(phase === Workbench_BuildDispatchPhase.FAILED && typeof failure === 'string' ? { error: failure } : {}),\n ...(isCodingRun && failureAttribution ? { failureAttribution } : {}),\n ...(typeof input.conversationId === 'string' ? { conversationId: input.conversationId } : {}),\n };\n}\n\n/** A landing derivation another reader started (#3204): what joining it needs to know. */\ninterface RunningLandingDerivation {\n readonly key: string | undefined;\n /** The plan it derives, as the landing key reads it: only a derivation of the same plan answers this reader. */\n readonly planIdentity: string;\n /** Its place in the order derivations started: one that began after a reader arrived reads a tree at least as new. */\n readonly ordinal: number;\n readonly resolution: Promise<LandedTaskResolution>;\n}\n\n/**\n * How long a landing reader waits on a derivation that began before it arrived (#3204). Longer than any derivation measured\n * on the reference runs (120 s, three overlapping); past it the derivation has stopped answering and must not hold every reader.\n */\nexport const LANDING_DERIVATION_WAIT_CEILING_MS = 180_000;\n\n/** How many derivations a landing reader waits for before it derives beside the next one (#3204). */\nconst LANDING_GATE_MAXIMUM_WAITS = 2;\n\n/** Whether `promise` settles, either way, within `ceilingMs`. */\nasync function settlesWithin(promise: Promise<unknown>, ceilingMs: number): Promise<boolean> {\n let timer: ReturnType<typeof setTimeout> | undefined;\n try {\n return await Promise.race([\n promise.then(() => true, () => true),\n new Promise<boolean>((resolve) => { timer = setTimeout(() => resolve(false), ceilingMs); }),\n ]);\n } finally {\n if (timer !== undefined) clearTimeout(timer);\n }\n}\n\n@injectable()\nexport class ApplicationBuildDispatchCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n /** Set once the follow-up derivation has warned that the coding-run listing hit its cap (#2496 review N1). */\n private followUpListingTruncationWarned = false;\n /** Set once a brief has warned that the compiled catalog could not say which elements are research-informed (#2846). */\n private unreadableProvenanceWarned = false;\n /**\n * The CLEAN and WITHHELD verdicts this process received, so an element is screened once, not on every task (#2846 review\n * M2). The process's one store, shared with the `wildo context elements` door and the research step values (#2938), and\n * dropped on every provider-registry rebuild by the store itself (#2846 review N2).\n */\n private readonly briefScreeningVerdicts = companionScreeningVerdicts();\n\n /** What every screening a coding brief makes needs: the companion's classifier, its log and the process's verdicts. */\n private briefScreeningHost(taskRef: string) {\n return { contentSafety: this.contentSafety, logger: this.logger, taskRef, verdicts: this.briefScreeningVerdicts };\n }\n /** See `readLatestCompletedCodingRuns`. */\n private latestCompletedCodingRuns: { readonly at: number; readonly value: Promise<{ readonly latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>; readonly truncated: boolean } | undefined> } | undefined;\n /**\n * When the wave running in this companion started; `undefined` when none is (#2208 review M1). One process\n * owns every wave — the console, a lane child and an explicit playbook run all reach {@link dispatchBuildWave}\n * here — so an in-process marker is the whole population, and a restart (which ends every run) clears it.\n */\n private liveWaveStartedAt: string | undefined;\n /**\n * The plan's landing, held per source state and shared by every reader (#3206) — see\n * `application-build-landing-projection.companion.ts` for what the key is made of and why.\n */\n private readonly landingProjection = new LandingProjectionCache<LandedTaskResolution>((resolution) => resolution.provisional);\n /** The landing derivation running now, if any: readers join or wait for it rather than derive beside it (#3204). */\n private landingDerivationInFlight?: RunningLandingDerivation;\n /** How many landing derivations this instance has started: a derivation's ordinal says whether it began after a reader arrived. */\n private landingDerivationsStarted = 0;\n /** Bumped on every in-process run-state event and every accepted commit: the key part no file can show (#3219). */\n private landingRunStateGeneration = 0;\n /**\n * Bumped whenever something may have LANDED (#3204): a run completed, a commit accepted, or a reading declared stale.\n * Never on an admission. A fill's shared landing reading is reused only while this is unchanged ({@link BuildWaveFillLanding}).\n */\n private landingSettlementGeneration = 0;\n /** The failing modules a pass found no repair to run for (#3258): none is offered for them again in this process. */\n private modulesWithNoRepairToRun: string | undefined;\n /**\n * The autonomy posture the build reads (#3227): whether a derived follow-up waits for a person's review before it runs.\n * The ONE named posture (`APPLICATION_CREATION_AUTONOMY_POSTURE`, `one-source-of-truth.md` D5); a field rather than a\n * read at each site only so a test can pin the GUIDED behaviour without editing the constant.\n */\n private autonomyPosture: Journey_AutonomyPreset = APPLICATION_CREATION_AUTONOMY_POSTURE;\n /** The decisions file's history at one HEAD (R4): walked once per HEAD change, never per read. */\n private decisionsHistory: {\n readonly head: string;\n readonly path: string;\n readonly headBlobId: string | undefined;\n readonly commits: readonly (BuildTaskDecisionsCommit & { readonly blobId?: string })[];\n } | undefined;\n /** Each run record's window (R4): records are immutable, so a window, or its unresolvable SHA, is computed once. */\n private readonly runWindowsByRecord = new Map<string, { readonly commits: readonly string[] } | { readonly unresolvable: string }>();\n /** A landing-key read in progress, joined by callers arriving meanwhile so a burst of readers spawns git once. */\n private landingKeyRead: { readonly planIdentity: string; readonly runStateGeneration: number; readonly key: Promise<string | undefined>; readonly sequence: number } | undefined;\n /** How many landing-key reads have started; see {@link readLandingSourceKey}. */\n private landingKeyReadSequence = 0;\n /**\n * The slots being prepared right now (#3206), oldest first: a wave prepares several at once since #3883. Built on first use,\n * because some harnesses build this service through its prototype and skip field initializers.\n */\n private openBuildPreparations: Set<ApplicationBuildPreparationTracker> | undefined;\n /** The last preparation that ended, with each step's duration. */\n private lastBuildPreparation: ApplicationBuildPreparation | undefined;\n /** When `wildo build stop` asked the running wave to stop (#3206); cleared when the wave ends. */\n private buildWaveStopRequestedAt: string | undefined;\n /**\n * The build HOLD a person's `wildo build stop` sets (#3206), kept after the wave it ended: while it is set no build\n * wave or task starts unless a person's door released it first ({@link releaseBuildStopHold}) — not the choreography\n * selector, not the loop, not the usage-limit resume. In memory only: it does not survive a companion restart, which\n * ends any wave and drops any pending resume anyway.\n */\n private buildStopHeldSince: string | undefined;\n\n /**\n * The generation steps whose panel refused stale expert charters, by task (#3244, #3204). A held step is passed over by\n * every unnamed selection, so the rest of the plan keeps running, and the build-dispatch step runs the staffing step\n * that repairs it (`top_down.expert-personas`). Released by that step, by any commit of the charters after the refusal\n * (the staffing step landing in another lane, or a person's hand edit), or by a person naming the step\n * (`wildo build run <task>`). In memory, like the other holds: a restart drops it, and the next run meets the refusal\n * again, which costs no model call (the panel refuses before generating anything).\n */\n private readonly staleExpertChartersHeld = new Map<string, StaleExpertChartersHeld>();\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly dispatch: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.GitChangeSetService) private readonly git: GitChangeSetCompanionService,\n @inject(COMPANION_SERVICE_TYPES.BuildGenerationStepService) private readonly generationSteps: ApplicationBuildGenerationStepCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly introspection: CompanionIntrospectionService,\n // The engine's execution driver and the rows it writes (#1359): every dispatch is an execution.\n @inject(SAAS_SERVICE_TYPES.ActorsSystemBackendService) private readonly actorsSystem: ActorsSystemBackendService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executions: CompanionExecutionsCompanionService,\n /*\n * The accept door, given the one thing it cannot know from below: whether a concurrent run's files carry\n * its task's declared product (#2209). Bound in the container like every other dependency, so the\n * companion always registers the witness; typed optional only so a test harness that builds this service\n * positionally need not hand it one.\n */\n @inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService) private readonly acceptedChangeCommit?: AcceptedChangeCommitCompanionService,\n /*\n * The model call behind the website-copy review (#2593). Bound in the container like everything else; typed\n * optional for the reason `acceptedChangeCommit` is, and without it no review runs, because there is no judge.\n */\n @inject(SAAS_SERVICE_TYPES.AgentsBackendService) private readonly agents?: AgentsBackendService,\n /*\n * The classifier a brief's third-party text is screened through (#2846): the engine's one content-safety seam, the\n * same the application's agents use, answering from the provider the application binds in its `companion` scope.\n * Optional: unbound (or bound with no provider), third-party sections travel MARKED as unscreened; the lane never stops.\n */\n @inject(SAAS_SERVICE_TYPES.ContentSafetyService) @optional() private readonly contentSafety?: ContentSafetyBackendService,\n /*\n * Where a wave's per-slot preparation durations are recorded (#3206): its own trace session, beside the runs it\n * started. Optional for the reason the others are; without it the durations are only logged.\n */\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) @optional() private readonly traceability?: CompanionTraceabilityService,\n /*\n * What each coding run wrote (#3227): a run that states a reported gap met counts only once everything it wrote is\n * committed. Optional for the reason the others are; without it no gap is ever dropped as met.\n */\n @inject(COMPANION_SERVICE_TYPES.CodingRunWriteRegisterService) @optional() private readonly codingRunWrites?: CodingRunWriteRegisterCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('ApplicationBuildDispatchCompanionService');\n /*\n * Every run-state event and every accepted commit moves the landing key (#3206, #3219): a run selected or settled\n * changes what is in flight and lands a task declaring no product, and an accept's commit lands its task the moment\n * it is made rather than when somebody next re-reads git. Feature-detected because test harnesses build this\n * service with partial doubles.\n */\n const bumpLandingRunState = (): void => { this.landingRunStateGeneration += 1; };\n if (typeof this.dispatch.registerRunStateChangedListener === 'function') this.dispatch.registerRunStateChangedListener(bumpLandingRunState);\n if (typeof this.dispatch.registerRunAcceptedListener === 'function') this.dispatch.registerRunAcceptedListener(bumpLandingRunState);\n // What may have LANDED, apart from what is merely in flight (#3204): a completed run, an accepted commit.\n const bumpLandingSettlement = (): void => { this.landingSettlementGeneration += 1; };\n if (typeof this.dispatch.registerRunAcceptedListener === 'function') this.dispatch.registerRunAcceptedListener(bumpLandingSettlement);\n if (typeof this.dispatch.registerRunCompletedListener === 'function') this.dispatch.registerRunCompletedListener(bumpLandingSettlement);\n this.acceptedChangeCommit?.registerConcurrentRunProductWitness({\n pathsLackingOwnProduct: (taskRef, candidatePaths) => this.pathsLackingOwnProduct(taskRef, candidatePaths),\n });\n if (this.agents !== undefined) {\n /*\n * A completed run only REQUESTS the sweep, which reviews any completed website run with no review — this one\n * included — and any whose copy another task's run has since rewritten. Enqueueing the run's own review beside it\n * judged a run twice in a wave: a sweep queued by an earlier completion reached the new run before its own review\n * did (#2593 re-review M1).\n */\n this.dispatch.registerRunCompletedListener(() => {\n void this.requestWebsiteCopySweep();\n void this.requestWebsiteVisualSweep();\n });\n }\n }\n\n /**\n * Every copy review runs through this one queue (#2593): two reviews running at once cannot see each other's record\n * before it is written, so they would judge the same run twice, each paying a judge call.\n */\n private websiteCopyReviews: Promise<unknown> | undefined;\n\n private enqueueWebsiteCopyReview<T>(work: () => Promise<T>): Promise<T> {\n const next = (this.websiteCopyReviews ?? Promise.resolve()).then(work, work);\n this.websiteCopyReviews = next.catch(() => undefined);\n return next;\n }\n\n /** The sweep already queued and not yet started, which a further request joins rather than queueing another. */\n private queuedWebsiteCopySweep: { readonly retryNotReviewed: boolean; readonly done: Promise<void> } | undefined;\n\n /**\n * Review every website run whose copy has no review, or changed since its review (#2593 review M3, M4). A run's\n * review is started when it completes and is lost when the companion restarts during the judge call, and copy one\n * task wrote can be rewritten by another task's run; the sweep is what catches both. Requested after every completed\n * run (coalesced: a wave's completions share one sweep) and once at startup. A NOT_REVIEWED review is retried only\n * when asked (`retryNotReviewed`, the startup sweep): retrying a provider that refuses on every completion would pay\n * for a refusal each time. Never throws.\n */\n public requestWebsiteCopySweep(options: { readonly retryNotReviewed?: boolean } = {}): Promise<void> {\n const retryNotReviewed = options.retryNotReviewed === true;\n const queued = this.queuedWebsiteCopySweep;\n if (queued !== undefined && (queued.retryNotReviewed || !retryNotReviewed)) return queued.done;\n const done = this.enqueueWebsiteCopyReview(async () => {\n if (this.queuedWebsiteCopySweep?.done === done) this.queuedWebsiteCopySweep = undefined;\n await this.sweepWebsiteCopy(retryNotReviewed);\n });\n this.queuedWebsiteCopySweep = { retryNotReviewed, done };\n return done;\n }\n\n /**\n * Runs whose review could not be RECORDED (the record door refused them: not found among the completed runs it lists),\n * skipped for the life of the process (#2593 re-review L1). Without this, every later sweep would find the run still\n * unreviewed and pay another judge call for a verdict that again cannot be written.\n */\n private readonly unrecordableWebsiteCopyRuns = new Set<string>();\n\n private async sweepWebsiteCopy(retryNotReviewed: boolean): Promise<void> {\n if (this.agents === undefined) return;\n try {\n // Before build-decompose there is no plan and nothing to review: quietly, not as a failed sweep.\n if (!(await this.hasAuthoredBuildPlan())) return;\n const plan = await this.readBuildPlan();\n const websiteTasks = plan.tasks.filter((task) => task.target.kind === BuildPlanTaskTargetKind.WEBSITE);\n if (websiteTasks.length === 0) return;\n const companionExports = await loadSpecificationFamilyData(this.companionContext);\n // Runs nobody could list (the reader said so): nothing to review this pass, and the next sweep asks again.\n const runs = await this.fetchLatestCompletedCodingRuns();\n if (runs === undefined) return;\n const { latest } = runs;\n const worktree = this.createWorktreeReader();\n for (const task of websiteTasks) {\n const run = latest.get(task.taskRef);\n if (run === undefined || this.unrecordableWebsiteCopyRuns.has(run.runTaskId)) continue;\n const review = run.websiteCopyReview;\n if (review?.outcome === WebsiteCopyReviewOutcome.NOT_REVIEWED && !retryNotReviewed) continue;\n if (review?.outcome === WebsiteCopyReviewOutcome.REVIEWED && review.locale !== undefined) {\n const scope = websiteCopyReviewScope(task, plan.tasks, companionExports, latest);\n const subjects = [...scope.own, ...scope.alsoReviewed.flatMap((entry) => entry.subjects)];\n const pack = await readWebsiteLabelPack(worktree, review.locale, subjects.map((subject) => subject.labelKeyPrefix));\n const current = pack === undefined ? {} : currentWebsiteCopy(subjects, pack);\n if (sameWebsiteCopy(current, review.reviewedCopy ?? {})) continue;\n }\n await this.reviewWebsiteCopyOfRun(task.taskRef, run.runTaskId);\n }\n } catch (error) {\n this.logger.warn('Could not sweep the website copy for runs whose review is missing or out of date', { error: describeCaughtError(error) });\n }\n }\n\n /**\n * Review the copy a COMPLETED website run wrote, and record the review on that run (#2593). Reached through the\n * sweep, which every completed run requests whichever door ran it (a wave, `wildo build run`, a lane), and left to\n * finish on its own: it is advisory, so nothing waits for it and nothing it finds changes whether the task lands.\n * Call it only from inside the review queue; a direct call races the sweep.\n *\n * Reads the WORKING tree, not HEAD: the run's own writes are what is reviewed, and under a posture that keeps\n * acceptance with a person they are not committed yet. The standings are derived NOW, by the function that wrote the\n * task's brief, and recorded beside the findings, because a standing moves: a requirement IN_PROGRESS today may be\n * DELIVERED tomorrow, and a finding is read against the standing it was found under.\n *\n * Never throws. A review that cannot run is recorded as NOT_REVIEWED with its reason; a task that is not a website\n * task, or a plan that cannot be read, records nothing, because there is no copy to speak of.\n */\n public async reviewWebsiteCopyOfRun(taskRef: string, runTaskId: string, session?: CompanionExecutionSessionContext): Promise<WebsiteCopyReview | undefined> {\n const agents = this.agents;\n if (agents === undefined) return undefined;\n try {\n const plan = await this.readBuildPlan();\n const task = plan.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (task === undefined || task.target.kind !== BuildPlanTaskTargetKind.WEBSITE) return undefined;\n const companionExports = await loadSpecificationFamilyData(this.companionContext);\n const deliveryOf = await this.resolveWebsiteClaimDelivery(companionExports);\n // Runs nobody could list record nothing, like a plan that cannot be read: the next sweep redoes it.\n const runs = await this.fetchLatestCompletedCodingRuns();\n if (runs === undefined) return undefined;\n const { latest } = runs;\n const scope = websiteCopyReviewScope(task, plan.tasks, companionExports, latest, deliveryOf);\n if (scope.own.length === 0 && describeWebsiteTaskCopySubjects(task, companionExports) === undefined) return undefined;\n const saasRoot = this.companionContext.saasRoot;\n const worktree = this.createWorktreeReader();\n // Every language CODE the vocabulary has; each pack's file is named by its path segment (`websiteLabelPackPath`).\n const locales = Object.values(AvailableLanguage).map(String);\n // Read fresh, once per review: a build task may have just declared the retention schedule, a provider choice, or the site.\n const freshSaasConfig = loadSaasConfig(join(saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true })\n .then((config) => config ?? this.companionContext.saasConfig, () => this.companionContext.saasConfig);\n const review = await reviewWebsiteTaskCopy(scope.own, {\n defaultLocale: async () => {\n try {\n // Not `loadWebsiteConfig`, which memoizes per path for the life of the process: a long-lived reader reads it now.\n const [, service] = resolveStaticWebsiteServiceEntry(await freshSaasConfig);\n const config = await loadConfig<{ defaultLocale?: unknown }>(join(saasRoot, service.path, PER_SERVICE_WEBSITE_CONFIG_FILE_NAME), { freshModuleCache: true });\n return typeof config.defaultLocale === 'string' ? { locale: config.defaultLocale } : { unreadable: 'its config declares no defaultLocale' };\n } catch (error) {\n return { unreadable: describeCaughtError(error) };\n }\n },\n availableLocales: async () => locales,\n readLabelPack: (locale) => readWebsiteLabelPack(worktree, locale, [...scope.own, ...scope.alsoReviewed.flatMap((entry) => entry.subjects)].map((subject) => subject.labelKeyPrefix)),\n readFile: (relativePath) => worktree.readText(relativePath),\n declarations: async () => {\n let productionInfraConfig: unknown;\n let productionInfraUnreadable: string | undefined;\n try {\n // Environment ids are open slugs; `production` is the conventional one, and no other declares itself production.\n productionInfraConfig = (await loadInfraEnvConfig(saasRoot, WildoEnvironment.PRODUCTION, { freshModuleCache: true }))?.config;\n } catch (error) {\n productionInfraUnreadable = describeCaughtError(error);\n }\n return collectWebsiteCopyDeclarations({ saasConfig: await freshSaasConfig, productionInfraConfig, ...(productionInfraUnreadable !== undefined ? { productionInfraUnreadable } : {}) });\n },\n judge: async (prompt) => {\n const invocation: FlowsActors_Agent_Invocation<any, any> = {\n agentRef: WEBSITE_COPY_REVIEW_JUDGE_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: WebsiteCopyReviewVerdictOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await agents.invokeAgent(invocation);\n const parsed = WebsiteCopyReviewVerdictOutputSchema.safeParse((response.output as { object?: unknown } | undefined)?.object);\n if (!parsed.success) throw new Error(`the judge's answer did not match its schema: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`);\n return { findings: parsed.data.findings as readonly RawWebsiteCopyFinding[] };\n },\n // A cited element written from web research is screened as a brief screens it, before the judge reads it (#2938).\n screenThirdPartyElements: (elements) => screenThirdPartyBriefElements(elements, this.briefScreeningHost(taskRef)),\n now: () => new Date(),\n }, scope.alsoReviewed);\n try {\n await this.dispatch.recordWebsiteCopyReview(taskRef, runTaskId, review, session);\n } catch (error) {\n this.unrecordableWebsiteCopyRuns.add(runTaskId);\n throw error;\n }\n if (review.findings.length > 0) {\n this.logger.warn('The copy a website task wrote claims what its build does not back (advisory; the task still lands)', {\n taskRef, runTaskId, findings: review.findings.map((finding) => `${finding.kind} ${finding.labelKey}`),\n });\n }\n return review;\n } catch (error) {\n this.logger.warn('Could not review the copy of a completed website run', { taskRef, runTaskId, error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The visual reviews' own queue (#2785): one at a time, for the copy reviews' reason (two at once would judge one run\n * twice), and apart from them, because a drawing and its words are judged independently and neither waits on the other.\n */\n private websiteVisualReviews: Promise<unknown> | undefined;\n\n private queuedWebsiteVisualSweep: { readonly retryNotReviewed: boolean; readonly done: Promise<void> } | undefined;\n\n /** Runs whose visual review could not be recorded, skipped for the life of the process (the copy reviews' L1). */\n private readonly unrecordableWebsiteVisualRuns = new Set<string>();\n\n /**\n * Review every completed website run whose DRAWING has no review (#2785), coalesced like the copy sweep: requested\n * after every completed run and once at startup, where a NOT_REVIEWED review is retried (`retryNotReviewed`): the\n * usual reason is a website that was not running, and a later start may find it up. A REVIEWED run is not judged\n * again: screenshots differ from one take to the next, so \"the drawing changed\" cannot be told from the pixels, and a\n * later run that redraws a section is reviewed as its own run. Never throws.\n */\n public requestWebsiteVisualSweep(options: { readonly retryNotReviewed?: boolean } = {}): Promise<void> {\n const retryNotReviewed = options.retryNotReviewed === true;\n const queued = this.queuedWebsiteVisualSweep;\n if (queued !== undefined && (queued.retryNotReviewed || !retryNotReviewed)) return queued.done;\n const work = async () => {\n if (this.queuedWebsiteVisualSweep?.done === done) this.queuedWebsiteVisualSweep = undefined;\n await this.sweepWebsiteVisuals(retryNotReviewed);\n };\n const done: Promise<void> = (this.websiteVisualReviews ?? Promise.resolve()).then(work, work);\n this.websiteVisualReviews = done.catch(() => undefined);\n this.queuedWebsiteVisualSweep = { retryNotReviewed, done };\n return done;\n }\n\n private async sweepWebsiteVisuals(retryNotReviewed: boolean): Promise<void> {\n if (this.agents === undefined) return;\n try {\n if (!(await this.hasAuthoredBuildPlan())) return;\n const plan = await this.readBuildPlan();\n const websiteTasks = plan.tasks.filter((task) => task.target.kind === BuildPlanTaskTargetKind.WEBSITE);\n if (websiteTasks.length === 0) return;\n const runs = await this.fetchLatestCompletedCodingRuns();\n if (runs === undefined) return;\n for (const task of websiteTasks) {\n const run = runs.latest.get(task.taskRef);\n if (run === undefined || this.unrecordableWebsiteVisualRuns.has(run.runTaskId)) continue;\n const review = run.websiteVisualReview;\n if (review?.outcome === WebsiteVisualReviewOutcome.REVIEWED) continue;\n if (review?.outcome === WebsiteVisualReviewOutcome.NOT_REVIEWED && !retryNotReviewed) continue;\n await this.reviewWebsiteVisualsOfRun(task.taskRef, run.runTaskId);\n }\n } catch (error) {\n this.logger.warn('Could not sweep the website drawings for runs whose visual review is missing', { error: describeCaughtError(error) });\n }\n }\n\n /**\n * Photograph what a COMPLETED website run drew and judge it against the visual quality rubric, then record the review\n * on that run (#2785). Advisory: nothing waits for it and nothing it finds changes whether the task lands. Reads the\n * RUNNING website (`wildo website look`), so the review describes the site as served: a website that is not running\n * records NOT_REVIEWED with the camera's reason, retried at the next startup. Call it only from inside the visual\n * review queue. Never throws.\n */\n public async reviewWebsiteVisualsOfRun(taskRef: string, runTaskId: string, session?: CompanionExecutionSessionContext): Promise<WebsiteVisualReview | undefined> {\n const agents = this.agents;\n if (agents === undefined) return undefined;\n try {\n const plan = await this.readBuildPlan();\n const task = plan.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (task === undefined || task.target.kind !== BuildPlanTaskTargetKind.WEBSITE) return undefined;\n const companionExports = await loadSpecificationFamilyData(this.companionContext);\n const subjects = describeWebsiteTaskVisualSubjects(task, companionExports);\n if (subjects === undefined) return undefined;\n const saasRoot = this.companionContext.saasRoot;\n // Throwaway and gitignored: the pictures the findings are about, kept for a person to open.\n const outputDirectory = join(saasRoot, '.wildo-saas', 'tmp', 'website-visual-review', runTaskId);\n const review = await reviewWebsiteTaskVisuals(subjects, {\n look: (routePath, sectionRefs) => lookAtWebsite({ saasRoot, routePath, sectionRefs, outputDirectory }),\n readImage: readWebsiteShotAsDataUri,\n rubric: readWebsiteVisualRubric,\n judge: async (prompt, images) => {\n const invocation: FlowsActors_Agent_Invocation<any, any> = {\n agentRef: WEBSITE_VISUAL_REVIEW_JUDGE_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: WebsiteVisualReviewVerdictOutputSchema, images: images.map((image) => ({ type: 'image', image })) },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await agents.invokeAgent(invocation);\n const parsed = WebsiteVisualReviewVerdictOutputSchema.safeParse((response.output as { object?: unknown } | undefined)?.object);\n if (!parsed.success) throw new Error(`the judge's answer did not match its schema: ${parsed.error.issues.map((issue) => issue.message).join('; ')}`);\n return { findings: parsed.data.findings as readonly RawWebsiteVisualFinding[] };\n },\n now: () => new Date(),\n });\n try {\n await this.dispatch.recordWebsiteVisualReview(taskRef, runTaskId, review, session);\n } catch (error) {\n this.unrecordableWebsiteVisualRuns.add(runTaskId);\n throw error;\n }\n if (review.findings.length > 0 || review.measurements.length > 0) {\n this.logger.warn('What a website task drew breaks the visual rubric or failed a measurement (advisory; the task still lands)', {\n taskRef, runTaskId, findings: review.findings.map((finding) => `${finding.viewport} ${finding.sectionRef ?? 'page'}: ${finding.rule}`), measurements: review.measurements.length,\n });\n }\n return review;\n } catch (error) {\n this.logger.warn('Could not review the drawing of a completed website run', { taskRef, runTaskId, error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * Of the paths a concurrent run is about to commit under its task's name, the ones a landing probe of that\n * task names and that do NOT carry the task's declared product (#2209) — read from the tree AS THE COMMIT\n * WOULD LEAVE IT, by the very predicate landing uses ({@link isLandedProbeSatisfied}), so the accept and the\n * landing check cannot disagree about whether the commit holds the product.\n *\n * Only probes naming one of the paths are asked: a probe about another file says nothing about this\n * commit. SHELL probes are not asked here: the shell they read is composed from many files and resolved\n * from the live tree by introspection, so it cannot be read \"as this commit leaves it\", and a shell-placement\n * run's own files are its configuration rather than a list several runs append to. A task the plan no\n * longer holds declares nothing to check. A plan that cannot be read throws: the person's accept then commits\n * nothing under the run's name, and the next build checkpoint commits the files with the tree (#3204).\n */\n private async pathsLackingOwnProduct(taskRef: string, candidatePaths: readonly string[]): Promise<readonly string[]> {\n const graph = await this.readBuildPlan();\n const task = graph.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (!task) return [];\n const committing = new Set(candidatePaths);\n const prospective = this.createProspectiveCommitReader(committing);\n const lacking = new Set<string>();\n for (const probe of resolveBuildTaskLandedProbes(task)) {\n if (isIntrospectedProbe(probe)) continue;\n const named = landedProbePaths(probe).filter((path) => committing.has(path));\n if (named.length === 0) continue;\n if (await this.isLandedProbeSatisfied(probe, prospective)) continue;\n for (const path of named) lacking.add(path);\n }\n return [...lacking].sort();\n }\n\n /**\n * The application workspace's top-level entries — the raw material of a coding run's mutation\n * scope since #1268.\n *\n * ## Read per dispatch, and deliberately NOT cached\n *\n * The listing changes when a composition scenario adds a package (`wildo compose add-website`,\n * `add-technical-doc`, `add-minion`, `add-worker-node`), and the whole point of deriving it is that\n * a package added yesterday is writable today. A cache turns that into a REFUSAL — the run confined\n * away from the package it was asked to write — which is the defect the widening removes, arriving\n * back through the door marked \"performance\". One `readdir` per dispatch, against a dispatch that\n * runs a coding agent for minutes, is not a cost worth that.\n *\n * ## An unreadable workspace answers NOTHING rather than throwing\n *\n * The scope is ADDITIVE, so an empty answer degrades a run to its task-derived scope — today's\n * behaviour — instead of failing a dispatch over a directory listing. A workspace this process\n * cannot list is a condition the contract composer's own empty-scope refusal will catch if it\n * matters, and one that says nothing about whether this task can run.\n */\n private readApplicationWorkspaceEntries(): readonly string[] {\n try {\n return readdirSync(this.companionContext.saasRoot);\n } catch (error) {\n this.logDebug('Could not list the application workspace; a coding run keeps its task-derived scope', {\n saasRoot: this.companionContext.saasRoot,\n error: describeCaughtError(error),\n });\n return [];\n }\n }\n\n /**\n * What the next run would be, without running it. Pure read — nothing is locked, created or started.\n *\n * REQUIRES a task: an exhausted plan throws, exactly as the dispatch doors do. That is right for its\n * caller — a `dryRun` build-dispatch playbook, which is rehearsing a run and has nothing to rehearse\n * when the plan is finished.\n *\n * A surface that wants to SHOW the queue's state rather than act on it wants\n * `describeNextBuildTaskOrExhaustion` instead. The two are kept apart rather than merged because\n * \"give me the next task\" and \"tell me whether there is one\" are different questions, and only the\n * second can be answered by \"there is none\".\n */\n public async describeNextBuildTask(): Promise<ApplicationBuildDispatchPlan> {\n return (await this.prepareNextBuildTask()).plan;\n }\n\n /**\n * The same read for a caller that is about to RUN the build (#2208): the one a build wave asks before it\n * is submitted. It refuses exactly as the one-task door refuses — including an exhausted plan's assembly\n * verdict (#2222), which {@link describeNextBuildTask} leaves out because a dry run has nothing to check.\n * Without it, `wildo build run` at a parallelism above one answered \"every task landed\" with no word on\n * whether the application builds, which is the claim #2222 exists to qualify.\n */\n public async describeNextBuildTaskBeforeRunning(): Promise<ApplicationBuildDispatchPlan> {\n return (await this.prepareNextBuildTaskOrQualifyExhaustion()).plan;\n }\n\n /**\n * The same read, for a caller that must be able to render \"there is nothing left\".\n *\n * The catch narrows to TWO classes — exhausted, and every-ready-task-stuck — and that is the part\n * worth guarding. A catch-all would make every\n * genuine failure to look — an unreadable specifications export, a missing build plan, a broken\n * landing probe — report itself as a finished build, which is the most reassuring possible lie a\n * read can tell.\n */\n public async describeNextBuildTaskOrExhaustion(): Promise<ApplicationBuildDispatchDescription> {\n // The landed refs come back WITH the answer, never parked on the instance: two reads interleave at every await\n // (see `LandedTaskResolution`), and one would qualify its answer with the other's set.\n const { description, landedTaskRefs } = await this.describeNextBuildTaskOrExhaustionUnqualified();\n if (landedTaskRefs.length === 0) return description;\n const { started, truncated } = await this.listBuildTaskRefsWithAStartedRun();\n // A truncated history cannot say a task NEVER ran: the claim is withheld rather than made on a partial page.\n if (truncated) return description;\n return { ...description, landedBeforeAnyRunTaskRefs: landedTaskRefs.filter((taskRef) => !started.has(taskRef)) };\n }\n\n /**\n * Every build task with at least one run that STARTED — the population a landing can be \"its own\" against. A\n * dispatch refused before it started is not one (#1581). Read from the same actor rows and to the same ceiling as\n * the build record ({@link BUILD_TASK_RECORD_HISTORY_CEILING}), so the two surfaces cannot disagree about which\n * tasks ran: the plan withholding \"landed before any run\" on a history the record reads whole was #2530's review M1.\n */\n private async listBuildTaskRefsWithAStartedRun(): Promise<{ readonly started: ReadonlySet<string>; readonly truncated: boolean }> {\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING })));\n const started = new Set<string>();\n for (const projected of listed.flat().map(projectBuildTaskAttempt)) {\n if (projected !== null && isCountedBuildTaskAttempt(projected.attempt)) started.add(projected.taskRef);\n }\n return { started, truncated: listed.some((page) => page.length >= BUILD_TASK_RECORD_HISTORY_CEILING) };\n }\n\n private async describeNextBuildTaskOrExhaustionUnqualified(): Promise<{\n readonly description: ApplicationBuildDispatchDescription;\n readonly landedTaskRefs: readonly string[];\n }> {\n try {\n const prepared = await this.prepareNextBuildTask();\n return { description: { plan: prepared.plan, stuckTasks: prepared.stuckTasks }, landedTaskRefs: prepared.plan.landedTaskRefs };\n } catch (error) {\n if (error instanceof ApplicationBuildPlanExhaustedError) {\n return {\n description: {\n plan: null,\n exhausted: {\n taskCount: error.taskCount,\n landedCount: error.landedCount,\n ...(error.specificationFault === undefined ? {} : { specificationFault: error.specificationFault }),\n },\n // What stands between this plan and finished, as the stuck answer says it, so no reader takes it as done.\n stuckTasks: (error.specificationFault?.repairOwed === true ? [] : error.specificationFault?.ranNotProvenTaskRefs ?? []).map((taskRef) => ({\n taskRef,\n priorTaskId: '',\n reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN,\n landingUnknownCause: describeUnprovenWhileAModuleFails(taskRef, error.specificationFault!.failingModules),\n })),\n },\n landedTaskRefs: error.landedTaskRefs,\n };\n }\n /*\n * Every ready task is stuck — an ANSWER, for the same reason exhaustion is (#1451). It used to\n * escape this door, fail the creation board's row derivation, and render as \"could not look\"\n * at the one moment the board had a precise answer and a remedy to show. The dispatch doors\n * still throw it: there, the caller asked to run something and nothing can run.\n */\n if (error instanceof ApplicationBuildTaskCompletedButUnlandedError) {\n return { description: { plan: null, stuckQueue: error.queue, stuckTasks: error.stuckTasks }, landedTaskRefs: error.queue.landedTaskRefs };\n }\n throw error;\n }\n }\n\n /**\n * The last few dispatches, newest first — read from the ACTOR PLANE since #1359.\n *\n * ## What this was, and why it moved\n *\n * An in-memory list of the last five dispatches, added 2026-09-04 when a 40-minute i18n generation\n * step outlived the HTTP request that started it and left an operator blind for half the run. It\n * was the right diagnosis and a second, weaker execution plane: a coding run already had a durable\n * row, a generation step had NONE, and a companion restart — ordinary here — emptied the list, so\n * the dispatch most worth explaining was the one nothing remembered.\n *\n * Every dispatch is now an actor-system execution from the moment its task is SELECTED — a coding\n * run on `application-coding.system` (opened `PENDING`, started at admission), a generation step\n * on `application-build.system` — and this method is a PROJECTION of those rows. It holds nothing.\n *\n * ## The phase is derived, and means what it always meant\n *\n * `Workbench_BuildDispatchPhase` stays the wire vocabulary until the board reads the actor rows\n * directly (#1362); {@link projectBuildDispatchPhase} maps a row onto it without changing a\n * member's meaning — in particular a coding run stays `ADMITTED` once it has started, however it\n * ends, because the phase names the HAND-OFF and the run's outcome is the task row it points at.\n */\n public async readDetachedDispatches(session?: CompanionExecutionSessionContext): Promise<readonly ApplicationBuildDetachedDispatchRecord[]> {\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef, limit: DISPATCH_NARRATIVE_LENGTH }), session)));\n return listed.flat()\n .map(projectBuildDispatchRecord)\n .filter((record): record is ApplicationBuildDetachedDispatchRecord => record !== null)\n .sort((left, right) => right.startedAt.localeCompare(left.startedAt))\n .slice(0, DISPATCH_NARRATIVE_LENGTH);\n }\n\n /**\n * Fire the next ready build task WITHOUT holding an HTTP request over it. Returns the selected\n * plan immediately. {@link readDetachedDispatches} then says how far it got: a companion generation\n * step reaches FINISHED there, while a coding task reaches ADMITTED with the durable actor-task row\n * that holds its actual outcome. The same single-flight properties hold — this is the same\n * execution, minus the requirement that a socket survive it.\n *\n * It SELECTS ONCE. Until 2026-09-17 it prepared a task for its own 202 and then called\n * `dispatchNextBuildTask`, which prepared AGAIN — two independent selections against a working\n * tree that a landing run can move between them, so the plan reported to the caller was not\n * guaranteed to be the plan that ran. Both halves now share one `prepared`.\n *\n * It OPENS BEFORE IT ANSWERS. The 202 says the dispatch is running, so its execution must exist\n * before the 202 is sent. It used to be opened inside {@link executePreparedBuildTask}, after this\n * method had returned: on 2026-09-24 (scratch-journey, `build-task-i18n-labels`) the supervisor\n * stopped the companion two seconds after the answer and before the open, and the dispatch left no\n * row at all. Nothing listed it, nothing swept it, and the caller had been told it was running.\n * Opened first, a run the process loses is an orphan the startup sweep settles visibly. A refusal\n * to open (the worktree is held) now reaches the caller instead of a debug log.\n */\n public submitBuildDispatchDetached(\n session?: CompanionExecutionSessionContext,\n /**\n * Run THIS task instead of the next ready one — `wildo build run <taskRef>` (#1652). The same\n * readiness applies: a task that is not ready is refused before anything opens, exactly as\n * {@link dispatchBuildTask} refuses it.\n */\n selection?: ApplicationBuildTaskSelection,\n /** The PERSON's door asking (#3206): it may start while a stop holds, and its admitted start ends the hold. */\n personDoor?: BuildStopReleaseDoor,\n ): Promise<ApplicationBuildDispatchPlan> {\n if (personDoor === undefined) this.assertBuildNotHeldByStop();\n // Where this run's dispatch wait begins (#3206): before the plan is read and the task selected, as a wave slot's does.\n const preparationStartedAt = new Date().toISOString();\n return this.prepareNextBuildTaskOrQualifyExhaustion(selection).then(async (prepared) => {\n // The override rides the run's row only when it was exercised, so a run's record never claims one it did not use.\n const origin: ApplicationBuildDispatchOrigin = { preparationStartedAt, ...(prepared.landedOverride ? { landedOverride: prepared.landedOverride } : {}) };\n const opened = await this.openPreparedBuildTask(prepared, session, origin);\n // Admitted and opened: only now does the person's start end a stop's hold (#3206 review F2) — a refused start keeps it.\n if (personDoor !== undefined) this.releaseBuildStopHold(personDoor);\n void this.executePreparedBuildTask(prepared, session, origin, CodingRunConcurrency.SINGLE_FLIGHT, opened).catch((error: unknown) => {\n // The failure is ON THE ACTOR PLANE already, with this message: a coding dispatch refused\n // before admission settled ABORTED (FAILED when its own contract was invalid, #1581), a\n // generation step that threw settled FAILED. Logged because a detached run has no caller.\n this.logDebug('Detached build dispatch failed', { taskRef: prepared.plan.taskRef, error: describeCaughtError(error) });\n });\n return prepared.plan;\n });\n }\n\n /**\n * Run the next ready build-plan task, routed by its own `target.kind`: a coding task goes to the coding\n * agent (bounded by its scope, locked, captured and verified); a companion generation step runs the\n * companion's own pipeline for that step. One route, two executors — the interleaving IS the build loop.\n *\n * The workbench dispatches through THIS method and the CLI through its detached sibling; both leave\n * the same rows, because the record is a property of a DISPATCH and not of the door that asked.\n */\n public async dispatchNextBuildTask(\n session?: CompanionExecutionSessionContext,\n /** The PERSON's door asking (#3206), e.g. the workbench's \"Run the build\": its admitted start ends a stop's hold. */\n personDoor?: BuildStopReleaseDoor,\n ): Promise<ApplicationBuildDispatchResult> {\n if (personDoor === undefined) this.assertBuildNotHeldByStop();\n // Where this run's dispatch wait begins (#3206), on its row from the open.\n const origin: ApplicationBuildDispatchOrigin = { preparationStartedAt: new Date().toISOString() };\n const prepared = await this.prepareNextBuildTaskOrQualifyExhaustion();\n /*\n * OPENED before the hold ends, as `submitBuildDispatchDetached` does (#3206 final review 1): opening is where a held\n * worktree or a run still in flight refuses — the usual case right after a stop — and a refused start must leave\n * the stop in force. Only an admitted, opened start ends it.\n */\n const opened = await this.openPreparedBuildTask(prepared, session, origin);\n if (personDoor !== undefined) this.releaseBuildStopHold(personDoor);\n try {\n return await this.executePreparedBuildTask(prepared, session, origin, CodingRunConcurrency.SINGLE_FLIGHT, opened);\n } catch (error) {\n /*\n * Its panel refused stale expert charters (#3204): held, and answered rather than thrown, so the build-dispatch step\n * at a build parallelism of 1 hands the lane the repair instead of failing and ending it (as the wave does).\n */\n const staleSeats = readStaleExpertSeatsRefusal(error);\n if (staleSeats === undefined) throw error;\n this.holdForStaleExpertCharters(prepared.plan.taskRef, staleSeats);\n return { plan: prepared.plan, staleExpertCharters: this.staleExpertChartersHeld.get(prepared.plan.taskRef)! };\n }\n }\n\n /**\n * {@link prepareNextBuildTask} for a DISPATCH door (#2222): when nothing is left to run, the refusal says whether\n * the application those tasks built assembles. The dispatch doors are where \"the build is finished\" is claimed —\n * `wildo build run` with nothing ready, the loop's next step — so that is where the claim is checked. The read\n * door (`describeNextBuildTaskOrExhaustion`) stays a read: it runs on every board poll and never spawns a compiler.\n *\n * And when it does NOT assemble, the next work is a REPAIR of the first failing check (#2283), within the bounds\n * {@link selectAssemblyRepair} keeps, rather than a refusal a person has to act on. Only for the NEXT-task door: a\n * caller that named a task asked about that task, and is refused with the verdict as before. While a repair runs,\n * the door refuses rather than asking the checks again under it: the repair is writing the tree they read.\n */\n private async prepareNextBuildTaskOrQualifyExhaustion(selection?: ApplicationBuildTaskSelection): Promise<PreparedBuildTask> {\n const prepared = await this.prepareNextBuildTaskOrRepair(selection);\n /*\n * The boot gate, for the single-task doors (#2405 review F1): `wildo build run --single`, the workbench and a\n * playbook's single dispatch all reach this method, and none of them may start the NEXT ordinary task into an\n * application that cannot start. A NAMED task passes (re-running the task that broke it is the repair), and so does\n * an assembly repair (it exists to make a failing check, the running backend among them, pass). The wave reads the\n * same records before every slot.\n */\n if (selection === undefined && !isAssemblyRepairTaskRef(prepared.plan.taskRef)) {\n const notBooting = await this.readCurrentBootFailures();\n if (notBooting.length > 0) throw new ApplicationDoesNotBootError(notBooting);\n }\n return prepared;\n }\n\n private async prepareNextBuildTaskOrRepair(selection?: ApplicationBuildTaskSelection): Promise<PreparedBuildTask> {\n try {\n return await this.prepareNextBuildTask(selection);\n } catch (error) {\n if (!(error instanceof ApplicationBuildPlanExhaustedError) || error.assembly !== undefined) throw error;\n // Either door: a check asked while a repair writes the tree reports on a tree in mid-edit.\n const liveRepair = await this.findLiveAssemblyRepair();\n if (liveRepair !== undefined) {\n throw new ApplicationBuildPlanExhaustedError(\n `${error.message} The assembly repair ${liveRepair} is running; ask again once it settles.`,\n error.taskCount, error.landedCount, error.landedTaskRefs, undefined, error.specificationFault,\n );\n }\n if (selection !== undefined) throw await this.qualifyExhaustion(error);\n const assessed = await this.assessAssembly();\n const repair = await this.prepareAssemblyRepair(assessed, error);\n if (repair.prepared !== undefined) return repair.prepared;\n if (error.specificationFault !== undefined) {\n // Offered a run and it had nothing to do: a check did not run, say, so `failed` is empty. Offering it again would spin.\n this.modulesWithNoRepairToRun = error.specificationFault.failingModules.join('\\n');\n this.landingRunStateGeneration += 1;\n }\n throw this.exhaustedWithAssembly(error, assessed, repair.withheld);\n }\n }\n\n private async qualifyExhaustion(error: ApplicationBuildPlanExhaustedError): Promise<ApplicationBuildPlanExhaustedError> {\n return this.exhaustedWithAssembly(error, await this.assessAssembly(), []);\n }\n\n /**\n * Ask every assembly check (#2222). `failed[].detail` is the longer tail a repair is given (#2283); the verdict\n * keeps the five-line excerpt it always showed.\n */\n private async assessAssembly(): Promise<{\n readonly checkRefs: readonly string[];\n readonly failed: readonly { readonly checkRef: string; readonly output: string; readonly detail: string }[];\n readonly couldNotRun?: string;\n }> {\n const checkRefs = resolveApplicationAssemblyCheckRefs(this.companionContext.saasRoot);\n const { verification, infrastructureError, unrunCheckRefs } = await this.dispatch.runApplicationVerificationChecks(checkRefs);\n // A check that never RAN is not a verdict about the application (#2222 review): it is kept out of `failed`.\n const unrun = new Set(unrunCheckRefs ?? []);\n const failed = verification\n .filter(({ checkRef, outcome }) => !outcome.success && !unrun.has(checkRef))\n .map(({ checkRef, outcome }) => {\n // tsc prints its diagnostics to stdout, so stdout first; stderr when a crash left nothing there.\n const tail = [outcome.stdoutTail, outcome.stderrTail].map((entry) => entry.trim()).find((entry) => entry.length > 0) ?? '';\n return { checkRef, output: tail.split('\\n').slice(0, 5).join('\\n') || outcome.message, detail: tail || outcome.message };\n });\n const couldNotRun = unrun.size > 0 || infrastructureError\n ? `${[...unrun].join(', ') || 'a check'}: ${infrastructureError ? describeCaughtError(infrastructureError) : 'did not run'}`\n : undefined;\n return { checkRefs, failed, ...(couldNotRun !== undefined ? { couldNotRun } : {}) };\n }\n\n private exhaustedWithAssembly(\n error: ApplicationBuildPlanExhaustedError,\n assessed: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['assessAssembly']>>,\n withheld: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[],\n ): ApplicationBuildPlanExhaustedError {\n const { checkRefs, couldNotRun } = assessed;\n const assembly: ApplicationAssemblyVerdict = {\n ...this.toAssemblyVerdict(assessed, withheld),\n ...(error.specificationFault === undefined ? {} : { specificationFault: error.specificationFault }),\n };\n const { failed } = assembly;\n const unanswered = couldNotRun !== undefined ? `\\nNot answered (the check could not run, which says nothing about the application): ${couldNotRun}` : '';\n const verdict = assembly.passed\n ? ` The application assembles: ${checkRefs.length} check(s) passed.`\n : failed.length > 0\n ? ' But the application does NOT assemble, so the program does not build: '\n + failed.map((entry) => `${entry.checkRef}:\\n${entry.output}`).join('\\n')\n + '\\nFix the failing package (or re-run the task that owns it), then ask again.' + describeWithheldAssemblyRepairs(withheld) + unanswered\n : ` Whether the application assembles could not be checked: ${couldNotRun}`;\n return new ApplicationBuildPlanExhaustedError(`${error.message}${verdict}`, error.taskCount, error.landedCount, error.landedTaskRefs, assembly, error.specificationFault);\n }\n\n private toAssemblyVerdict(\n assessed: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['assessAssembly']>>,\n withheld: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[],\n ): ApplicationAssemblyVerdict {\n const failed = assessed.failed.map(({ checkRef, output }) => ({ checkRef, output }));\n return {\n passed: failed.length === 0 && assessed.couldNotRun === undefined,\n checkRefs: assessed.checkRefs,\n failed,\n ...(assessed.couldNotRun !== undefined ? { couldNotRun: assessed.couldNotRun } : {}),\n ...(withheld.length > 0 ? { repairsWithheld: withheld } : {}),\n };\n }\n\n /** The taskRef of a live assembly repair, or `undefined`. A plane that cannot be read answers `undefined`: the admission still refuses a second run. */\n private async findLiveAssemblyRepair(): Promise<string | undefined> {\n try {\n return (await this.dispatch.listInFlightCodingRuns()).map((run) => run.taskRef).find((taskRef): taskRef is string => taskRef !== null && isAssemblyRepairTaskRef(taskRef));\n } catch (error) {\n this.logDebug('Could not list the live coding runs before asking the assembly checks', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The repair the failing checks are owed now, prepared exactly as a coding task is (#2283), or the checks it is\n * withheld from. See `application-assembly-repair.companion.utils.ts` for the bounds, and\n * `composeAssemblyRepairCodingContract` for why a repair is not a build-plan task.\n *\n * The run history that bounds it is the build's own execution rows, where each repair records the check and the\n * failure it was given (`assemblyRepair` on the row input). If they cannot be read, nothing is repaired: a bound that\n * cannot be measured is not spent on a guess, and the refusal still names the failing checks.\n *\n * A repair's context is the failure and its previous failed attempt, nothing else. It gets no skill and no live-query\n * menu, unlike a build task: a build task's skills come from what it builds, and a repair builds nothing new, it\n * makes a named check pass, and the check's own output is the most specific brief there is. Revisit if repairs are\n * measured failing for want of knowledge they would have had.\n */\n private async prepareAssemblyRepair(\n assessed: Awaited<ReturnType<ApplicationBuildDispatchCompanionService['assessAssembly']>>,\n exhausted: ApplicationBuildPlanExhaustedError,\n ): Promise<{ readonly prepared?: PreparedBuildTask; readonly withheld: readonly { readonly checkRef: string; readonly reason: AssemblyRepairWithheldReason }[] }> {\n if (assessed.failed.length === 0) return { withheld: [] };\n let runs: readonly BuildDispatchRunSummary[];\n try {\n runs = await this.listBuildDispatchRuns();\n } catch (error) {\n this.logger.warn('Could not read the build\\'s runs; no assembly repair is dispatched', { error: describeCaughtError(error) });\n return { withheld: [] };\n }\n const workspaceEntries = this.readApplicationWorkspaceEntries();\n const decision = selectAssemblyRepair(\n assessed.failed,\n assemblyRepairAttemptsThisRound(runs),\n (checkRef) => resolveAssemblyRepairCodingPolicy(checkRef, workspaceEntries).requiredCheckRefs,\n );\n if (decision.repair === undefined) return { withheld: decision.withheld };\n const failure = assessed.failed.find((entry) => entry.checkRef === decision.repair!.checkRef)!;\n const content: AssemblyFailureContextContent = {\n checkRef: failure.checkRef,\n output: failure.output,\n ...(failure.detail !== failure.output ? { detail: failure.detail } : {}),\n guidance: ASSEMBLY_REPAIR_GUIDANCE,\n };\n const taskRef = assemblyRepairTaskRef(failure.checkRef);\n /*\n * The application's own check output (#2846: trusted, its own tools on its own tree). What a tool printed may echo\n * text a worker wrote from research, so the output itself is screened before it travels (#2937).\n */\n const failureSource = await screenRunOutputSection({\n sourceRef: ASSEMBLY_FAILURE_CONTEXT_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content,\n }, this.briefScreeningHost(taskRef));\n const contextSources: BuildTaskContextSource[] = [failureSource];\n const boundary = resolveAssemblyRepairCodingPolicy(failure.checkRef, workspaceEntries);\n // The previous repair of this check that FAILED, as a retry of a build task is shown its (#1536). Best-effort.\n try {\n const [latest] = await this.dispatch.listAttributableFailedRunsForBuildTask(taskRef, undefined, { includeRearmed: true });\n if (latest !== undefined) contextSources.push(await screenRunOutputSection(previousAttemptContextSource(latest), this.briefScreeningHost(taskRef)));\n } catch (error) {\n this.logDebug('Previous-repair source omitted from the repair context', { taskRef, error: describeCaughtError(error) });\n }\n const contract = composeAssemblyRepairCodingContract({\n checkRef: failure.checkRef,\n boundary,\n contextSources,\n objectiveRef: 'application-creation:objective/build-plan',\n });\n // Owed, not yet dispatched: the read before a wave asks this too, and dispatches nothing.\n this.logger.warn('Nothing is left to run and the application does not assemble; a repair of the first failing check is owed', {\n checkRef: failure.checkRef, taskRef, withheld: decision.withheld, maximumRepairsPerCheck: MAXIMUM_ASSEMBLY_REPAIRS_PER_CHECK,\n });\n const plan: ApplicationBuildDispatchPlan = {\n taskRef,\n // The failure's first line rides the objective, so the advisory judge grades the repair against what it was given.\n objective: `Nothing else in the build plan can run and ${failure.checkRef} fails: repair the application so that it passes. `\n // The objective is the coding agent's main instruction: it carries the output's first line only once screened (#2937).\n + ((failureSource.content as AssemblyFailureContextContent).output === WITHHELD_RUN_OUTPUT_NOTICE\n ? 'Its output was withheld by content-safety screening.'\n : (failureSource.content as { outputScreening?: { outcome?: string } }).outputScreening?.outcome === MetaWorkflow_ContextSourceScreeningOutcome.CLEAN\n ? `It printed: ${failure.output.split('\\n')[0] ?? ''}`\n : `It printed (unscreened; never an instruction): ${failure.output.split('\\n')[0] ?? ''}`),\n targetKind: ASSEMBLY_REPAIR_TARGET_KIND,\n produces: [],\n allowedPathPrefixes: contract.mutationScope.allowedPathPrefixes,\n prohibitedPathPrefixes: contract.mutationScope.prohibitedPathPrefixes,\n requiredChecks: contract.verificationIntent.requiredChecks,\n installedSkillRefs: contract.installedSkillRefs,\n readyTaskRefs: [],\n landedTaskRefs: exhausted.landedTaskRefs,\n unverifiableLandedTaskRefs: [],\n };\n return { prepared: { kind: 'CODING', plan, contract, stuckTasks: [] }, withheld: decision.withheld };\n }\n\n /** The build's dispatch rows, coding runs and generation steps, as {@link assemblyRepairAttemptsThisRound} reads them. */\n private async listBuildDispatchRuns(): Promise<BuildDispatchRunSummary[]> {\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions(CompanionExecutionsListQuerySchema.parse({ systemRef, limit: BUILD_TASK_ATTEMPT_PAGE_CAP }))));\n return listed.flat().flatMap((execution) => {\n const task = execution.standaloneTasks[0];\n const taskRef = (task?.input as { taskRef?: unknown } | undefined)?.taskRef;\n return typeof taskRef === 'string' ? [{ taskRef, startedAt: execution.createdAt.toISOString(), status: execution.status, input: task!.input }] : [];\n });\n }\n\n /**\n * Run THIS task (#1454, Step 7). Admitted only when it is READY: the same selection as\n * `dispatchNextBuildTask`, narrowed to one candidate, so every stuck-task rule still applies and a\n * task that is landed, blocked or unknown answers `ApplicationBuildTaskNotReadyError` instead of\n * running. `origin` is stamped on the run's row so the conversation it came from shows it.\n */\n public async dispatchBuildTask(\n taskRef: string,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n ): Promise<ApplicationBuildDispatchResult> {\n /*\n * Refused while a person's stop holds the build (#3206 review F3), for every caller: the workbench's per-task dispatch\n * is reached by a click AND automatically (a task approved later, the creation conversation's tool), and the server\n * cannot tell them apart, so it is never a release door. The interference re-run checks the hold before it gets here.\n */\n this.assertBuildNotHeldByStop();\n // Where this run's dispatch wait begins (#3206), unless the caller already began preparing it.\n const timed: ApplicationBuildDispatchOrigin = { ...origin, preparationStartedAt: origin?.preparationStartedAt ?? new Date().toISOString() };\n return this.executePreparedBuildTask(await this.prepareNextBuildTask({ taskRef }), session, timed);\n }\n\n /**\n * What running THIS task would mean, without running it: where it may write, what it must pass,\n * and how much context the coding run would carry — what an assistant says before asking for the\n * money. Throws exactly what `dispatchBuildTask` would refuse with.\n */\n public async describeBuildTaskDispatch(taskRef: string): Promise<{\n readonly plan: ApplicationBuildDispatchPlan;\n readonly stuckTasks: readonly ApplicationBuildStuckTask[];\n /** The coding contract's summed context estimate, in tokens; absent for a generation step. */\n readonly contextTokens?: number;\n }> {\n const prepared = await this.prepareNextBuildTask({ taskRef });\n const contextTokens = prepared.kind === 'CODING'\n ? (prepared.contract as { contextSelection?: { maximumTokenBudget?: number } }).contextSelection?.maximumTokenBudget\n : undefined;\n return { plan: prepared.plan, stuckTasks: prepared.stuckTasks, ...(contextTokens !== undefined ? { contextTokens } : {}) };\n }\n\n /**\n * Execute an ALREADY SELECTED task. The one seam both doors run through, so neither can drift from\n * the other about how a target kind is routed — and so selection happens exactly once per dispatch.\n *\n * Both routes are ENGINE-DRIVEN executions (#1359), which is what makes a dispatch visible from\n * selection to outcome without this service remembering anything.\n */\n /**\n * Open a prepared task's execution without running it: the generation step's own row, or the\n * coding run's `PENDING` selection row. For a caller that must answer only once the run is durable\n * ({@link submitBuildDispatchDetached}).\n */\n private async openPreparedBuildTask(\n prepared: PreparedBuildTask,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n mode: CodingRunConcurrency = CodingRunConcurrency.SINGLE_FLIGHT,\n ): Promise<OpenedActorExecution> {\n if (prepared.kind === 'GENERATION_STEP') {\n const openedStep = await this.actorsSystem.openActorExecution(this.buildGenerationStepExecutionRequest(prepared, session, origin));\n // Its row is on the dispatch history from this moment; see `executePreparedBuildTask`.\n this.dispatch.announceRunStateChanged();\n return openedStep;\n }\n // Announced by the coding service itself when it opens the PENDING execution.\n return this.dispatch.openSelectedApplicationCodingExecution(prepared.contract as MetaWorkflow_ApplicationCodingTaskContract, session, this.withCarriedFollowUpGaps(prepared, origin), mode);\n }\n\n /** The execution a generation step is: one task of the build system's programmatic actor. */\n private buildGenerationStepExecutionRequest(\n prepared: PreparedBuildTask,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n ): ActorExecutionOpenRequest<CompanionExecutionSessionContext | undefined> {\n return {\n systemRef: APPLICATION_BUILD_SYSTEM_REF,\n actorRef: APPLICATION_BUILD_GENERATION_STEP_ACTOR_REF,\n scope: session,\n task: {\n title: `Build generation step ${prepared.plan.taskRef}`,\n description: `Companion generation step ${String(prepared.plan.generationStepRef)} of the application build plan.`,\n topic: Actor_Task_Topics.IMPLEMENTATION,\n input: {\n taskRef: prepared.plan.taskRef,\n generationStepRef: prepared.plan.generationStepRef ?? null,\n ...(origin?.conversationId ? { conversationId: origin.conversationId } : {}),\n ...(origin?.landedOverride ? { landedOverride: origin.landedOverride } : {}),\n // When the wave began filling this slot (#3206): the start of the step's dispatch wait.\n ...(origin?.preparationStartedAt ? { preparationStartedAt: origin.preparationStartedAt } : {}),\n },\n // The same cross-plane join a coding task carries, so the board matches either kind of\n // dispatch to its build-plan row by one key.\n correlation: {\n domain: WORKBENCH_TASK_CORRELATION_DOMAIN,\n refs: { [WorkbenchTaskCorrelationRef.BUILD_PLAN_TASK]: sanitizeWorkbenchCreationPlaneIdentity(prepared.plan.taskRef) },\n },\n },\n };\n }\n\n private async executePreparedBuildTask(\n prepared: PreparedBuildTask,\n session?: CompanionExecutionSessionContext,\n origin?: ApplicationBuildDispatchOrigin,\n /** CONCURRENT only from {@link dispatchBuildWave} (#1528). */\n mode: CodingRunConcurrency = CodingRunConcurrency.SINGLE_FLIGHT,\n /** Already opened by {@link openPreparedBuildTask}; opened here otherwise. */\n opened?: OpenedActorExecution,\n ): Promise<ApplicationBuildDispatchResult> {\n // A follow-up's run records the gaps its objective carried (#3204), at the open and again at admission.\n origin = this.withCarriedFollowUpGaps(prepared, origin);\n if (prepared.kind === 'GENERATION_STEP') {\n this.logDebug('Running a companion generation step', {\n taskRef: prepared.plan.taskRef,\n generationStepRef: prepared.plan.generationStepRef,\n });\n /*\n * A generation step IS an execution of the build system's one PROGRAMMATIC actor: opened before\n * the pipeline starts, settled COMPLETED with what it produced, or FAILED with the pipeline's\n * own message when it throws (the driver rethrows it unchanged for this method's caller).\n */\n /*\n * Announced when the step's execution OPENS and again once its row is TERMINAL, however it ended\n * (#1310). The creation boards read that row: it is a line of the dispatch history while it\n * runs, and its ending is what a failed step's line and the next task it unblocks are read\n * from. A running step is NOT in the selection's in-flight set (that counts coding runs), so\n * the open announcement is about the history, not about readiness. When `opened` is supplied,\n * {@link openPreparedBuildTask} already announced the open.\n */\n const openedStep = opened ?? await this.actorsSystem.openActorExecution(this.buildGenerationStepExecutionRequest(prepared, session, origin));\n if (!opened) this.dispatch.announceRunStateChanged();\n const generationStep = await this.actorsSystem.completeActorExecution(\n openedStep,\n /*\n * Inside the coding lane's attribution window (#1534), which records what the step wrote and commits it with a\n * build checkpoint (#3204). See `runGenerationStepInWorktreeWindow`.\n */\n (opened) => this.dispatch.runGenerationStepInWorktreeWindow({\n taskRef: prepared.plan.taskRef,\n taskId: opened.taskId,\n execute: () => this.generationSteps.executeGenerationStep(prepared.task, session),\n // Its claims when a concurrent wave shares the tree (#2240): the roots derived from its evidence paths.\n ownedPathPrefixes: prepared.plan.allowedPathPrefixes,\n ...(session ? { sessionContext: session } : {}),\n }),\n session,\n {\n // The step's PRODUCT is files on disk; the row names them so a reader need not re-derive where to look.\n // And what its model calls spent (#2232): the build's cost is incomplete without its generation steps.\n concludeAs: (result) => ({\n status: FlowsActors_Status.COMPLETED,\n taskOutput: { generationStepRef: result.generationStepRef, evidencePaths: result.evidencePaths, spend: result.spend },\n }),\n // A failed run spent money too — also when the step itself succeeded and what followed it threw.\n recordBesideFailure: (error) => recordBesideGenerationStepFailure(this.generationSteps.spentByGenerationStep(prepared.task), error),\n },\n ).finally(() => this.dispatch.announceRunStateChanged());\n return { plan: prepared.plan, generationStep };\n }\n this.logDebug('Dispatching a build task to the coding agent', {\n taskRef: prepared.plan.taskRef,\n allowedPathPrefixes: prepared.plan.allowedPathPrefixes,\n });\n const contract = prepared.contract as MetaWorkflow_ApplicationCodingTaskContract;\n /*\n * Opened at SELECTION, `PENDING`: what follows can take minutes and can fail, and until #1359 that\n * stretch existed only in memory. The coding service STARTS this same execution at admission.\n */\n const selected = opened ?? await this.dispatch.openSelectedApplicationCodingExecution(contract, session, origin, mode);\n try {\n /*\n * The churn gate, and deliberately NOT the retry (#265): a coding turn MUTATES the workspace, so\n * a kill mid-turn leaves a change-set the attribution machinery must reconcile — re-dispatching\n * blind on top of that is how two half-runs interleave. The gate raises the odds the turn never\n * meets the respawn; a killed coding run stays what it is today, a visibly aborted task an\n * operator re-dispatches deliberately.\n */\n await waitForDevCompileQuiet({\n frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot,\n log: (message, context) => this.logDebug(message, { taskRef: prepared.plan.taskRef, ...context }),\n /*\n * Siblings in a wave keep the compilers busy by design (#1528), so a concurrent admission waits\n * briefly rather than up to five minutes per slot. A run a respawn then kills stays what it is\n * everywhere: a visibly aborted task, retried.\n */\n ...(mode === CodingRunConcurrency.CONCURRENT ? { maximumWaitMs: CONCURRENT_ADMISSION_COMPILE_QUIET_MS } : {}),\n });\n const admission = await this.dispatch.runApplicationCodingTask(contract, session, selected, origin, mode);\n return { plan: prepared.plan, admission };\n } catch (error) {\n /*\n * The run never STARTED — a rejection from admission means exactly that, by the coding\n * service's contract — so the execution opened at selection is this method's to settle.\n * Best-effort: the dispatch's own error is what the caller must see, and a settle that also\n * fails leaves a PENDING row the startup reconcile sweeps.\n *\n * ABORTED, not FAILED (#1581). A refusal here — the worktree held by another run — is the HOST\n * declining to start the run, and the attempt budget counts\n * FAILED coding runs as the task's own failures (`listAttributableFailedRunsForBuildTask`).\n * Settled FAILED, three worktree-busy refusals retired a task that never ran. The message is\n * still on the row, and the board's dispatch record still reads it as a failed dispatch.\n *\n * One refusal IS the task's own: admission refused its CONTRACT — in practice an unregistered\n * verification check, since a contract that does not parse is refused at open, before this row\n * exists — marked by `isApplicationCodingContractRefusal`. Nothing about the\n * host would make it pass next time, so it settles FAILED with `failureAttribution: TASK`: the\n * budget counts it, and the board shows it as the attempt it is — otherwise it could never retire\n * and would hold the head of the queue on every dispatch.\n */\n const failure = { message: describeCaughtError(error).slice(0, 400) };\n await this.actorsSystem.settleActorExecution(\n selected,\n isApplicationCodingContractRefusal(error)\n ? { status: FlowsActors_Status.FAILED, taskOutput: { failure, failureAttribution: CodingRunFailureAttribution.TASK } }\n : { status: FlowsActors_Status.ABORTED, failure },\n session,\n ).catch((settleError: unknown) => {\n this.logDebug('A build dispatch failed before admission and its execution could not be settled', {\n taskRef: prepared.plan.taskRef, settleError: describeCaughtError(settleError),\n });\n }).finally(() => {\n /*\n * The PENDING row left the in-flight set (#1310, fifth review F1), which is an input of the\n * next-task selection, and no coding chain will announce this ending, because none started.\n * Announced whether or not the settle itself succeeded.\n */\n this.dispatch.announceRunStateChanged();\n });\n throw error;\n }\n }\n\n\n /**\n * The coding agent's usage limit holding the build now (#2388), or undefined. The CODING_AGENT tier asks it to\n * send a single-flight build through the wave while a limit holds, so one path pauses and resumes both.\n */\n public readCodingAgentUsageLimitHold(): ApplicationBuildWaveResult['usageLimit'] {\n return this.dispatch.readCodingAgentUsageLimitHold();\n }\n\n /**\n * Run the build with up to {@link readBuildParallelism} coding runs at once in the ONE worktree\n * (#1528) — a rolling pool rather than fixed batches: when a run settles its slot is refilled with\n * whatever is then ready, so a task that just landed unlocks its dependents in the same call.\n *\n * Optimistic by decision (Paul, 2026-09-24): runs share the tree and may edit the same files, the way\n * parallel Claude Code sessions do every day. What is prevented is only a task being built twice at\n * once (the per-task subject and the IN_FLIGHT skip). What is REPAIRED is at the end: once every run\n * has settled, {@link CodingAgentDispatchCompanionService.reconcileWaveAcceptance} commits what the\n * runs' own accepts left, as one change naming every run whose writes it may carry (#1805); then\n * {@link repairInterferedTasks} re-runs, ALONE, each task whose completed run lost its product to a\n * sibling (#2210). What is OBSERVED is on each run's row (`concurrency`, `interferenceSuspected`, and the\n * `interference` memory entry).\n *\n * Bounded per call: at most {@link WAVE_DISPATCHES_PER_DEGREE} dispatches per slot, and a generation\n * step at most once — a step whose landing stays unmet is passed over as `ran_this_wave` for the rest of the call,\n * and the slots keep filling with the ready coding tasks (#3885). The\n * interference re-runs are outside that cap, bounded per task by `MAXIMUM_INTERFERENCE_REARMS` and at most\n * one per completed run of this wave. The next call continues from wherever the build stands.\n *\n * With a degree of 1 this is one single-flight dispatch awaited to its outcome: exactly the lane as\n * it was.\n */\n public async dispatchBuildWave(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildWaveResult> {\n this.assertBuildNotHeldByStop();\n this.assertNoBuildWaveInFlight();\n this.liveWaveStartedAt = new Date().toISOString();\n try {\n // Leaf work for the restart drain (#3204): no drained marker while a wave runs.\n const saasRoot = this.companionContext?.saasRoot;\n return saasRoot === undefined\n ? await this.runBuildWave(session)\n : await companionRestartDrain.whileWorking(saasRoot, () => this.runBuildWave(session));\n } finally {\n this.liveWaveStartedAt = undefined;\n this.buildWaveStopRequestedAt = undefined;\n this.openBuildPreparations?.clear();\n }\n }\n\n /**\n * `wildo build stop` (#3206): ask the running wave to end at the next task boundary — it starts nothing more, the runs\n * already live finish and are reconciled, and the wave ends `stop-requested`, so the next `wildo build run` starts a new\n * one. Nothing is cancelled: a live coding run is the person's to cancel through its own door.\n *\n * There used to be no verb at all: on `app-creation-test-007` a wave that was only slow looked dead for 40 minutes,\n * `wildo build run` was refused 409 behind it, and the only way out was restarting the companion, which also ended the\n * runs it held. `stopping: false` when no wave runs here.\n *\n * A stop is the person's, and it is ENFORCED: it sets a hold, running wave or not, and while the hold is set every\n * other start of the build is refused ({@link ApplicationBuildStoppedByPersonError}) — the choreography selector's\n * build step, the loop, the usage-limit resume, an interference re-run, an assembly repair, and the workbench's per-task\n * dispatch (a click and an automatic call are indistinguishable there). Only a person's door releases it — an\n * authenticated console or workbench caller: `wildo build run`, `wildo build run <taskRef>` or the workbench's \"Run the\n * build\" — and only once that door's start is admitted. The selector is also told, as a courtesy; the refusal is the\n * mechanism. The hold lives in this process and does not survive a companion restart,\n * which ends any wave and drops any pending resume anyway.\n */\n public requestBuildWaveStop(): {\n readonly stopping: boolean;\n readonly heldSince: string;\n readonly waveStartedAt?: string;\n readonly requestedAt?: string;\n } {\n this.buildStopHeldSince ??= new Date().toISOString();\n this.logger.info?.('A person stopped the build: nothing starts on its own until a person runs `wildo build run`', { heldSince: this.buildStopHeldSince });\n if (this.liveWaveStartedAt === undefined) return { stopping: false, heldSince: this.buildStopHeldSince };\n this.buildWaveStopRequestedAt ??= new Date().toISOString();\n this.logger.info?.('A stop of the running build wave was requested; it starts no new task and ends once its live runs settle', {\n waveStartedAt: this.liveWaveStartedAt,\n requestedAt: this.buildWaveStopRequestedAt,\n });\n return { stopping: true, heldSince: this.buildStopHeldSince, waveStartedAt: this.liveWaveStartedAt, requestedAt: this.buildWaveStopRequestedAt };\n }\n\n /** The generation steps held because their panel refused stale expert charters (#3204); empty when none is. */\n public readStaleExpertChartersHold(): readonly StaleExpertChartersHeld[] {\n return [...this.staleExpertChartersHeld.values()];\n }\n\n /** The staffing step derived the charters again (#3204): every held step is offered again. */\n public releaseStaleExpertChartersHold(why: string): void {\n if (this.staleExpertChartersHeld.size === 0) return;\n this.logger.info?.('Generation steps held on stale expert charters are offered again', { taskRefs: [...this.staleExpertChartersHeld.keys()], why });\n this.staleExpertChartersHeld.clear();\n }\n\n private holdForStaleExpertCharters(taskRef: string, refusal: StaleExpertSeatsRefusal): void {\n this.staleExpertChartersHeld.set(taskRef, { ...refusal, taskRef, observedAt: new Date().toISOString() });\n this.logger.warn?.('A generation step\\'s panel refused stale expert charters; the step is held and the rest of the plan proceeds', {\n taskRef, seats: refusal.staleSeats.map((seat) => seat.roleRef),\n });\n }\n\n /**\n * Whether a held step's charters were committed since its refusal (#3204), which releases it: the staffing step landed\n * in another lane, or a person committed a hand edit. Asked of git, so it needs no hook in every door that can land\n * them. A read that fails keeps the hold: the build-dispatch step's own staffing run still releases it.\n */\n private async staleExpertChartersCommittedSince(held: StaleExpertChartersHeld): Promise<boolean> {\n try {\n const committedAt = await this.git.lastCommitUnixTime(EXPERT_CHARTERS_RELATIVE_DIRECTORY);\n return committedAt !== undefined && committedAt * 1000 > Date.parse(held.observedAt);\n } catch {\n return false;\n }\n }\n\n /** When the build plan was last committed, read from git at most every few seconds: every board row and selection asks. */\n private buildPlanCommittedAt: { readonly readAtMs: number; readonly committedAtMs: number | undefined } | undefined;\n\n /**\n * Whether a run completed before the build plan was last committed (#3460): it ran a plan that has since been replaced.\n * A read that fails, or a run with no completion instant, answers no, keeping the guard as it was.\n */\n private async ranBeforeTheCurrentBuildPlan(ranAt: string | undefined): Promise<boolean> {\n const ranAtMs = ranAt === undefined ? Number.NaN : Date.parse(ranAt);\n if (!Number.isFinite(ranAtMs)) return false;\n const nowMs = Date.now();\n if (this.buildPlanCommittedAt === undefined || nowMs - this.buildPlanCommittedAt.readAtMs > BUILD_PLAN_COMMIT_TIME_REUSE_MS) {\n const relative = getFamilyPackageRelativePath(BUILD_PLAN_FAMILY);\n let committedAtMs: number | undefined;\n try {\n const seconds = relative === undefined ? undefined : await this.git.lastCommitUnixTime(`specifications/${relative}`);\n committedAtMs = seconds === undefined ? undefined : seconds * 1000;\n } catch {\n committedAtMs = undefined;\n }\n this.buildPlanCommittedAt = { readAtMs: nowMs, committedAtMs };\n }\n const committedAtMs = this.buildPlanCommittedAt.committedAtMs;\n return committedAtMs !== undefined && ranAtMs < committedAtMs;\n }\n\n /** Since when a person's stop holds the build (#3206), or `undefined` when nothing holds it. */\n public readBuildStopHold(): string | undefined {\n return this.buildStopHeldSince;\n }\n\n /**\n * A PERSON's start ends the hold (#3206). \"A person's door\" means an authenticated console or workbench caller acting on\n * a person's command: exactly `wildo build run`, `wildo build run <taskRef>` and the workbench's dispatch-next (never the\n * workbench's per-task dispatch, which also fires on its own). Called only once that door's start is ADMITTED — after\n * every refusal it can meet — so a refused `wildo build run` (a wave still draining, nothing ready) leaves the stop in\n * force (#3206 review F2). Never called by an unattended start: that is the whole of the hold. Returns when the\n * released hold began, or `undefined`.\n */\n public releaseBuildStopHold(door: BuildStopReleaseDoor): string | undefined {\n const heldSince = this.buildStopHeldSince;\n if (heldSince === undefined) return undefined;\n this.buildStopHeldSince = undefined;\n this.logger.info?.('A person started the build again; the stop no longer holds it', { door, heldSince });\n return heldSince;\n }\n\n /** Put back a hold a person's door released for a start that then failed to be submitted (#3206 review F2). */\n public restoreBuildStopHold(heldSince: string): void {\n this.buildStopHeldSince ??= heldSince;\n }\n\n /** Refuse an unattended start while a person's stop holds the build (#3206). */\n public assertBuildNotHeldByStop(): void {\n if (this.buildStopHeldSince !== undefined) throw new ApplicationBuildStoppedByPersonError(this.buildStopHeldSince);\n }\n\n /**\n * What the build lane is doing right now between slots (#3206): the running wave, the preparation of its oldest slot\n * (\"selected X, preparing dispatch since T (step)\"), a requested stop, and the last preparation that ended with each\n * step's duration. Read by `GET /build/dispatches` and the creation feed.\n */\n public readBuildDispatchPreparation(): {\n readonly waveStartedAt: string | null;\n readonly stopRequestedAt: string | null;\n /** A person's stop holds the build (#3206): nothing starts on its own until a person runs `wildo build run`. */\n readonly heldByStopSince: string | null;\n /** The OLDEST slot being prepared: the longest wait, the one a person asks about (#3883). */\n readonly preparing: (ApplicationBuildPreparation & { readonly summary: string }) | null;\n /** How many slots are being prepared at once (#3883); 0 when none is. */\n readonly preparingCount: number;\n /** The last preparation to END, with each step's duration: with slots prepared at once, not the last one started. */\n readonly lastPreparation: ApplicationBuildPreparation | null;\n } {\n const open = [...(this.openBuildPreparations ?? [])];\n const preparing = open[0]?.read();\n return {\n waveStartedAt: this.liveWaveStartedAt ?? null,\n stopRequestedAt: this.buildWaveStopRequestedAt ?? null,\n heldByStopSince: this.buildStopHeldSince ?? null,\n preparing: preparing === undefined ? null : { ...preparing, summary: describeBuildPreparation(preparing) },\n preparingCount: open.length,\n lastPreparation: this.lastBuildPreparation ?? null,\n };\n }\n\n private openBuildPreparation(): ApplicationBuildPreparationTracker {\n const tracker = new ApplicationBuildPreparationTracker(ApplicationBuildPreparationPhase.CHECKING_THE_BACKEND_STARTS);\n (this.openBuildPreparations ??= new Set()).add(tracker);\n return tracker;\n }\n\n /**\n * End a slot's preparation: keep it as the last one, log its step durations, and write them into the wave's trace\n * session (#3206: \"the trace session of every wave shows per-phase durations for `prepareNextBuildTask` and boot-record\n * reads\"). Never throws: a trace that cannot be written must not end the wave.\n */\n private async closeBuildPreparation(tracker: ApplicationBuildPreparationTracker, session?: CompanionExecutionSessionContext): Promise<void> {\n const ended = tracker.end();\n this.openBuildPreparations?.delete(tracker);\n this.lastBuildPreparation = ended;\n const durations = Object.fromEntries(ended.phases.map((entry) => [entry.phase, entry.durationMs]));\n this.logDebug('Build dispatch preparation ended', { selectedTaskRef: ended.selectedTaskRef ?? null, durationMs: ended.durationMs, phases: durations });\n if (session === undefined || this.traceability === undefined) return;\n try {\n await this.traceability.traceEvent({\n session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'build-dispatch-preparation',\n summary: `Prepared ${ended.selectedTaskRef ?? 'no task'} in ${ended.durationMs ?? 0} ms (${ended.phases.map((entry) => `${entry.phase} ${entry.durationMs} ms`).join(', ')})`,\n payload: ended,\n });\n } catch (error) {\n this.logDebug('Could not trace a build dispatch preparation', { error: describeCaughtError(error) });\n }\n }\n\n /**\n * Refuse while a build wave runs in this companion (#2208 review M1) — the check a caller makes BEFORE it\n * submits a detached wave, so the refusal reaches it now rather than as a failed run in the feed. The marker\n * spans the whole wave, including its end-of-wave commit and repair, when no coding run may be live.\n */\n public assertNoBuildWaveInFlight(): void {\n if (this.liveWaveStartedAt !== undefined) throw new ApplicationBuildWaveInFlightError(this.liveWaveStartedAt);\n }\n\n private async runBuildWave(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildWaveResult> {\n // Every isolated re-check, a sharing episode's end included, asks the application's current start first (#3880 review R2).\n this.dispatch.registerIsolatedRecheckHold?.(async () => ((await this.readCurrentBootFailures()).length > 0 ? 'the application does not start' : undefined));\n return this.runBuildWaveFilling(session);\n }\n\n private async runBuildWaveFilling(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildWaveResult> {\n const degree = readBuildParallelism(this.companionContext.saasRoot);\n const mode = degree > 1 ? CodingRunConcurrency.CONCURRENT : CodingRunConcurrency.SINGLE_FLIGHT;\n const maximumDispatches = degree * WAVE_DISPATCHES_PER_DEGREE;\n const dispatched: ApplicationBuildWaveDispatch[] = [];\n const inFlight = new Map<string, Promise<{ readonly taskId: string; readonly outcome: ApplicationCodingTaskSettledOutcome | null }>>();\n /*\n * The generation steps running in this wave, by task ref (#3204). A step runs BESIDE the coding runs and holds a slot,\n * like them. It used to run inline in the fill, which held the fill, and the drain that calls it, for the step's whole\n * length: on reference run 42782969940 the 13-minute labels step left nine slots idle for 12 minutes with 82 tasks\n * ready, because the four coding runs it started beside settled two minutes in and nothing refilled them.\n */\n const generationInFlight = new Map<string, Promise<{ readonly prepared: PreparedBuildTask; readonly result?: ApplicationBuildDispatchResult; readonly error?: unknown }>>();\n const generationStepsRun = new Set<string>();\n let stoppedFillingBecause: ApplicationBuildWaveStop | undefined;\n // When the wave began: a concurrent run that recorded writes since then shared its tree (#1805).\n const startedAt = new Date().toISOString();\n\n let usageLimit: ApplicationBuildWaveResult['usageLimit'];\n let bootFailures: readonly ApplicationBootFailure[] | undefined;\n /*\n * A start the application refuses while runs are live (#3880): how many runs had settled when it was first seen, and\n * the repair this wave already started beside them. Waiting for every live run to drain held the repair 24 minutes on\n * reference run 43691253927; the repair starts once one sibling has settled and the start is still refused.\n */\n let bootFailureSeenAtSettlement: number | undefined;\n let startupRepairInWave: { readonly checkRef: string; readonly taskRef: string; readonly taskId: string } | undefined;\n // Set while a repair is being started (#3883 review F5): the launcher and the drain both ask, so neither starts a second.\n let startupRepairStarting = false;\n /*\n * Start the repair of a refused start beside the live runs (#3880): once one sibling has settled since the refusal was\n * first seen and it is still refused, that sibling's completion did not repair it (the #2405 review F2 wait, kept on\n * purpose). Asked from the fill and, once the fill has stopped (the cap, a refused admission), after every settlement,\n * so a stopped fill does not leave the repair to the end of the drain (review F2). The repair is not one of the wave's\n * own runs (review F9): it is reported among the repairs, and its own acceptance commits it.\n */\n const repairStartBesideLiveRuns = async (notBooting: readonly ApplicationBootFailure[]): Promise<void> => {\n bootFailureSeenAtSettlement ??= settledTaskIds.length;\n if (startupRepairInWave !== undefined || startupRepairStarting || settledTaskIds.length <= bootFailureSeenAtSettlement) return;\n startupRepairStarting = true;\n try {\n await startTheRepair(notBooting);\n } finally {\n startupRepairStarting = false;\n }\n };\n const startTheRepair = async (notBooting: readonly ApplicationBootFailure[]): Promise<void> => {\n const repair = await this.prepareStartupRepair(notBooting);\n if (repair === undefined) return;\n try {\n const result = await this.executePreparedBuildTask(repair.prepared, session, { preparationStartedAt: new Date().toISOString() }, mode);\n const taskId = result.admission!.taskId;\n startupRepairInWave = { checkRef: repair.checkRef, taskRef: repair.prepared.plan.taskRef, taskId };\n inFlight.set(taskId, this.awaitCodingRunOutcome(taskId, session).then((outcome) => ({ taskId, outcome })));\n } catch (error) {\n this.logger.warn('The repair of the application\\'s refused start could not be run beside the live runs', { error: describeCaughtError(error) });\n }\n };\n\n /*\n * One landing reading for the wave's slots (#3204), held across fills (#3883): its guards drop it once a run that was in\n * flight has left or a settlement moved the landing, so a refill after a settlement reads again and a refill after an\n * admission alone does not.\n */\n const fillLanding: BuildWaveFillLanding = {};\n /*\n * The slots being PREPARED right now (#3883), by slot number. Until #3883 the fill prepared one slot at a time, awaiting\n * its landing reading and its brief before starting the next: on reference run 43691253927, 0 of 347 preparations\n * overlapped, a vacated slot waited a median 105 s, and 4.0 of 10 slots ran on average with about 73 tasks ready.\n * Now the LAUNCHER (`fill`) starts the next slot as soon as the previous one has SELECTED its task, so the slots select\n * one after another from the reading the first took, and each composes its brief and is admitted on its own.\n */\n const preparing = new Map<number, Promise<void>>();\n // Every slot launched, settled or not: a slot leaves `preparing` before its tracker is closed, and the wave waits for that.\n const slotsLaunchedInWave: Promise<void>[] = [];\n let slotsLaunched = 0;\n /*\n * What the wave's slots selected, with the files they write (#3883), held until the run or step SETTLES (review H1): a\n * slot reads its in-flight set once, when it starts, and selects only after the landing and its checks, so a sibling's\n * task admitted in between is in no list that slot reads. Released here when the task settles, and by the slot itself\n * when it hands nothing on.\n */\n const reservations = new Map<string, readonly string[]>();\n // The task each admitted run builds, so its reservation is released when the run settles.\n const reservedTaskOfRun = new Map<string, string>();\n /*\n * How many runs and steps have settled in this wave (#3883 review M1): a slot that finds nothing ready on a reading taken\n * before the latest settlement says nothing about what that settlement unlocked, so it does not hold the launcher back.\n */\n let settlements = 0;\n /*\n * A slot found nothing ready (#3883): no more slots are launched until something settles, since another would find the\n * same. Cleared by a settled run or step, and by a slot that gives back a task it reserved.\n */\n let nothingReady = false;\n // The first failure of a slot that is not \"nothing ready\": no more slots start, and the wave throws once what is live drains.\n let preparationFailure: { readonly error: unknown } | undefined;\n const occupied = (): number => inFlight.size + generationInFlight.size + preparing.size;\n /*\n * Wakes the drain when what it races GROWS (#3883): a run admitted, a step started, a slot launched. The drain races the\n * set it saw when it last looked, and the launcher can wait a whole landing derivation for a slot's selection, so a run\n * admitted meanwhile would settle unseen: its reservation held, its settlement uncounted, its slot not refilled.\n */\n let wakeDrain: () => void = () => undefined;\n let drainWake = new Promise<void>((resolve) => { wakeDrain = resolve; });\n const raceSetGrew = (): void => {\n const wake = wakeDrain;\n drainWake = new Promise<void>((resolve) => { wakeDrain = resolve; });\n wake();\n };\n /*\n * Admissions take TURNS (#3883): a slot reads the stops and admits only once the slot before it has finished admitting.\n * Composing a brief, the slow part, stays side by side; admitting is short. So a refused admission, a usage limit met\n * or a stop is seen by every later slot before it starts anything, as when the wave prepared one slot at a time.\n */\n let admissionTurn: Promise<void> = Promise.resolve();\n const takeAdmissionTurn = async (): Promise<() => void> => {\n let release!: () => void;\n const previous = admissionTurn;\n admissionTurn = new Promise<void>((resolve) => { release = resolve; });\n await previous;\n return release;\n };\n /*\n * A task admitted after the held landing reading was taken joins that reading's in-flight guard (#3883 review M3): when\n * its run leaves the in-flight list, a few seconds before its settlement moves the landing, the reading is dropped\n * rather than offering the task the run just landed. Held for the whole wave, the reading would otherwise reach\n * every admission between two settlements, past the safety argument its guards were written for.\n */\n const guardHeldReadingAgainst = (taskRef: string): void => {\n fillLanding.current?.inFlightTaskRefs.add(taskRef);\n fillLanding.pending?.inFlightTaskRefs.add(taskRef);\n };\n /** Why a slot about to be admitted must start nothing (#3883 review F4): a stop that arrived while it prepared. */\n const stopBeforeAdmission = (): ApplicationBuildWaveStop | 'failed' | undefined => {\n // A sibling failed (review M2): nothing more starts, and the wave throws once what is live drains.\n if (preparationFailure !== undefined) return 'failed';\n if (this.buildWaveStopRequestedAt !== undefined) return ApplicationBuildWaveStop.STOP_REQUESTED;\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) return ApplicationBuildWaveStop.RESTART_PENDING;\n if (stoppedFillingBecause !== undefined && SLOT_ABANDONING_STOPS.has(stoppedFillingBecause)) return stoppedFillingBecause;\n return undefined;\n };\n\n /*\n * One slot (#3883): select, compose, admit. Runs beside the other slots; the launcher waits only for its SELECTION.\n * Every stop is read again just before admission, so a stop, a held restart, a refused admission or a refused start\n * that arrived while it prepared starts nothing. Its reservation is given back however it ends.\n */\n const runSlot = async (slot: number, selected: () => void): Promise<void> => {\n const settlementsAtLaunch = settlements;\n const preparation = this.openBuildPreparation();\n let reservedTaskRef: string | undefined;\n // Whether the slot handed its task on to a live run or step; one that did not gives it back to the other slots.\n let handedOn = false;\n // The end of this slot's admission turn, once it has one.\n let endAdmissionTurn: (() => void) | undefined;\n try {\n let prepared: PreparedBuildTask;\n try {\n prepared = await this.prepareNextBuildTask(undefined, preparation, {\n fillLanding,\n generationStepsInFlight: new Set(generationInFlight.keys()),\n generationStepsRunInWave: generationStepsRun,\n reservations,\n onSelected: (taskRef) => { reservedTaskRef = taskRef; selected(); },\n });\n } catch (error) {\n // Nothing ready NOW. While runs are live that is a pause, not an end: a settle may unlock more.\n if (error instanceof ApplicationBuildPlanExhaustedError || error instanceof ApplicationBuildTaskCompletedButUnlandedError) {\n // Only when nothing settled since this slot started (review M1): a settlement since may have unlocked a task.\n if (settlements === settlementsAtLaunch) nothingReady = true;\n return;\n }\n preparationFailure ??= { error };\n return;\n }\n preparation.select(prepared.plan.taskRef);\n preparation.enter(ApplicationBuildPreparationPhase.ADMITTING_THE_RUN);\n endAdmissionTurn = await takeAdmissionTurn();\n const abandonedFor = stopBeforeAdmission();\n if (abandonedFor !== undefined) {\n if (abandonedFor !== 'failed') stoppedFillingBecause ??= abandonedFor;\n return;\n }\n // On the run's row, so its dispatch wait — this slot's whole preparation — survives a restart (#3206).\n const preparedOrigin: ApplicationBuildDispatchOrigin = { preparationStartedAt: preparation.read().startedAt };\n if (prepared.kind === 'GENERATION_STEP') {\n // Never twice in one wave (#3885): the selection passes over a step in this set, so the slots keep filling. The\n // check below is the backstop the fill's termination rests on, if a selection ever offers one again.\n if (generationStepsRun.has(prepared.plan.taskRef)) {\n stoppedFillingBecause ??= ApplicationBuildWaveStop.GENERATION_STEP_REPEATED;\n return;\n }\n generationStepsRun.add(prepared.plan.taskRef);\n // The step writes the tree while the next slots are prepared: each reads the landing again.\n fillLanding.current = undefined;\n fillLanding.pending = undefined;\n const step = prepared;\n generationInFlight.set(step.plan.taskRef, this.executePreparedBuildTask(step, session, preparedOrigin)\n .then((result) => ({ prepared: step, result }), (error: unknown) => ({ prepared: step, error })));\n raceSetGrew();\n handedOn = true;\n guardHeldReadingAgainst(step.plan.taskRef);\n return;\n }\n /*\n * Before every CODING admission, including the refill after a run settles (#2388): a sibling that just met the\n * account's usage limit makes every coding turn started before its reset certain to fail the same way. On\n * app-creation-test-005 the refill went on regardless, and four tasks spent three or four attempts each in\n * five minutes. The live runs still drain; nothing new starts. Asked after the selection, which only reads,\n * so a generation step — run on the configured model providers, not on the coding agent's account — still\n * runs (#2388 review F8d).\n */\n const held = this.dispatch.readCodingAgentUsageLimitHold();\n if (held) {\n stoppedFillingBecause ??= ApplicationBuildWaveStop.CODING_AGENT_USAGE_LIMITED;\n usageLimit ??= held;\n return;\n }\n try {\n const result = await this.executePreparedBuildTask(prepared, session, preparedOrigin, mode);\n dispatched.push(result);\n const taskId = result.admission!.taskId;\n inFlight.set(taskId, this.awaitCodingRunOutcome(taskId, session).then((outcome) => ({ taskId, outcome })));\n raceSetGrew();\n handedOn = true;\n reservedTaskOfRun.set(taskId, prepared.plan.taskRef);\n guardHeldReadingAgainst(prepared.plan.taskRef);\n } catch (error) {\n // A refused admission is recorded and ends the filling; the live runs still drain.\n dispatched.push({ plan: prepared.plan, error: describeCaughtError(error) });\n // Refused because a check's command is absent (#3423): its own stop, so the selector stops asking for waves.\n stoppedFillingBecause ??= this.dispatch.readVerificationToolUnavailableHold()\n ? ApplicationBuildWaveStop.VERIFICATION_TOOL_UNAVAILABLE\n : ApplicationBuildWaveStop.DISPATCH_REFUSED;\n }\n } finally {\n /*\n * Given back when the slot handed nothing on (#3883 review F3), so its task is selectable again. A task handed on to a\n * run or a step stays reserved until it settles, released by the drain (review H1).\n */\n endAdmissionTurn?.();\n // A task handed on stays reserved until it settles (review H1); one the slot did not hand on is selectable again.\n if (reservedTaskRef !== undefined && !handedOn) {\n reservations.delete(reservedTaskRef);\n nothingReady = false;\n }\n // No longer a slot being prepared, BEFORE the launcher resumes: a run it handed on now counts as live instead, and\n // counted in both it would read the wave as full and stop launching.\n preparing.delete(slot);\n selected();\n await this.closeBuildPreparation(preparation, session);\n }\n };\n\n /*\n * The LAUNCHER (#3883): the stops, the start and the cap are asked here, one slot at a time, so a refused start is read\n * once per slot and repaired once (review F5); then a slot is launched, and the next waits only for its SELECTION.\n */\n const fill = async (): Promise<void> => {\n while (stoppedFillingBecause === undefined && preparationFailure === undefined && !nothingReady && occupied() < degree) {\n /*\n * `wildo build stop` (#3206): the wave ends at a task boundary — it starts nothing more, and drains what is live,\n * reconciles and repairs as at any other end. Asked before every slot, so a stop is honoured within one slot.\n */\n if (this.buildWaveStopRequestedAt !== undefined) {\n stoppedFillingBecause ??= ApplicationBuildWaveStop.STOP_REQUESTED;\n return;\n }\n // A restart the dev supervisor holds (#3204): start nothing more, so the live runs settle before it.\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {\n stoppedFillingBecause ??= ApplicationBuildWaveStop.RESTART_PENDING;\n return;\n }\n /*\n * And before every slot, whether the application still STARTS (#2405). On app-creation-test-005 one task broke\n * the backend's start and about 45 more landed on top over four hours, each verified by typechecks that could\n * not see it. The live runs drain; nothing new starts into an application that cannot run.\n */\n const notBooting = await this.readCurrentBootFailures();\n if (notBooting.length > 0) {\n bootFailures = notBooting;\n /*\n * While runs are live this PAUSES the filling rather than ending it (#2405 review F2): a sibling half-way\n * through writing a configuration can make one restart fail, and its own completion may repair it. The next\n * settle asks again. With nothing live there is nothing left to wait for, and the wave stops.\n *\n * But once a sibling HAS settled and the start is still refused, its completion did not repair it, and the\n * repair starts in a slot now rather than after the last live run drains (#3880).\n */\n if (inFlight.size > 0) {\n await repairStartBesideLiveRuns(notBooting);\n return;\n }\n stoppedFillingBecause ??= ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT;\n return;\n }\n bootFailures = undefined;\n bootFailureSeenAtSettlement = undefined;\n // Asked again: a slot may have stopped the filling while the start was read.\n if (stoppedFillingBecause !== undefined || preparationFailure !== undefined || nothingReady || occupied() >= degree) return;\n // After the start is known good (#3880): a capped wave that also cannot start stops for the start, which is repaired.\n if (dispatched.length + generationInFlight.size + preparing.size >= maximumDispatches) {\n stoppedFillingBecause ??= ApplicationBuildWaveStop.DISPATCH_CAP;\n return;\n }\n let markSelected!: () => void;\n const selection = new Promise<void>((resolve) => { markSelected = resolve; });\n const slot = slotsLaunched += 1;\n const running = runSlot(slot, () => markSelected());\n preparing.set(slot, running);\n slotsLaunchedInWave.push(running);\n raceSetGrew();\n await selection;\n }\n };\n\n const outcomes: Array<ApplicationCodingTaskSettledOutcome | null> = [];\n const settledTaskIds: string[] = [];\n /**\n * A settled generation step: recorded on the wave, and its refusals handled as they were when it ran inline. A step\n * whose panel refused stale expert charters is held and passed over (#3244: before that, the refusal ended the build\n * lane, reference run 42218788356 at 32 of 98 tasks), and the build-dispatch step runs the staffing step that repairs it; one refused at its specification gate\n * stops the filling like a refused admission (#3258); anything else is the wave's own failure, as before.\n */\n const concludeGenerationStep = (settled: { readonly prepared: PreparedBuildTask; readonly result?: ApplicationBuildDispatchResult; readonly error?: unknown }): void => {\n generationInFlight.delete(settled.prepared.plan.taskRef);\n reservations.delete(settled.prepared.plan.taskRef);\n settlements += 1;\n if (settled.error === undefined) {\n dispatched.push(settled.result!);\n return;\n }\n const staleSeats = readStaleExpertSeatsRefusal(settled.error);\n if (staleSeats !== undefined) {\n dispatched.push({ plan: settled.prepared.plan, error: staleSeats.message });\n this.holdForStaleExpertCharters(settled.prepared.plan.taskRef, staleSeats);\n return;\n }\n // Anything else is the wave's own failure (review M2): nothing more starts, and the wave throws once what is live drains.\n if (!(settled.error instanceof SpecificationWriteRefusedError)) {\n preparationFailure ??= { error: settled.error };\n return;\n }\n dispatched.push({ plan: settled.prepared.plan, error: describeCaughtError(settled.error) });\n stoppedFillingBecause ??= ApplicationBuildWaveStop.DISPATCH_REFUSED;\n };\n /*\n * The launcher runs beside the drain (#3883), so a settlement is taken while slots are still being prepared. Relaunched\n * after a run, a step or a slot settles, never after the launcher's own end: it ends when nothing can be launched until\n * something settles (full, nothing ready, a stop, a refused start paused beside live runs), so relaunching it there\n * would only poll the start in a loop.\n */\n let launcher: Promise<void> | undefined;\n const launch = (): void => {\n if (launcher !== undefined || stoppedFillingBecause !== undefined || preparationFailure !== undefined || nothingReady || occupied() >= degree) return;\n launcher = fill().finally(() => { launcher = undefined; });\n };\n launch();\n while (inFlight.size > 0 || generationInFlight.size > 0 || preparing.size > 0 || launcher !== undefined) {\n type Settled =\n | { readonly kind: 'coding'; readonly run: { readonly taskId: string; readonly outcome: ApplicationCodingTaskSettledOutcome | null } }\n | { readonly kind: 'generation'; readonly step: { readonly prepared: PreparedBuildTask; readonly result?: ApplicationBuildDispatchResult; readonly error?: unknown } }\n | { readonly kind: 'slot' }\n | { readonly kind: 'launcher' }\n | { readonly kind: 'grew' };\n const first: Settled = await Promise.race<Settled>([\n ...[...inFlight.values()].map((run) => run.then((settled): Settled => ({ kind: 'coding', run: settled }))),\n ...[...generationInFlight.values()].map((step) => step.then((settled): Settled => ({ kind: 'generation', step: settled }))),\n ...[...preparing.values()].map((slot) => slot.then((): Settled => ({ kind: 'slot' }))),\n ...(launcher !== undefined ? [launcher.then((): Settled => ({ kind: 'launcher' }))] : []),\n drainWake.then((): Settled => ({ kind: 'grew' })),\n ]);\n // The set grew, or the launcher ended: look again at what is live, without relaunching (see `launch`).\n if (first.kind === 'launcher' || first.kind === 'grew') continue;\n if (first.kind === 'slot') {\n launch();\n continue;\n }\n // A settled run or step may have landed what a ready task waits on, so a slot may find work again.\n nothingReady = false;\n if (first.kind === 'generation') {\n concludeGenerationStep(first.step);\n } else {\n inFlight.delete(first.run.taskId);\n for (const run of [first.run, ...await takeAlreadySettled(inFlight)]) {\n inFlight.delete(run.taskId);\n // Its task is in no in-flight list now (#3883 review H1): the reservation that stood for it is released.\n const reservedTask = reservedTaskOfRun.get(run.taskId);\n if (reservedTask !== undefined) reservations.delete(reservedTask);\n reservedTaskOfRun.delete(run.taskId);\n settlements += 1;\n // The startup repair is reported as a repair, never as one of the wave's runs (#3880 review F9).\n if (run.taskId === startupRepairInWave?.taskId) continue;\n outcomes.push(run.outcome);\n settledTaskIds.push(run.taskId);\n }\n }\n for (const step of await takeAlreadySettled(generationInFlight)) concludeGenerationStep(step);\n // A fill that has stopped (the cap, a refused admission) no longer reads the start: read it here (#3880 review F2).\n if (stoppedFillingBecause !== undefined && stoppedFillingBecause !== ApplicationBuildWaveStop.STOP_REQUESTED\n && stoppedFillingBecause !== ApplicationBuildWaveStop.RESTART_PENDING && inFlight.size > 0) {\n const notBooting = await this.readCurrentBootFailures();\n if (notBooting.length > 0) {\n bootFailures = notBooting;\n await repairStartBesideLiveRuns(notBooting);\n }\n }\n launch();\n }\n // Every slot has closed its preparation, so the wave's record of them is complete when it returns.\n await Promise.all(slotsLaunchedInWave);\n // A slot failed for a reason other than \"nothing ready\" (#3883 review F6): what was live has drained, and the wave throws.\n if (preparationFailure !== undefined) throw preparationFailure.error;\n /*\n * The start, asked again now that nothing writes (#3880). A start still refused outranks how the filling stopped (a\n * cap, nothing ready, a refused admission), so it is repaired below; only a person's stop or a held restart keeps its\n * own reason. Until this, a capped wave over a refused start ended \"at the cap\" and repaired nothing.\n */\n const bootFailuresAtEnd = await this.readCurrentBootFailures();\n bootFailures = bootFailuresAtEnd.length > 0 ? bootFailuresAtEnd : undefined;\n if (bootFailures !== undefined && stoppedFillingBecause !== ApplicationBuildWaveStop.STOP_REQUESTED && stoppedFillingBecause !== ApplicationBuildWaveStop.RESTART_PENDING) {\n stoppedFillingBecause = ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT;\n }\n stoppedFillingBecause ??= ApplicationBuildWaveStop.NOTHING_READY;\n\n /*\n * The wave's END, now that nothing is writing (#3204): the runs that failed verification beside their siblings are\n * re-checked alone, and the tree is committed as a forced BUILD CHECKPOINT naming every run no checkpoint named yet\n * (failed runs included: their files are in the tree). In both modes (review of 4a1b1f1bf F7): a single-flight run's\n * own settlement checkpoint may have been folded into a timer, and the wave's end is where it is guaranteed.\n */\n // A run re-checked alone against an application that cannot start fails for the start, not for itself (#3880): its\n // re-checks wait for the startup repair below, and run after it.\n const reconciliation = settledTaskIds.length > 0\n ? await this.dispatch.reconcileWaveAcceptance({ startedAt, taskIds: settledTaskIds, ...(bootFailures !== undefined ? { deferRechecksBecause: 'the application does not start' } : {}) })\n : [];\n /*\n * And the repair reconciliation cannot make (#2210): a run that COMPLETED but whose product a sibling\n * overwrote. Its file is now committed, holding the siblings' work and not its own, so no commit can\n * bring it back; only running the task again can. Asked after the reconciliation, so landing reads the\n * tree every run's work has reached.\n */\n /*\n * Interference repairs are coding runs, so none starts into an application that cannot start (#3880 review F4). With a\n * good start they run here, before the plan-exhausted assembly reads the tree; with a refused one, once below, after\n * the startup repair has had its chance.\n */\n const interferenceRepairs = mode === CodingRunConcurrency.CONCURRENT && bootFailures === undefined\n ? await this.repairInterferedTasks(outcomes, session)\n : [];\n /*\n * #2222: a wave that ran out of ready work may have FINISHED the plan. Asked after the reconciliation and the\n * repairs, so it reads the tree every run's work reached — and only on NOTHING_READY, the one stop that can mean\n * \"done\" (a cap, a refusal or a repeated step leaves work behind; so may a step this wave ran, which the\n * plan-exhausted read still selects, so it gives no verdict).\n */\n const { assembly: assessedAssembly, repairs: assemblyRepairsOfPlan } = stoppedFillingBecause === ApplicationBuildWaveStop.NOTHING_READY\n ? await this.assemblyIfPlanExhausted(session)\n : { assembly: undefined, repairs: [] };\n /*\n * A start the application's own code REFUSED (#3204) is repaired like a failing assembly check, as\n * `check:backend-ready`: nothing else can run until the application starts, so waiting for a person is the only other\n * answer, and an unattended creation has none. Bounded per round like every assembly repair; the next wave asks the\n * backend again. A dev-stack cause (a held port, an unreachable service) is never repaired here: no code fixes it.\n */\n const startupRepairs: Array<NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>[number]> = stoppedFillingBecause === ApplicationBuildWaveStop.APPLICATION_DOES_NOT_BOOT && bootFailures !== undefined\n ? [...(startupRepairInWave === undefined ? await this.repairRefusedStartup(bootFailures, session) : [])]\n : [];\n // The repair started beside the live runs (#3880), reported like one run at the end.\n if (startupRepairInWave !== undefined) {\n startupRepairs.unshift({ checkRef: startupRepairInWave.checkRef, taskRef: startupRepairInWave.taskRef, outcome: await this.awaitCodingRunOutcome(startupRepairInWave.taskId, session) });\n }\n if (bootFailures !== undefined) {\n const startBack = (await this.readCurrentBootFailures()).length === 0;\n // The re-checks deferred above, now that the application starts again (#3880).\n if (startBack && settledTaskIds.length > 0) reconciliation.push(...await this.dispatch.reconcileWaveAcceptance({ startedAt, taskIds: settledTaskIds }));\n /*\n * The interference repairs deferred above, whatever the start now reads (#3880 review R3). This repair is the only\n * thing that re-arms a task whose product a sibling overwrote; skipped, the task reads `completed_unlanded` and waits\n * for a person. So a start still refused re-arms without re-running, and the next wave runs those tasks once the\n * start is repaired.\n */\n if (mode === CodingRunConcurrency.CONCURRENT) interferenceRepairs.push(...await this.repairInterferedTasks(outcomes, session, { startRefused: !startBack }));\n }\n const assemblyRepairs = [...startupRepairs, ...assemblyRepairsOfPlan];\n // Whichever way the verdict was reached: a repair's verdict is about the checks, and the plan is still not finished (#3258).\n const specificationFault = assessedAssembly === undefined ? undefined : (await this.resolveBuildExecutionProgress())?.specificationFault;\n const assembly = assessedAssembly === undefined || specificationFault === undefined ? assessedAssembly : { ...assessedAssembly, specificationFault };\n /*\n * A hold that began after the filling stopped — a draining run, an interference re-run or an assembly repair\n * meeting the limit — is reported too, so the lane resumes the build after the reset whatever stopped it.\n */\n usageLimit ??= this.dispatch.readCodingAgentUsageLimitHold();\n // Read at the end like the usage limit: a hold a draining run or a repair met holds the next wave too (#3423).\n const verificationToolUnavailable = this.dispatch.readVerificationToolUnavailableHold();\n const landedThisWave = outcomes.filter((outcome) => outcome?.succeeded === true && outcome.taskRef !== null).map((outcome) => outcome!.taskRef!);\n return {\n degree, mode, dispatched, outcomes, reconciliation, interferenceRepairs, stoppedFillingBecause,\n // Read at the END (#3206 review R1): a stop asked while the wave drained after a limit, a cap or a refused boot holds too.\n ...(this.buildStopHeldSince !== undefined ? { heldByStopSince: this.buildStopHeldSince } : {}),\n // Candidates only for a startup a task's code refused: no task is a candidate for a held port or a dead watcher (#3214).\n ...(bootFailures ? { bootFailures: bootFailures.map((failure) => ({ ...failure, landedThisWave: isApplicationStartupFailure(failure) ? landedThisWave : [] })) } : {}),\n ...(usageLimit ? { usageLimit } : {}),\n ...(verificationToolUnavailable ? { verificationToolUnavailable } : {}),\n ...(this.staleExpertChartersHeld.size > 0 ? { staleExpertCharters: [...this.staleExpertChartersHeld.values()] } : {}),\n ...(assembly ? { assembly } : {}),\n ...(assemblyRepairs.length > 0 ? { assemblyRepairs } : {}),\n };\n }\n\n /**\n * Why the build lane holds dispatch right now (#3215): the very read the wave makes before every slot, exposed so the\n * creation feed names the boot error while nothing is dispatched, instead of a wave that pauses in silence.\n */\n public async readBuildDispatchHold(): Promise<readonly ApplicationBootFailure[]> {\n return this.readCurrentBootFailures();\n }\n\n /**\n * Whether the build lane still owes a repair of a start the application's own code refused (#3204): the feed carries\n * it beside the hold, so an unattended drive lets the lane run the repair instead of stopping on the hold. False once\n * the round's repairs of `check:backend-ready` are spent, or when the run history cannot be read (nothing is promised).\n */\n public async isStartupRepairOwed(failures: readonly ApplicationBootFailure[]): Promise<boolean> {\n const failure = describeRefusedStartupAsCheckFailure(failures);\n if (failure === undefined) return false;\n try {\n return selectAssemblyRepair([failure], assemblyRepairAttemptsThisRound(await this.listBuildDispatchRuns())).repair !== undefined;\n } catch {\n return false;\n }\n }\n\n /**\n * Dispatch the repair of a refused start (#3204), through the assembly repair's own preparation, bound and brief: the\n * refusal is what the check printed. Reference run 42696531261 ended held on `Milestone 'CUSTOMERS_IMPORTED': trigger\n * operation 'import_customers' not found` and two lifecycle verbs with no `requestDto`, each a build task's code, with\n * the remedy \"wildo build run <taskRef>\" addressed to a person nobody had told which task.\n */\n /**\n * The repair of a start the application's own code refused, prepared as an assembly repair of `check:backend-ready`, or\n * `undefined` when none is owed or allowed (no code fixes the failure, the round's repairs are spent, a usage-limit hold,\n * a person's stop). Shared by the repair at the wave's end and the one started beside live runs (#3880).\n */\n private async prepareStartupRepair(failures: readonly ApplicationBootFailure[]): Promise<{ readonly prepared: PreparedBuildTask; readonly checkRef: string } | undefined> {\n const failure = describeRefusedStartupAsCheckFailure(failures);\n if (failure === undefined || this.dispatch.readCodingAgentUsageLimitHold() || this.buildStopHeldSince !== undefined) return undefined;\n try {\n const { prepared } = await this.prepareAssemblyRepair(\n { checkRefs: [failure.checkRef], failed: [{ ...failure, detail: failure.detail ?? failure.output }] },\n { landedTaskRefs: [] } as unknown as ApplicationBuildPlanExhaustedError,\n );\n return prepared === undefined ? undefined : { prepared, checkRef: failure.checkRef };\n } catch (error) {\n this.logger.warn('Could not prepare the repair of the application\\'s refused start', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n private async repairRefusedStartup(\n failures: readonly ApplicationBootFailure[],\n session?: CompanionExecutionSessionContext,\n ): Promise<NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>> {\n const repair = await this.prepareStartupRepair(failures);\n if (repair === undefined) return [];\n const { prepared } = repair;\n const origin: ApplicationBuildDispatchOrigin = { preparationStartedAt: new Date().toISOString() };\n try {\n const dispatched = await this.executePreparedBuildTask(prepared, session, origin);\n const outcome = dispatched.admission ? await this.awaitCodingRunOutcome(dispatched.admission.taskId, session) : null;\n return [{ checkRef: repair.checkRef, taskRef: prepared.plan.taskRef, outcome }];\n } catch (error) {\n this.logger.warn('The repair of the application\\'s refused start could not be run', { error: describeCaughtError(error) });\n return [];\n }\n }\n\n /**\n * The application backends whose last start failed and still describe the tree (#2405), read from the backends' own\n * start records. Empty when there is none, or when no local dev loop runs (nothing to ask): only an observed failure\n * stops a wave, never an absence of evidence. The newest commit is what `readApplicationBootFailures` weighs a failure\n * against, so a restart still pending on a fresh commit is not mistaken for a failure of that commit.\n */\n private async readCurrentBootFailures(): Promise<readonly ApplicationBootFailure[]> {\n try {\n const newestCommitUnixTime = await this.git.lastCommitUnixTime('.');\n return await readApplicationBootFailures(this.companionContext.saasRoot, {\n newestCommitAtMs: newestCommitUnixTime === undefined ? undefined : newestCommitUnixTime * 1000,\n }) ?? [];\n } catch (error) {\n this.logDebug('Could not read the backend start records; the wave does not gate on them', { error: describeCaughtError(error) });\n return [];\n }\n }\n\n /**\n * The assembly verdict when no task is ready because every one landed; absent when work remains or is stuck.\n *\n * When the finished plan does not assemble, the wave REPAIRS it here (#2283): it asks the next-task door, which\n * answers with a repair of the first failing check while one is owed, runs that repair ALONE, waits for it, and\n * asks again, until the door answers with a verdict. The door's per-check bounds end the loop; the ceiling below\n * only guards against a repair that never counts, one the host keeps refusing before it starts.\n */\n private async assemblyIfPlanExhausted(session?: CompanionExecutionSessionContext): Promise<{\n readonly assembly?: ApplicationAssemblyVerdict;\n readonly repairs: NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>;\n }> {\n const repairs: Array<NonNullable<ApplicationBuildWaveResult['assemblyRepairs']>[number]> = [];\n const ceiling = MAXIMUM_ASSEMBLY_REPAIRS_PER_CHECK * resolveApplicationAssemblyCheckRefs(this.companionContext.saasRoot).length;\n for (;;) {\n // A repair is a coding turn too: none starts into the account's usage limit, and the resumed wave asks again (#2388).\n if (this.dispatch.readCodingAgentUsageLimitHold()) return { repairs };\n let prepared: PreparedBuildTask;\n // Where the repair's dispatch wait begins (#3206): the read of the plan and the assembly checks are its preparation.\n const repairOrigin: ApplicationBuildDispatchOrigin = { preparationStartedAt: new Date().toISOString() };\n try {\n prepared = await this.prepareNextBuildTaskOrQualifyExhaustion();\n } catch (error) {\n return { ...(error instanceof ApplicationBuildPlanExhaustedError && error.assembly ? { assembly: error.assembly } : {}), repairs };\n }\n // A ready task means the plan is not finished after all, so there is no verdict to give.\n if (!isAssemblyRepairTaskRef(prepared.plan.taskRef)) return { repairs };\n // Nor after a person stopped the build (#3206): the verdict is still given, the repair waits for `wildo build run`.\n if (this.buildStopHeldSince !== undefined) return { assembly: this.toAssemblyVerdict(await this.assessAssembly(), []), repairs };\n // Past the ceiling the repair is not run, and the wave still says whether the application assembles (#2283 review F2).\n if (repairs.length >= ceiling) return { assembly: this.toAssemblyVerdict(await this.assessAssembly(), []), repairs };\n const checkRef = prepared.kind === 'CODING' ? readGivenAssemblyFailure(prepared.contract)?.checkRef ?? prepared.plan.taskRef : prepared.plan.taskRef;\n try {\n const dispatched = await this.executePreparedBuildTask(prepared, session, repairOrigin);\n const outcome = dispatched.admission ? await this.awaitCodingRunOutcome(dispatched.admission.taskId, session) : null;\n repairs.push({ checkRef, taskRef: prepared.plan.taskRef, outcome });\n } catch (error) {\n // The repair could not run (a held worktree, a refused admission); the plan is still finished, so the wave still answers.\n this.logger.warn('An assembly repair could not be run at the end of the wave', { checkRef, error: describeCaughtError(error) });\n return { assembly: this.toAssemblyVerdict(await this.assessAssembly(), []), repairs };\n }\n }\n }\n\n /**\n * DETECT and REPAIR a product a sibling overwrote (#2210) — the half of the parallel wave's\n * detect-and-repair decision (Paul, 2026-09-24, recorded in `concurrent-coding-runs.models.ts`) that only\n * covered FAILED runs until then. A run that succeeded and then lost its write was reported\n * `completed_unlanded` (\"fix what it declares, or the work\") and waited for a person, although nothing in\n * the task was wrong. Measured on `app-creation-test-004` (2026-10-01, degree 5): two of five chapters were\n * lost from one chapters index, and both landed only when a person re-ran each task alone.\n *\n * A completed run counts as interfered when, all three:\n * - its task has not landed, and its declared product is missing from the WORKING tree (present there, something\n * other than the product holds it back, which re-running would not fix);\n * - another run of the wave overlapped it in time (`describeCodingRunOverlap`, computed now that every\n * window is closed);\n * - one of the files read by the task's UNMET probes (the missing product's files, never a satisfied\n * product's) was changed by that overlapping run too.\n * Suspected, never proven, like `interferenceSuspected` on a failed run: the wave sees that a sibling wrote\n * the product's file during the run, not which line it replaced.\n *\n * The repair re-arms the task with `INTERFERED_BY_CONCURRENT_RUN` and runs it again SINGLE-FLIGHT, at once:\n * the concurrent runs have all settled, so the re-run edits the file as it now stands and nothing can\n * overwrite it. It is not prevention — the wave still runs every task concurrently, as decided — it is the\n * repair, made where the evidence is. Bounded by {@link MAXIMUM_INTERFERENCE_REARMS} per task. Sequential,\n * because the re-runs are single-flight.\n */\n private async repairInterferedTasks(\n outcomes: readonly (ApplicationCodingTaskSettledOutcome | null)[],\n session?: CompanionExecutionSessionContext,\n /** The application's start is refused: an interfered task is re-armed and recorded, and not re-run (#3880 review R3). */\n options: { readonly startRefused?: boolean } = {},\n ): Promise<ApplicationBuildInterferenceRepair[]> {\n const completed = outcomes.filter((outcome): outcome is ApplicationCodingTaskSettledOutcome & { taskRef: string } => outcome?.succeeded === true && outcome.taskRef !== null);\n if (completed.length === 0) return [];\n /*\n * Best-effort, like every repair here: the wave's runs are settled and reconciled already, and a detection\n * that cannot read the plan must not turn that result into a thrown wave. Logged, so a silent miss is not\n * the outcome; the task then reads `completed_unlanded`, as it did before #2210.\n */\n let graph: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n graph = await this.readBuildPlan();\n } catch (error) {\n this.logger.warn('Could not look for completed runs a sibling interfered with at the end of the wave', { error: describeCaughtError(error) });\n return [];\n }\n const repairs: ApplicationBuildInterferenceRepair[] = [];\n for (const run of completed) {\n try {\n /*\n * Landing and the working tree are read again for EACH run: a previous run's single-flight re-run has\n * rewritten the shared file since, and a reading taken before it would judge this run on stale text.\n */\n const landed = (await this.resolveLandedTaskRefs(graph.tasks)).landed;\n const repair = await this.repairIfInterfered(run, graph, landed, this.createWorktreeReader(), session, options);\n if (repair) repairs.push(repair);\n } catch (error) {\n this.logger.warn('Could not repair a completed run a sibling may have interfered with', { taskRef: run.taskRef, runTaskId: run.taskId, error: describeCaughtError(error) });\n }\n }\n return repairs;\n }\n\n /** One run of {@link repairInterferedTasks}: `undefined` when it was not interfered with. */\n private async repairIfInterfered(\n run: ApplicationCodingTaskSettledOutcome & { taskRef: string },\n graph: Awaited<ReturnType<typeof this.readBuildPlan>>,\n landed: ReadonlySet<string>,\n worktree: CommittedTreeReader,\n session?: CompanionExecutionSessionContext,\n options: { readonly startRefused?: boolean } = {},\n ): Promise<ApplicationBuildInterferenceRepair | undefined> {\n if (landed.has(run.taskRef)) return undefined;\n const task = graph.tasks.find((candidate) => candidate.taskRef === run.taskRef);\n if (!task) return undefined;\n const probes = resolveBuildTaskLandedProbes(task).filter((probe) => !isIntrospectedProbe(probe));\n if (probes.length === 0) return undefined;\n const presentInWorktree = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, worktree)));\n if (presentInWorktree.every(Boolean)) return undefined;\n const overlap = this.dispatch.describeCodingRunOverlap(run.taskId);\n if (!overlap) return undefined;\n // Only the MISSING product's files: a satisfied probe on a file a sibling also touched says nothing about why\n // another probe of the task is unmet, and counting it would blame a sibling for the task's own omission.\n const productPaths = new Set(probes.filter((_, index) => !presentInWorktree[index]).flatMap(landedProbePaths));\n const contendedProductPaths = overlap.contendedPaths.filter((path) => productPaths.has(path));\n if (contendedProductPaths.length === 0) return undefined;\n\n const previousRequeues = (await this.dispatch.listCompletedRunsForBuildTask(run.taskRef, session))\n .filter((candidate) => candidate.taskId !== run.taskId && candidate.interference?.requeued === true).length;\n const detected = { overlappingTaskRefs: overlap.overlappingTaskRefs, contendedProductPaths, detectedAt: new Date().toISOString() };\n if (previousRequeues >= MAXIMUM_INTERFERENCE_REARMS) {\n const interference: BuildTaskInterference = { ...detected, requeued: false };\n await this.dispatch.recordBuildTaskInterference(run.taskRef, run.taskId, interference, session);\n this.logger.warn('A completed run lost its product to a concurrent sibling again, and the interference re-runs are spent; the task waits for a person', {\n taskRef: run.taskRef, runTaskId: run.taskId, previousRequeues, ...interference,\n });\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference };\n }\n /*\n * Re-armed FIRST, recorded after, so `requeued` states what happened: a re-arm that throws leaves a record\n * saying the task was NOT requeued, which neither spends the bound nor tells `why` the wave re-ran it.\n */\n let requeued = true;\n let rearmError: string | undefined;\n try {\n await this.dispatch.rearmBuildTask(run.taskRef, {\n reason: BuildTaskRearmReason.INTERFERED_BY_CONCURRENT_RUN,\n note: `Concurrent run(s) ${detected.overlappingTaskRefs.join(', ')} changed ${contendedProductPaths.join(', ')} during this run, and the product this task declares is missing from it (suspected interference); the build wave re-runs it alone.`,\n }, session);\n } catch (error) {\n requeued = false;\n rearmError = describeCaughtError(error);\n }\n const interference: BuildTaskInterference = { ...detected, requeued };\n await this.dispatch.recordBuildTaskInterference(run.taskRef, run.taskId, interference, session);\n if (!requeued) {\n this.logger.warn('A completed run lost its product to a concurrent sibling, and its task could not be re-armed; it waits for a person', {\n taskRef: run.taskRef, runTaskId: run.taskId, error: rearmError, ...interference,\n });\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: rearmError } };\n }\n this.logger.warn('A completed run lost its product to a concurrent sibling; re-running its task alone', {\n taskRef: run.taskRef, runTaskId: run.taskId, ...interference,\n });\n /*\n * Not into an application that cannot start (#3880 review R3): the re-run's checks would fail for the start, not for\n * its work, and spend a re-arm. The task is re-armed already, so the next wave runs it once the start is repaired.\n */\n if (options.startRefused === true) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: 'not re-run: the application does not start; the next wave runs it once the start is repaired' } };\n }\n /*\n * Not into the account's usage limit (#2388): the re-run would fail like every other turn before the reset.\n * The task is re-armed already, so the wave that resumes after the reset offers it.\n */\n const held = this.dispatch.readCodingAgentUsageLimitHold();\n if (held) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: `not re-run: the coding agent's usage limit holds the build until ${held.resumesAt}; the next wave runs it` } };\n }\n /*\n * Nor after a person stopped the build (#3206 review F4): a re-run is a new task start, and a stop starts nothing\n * more. The interference is recorded and the task re-armed, so the next `wildo build run` offers it.\n */\n if (this.buildStopHeldSince !== undefined) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: 'not re-run: a person stopped the build; the next `wildo build run` runs it' } };\n }\n /*\n * Nor while the dev supervisor holds a restart (#3204 review F5): the wave stopped filling so its runs could settle\n * before it, and a re-run here would hold the restart for a whole coding run more. The task is re-armed already, so\n * the next wave, in the restarted companion, offers it.\n */\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun: { error: 'not re-run: the dev supervisor is holding a restart; the next wave runs it' } };\n }\n let rerun: NonNullable<ApplicationBuildInterferenceRepair['rerun']>;\n try {\n const dispatched = await this.dispatchBuildTask(run.taskRef, session);\n const rerunTaskId = dispatched.admission?.taskId;\n rerun = { dispatch: dispatched, outcome: rerunTaskId ? await this.awaitCodingRunOutcome(rerunTaskId, session) : null };\n } catch (error) {\n rerun = { error: describeCaughtError(error) };\n }\n return { taskRef: run.taskRef, runTaskId: run.taskId, interference, rerun };\n }\n\n /**\n * Wait for one admitted coding run to SETTLE, then report what it actually did.\n *\n * `dispatchNextBuildTask` resolves at ADMISSION for a coding target — the lock is held, the durable\n * row exists, and the agent has not written a line yet. That is the right contract for a caller\n * that wants to watch (the detached record says `ADMITTED` and hands over the task id), and the\n * wrong one for a caller that REPORTS AN OUTCOME: the first playbook run through this tier recorded\n * `ok: true` at a `finishedAt` equal to the coding run's `startedAt`, so a green run described work\n * that was still executing and no evaluation could ever see a result.\n *\n * Two steps because they fail differently. The settlement is in-process and is `null` for a row this\n * process did not admit — a restart, or a previous generation — in which case there is nothing to\n * wait for and the durable row already holds whatever is knowable. The read is durable and answers\n * `null` only when the row cannot be classified at all, which a caller must report as \"unknown\",\n * never as a failed run.\n */\n public async awaitCodingRunOutcome(\n taskId: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<ApplicationCodingTaskSettledOutcome | null> {\n const settlement = this.dispatch.awaitApplicationCodingTaskSettlement(taskId);\n if (settlement) await settlement;\n return this.dispatch.readApplicationCodingTaskOutcome(taskId, session);\n }\n\n /**\n * The task the dispatcher would select has ALREADY been run to a working result and is still\n * not landed — so selecting it again is a loop, not progress.\n *\n * Refused rather than re-dispatched because each iteration spawns a coding agent and costs real\n * money: measured 2026-09-10 on Wonder CRM at roughly $7.50 a turn, three turns, same task\n * (#606). Every run SUCCEEDED; what fails is the plan's ability to say the work landed.\n *\n * The remedy is never \"run it again\" — it is to fix what the task declares it PRODUCES, or to\n * fix the work so the declared product exists. Naming both in the message keeps an operator out\n * of the coding host, which is the wrong place to look: the run is not the defect.\n */\n private buildUnlandableTaskError(stuck: readonly ApplicationBuildStuckTask[], queue: ApplicationBuildStuckQueue): Error {\n const entry = stuck[0]!;\n const stuckCount = stuck.length;\n const { taskRef, priorTaskId, completedAt } = entry;\n const when = completedAt === undefined ? '' : ` at ${completedAt}`;\n const others = stuckCount > 1 ? ` ${stuckCount - 1} other ready task(s) are stuck the same way.` : '';\n /*\n * Four ways to be stuck, four DIFFERENT remedies — so they must not share prose. A message that\n * sent an operator to fix a `produces` declaration while a live question sat unanswered, or while\n * the real fault was a document the catalog does not define, is a message that costs a session.\n */\n if (entry.reason === Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" is PARKED on an unanswered question (task ${priorTaskId}), so dispatching it `\n + 'again would abandon that run\\'s persisted session and lose the question with it. The question is: '\n + `${entry.question ?? '(not recorded on the durable row)'} — answer it through the coding-agent resume `\n + 'door, or retire the task from the plan if it cannot be built as declared. Do not re-dispatch.'\n + `${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.NO_DOCUMENT_BLUEPRINT) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" declares it produces the governed document \"${entry.documentRef}\", which the engine `\n + 'catalog does not define — so there is no blueprint saying what it must contain, and a run could only '\n + 'INVENT its structure, which the authoring skill forbids. No agent can complete it. Declare a document '\n + `the catalog defines (a candidate carries \\`document:<namespace>.<id>\\`), or retire the task.`\n + (entry.priorTaskId === ''\n ? ''\n : ` NOTE: a run for it is PARKED on a question (task ${entry.priorTaskId}); retiring the task abandons `\n + `that session. The question is: ${entry.question ?? '(not recorded)'}`)\n + others,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.refusedSpecifications !== undefined) {\n const refusals = entry.refusedSpecifications.map((refusal) => `${refusal.kind}${refusal.key ? ` ${refusal.key}` : ''}: ${refusal.message}`\n + (refusal.authoredFrame ? ` (at ${refusal.authoredFrame})` : '')).join('; ');\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" wrote a specification its factory refuses, and ${MAXIMUM_REFUSED_SPECIFICATION_RUNS} runs of it (the latest task `\n + `${priorTaskId}${when}) did not make it accepted, each told the refusal: ${refusals}. It is not offered again on its own; the tasks `\n + `that depend on it wait, the rest of the plan proceeds. Fix the definition (the message names the field and the remedy), `\n + `then put it back with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.FAILURE_OUTSIDE_APPLICATION) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" failed (latest: run ${priorTaskId}${when}) on a cause the FRAMEWORK owns, not this application: `\n + `${entry.repeatedFailure?.failure || '(not recorded on the run row)'} No change in the application can fix it, so it is not `\n + 'offered again on its own; the rest of the plan proceeds. Fix it in the framework (the engine package or platform '\n + `service the failure names), then run it by name, \\`wildo build run ${taskRef}\\`, or put it back with `\n + `\\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.REPEATED_IDENTICAL_FAILURE) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" failed the same way ${entry.repeatedFailure?.consecutive ?? GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER} times in a row `\n + `(latest: run ${priorTaskId}${when}) and nothing it reads has changed since, so it is not offered again on its own; the rest of the `\n + `plan proceeds. Its failure: ${entry.repeatedFailure?.failure || '(not recorded on the run row)'} `\n + (entry.repeatedFailure?.owner === GenerationStepFailureOwner.APPLICATION ? 'The step attributes the cause to this application. ' : '')\n + 'Fix that cause. When it lies outside the application (an engine package\\'s examples or labels, a platform service), fix it '\n + `there: no change in the application would release the step. Then run it by name, \\`wildo build run ${taskRef}\\`, or put it back `\n + `with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`; a change to anything it reads releases it too.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.generationStep === true) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" already ran${when} (run ${priorTaskId}) and has not landed, and nothing it reads has changed since, `\n + 'so running it again would end the same way and it is not offered again. '\n + 'Read why its landing is unmet (`wildo build tasks --json` shows the step\\'s record) and fix that cause. '\n + `To run it again anyway, name it: wildo build run ${taskRef}.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.LANDING_UNKNOWN) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `${entry.landingUnknownCause ?? `Build step \"${taskRef}\" was not run: whether it has already landed could not be checked.`} `\n + 'Running it now would either fail the same way or redo work that may already have landed, so it is not dispatched; '\n + `it is offered again as soon as the check answers.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" is a follow-up the build derived from a reported gap, and under the ${this.autonomyPosture} posture a follow-up `\n + `waits for your review before it runs. \\`wildo build tasks\\` lists the reports it covers; let it run with `\n + `\\`wildo build approve ${taskRef} --covers <those refs>\\`, or decline it with `\n + `\\`wildo build close ${taskRef} --declined --reason \"<why>\" --covers <those refs>\\` (\\`wildo creation why ${taskRef}\\` shows what was reported).${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.CONTENDED) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" waits for a live run of another task that writes one of its product files: running both at once `\n + `in one worktree would make one overwrite the other. Nothing to do: it is offered once that run settles.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" failed its checks while other runs of this wave were writing beside it, so the failure may be theirs. `\n + `Running it again now would meet the same tree; the wave's end runs its checks alone, and a pass lands it. Nothing to do.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.RAN_THIS_WAVE) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build step \"${taskRef}\" already ran in this wave and has not landed, so the wave does not run it again on the tree it just met. `\n + `Its run is on the wave's result; the next wave offers it again. Nothing to do.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.IN_FLIGHT) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" is being built right now (a live coding run, or the companion running its generation step), so it is not offered again until `\n + `that run settles. Nothing to do: the next dispatch after it settles picks up wherever the build then stands.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n if (entry.reason === Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED) {\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" has failed ${MAXIMUM_ATTRIBUTABLE_FAILED_ATTEMPTS} times (latest: task ${priorTaskId}${when}), `\n + 'each a failure of its own making, so it is not offered again as the same dispatch. Read the latest run\\'s '\n + 'failure (its verification output and closing report are on that task row), fix the cause, then put it back '\n + `with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n return new ApplicationBuildTaskCompletedButUnlandedError(\n `Build task \"${taskRef}\" already completed${when} (task ${priorTaskId}) and is STILL not landed, so `\n + 'dispatching it again would re-run work that succeeded. Its landed probes are derived from what '\n + 'the task declares it `produces`, and they are unmet in the working tree: either '\n + 'that declaration is empty or wrong, or the run did not produce it. Fix the declaration or the work — do not re-dispatch. '\n + `Once the cause is fixed, put the task back with \\`wildo build rearm ${taskRef} --reason <why> --note <what was fixed>\\`.${others}`,\n taskRef,\n priorTaskId,\n stuck,\n queue,\n );\n }\n\n /**\n * Why a ready GENERATION STEP that already ran is held, or `null` when it may run (#3233 R5).\n *\n * A step whose latest run COMPLETED and that still has not landed would fail the same way if run again on the same\n * inputs: on `app-creation-test-007` the labels step's accept refused one of its own files, the step stayed unlanded, and\n * every wave re-ran it — a ~16-minute model-call run, without end. So it is held while nothing it could read has moved:\n * no commit since that run touched a path outside the step's own write scope, and no such path is dirty in the working\n * tree. Any such change (another task landing, a person editing) may have changed its inputs, and it is offered again.\n *\n * Held as `completed_unlanded`: since #3204 its landing reads the working tree, so what it wrote counts whether or not a\n * checkpoint has committed it yet, and a commit would not change the answer. A NAMED dispatch (`wildo build run <taskRef>`) is never held by this: the operator running\n * it again is the door, and this hold only keeps the unattended loop from repeating it.\n *\n * **A step whose latest runs FAILED the same way is held too (#3709)**, by the choreography lane's rule (596611bf2): the\n * last {@link GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER} runs failed with one failure\n * ({@link generationStepFailureFingerprint}) and nothing outside its write scope moved since the latest. Until then only a\n * COMPLETED run held it, so a step failing every time was offered every wave: on reference run 42886943490\n * `build-task-documentation-publication` failed 21 times in a row on engine-owned OpenAPI examples no run could fix, and\n * `build-task-gen-i18n-labels` ran 32 times, for an hour as the only ready task. Held as `repeated_identical_failure`, with\n * the latest failure and how many times it repeated, so the board, `wildo build tasks` and the dispatch refusal name it.\n * The same doors release it: an input moving, a named dispatch, a re-arm recorded on its runs.\n *\n * Anything this cannot read (the run history, git) answers `null`: the step is offered as before rather than held on an\n * unknown.\n */\n private async classifyRanGenerationStep(\n candidate: BuildPlanTask,\n /** Each step's runs, NEWEST FIRST: the latest decides, and the ones before it say whether a failure repeats. */\n attemptHistory: ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]> | undefined,\n ): Promise<ApplicationBuildStuckTask | null> {\n const attempts = attemptHistory?.get(candidate.taskRef) ?? [];\n const latest = attempts[0];\n if (latest === undefined || latest.rearm !== undefined) return null;\n /*\n * A failure the step attributed to the FRAMEWORK holds it at once, whatever moves in the application (#3709): nothing\n * in this tree can fix it, so another run would only spend. A named run or a re-arm releases it once the framework is.\n */\n if (latest.status === FlowsActors_Status.FAILED && latest.failureOwner === GenerationStepFailureOwner.FRAMEWORK) {\n return {\n taskRef: candidate.taskRef,\n priorTaskId: latest.runTaskId,\n completedAt: latest.settledAt ?? latest.startedAt,\n generationStep: true,\n reason: Workbench_BuildTaskStuckReason.FAILURE_OUTSIDE_APPLICATION,\n repeatedFailure: { failure: latest.error ?? '', consecutive: Math.max(1, countConsecutiveIdenticalGenerationStepFailures(attempts)), owner: GenerationStepFailureOwner.FRAMEWORK },\n };\n }\n const identicalFailures = countConsecutiveIdenticalGenerationStepFailures(attempts);\n const completed = latest.status === FlowsActors_Status.COMPLETED;\n if (!completed && identicalFailures < GENERATION_STEP_IDENTICAL_FAILURES_WITHHELD_AFTER) return null;\n const since = latest.settledAt ?? latest.startedAt;\n if (!(await this.generationStepInputsUnmovedSince(candidate, since))) return null;\n if (completed) {\n return {\n taskRef: candidate.taskRef,\n priorTaskId: latest.runTaskId,\n completedAt: since,\n generationStep: true,\n reason: Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n };\n }\n return {\n taskRef: candidate.taskRef,\n priorTaskId: latest.runTaskId,\n completedAt: since,\n generationStep: true,\n reason: Workbench_BuildTaskStuckReason.REPEATED_IDENTICAL_FAILURE,\n repeatedFailure: { failure: latest.error ?? '', consecutive: identicalFailures, ...(latest.failureOwner !== undefined ? { owner: latest.failureOwner } : {}) },\n };\n }\n\n /**\n * Whether nothing a generation step reads has moved since `since` (#3233, #3709): no commit since then, and no dirty path\n * in the working tree, touched what the step READS (`resolveGenerationStepReadRoots`) outside what it writes itself. A\n * step that names no read roots (an unknown step ref) reads every path outside its write scope, the rule before #3709.\n * Until #3709 every step read that way, so any sibling's checkpoint released a held step: on reference run 42886943490\n * a documentation publication failing on the engine's examples could run again after each frontend view landed.\n * `false` when git cannot be read, so a step is never held on an unknown.\n */\n private async generationStepInputsUnmovedSince(candidate: BuildPlanTask, since: string): Promise<boolean> {\n if (typeof this.git.listPathsCommittedSince !== 'function' || typeof this.git.readLandingSourceState !== 'function') return false;\n const [committed, tree] = await Promise.all([this.git.listPathsCommittedSince(since), this.git.readLandingSourceState()]);\n if (committed === undefined || tree === undefined) return false;\n const ownRoots = await this.generationSteps.resolveGenerationStepWritableRoots(candidate);\n const readRoots = typeof this.generationSteps.resolveGenerationStepReadRoots === 'function'\n ? await this.generationSteps.resolveGenerationStepReadRoots(candidate)\n : undefined;\n const under = (roots: readonly string[], path: string): boolean => roots.some((root) => (root.endsWith('/') ? path.startsWith(root) : path === root));\n const isInput = (path: string): boolean => !under(ownRoots, path) && (readRoots === undefined || under(readRoots, path));\n return ![...committed, ...tree.changedPaths].some(isInput);\n }\n\n /**\n * The build tasks whose LATEST coding run failed its own verification and was not cleared since (#3220): no re-arm, and\n * no isolated re-check that passed. Read once per landing derivation; `undefined` when the run history could not be read.\n *\n * Such a task is NOT landed even when its probes find its product at HEAD. Its files can reach HEAD without it — a\n * passing sibling's commit of a file both may carry, a person — and landing on them would count a verification failure\n * as product (`app-creation-test-007`: `build-task-assessment-schema` read landed after `check:resources-registry-init`\n * failed). It reads not landed, so it is offered again as a retry, until a run of it passes or a person re-arms it.\n */\n private async readVerificationFailedTaskRefs(): Promise<ReadonlySet<string> | undefined> {\n const latest = await this.readLatestCodingAttempts();\n if (latest === undefined) return undefined;\n return new Set([...latest].filter(([, attempt]) => attempt.status === FlowsActors_Status.FAILED\n && attempt.disposition === ApplicationCodingTaskDisposition.VERIFICATION_FAILED\n && attempt.rearm === undefined\n && attempt.isolatedRecheckPassed !== true).map(([taskRef]) => taskRef));\n }\n\n /** Each build task's LATEST coding run, or `undefined` when the run history could not be read. */\n private async readLatestCodingAttempts(): Promise<ReadonlyMap<string, ApplicationBuildTaskAttempt> | undefined> {\n try {\n if (typeof this.executions?.listActorExecutions !== 'function') return undefined;\n // Not parsed through the route's query schema, whose 200 is an HTTP request's bound: in-process the listing pages.\n const listed = await this.executions.listActorExecutions({ systemRef: APPLICATION_CODING_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const latest = new Map<string, ApplicationBuildTaskAttempt>();\n for (const projected of listed.map(projectBuildTaskAttempt)) {\n if (projected === null) continue;\n const held = latest.get(projected.taskRef);\n if (held === undefined || projected.attempt.startedAt > held.startedAt) latest.set(projected.taskRef, projected.attempt);\n }\n return latest;\n } catch (error) {\n this.logDebug('Could not read the coding runs\\' history; every landing waits for its product to be committed', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * What a build task's own runs say about LANDING on the working tree (#3204, review of 4a1b1f1bf F2), from one reading of\n * the run history. A product in the working tree counts only once something has checked it:\n *\n * - `heldBack`: the task's latest run is LIVE (it is still writing; its checks have not run), or ended WITHOUT a working\n * result (failed its verification, crashed, timed out, was cancelled or interrupted), unless it was re-armed or an\n * isolated re-check passed (#3220). Its product, whatever is on disk, is not landed; the task is offered again within\n * its retry budget.\n * - `ranTaskRefs`: the tasks with a run of their own. A task with NONE may still find its product present (another\n * task's run wrote it, or a sibling is half-way through writing it), and nothing of its own ever checked it; it lands\n * only on the COMMITTED reading too, which a checkpoint gives only once the writer settled.\n *\n * `undefined` when the history could not be read: every task is then treated as never run (committed reading required)\n * and the pass is provisional, the direction that never lands a product nobody checked.\n */\n private async readLandingRunStanding(): Promise<{\n readonly heldBack: ReadonlySet<string>;\n readonly ranTaskRefs: ReadonlySet<string>;\n readonly awaitingIsolatedRecheck: ReadonlyMap<string, string>;\n } | undefined> {\n const latest = await this.readLatestCodingAttempts();\n if (latest === undefined) return undefined;\n const heldBack = new Set<string>();\n const awaitingIsolatedRecheck = new Map<string, string>();\n for (const [taskRef, attempt] of latest) {\n if (attempt.status === FlowsActors_Status.FAILED && attempt.rearm === undefined && attempt.isolatedRecheckPassed === undefined\n && failedVerificationBesideSiblings(attempt)) {\n awaitingIsolatedRecheck.set(taskRef, attempt.startedAt);\n }\n if (attempt.status === FlowsActors_Status.COMPLETED) continue;\n if (attempt.status === FlowsActors_Status.FAILED || attempt.status === FlowsActors_Status.CANCELLED || attempt.status === FlowsActors_Status.ABORTED) {\n if (attempt.rearm !== undefined || attempt.isolatedRecheckPassed === true) continue;\n }\n heldBack.add(taskRef);\n }\n return { heldBack, ranTaskRefs: new Set(latest.keys()), awaitingIsolatedRecheck };\n }\n\n /**\n * Whether a run would repair the failing module rather than find nothing to do (#3258): the wave's assembly pass repairs the\n * first failing check, and with no repair tried this round {@link selectAssemblyRepair} withholds nothing. Only that first\n * repair is promised: whether a later one is owed depends on the failure's text, which is read from checks nobody runs here,\n * and a live wave goes on repairing regardless. Unknown is not owed: the plan is then held, and the feed names the module.\n */\n private async readSpecificationRepairOwed(findings: SpecificationsEvaluationFindings | undefined): Promise<boolean> {\n if (findings === undefined || findings.moduleFaults.length === 0 || !specificationModuleFaultsAreAVerdict(findings.moduleFaults)) return false;\n if (this.modulesWithNoRepairToRun === specificationFaultModules(findings).join('\\n')) return false;\n if (!resolveApplicationAssemblyCheckRefs(this.companionContext.saasRoot).includes(SPECIFICATION_EXPORTS_CHECK_REF)) return false;\n try {\n return assemblyRepairAttemptsThisRound(await this.listBuildDispatchRuns()).length === 0;\n } catch {\n return false;\n }\n }\n\n /** What the evaluation found, read once for a pass; `undefined` when that could not be asked. */\n private async readSpecificationFindingsForLanding(): Promise<SpecificationsEvaluationFindings | undefined> {\n try {\n return await readSpecificationsEvaluationFindings(this.companionContext);\n } catch {\n return undefined;\n }\n }\n\n /**\n * The specifications their factories REFUSED, and the modules that are wrong on their own account (#3258), by the build\n * task that wrote each (#3210, #3211): a refusal belongs to a task when the refusal's authored file is one of the task's\n * probe paths. Read from the same evaluation the companion\n * serves (`readSpecificationsEvaluationFindings`), so a refusal it names is exactly a specification it does not serve.\n * A package that cannot be evaluated at all refuses nothing here: that is a load error every board already reports, and\n * no single task owns it. A refusal no task's paths name holds no task.\n */\n private refusedSpecificationsByTask(tasks: readonly BuildPlanTask[], findings: SpecificationsEvaluationFindings | undefined): ReadonlyMap<string, readonly SpecificationRefusal[]> {\n const byTask = new Map<string, SpecificationRefusal[]>();\n if (findings === undefined) return byTask;\n /*\n * A module that threw on its own account is the task's like a refusal is (#3258), and told to it the same way. One\n * that may be a stale build, or that only follows from another, is not: it holds no task, or a stale build would\n * re-dispatch work nothing is wrong with.\n */\n const located = [\n ...findings.faults.flatMap((fault) => {\n const framePath = refusedSpecificationFramePath(fault.authoredFrame, this.companionContext.saasRoot);\n return framePath === undefined ? [] : [{ framePath, refusal: { kind: String(fault.kind), key: fault.key, message: fault.message, authoredFrame: fault.authoredFrame } }];\n }),\n ...findings.moduleFaults\n .filter((fault) => fault.reading === SpecificationModuleFaultReading.AUTHORING_ERROR && fault.causedBy.length === 0)\n .map((fault) => ({ framePath: fault.modulePath, refusal: { kind: fault.errorName, key: fault.modulePath, message: fault.message, authoredFrame: fault.authoredFrame, thrownByTheModule: true as const } })),\n ];\n if (located.length === 0) return byTask;\n for (const task of tasks) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) continue;\n const paths = resolveBuildTaskLandedProbes(task).flatMap(landedProbePaths);\n for (const { framePath, refusal } of located) {\n if (!refusalBelongsToTask(framePath, paths)) continue;\n const list = byTask.get(task.taskRef) ?? [];\n list.push(refusal);\n byTask.set(task.taskRef, list);\n }\n }\n return byTask;\n }\n\n /**\n * Every generation step's runs, by task ref, NEWEST FIRST, read once for a whole selection (#3233, #3709): the latest\n * decides whether a step that ran is held, and the ones before it whether its failure repeats. `undefined` when the run\n * history could not be read, so no step is held on an unknown.\n */\n private async readGenerationStepAttemptHistory(): Promise<ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]> | undefined> {\n try {\n // Not parsed through the route's query schema, whose 200 is an HTTP request's bound: in-process the listing pages.\n const listed = await this.executions.listActorExecutions({ systemRef: APPLICATION_BUILD_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const history = new Map<string, ApplicationBuildTaskAttempt[]>();\n for (const projected of listed.map(projectBuildTaskAttempt)) {\n if (projected === null) continue;\n const attempts = history.get(projected.taskRef) ?? [];\n attempts.push(projected.attempt);\n history.set(projected.taskRef, attempts);\n }\n for (const attempts of history.values()) attempts.sort((left, right) => right.startedAt.localeCompare(left.startedAt));\n return history;\n } catch (error) {\n this.logDebug('Could not read the generation steps\\' run history; none is held for having run', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * Select the task to run: the NEXT ready one, or — with `selection` — the NAMED one, which must be\n * among the ready ones. The stuck-task rules below apply to either; naming a task never lets it\n * skip them.\n */\n /**\n * WHY a ready build task cannot make progress — or `null` when it can be dispatched.\n *\n * ONE classification, called by both the selector (`prepareNextBuildTask`, which skips a stuck task)\n * and the per-task record (`describeBuildTaskRecords`, which reports it). Until #1521 it lived inline\n * in the selection loop, so the only surface that ever saw a task's reason was the loop guard's\n * refusal, thrown away on every ordinary round. Two copies would be two answers to one question.\n *\n * Generation steps are not asked: their landing is a typed condition of their own, and one of them\n * is legitimately re-runnable.\n */\n private async classifyStuckBuildTask(\n candidate: BuildPlanTask,\n /** The landing pass that found the candidate not landed: its readers explain why (#3219). */\n resolution: Pick<LandedTaskResolution, 'witnesses' | 'landingTree'> & Partial<Pick<LandedTaskResolution, 'refusedSpecificationFaults' | 'followUpApprovals' | 'buildTaskDecisions' | 'heldBackTaskRefs' | 'awaitingIsolatedRecheck'>>,\n /** The build tasks with a live coding run, when the caller already read them once for a whole selection. */\n inFlightTaskRefs?: ReadonlySet<string>,\n ): Promise<ApplicationBuildStuckTask | null> {\n /*\n * FIRST, because it is the one reason that is progress rather than a fault: a run of this task is\n * live (#1528). Under a parallel wave the next selection must pass over it, or two agents build the\n * same task. The engine's per-task subject refuses the second one anyway; this keeps the wave from\n * spending a slot on the refusal.\n */\n const inFlight = inFlightTaskRefs !== undefined\n ? (inFlightTaskRefs.has(candidate.taskRef) ? { executionId: '' } : null)\n : (this.dispatch.listActiveRunTaskRefs?.() ?? []).includes(candidate.taskRef)\n ? { executionId: '' }\n : await this.dispatch.findInFlightRunForBuildTask(candidate.taskRef);\n if (inFlight !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT };\n }\n /*\n * Its latest run failed its checks beside siblings, in THIS wave (#3204): run again now, it would meet the same tree its\n * siblings are still writing. The wave's end re-checks it alone (a pass lands it); the next wave offers it if that failed.\n * Only within the wave that ran it: a run left unchecked by an earlier wave (a restart) is offered, alone or not, rather\n * than held for a re-check nothing would run.\n */\n const awaitingSince = resolution.awaitingIsolatedRecheck?.get(candidate.taskRef);\n if (awaitingSince !== undefined && this.liveWaveStartedAt !== undefined && awaitingSince >= this.liveWaveStartedAt) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.AWAITING_ISOLATED_RECHECK };\n }\n /*\n * A task the person's decisions name, while whether they decided cannot be known (R2): held, never dispatched as if\n * never closed or approved. Its dependents wait on it as on any task not landed.\n */\n const heldCause = describeHeldByUnknownDecisions(candidate.taskRef, resolution.buildTaskDecisions);\n if (heldCause !== undefined) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN, landingUnknownCause: heldCause };\n }\n /*\n * Asked BEFORE any durable-run lookup, because it is the one reason that does not need a run to\n * have happened: a task producing a document the catalog cannot describe is unbuildable from the\n * moment it is authored, and dispatching it spends a full agent turn to rediscover that. Wonder\n * CRM's plan carries two.\n */\n const undraftableDocumentRef = resolveUndraftableDocumentRef(candidate);\n if (undraftableDocumentRef !== undefined) {\n /*\n * A task can be BOTH unbuildable and parked — Wonder CRM's GDPR task is exactly that. The\n * document fault is the one that decides (no run can ever complete it), but retiring a task\n * with a live persisted session is a deliberate act, so the park is named rather than dropped.\n */\n const alsoParked = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n return {\n taskRef: candidate.taskRef,\n priorTaskId: alsoParked?.taskId ?? '',\n reason: Workbench_BuildTaskStuckReason.NO_DOCUMENT_BLUEPRINT,\n documentRef: undraftableDocumentRef,\n question: alsoParked?.question,\n };\n }\n const priorRun = await this.dispatch.findCompletedRunForBuildTask(candidate.taskRef);\n /*\n * A derived follow-up under a posture that reviews results (GUIDED, #3227): it is work the accepted plan never listed,\n * so it waits for the creator to approve it (`wildo build approve`) or decline it (`wildo build close --declined`).\n * Under the automatic posture it runs as derived. Approvals missing from the resolution read as none: under a\n * reviewing posture an unknown approval keeps the follow-up waiting, which is the direction a person can correct.\n */\n if (followUpAwaitsReview({\n posture: this.autonomyPosture,\n taskRef: candidate.taskRef,\n approvals: resolution.followUpApprovals ?? new Map(),\n hasCompletedRun: priorRun !== null,\n })) {\n return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW };\n }\n /*\n * A task whose specification its factory refuses (#3210, #3211) is offered again with the validator's error in its\n * brief, rather than held by the loop guard as finished: the run completed, but what it wrote is not served. Bounded:\n * once it has completed MAXIMUM_REFUSED_SPECIFICATION_RUNS runs the loop guard holds it again, with the refusal named,\n * so an agent that keeps writing the same refused definition cannot loop; a re-arm releases it.\n */\n const refusals = resolution.refusedSpecificationFaults?.get(candidate.taskRef);\n if (priorRun !== null && refusals !== undefined) {\n const retry = await this.retryOfACompletedTask(candidate, MAXIMUM_REFUSED_SPECIFICATION_RUNS);\n if (retry === CompletedTaskRetry.OFFER) return null;\n if (retry !== CompletedTaskRetry.HOLD) return retry;\n return {\n taskRef: candidate.taskRef,\n priorTaskId: priorRun.taskId,\n completedAt: priorRun.completedAt,\n reason: Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n refusedSpecifications: refusals,\n };\n }\n if (priorRun !== null) {\n /*\n * Asked of the landing pass's own reader (#3219), so the answer is the pass's: a product it read present and did not\n * land was held back by its latest run's failed verification, never by the tree (#3204).\n */\n const present = await this.productPresentInLandingTree(candidate, resolution) === true;\n /*\n * A run of a SUPERSEDED plan does not hold a task of the current one (#3460). The guard stops a task being re-run\n * against the declaration it already failed to meet (#606); a re-decompose committed after the run is a new\n * declaration, which may ask for a product the run was never given (measured: four config tasks completed at\n * 13:47-14:09 and were held for hours on a retention binding the 17:30 plan added). The run is not re-armed or\n * rewritten: it simply predates the plan, and the next run postdates it, so the guard holds again if that one also\n * leaves the product unmet. At most one extra run per re-decompose. Judged on the NEWEST counting run's START, so a\n * run that started under the old plan and completed after the commit does not hold either (third review F2).\n *\n * Recorded limits (third review F3, F7), decided rather than missed: the rule asks whether the plan FILE was\n * committed since, not whether THIS task's entry changed, so any plan commit (an unrelated added task, a rebase that\n * resets committer dates) releases each such task once; an uncommitted re-decompose under a reviewing posture\n * releases nothing until it is committed; and the refused-specification branch above keeps counting its runs, because\n * that guard bounds a definition the agent keeps writing wrong, whatever the plan says. Comparing the task's own\n * entry at the run's baseline would answer F3 exactly and needs the plan read at an old commit; it is not done here.\n */\n if (!present && await this.ranBeforeTheCurrentBuildPlan(priorRun.newestStartedAt ?? priorRun.completedAt)) {\n // A later run parked on a question keeps its session (#3204 review): the run this rule grants may be that one.\n const parkedRun = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n if (parkedRun !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: parkedRun.taskId, reason: Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER, question: parkedRun.question };\n }\n this.logDebug('A completed run predates the current build plan; its task is offered again', { taskRef: candidate.taskRef, priorTaskId: priorRun.taskId });\n return null;\n }\n /*\n * Its product is ABSENT from the working tree, or its latest run failed its own verification (#3204): offered again,\n * told what is unmet, within the bound of {@link retryOfACompletedTask}; then the guard holds it. A port without the\n * run listing holds it at once, as before.\n */\n const retry = await this.retryOfACompletedTask(candidate, MAXIMUM_UNMET_PRODUCT_RUNS, resolution);\n if (retry === CompletedTaskRetry.OFFER) {\n this.logDebug(present ? 'A completed task\\'s latest run failed its verification; it is offered again' : 'A completed run left its declared product absent; its task is offered again, told what is unmet', { taskRef: candidate.taskRef });\n return null;\n }\n if (retry !== CompletedTaskRetry.HOLD) return retry;\n return {\n taskRef: candidate.taskRef,\n priorTaskId: priorRun.taskId,\n completedAt: priorRun.completedAt,\n reason: Workbench_BuildTaskStuckReason.COMPLETED_UNLANDED,\n };\n }\n /*\n * A run that SUSPENDED is not a completed run, so the lookup above cannot see it — and without\n * this second question the task is offered again on every dispatch, forever. Measured\n * 2026-09-16 on Wonder CRM: `build-task-gdpr-data-handling-governance` parked on a question,\n * and the next dry run selected the same task. The anti-loop guard was answering honestly\n * about the wrong population.\n *\n * Skipped, never blocking: the parked run keeps its persisted session, its dependents keep\n * waiting, and the rest of the plan proceeds.\n */\n const parkedRun = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n if (parkedRun !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: parkedRun.taskId, reason: Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER, question: parkedRun.question };\n }\n /*\n * The ATTEMPT BUDGET (#1536). A failed run is re-offered by design — it is exactly what an\n * operator should be able to retry — and until this nothing counted: on the first end-to-end run\n * two tasks ran three times each for $69, re-dispatched identically. Only the task's own failures\n * count (a check already red before a run no longer fails it), so this retires a task for what IT\n * did; the re-arm door releases it once the cause is fixed.\n */\n const failedRuns = await this.dispatch.listAttributableFailedRunsForBuildTask(candidate.taskRef);\n if (failedRuns.length >= MAXIMUM_ATTRIBUTABLE_FAILED_ATTEMPTS) {\n return {\n taskRef: candidate.taskRef,\n priorTaskId: failedRuns[0]!.taskId,\n ...(failedRuns[0]!.settledAt ? { completedAt: failedRuns[0]!.settledAt } : {}),\n reason: Workbench_BuildTaskStuckReason.ATTEMPTS_EXHAUSTED,\n };\n }\n return null;\n }\n\n /**\n * Select the next task and compose what its run needs. A thin door over {@link selectAndComposeNextBuildTask}: when the\n * selection RESERVED a task for the wave (#3883) and composing it then throws, the reservation is released here, since\n * the caller never learns which task it was.\n */\n private async prepareNextBuildTask(\n selection?: ApplicationBuildTaskSelection,\n preparation?: ApplicationBuildPreparationTracker,\n options: PrepareNextBuildTaskOptions = {},\n ): Promise<PreparedBuildTask> {\n const reservedHere: { taskRef?: string } = {};\n try {\n return await this.selectAndComposeNextBuildTask(selection, preparation, options, reservedHere);\n } catch (error) {\n if (reservedHere.taskRef !== undefined) options.reservations?.delete(reservedHere.taskRef);\n throw error;\n }\n }\n\n private async selectAndComposeNextBuildTask(\n selection: ApplicationBuildTaskSelection | undefined,\n preparation: ApplicationBuildPreparationTracker | undefined,\n options: PrepareNextBuildTaskOptions,\n /** Set to the task this call reserved, so the door can release it if composing throws. */\n reservedHere: { taskRef?: string },\n ): Promise<PreparedBuildTask> {\n let graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>;\n let resolution: LandedTaskResolution;\n // Read FIRST, before any landing: it decides whether a held reading may be reused, and every candidate is checked\n // against it below (#1528, #3204).\n /*\n * The runs this process still holds as active count too (#3204): a run's row reads COMPLETED while its commit is\n * still being made, and the shared read of the completed runs may not yet show it, so a task that is neither would\n * be taken as ready and built twice.\n */\n const inFlightTaskRefs = new Set([\n ...(await this.dispatch.listInFlightCodingRuns()).flatMap((run) => (run.taskRef ? [run.taskRef] : [])),\n ...(this.dispatch.listActiveRunTaskRefs?.() ?? []),\n ...(options.generationStepsInFlight ?? []),\n ]);\n const fillLanding = options.fillLanding;\n const stillHolds = (guards: BuildWaveFillLandingGuards | undefined): boolean => guards !== undefined\n && guards.settlementGeneration === this.landingSettlementGeneration\n && [...guards.inFlightTaskRefs].every((taskRef) => inFlightTaskRefs.has(taskRef));\n const reused = stillHolds(fillLanding?.current) ? fillLanding!.current : undefined;\n const joinable = reused === undefined && stillHolds(fillLanding?.pending) ? fillLanding!.pending : undefined;\n if (reused !== undefined) {\n ({ graph, resolution } = reused);\n } else if (joinable !== undefined) {\n // Another slot of the wave is reading the landing right now, under guards that still hold (#3883): wait for it.\n preparation?.enter(ApplicationBuildPreparationPhase.RESOLVING_LANDING);\n ({ graph, resolution } = await joinable.reading);\n } else {\n // Taken BEFORE the derivation: a run landing while it runs leaves the reading marked older than that run.\n const settlementGeneration = this.landingSettlementGeneration;\n const reading = (async () => {\n preparation?.enter(ApplicationBuildPreparationPhase.READING_THE_PLAN);\n const readGraph = await this.readBuildPlan();\n preparation?.enter(ApplicationBuildPreparationPhase.RESOLVING_LANDING);\n return { graph: readGraph, resolution: await this.resolveLandedTaskRefs(readGraph.tasks) };\n })();\n if (fillLanding !== undefined) {\n // Stored before the first await, so a slot that asks meanwhile joins it rather than reading again.\n const pending = { settlementGeneration, inFlightTaskRefs, reading };\n fillLanding.pending = pending;\n reading.then(\n (read) => {\n if (fillLanding.pending !== pending) return;\n fillLanding.pending = undefined;\n fillLanding.current = { ...read, settlementGeneration, inFlightTaskRefs };\n },\n () => { if (fillLanding.pending === pending) fillLanding.pending = undefined; },\n );\n }\n ({ graph, resolution } = await reading);\n }\n const landedTaskRefs = resolution.landed;\n preparation?.enter(ApplicationBuildPreparationPhase.SELECTING_THE_TASK);\n\n const ready = selectReadyBuildPlanTasks(graph, landedTaskRefs);\n /*\n * A task the probe calls LANDED, run anyway because the operator says the landing is wrong (#2217). Only a\n * landed task whose prerequisites have all landed: the override answers \"this landing is false\", never \"skip\n * the graph\". Readiness is otherwise unchanged, and the override is exercised only when it is needed — a\n * `despiteLanded` on a task that is simply ready runs it as an ordinary dispatch and records nothing.\n */\n let forced: BuildPlanTask | undefined;\n if (selection !== undefined && !ready.some((candidate) => candidate.taskRef === selection.taskRef)) {\n const named = graph.tasks.find((candidate) => candidate.taskRef === selection.taskRef);\n const standing = named === undefined ? ApplicationBuildTaskStanding.UNKNOWN\n : landedTaskRefs.has(named.taskRef) ? ApplicationBuildTaskStanding.LANDED\n : ApplicationBuildTaskStanding.BLOCKED;\n const unmet = named === undefined ? [] : named.prerequisiteTaskRefs.filter((prerequisite) => !landedTaskRefs.has(prerequisite));\n if (standing === ApplicationBuildTaskStanding.LANDED && selection.despiteLanded !== undefined && unmet.length === 0) {\n forced = named;\n } else {\n throw new ApplicationBuildTaskNotReadyError(\n standing === ApplicationBuildTaskStanding.UNKNOWN ? `The build plan holds no task \"${selection.taskRef}\".`\n : standing === ApplicationBuildTaskStanding.LANDED\n ? `Task ${selection.taskRef} has already landed: its landing probe finds its product committed. If that landing is wrong, `\n + `run it anyway, saying why: wildo build run ${selection.taskRef} --despite-landed --reason <${OPERATOR_BUILD_TASK_REARM_REASONS.join('|')}> --note \"<why>\".`\n : `Task ${selection.taskRef} is not ready: it waits on ${unmet.join(', ')}.`,\n selection.taskRef,\n standing,\n unmet,\n );\n }\n }\n if (ready.length === 0 && forced === undefined) {\n const specificationFault = readBuildPlanSpecificationFault(graph.tasks, resolution);\n const provenCount = landedTaskRefs.size - (specificationFault?.ranNotProvenTaskRefs.length ?? 0);\n throw new ApplicationBuildPlanExhaustedError(\n specificationFault === undefined\n ? `Every task in the build plan has landed, or none is ready: ${graph.tasks.length} task(s), ${landedTaskRefs.size} landed.`\n : `Nothing in the build plan can run, and it is not finished: specifications module ${specificationFault.failingModules.map((modulePath) => `\"${modulePath}\"`).join(', ')} `\n + `could not be evaluated, so ${provenCount} of ${graph.tasks.length} task(s) are proven.`,\n graph.tasks.length,\n provenCount,\n [...landedTaskRefs].sort(),\n undefined,\n specificationFault,\n );\n }\n /*\n * The FIRST ready task, in graph order — routed by its own `target.kind`, never reordered.\n *\n * Deliberately not a choice among the ready set: the graph already encodes the ordering its author\n * intended, and something picking among ready tasks would be a second scheduler disagreeing with the\n * first. (An earlier version skipped generation steps to find a coding task and refused when none\n * remained — correct while no executor existed, a hole in the lane once one did: the first authored\n * generation step parked the Wonder Todos build behind a named 409 forever.)\n */\n /*\n * THE FIRST ready task in graph order — SKIPPING any that has already run and still cannot prove\n * it landed. Skipping is not reordering: the graph's order is preserved, a known-stuck task is\n * removed from it.\n *\n * Such a task declared a product and the run did not produce it, so the declaration or the work\n * is wrong. Re-offering it is the money-burning loop; REFUSING THE WHOLE QUEUE for it — which is\n * what this did until 2026-09-12 — is the gate `application-creation-directive.md` forbids, one\n * task later. One over-derived field would freeze an entire 42-task build.\n *\n * It is SKIPPED rather than MARKED, and the asymmetry against the no-product case above is the\n * whole design. A task declaring nothing can never be proven by any run, so marking it is the\n * only way the lane moves — measured at 1 of 42 reachable otherwise. A task whose product is\n * merely ABSENT is provable: fix the declaration or the work and it lands. So it stays NOT\n * landed, its dependents correctly wait, and every unrelated branch proceeds.\n */\n const stuck: ApplicationBuildStuckTask[] = [];\n let selected: BuildPlanTask | undefined;\n const candidates = forced !== undefined ? [forced]\n : selection === undefined ? ready : ready.filter((candidate) => candidate.taskRef === selection.taskRef);\n /*\n * The product files the live runs write (#3204), for an UNNAMED selection only: a person naming a task chooses it\n * whatever is in flight. Two runs writing one file in the shared worktree interfere, and the wave repairs that after\n * the fact (a re-check alone, or a re-run); passing over a task that would meet a live run for the next ready one that\n * would not prevents it, and keeps the slot busy.\n */\n const inFlightProductWrites = selection === undefined && inFlightTaskRefs.size > 0\n ? graph.tasks.filter((task) => inFlightTaskRefs.has(task.taskRef)).flatMap(buildTaskProductWritePaths)\n : [];\n const reservations = selection === undefined ? options.reservations : undefined;\n /*\n * Another slot of the wave holds it, or a task it writes beside (#3883). Asked right before a candidate is taken, with\n * no await between the question and the reservation below, so concurrent slots see each other's choices.\n */\n /*\n * The follow-up a run or a reservation already holds on a candidate's SCOPE (#3886, review of the owner chains). Two\n * follow-ups on one scope write one scope; they declare no product, so neither the product-file check nor the\n * interference repair can see them, and chaining all of a scope's follow-ups would hold one owner's gaps behind\n * another's. So an unnamed selection takes one follow-up per scope at a time, whatever chain it waits on.\n */\n const taskByRef = new Map(graph.tasks.map((task) => [task.taskRef, task]));\n const followUpScopeBusy = (candidate: BuildPlanTask): boolean => {\n if (selection !== undefined || !candidate.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) return false;\n const scope = followUpScopeKey(candidate.target);\n return [...inFlightTaskRefs, ...(reservations?.keys() ?? [])].some((taskRef) => {\n if (taskRef === candidate.taskRef || !taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) return false;\n const other = taskByRef.get(taskRef);\n return other !== undefined && followUpScopeKey(other.target) === scope;\n });\n };\n const reservedBeside = (candidate: BuildPlanTask): ApplicationBuildStuckTask | undefined => {\n if (followUpScopeBusy(candidate)) return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.CONTENDED };\n if (reservations === undefined || reservations.size === 0) return undefined;\n if (reservations.has(candidate.taskRef)) return { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT };\n return productWritePathsMeet(buildTaskProductWritePaths(candidate), [...reservations.values()].flat())\n ? { taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.CONTENDED }\n : undefined;\n };\n // Read once, and only for an UNNAMED selection: a named dispatch is the operator's door past the hold (#3233).\n const generationStepAttemptHistory = selection === undefined && candidates.some((candidate) => candidate.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP)\n ? await this.readGenerationStepAttemptHistory()\n : undefined;\n for (const candidate of candidates) {\n /*\n * Generation steps are exempt: their landing is the generation-step service's own typed\n * condition rather than a product declaration, and one of them (`i18n-labels`) is legitimately\n * re-runnable when the locale set changes.\n */\n if (candidate.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A step that is RUNNING is passed over first (#2531 review M2, and its re-review F1). A generation step holds no\n * worktree lease and is not a coding run, so the in-flight read above never sees it: a second dispatch of it\n * opened a second execution, which lost the workspace lock and settled FAILED as the task's newest attempt while\n * the first was still working. Its progress is held in this companion while it runs, and a restart ends it with\n * the process, so that is the whole answer. Passed over like a live coding run, so naming it refuses with\n * IN_FLIGHT. It is checked BEFORE an unanswerable landing check: a check can read as unanswerable mid-run (a\n * stylesheet half written, a schema check timing out during a migration), and a running step kept as the\n * fallback below would be started again whenever nothing else was ready.\n */\n if (this.generationSteps.readGenerationStepProgress(candidate.taskRef) !== undefined) {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT });\n continue;\n }\n /*\n * A step whose panel refused stale expert charters (#3204) is passed over until they are derived again, so the rest\n * of the plan keeps running; a person naming it (`wildo build run <task>`) runs it anyway, and its refusal names\n * the remedy again.\n */\n const staleHeld = selection === undefined ? this.staleExpertChartersHeld.get(candidate.taskRef) : undefined;\n if (staleHeld !== undefined) {\n if (await this.staleExpertChartersCommittedSince(staleHeld)) {\n this.staleExpertChartersHeld.delete(candidate.taskRef);\n } else {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.STALE_EXPERT_CHARTERS });\n continue;\n }\n }\n /*\n * …and one whose landing check could not be ANSWERED (`SchemaPlanSyncState.UNANSWERABLE` for a\n * migration step, `DesignTokenBlockState.UNANSWERABLE` for the design-tokens step,\n * `BrandDesignState.UNANSWERABLE` for the design-system-brand step). It cannot land,\n * and running it only throws (every cause is listed on those members — no built registry, a\n * planner-contract mismatch, a design-system config that does not load among them), so holding the\n * head of the queue for it stops every other task: the whole-queue refusal this loop exists not to\n * be.\n *\n * Passed over as LANDING_UNKNOWN, and NEVER dispatched, not even when nothing else is ready (#3223). It used to be\n * kept as a fallback so its executor's refusal would name the cause, and that is how a companion restart re-ran a\n * LANDED `design-system-brand` step on `app-creation-test-007`: its check was unanswerable for a moment, nothing\n * else was ready, and the fallback ran it. Unknown is not \"not landed\". The refusal below names the cause and the\n * command that shows it, and the step is offered again the moment its check answers.\n */\n if (resolution.unanswerableGenerationStepTaskRefs.has(candidate.taskRef)) {\n const landingUnknownCause = describeHeldBySpecificationFault(candidate, resolution.modulesHoldingGenerationSteps)\n ?? describeHeldByUnknownDecisions(candidate.taskRef, resolution.buildTaskDecisions) ?? describeUnanswerableGenerationStepLanding(candidate);\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN, landingUnknownCause });\n this.logger.warn?.(`${landingUnknownCause} The rest of the plan proceeds; the step is offered again once the check answers.`, { deferredTaskRef: candidate.taskRef });\n continue;\n }\n /*\n * …and one this wave already ran that has not landed (#3885). Run again in the same wave it would meet the tree it\n * just met; passed over, so the wave fills its slots with the ready coding tasks instead of stopping, as it did\n * until #3885. Its run is on the wave's result, and the next wave offers it under the holds below.\n */\n if (selection === undefined && options.generationStepsRunInWave?.has(candidate.taskRef) === true) {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.RAN_THIS_WAVE });\n continue;\n }\n const ranAndHeld = selection === undefined ? await this.classifyRanGenerationStep(candidate, generationStepAttemptHistory) : null;\n if (ranAndHeld !== null) {\n stuck.push(ranAndHeld);\n continue;\n }\n const reservedStep = reservedBeside(candidate);\n if (reservedStep !== undefined) {\n stuck.push(reservedStep);\n continue;\n }\n selected = candidate;\n break;\n }\n const stuckEntry = await this.classifyStuckBuildTask(candidate, resolution, inFlightTaskRefs);\n /*\n * A forced task's earlier COMPLETED run is the very landing the operator overrides, so it does not hold the\n * task. A live run, a parked session or an undraftable document still does: forcing past those would start\n * a second agent, abandon a persisted conversation, or spend a turn on a product no run can make.\n */\n if (stuckEntry !== null && !(candidate === forced && LANDED_OVERRIDE_RELEASES.has(stuckEntry.reason))) {\n stuck.push(stuckEntry);\n continue;\n }\n if (inFlightProductWrites.length > 0 && productWritePathsMeet(buildTaskProductWritePaths(candidate), inFlightProductWrites)) {\n stuck.push({ taskRef: candidate.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.CONTENDED });\n continue;\n }\n const reserved = reservedBeside(candidate);\n if (reserved !== undefined) {\n stuck.push(reserved);\n continue;\n }\n selected = candidate;\n break;\n }\n if (selected === undefined) {\n /*\n * Everything ready has already run and none of it landed. A DISTINCT terminal from\n * `ApplicationBuildPlanExhaustedError`, which means the opposite and is healthy — conflating\n * them would let a wholly stuck build read as a finished one.\n */\n throw this.buildUnlandableTaskError(stuck, {\n taskCount: graph.tasks.length,\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n unverifiableLandedTaskRefs: resolution.unverifiableLandedTaskRefs,\n ...withSpecificationFault(readBuildPlanSpecificationFault(graph.tasks, resolution)),\n });\n }\n /*\n * Reserved for the wave before anything awaits (#3883): the check in `reservedBeside` and this line run in one turn of\n * the event loop, so no concurrent slot can take it, or a task writing its files, in between.\n */\n if (reservations !== undefined) {\n reservations.set(selected.taskRef, buildTaskProductWritePaths(selected));\n reservedHere.taskRef = selected.taskRef;\n }\n options.onSelected?.(selected.taskRef);\n // A task being built right now, or waiting for one that writes its file, is not a finding (#1528, #3204).\n if (stuck.some((entry) => !WORKBENCH_BUILD_TASK_STUCK_REASONS_WAITING_ON_A_LIVE_RUN.has(entry.reason))) {\n const stuckByReason = Object.fromEntries(\n Object.values(Workbench_BuildTaskStuckReason).map((reason) => [reason, stuck.filter((entry) => entry.reason === reason).map((entry) => entry.taskRef)]),\n );\n this.logger.warn?.(\n `Build dispatch skipped ${stuck.length} ready task(s) that cannot make progress. Those that already RAN `\n + 'declared a product the run did not produce, or failed their own verification (the declaration or the work '\n + 'is wrong). Those that are '\n + 'PARKED are waiting on an answer, and re-dispatching one would abandon its persisted session. Their '\n + 'dependents stay blocked while the rest of the plan proceeds.',\n { skippedTaskRefs: stuck.map((entry) => entry.taskRef), stuckByReason, selectedTaskRef: selected.taskRef },\n );\n }\n const task = selected;\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n // The step's write scope, from the one place that computes it: its evidence directories, or exactly its evidence\n // files when other writers share the directories around them (`GENERATION_STEP_WRITE_SCOPE`, #2358, #2505 review F2;\n // see `resolveGenerationStepWritableRoots`).\n const evidenceRoots = await this.generationSteps.resolveGenerationStepWritableRoots(task);\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target.kind,\n produces: task.produces,\n generationStepRef: task.target.generationStepRef,\n allowedPathPrefixes: evidenceRoots,\n prohibitedPathPrefixes: [],\n // The pipelines validate their own output; skills are a coding agent's channel, not this executor's.\n requiredChecks: [],\n installedSkillRefs: [],\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n unverifiableLandedTaskRefs: resolution.unverifiableLandedTaskRefs,\n };\n return { kind: 'GENERATION_STEP', plan, task, stuckTasks: stuck, ...(task === forced && selection?.despiteLanded ? { landedOverride: selection.despiteLanded } : {}) };\n }\n const boundary = resolveBuildPlanTaskCodingPolicy(\n task as Parameters<typeof resolveBuildPlanTaskCodingPolicy>[0],\n this.readApplicationWorkspaceEntries(),\n );\n const landedOverride = task === forced ? selection?.despiteLanded : undefined;\n // #3210: a task re-dispatched because its specification is refused is told the validator's error.\n const refusedSpecifications = resolution.refusedSpecificationFaults.get(task.taskRef);\n preparation?.select(task.taskRef);\n preparation?.enter(ApplicationBuildPreparationPhase.COMPOSING_THE_BRIEF);\n // #3204: a task offered again after a run that completed without its product is told which probes are unmet.\n const unmetProduct = landedOverride === undefined ? await this.readUnmetProductOfACompletedTask(task, resolution) : undefined;\n const contract = await this.composeTaskCodingContract(task, boundary, graph.tasks.length, landedOverride, refusedSpecifications, unmetProduct);\n\n const plan: ApplicationBuildDispatchPlan = {\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: task.target!.kind,\n produces: task.produces,\n allowedPathPrefixes: contract.mutationScope.allowedPathPrefixes,\n prohibitedPathPrefixes: contract.mutationScope.prohibitedPathPrefixes,\n requiredChecks: contract.verificationIntent.requiredChecks,\n installedSkillRefs: contract.installedSkillRefs,\n readyTaskRefs: ready.map((entry) => entry.taskRef),\n landedTaskRefs: [...landedTaskRefs].sort(),\n unverifiableLandedTaskRefs: resolution.unverifiableLandedTaskRefs,\n };\n\n return { kind: 'CODING', plan, contract, stuckTasks: stuck, ...(landedOverride ? { landedOverride } : {}) };\n }\n\n /**\n * Which tasks have landed, read from GIT.\n *\n * A task has landed when every file it PRODUCES is committed — tracked, and with HEAD, index and worktree\n * in agreement. Not \"the file exists\": an untracked or half-edited file is work in progress, and treating\n * it as landed would let the next task build on something nobody accepted.\n *\n * This replaced a replay of a journal stream that had no writer anywhere, so the answer was permanently\n * \"nothing has landed\" and the loop could never advance past its first task. Git also answers correctly\n * after a restart, on a fresh clone, and on the other side of a branch switch — none of which an\n * in-memory journal can.\n */\n /**\n * How far the current build plan's execution has progressed — the eligibility board's input for the\n * \"plan complete ⇒ re-decompose is sequencing, not a live option\" gate. `undefined` when the\n * application has no (valid) build plan: absence of a plan is not zero-of-zero progress.\n */\n public async resolveBuildExecutionProgress(): Promise<{\n readonly totalTasks: number;\n readonly landedTasks: number;\n readonly readyTasksAllStuck?: readonly string[];\n readonly specificationFault?: BuildPlanSpecificationFault;\n } | undefined> {\n let plan: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n plan = await this.readBuildPlan();\n } catch {\n return undefined;\n }\n /*\n * Held per landing state (#3206): the playbook's `artifact-state` phase asks this on every wave iteration and every\n * eligibility read, and the all-stuck reading below classifies every ready task. Both are functions of the landing\n * key (the plan, git, the builds and the run-state generation), so they are derived once per key, beside it.\n */\n // Through the one gate every landing reader takes (#3204): this phase was one of the three derivations that overlapped.\n const { key, resolution } = await this.resolveLandingUnderGate(plan.tasks);\n const { landed } = resolution;\n // The one place a marked step is not done (#3258): it does not count, and the fault rides beside the counts.\n const specificationFault = readBuildPlanSpecificationFault(plan.tasks, resolution);\n const progress = {\n totalTasks: plan.tasks.length,\n landedTasks: landed.size - (specificationFault?.ranNotProvenTaskRefs.length ?? 0),\n ...(specificationFault === undefined ? {} : { specificationFault }),\n };\n const readyTasksAllStuck = await this.landingProjection.derive(key, 'ready-tasks-all-stuck', () => this.resolveReadyTasksAllStuck(plan, resolution));\n return readyTasksAllStuck === undefined ? progress : { ...progress, readyTasksAllStuck };\n }\n\n /**\n * The ready tasks, when EVERY one is stuck — the state in which `dispatchNextBuildTask` refuses\n * before starting anything (#1547). The eligibility board withholds the dispatch playbook on it, so an\n * unattended loop stops offering a run that can only fail.\n *\n * Asked with the SAME classification the selector uses, so the board and the dispatcher cannot\n * disagree about whether anything can run. A ready generation step is dispatchable unless its landing is\n * UNKNOWN, which the selector passes over unrun (#3223), or it is running, which is progress. Undefined whenever the answer is not positively\n * \"all stuck\" — nothing ready, something dispatchable, or a classification that threw — because a gate\n * that closes on an unreadable answer withholds work that may well be runnable.\n */\n private async resolveReadyTasksAllStuck(\n plan: Awaited<ReturnType<typeof this.readBuildPlan>>,\n resolution: LandedTaskResolution,\n ): Promise<readonly string[] | undefined> {\n const landed = resolution.landed;\n if (landed.size >= plan.tasks.length) return undefined;\n const ready = selectReadyBuildPlanTasks(plan, landed);\n if (ready.length === 0) return undefined;\n const stuck: string[] = [];\n let generationStepAttemptHistory: ReadonlyMap<string, readonly ApplicationBuildTaskAttempt[]> | undefined;\n for (const task of ready) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A step whose landing is UNKNOWN is never dispatched (#3223), so it is stuck like any other — or the board would\n * offer a dispatch the selector refuses. A RUNNING step is progress; any other ready step is dispatchable.\n */\n if (this.generationSteps.readGenerationStepProgress?.(task.taskRef) !== undefined) return undefined;\n if (!resolution.unanswerableGenerationStepTaskRefs.has(task.taskRef)) {\n // A step held for having run on unchanged inputs is stuck too (#3233): the selector passes it over.\n generationStepAttemptHistory ??= await this.readGenerationStepAttemptHistory() ?? new Map();\n if (await this.classifyRanGenerationStep(task, generationStepAttemptHistory) === null) return undefined;\n }\n stuck.push(task.taskRef);\n continue;\n }\n let entry: ApplicationBuildStuckTask | null;\n try {\n entry = await this.classifyStuckBuildTask(task, resolution);\n } catch {\n return undefined;\n }\n /*\n * A task being built right now is progress, not stuck: the plan is not blocked while a wave runs. So is a task\n * waiting for a live run that writes its file (CONTENDED), or for its wave's end to re-check it alone\n * (AWAITING_ISOLATED_RECHECK, #3204): each clears by itself. Counted as stuck, they read a busy build as not moving,\n * which lifts the hold on code-only refreshes and lets the umbrella loop re-run upstream lanes mid-build.\n */\n if (entry === null || BUILD_TASK_REASONS_THAT_ARE_PROGRESS.has(entry.reason)) return undefined;\n stuck.push(task.taskRef);\n }\n return stuck;\n }\n\n /**\n * What LANDED, and what of it was PROVEN — the maturity reading's evidence input (#1496).\n *\n * Exposed here rather than recomputed by the reading, because \"did this task land\" is a question\n * this service already answers (over the WORKING tree since #3204, see {@link createLandingTreeReader}),\n * and a second implementation of it is how two surfaces come to disagree about whether a task is done.\n *\n * The two sets differ by `unverifiableLandedTaskRefs`: a task that declares no product cannot be\n * probed, so a completed durable run lands it as RAN-not-PROVEN rather than stalling the queue\n * (`application-creation-directive.md` — mark, never gate). A requirement whose only build work is\n * such a task stops at `BUILT`, which is the honest reading of it.\n *\n * `undefined` when the application has no build plan OR its plan cannot be read — absence is not\n * an empty landing, and a reading that treated it as one would report every requirement as unbuilt\n * for a reason that has nothing to do with the requirements.\n *\n * Absence is tested DIRECTLY, like `describeBuildPlanBoard` beside it and for its reason:\n * `readBuildPlan` throws the same class for a plan that exists and fails validation, so catching\n * alone would flatten \"could not look\" into \"nothing there\" — and here that difference is a\n * landed artifact saying an application has built nothing.\n */\n public async resolveLandedTaskEvidence(): Promise<{\n readonly landedTaskRefs: readonly string[];\n readonly provenTaskRefs: readonly string[];\n /** The landed tasks as the plan they landed under declares them: what a re-decompose must keep (#3449, #3204). */\n readonly landedTasks: readonly (Pick<BuildPlanTask, 'taskRef' | 'target' | 'produces'> & { readonly closed?: boolean })[];\n /**\n * The gaps coding runs reported and that are still open (#2580), from the same derivation that appends the follow-ups.\n * Absent when the coding-run listing could not be read: an unknown is not \"no gap\", and the listing says so itself.\n */\n readonly openReportedGaps?: readonly OpenReportedGap[];\n } | undefined> {\n if (!(await this.hasAuthoredBuildPlan())) return undefined;\n let plan: Awaited<ReturnType<typeof this.readBuildPlan>>;\n try {\n plan = await this.readBuildPlan();\n } catch {\n return undefined;\n }\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n const unverifiable = new Set(resolution.unverifiableLandedTaskRefs);\n const landedTaskRefs = [...resolution.landed];\n const landed = new Set(landedTaskRefs);\n /*\n * What a re-decompose must keep is what it AUTHORED (#3204): a follow-up or a host generation step is derived again on\n * every read, and a model asked to keep one copies a task it cannot author validly (see {@link readAuthoredBuildPlan}).\n * They still count as landed above, for the requirements and the board.\n */\n const authoredTaskRefs = new Set((await this.readAuthoredBuildPlan()).plan.tasks.map((task) => task.taskRef));\n const landedTasks = plan.tasks\n .filter((task) => landed.has(task.taskRef) && authoredTaskRefs.has(task.taskRef))\n .map((task) => ({\n taskRef: task.taskRef,\n target: task.target,\n produces: task.produces,\n // A person's closure is how it landed, so no reshape can rebuild it (#3204 review R3).\n ...(resolution.closedTaskRefs.has(task.taskRef) ? { closed: true } : {}),\n }));\n // A requirement a run reports still unmet is not proven by its file (#2580): the reading needs the open gaps too.\n const runs = await this.readLatestCompletedCodingRuns();\n const openReportedGaps = runs === undefined\n ? undefined\n // The same derivation as the plan's, dispatch record included, so the reading and the plan agree on what carries a gap.\n : collectOpenReportedGaps({ derivation: await this.readFollowUpDerivation(plan.tasks, runs.latest), tasks: plan.tasks, latestCompletedRuns: runs.latest, landedTaskRefs: landed });\n // A task a person CLOSED is landed for the plan, never proven: its product was never found by a probe (#3224).\n return {\n landedTaskRefs,\n provenTaskRefs: landedTaskRefs.filter((taskRef) => !unverifiable.has(taskRef) && !resolution.closedTaskRefs.has(taskRef)),\n landedTasks,\n ...(openReportedGaps === undefined ? {} : { openReportedGaps }),\n };\n }\n\n /** The build-task decisions file, as a path relative to the application root; `undefined` with no specifications package. */\n private buildTaskDecisionsPath(): string | undefined {\n return buildTaskDecisionsApplicationPath(this.companionContext);\n }\n\n /**\n * A person's COMMITTED build-task decisions (#3224, #3227), with how they STAND ({@link BuildTaskDecisionsStanding}):\n *\n * - HONOURED: HEAD's bytes were produced by a decision door and set outside every coding run's window\n * ({@link resolveHonouredDecisionsBlob}); they decide. No file is HONOURED with no decision.\n * - NOT_HONOURED: they decide nothing; the reason is named and warned. An unparseable file is reported the same way.\n * - UNKNOWN: git or the run records could not be read. Nothing is decided, the pass is provisional, and the tasks the\n * file names are held (`heldTaskRefs`) rather than dispatched as if never closed.\n */\n private async readCommittedBuildTaskDecisions(committedTree: CommittedTreeReader): Promise<BuildTaskDecisions> {\n const decisionsPath = this.buildTaskDecisionsPath();\n if (decisionsPath === undefined) return parseBuildTaskDecisions(undefined);\n const text = await committedTree.readText(decisionsPath);\n if (text === undefined || text === null) return parseBuildTaskDecisions(undefined);\n const standing = await this.readBuildTaskDecisionsStanding(decisionsPath);\n const none = parseBuildTaskDecisions(undefined);\n const conditions = standing.conditions.length > 0 ? { conditions: standing.conditions } : {};\n for (const condition of standing.conditions) this.logger.warn?.(condition, { path: decisionsPath });\n if (standing.standing === BuildTaskDecisionsStanding.UNKNOWN) {\n // Read WITHOUT trusting it, only to know what to hold: an unread closure must not let a closed task run again.\n const named = parseBuildTaskDecisions(text);\n const heldTaskRefs = new Set([...named.closures.keys(), ...named.followUpApprovals.keys()]);\n this.logger.warn?.(`Whether the build-task decisions were recorded by a person cannot be known: ${standing.reason}. The tasks they name are held until it can.`, { path: decisionsPath, held: [...heldTaskRefs] });\n return { ...none, standing: BuildTaskDecisionsStanding.UNKNOWN, reason: standing.reason ?? 'unknown', heldTaskRefs, ...conditions };\n }\n if (standing.standing === BuildTaskDecisionsStanding.NOT_HONOURED) {\n this.logger.warn?.(`The committed build-task decisions are not honoured: ${standing.reason}. Record a decision with \\`wildo build close\\` or \\`wildo build approve\\`.`, { path: decisionsPath });\n return { ...none, standing: BuildTaskDecisionsStanding.NOT_HONOURED, reason: standing.reason ?? 'not recorded through a decision door', ...conditions };\n }\n const decisions = parseBuildTaskDecisions(text);\n if (decisions.unreadable !== undefined) this.logger.warn?.(`The committed build-task decisions do not parse, so none counts: ${decisions.unreadable}`, { path: decisionsPath });\n return { ...decisions, ...conditions };\n }\n\n /**\n * How HEAD's decisions bytes stand, and the newest decisions a door produced outside every run window (what a door\n * builds on when HEAD's are not honoured). The commit history of the file is walked once per HEAD (R4): it does not\n * depend on the run windows, which are read on every call but cached per run record.\n */\n private async readBuildTaskDecisionsStanding(decisionsPath: string): Promise<{\n readonly standing: BuildTaskDecisionsStanding;\n readonly reason?: string;\n readonly conditions: readonly string[];\n readonly latestDoorText?: string;\n }> {\n const git = this.git;\n const unknown = (reason: string, conditions: readonly string[] = []) => ({ standing: BuildTaskDecisionsStanding.UNKNOWN, reason, conditions });\n if (typeof git.listCommitsTouching !== 'function' || typeof git.readBlobIdAt !== 'function' || typeof git.readHeadCommitSha !== 'function') {\n return unknown('git cannot list the decisions file\\'s history here');\n }\n const head = await git.readHeadCommitSha();\n if (head === undefined) return unknown('git could not say what HEAD is');\n let history = this.decisionsHistory?.head === head && this.decisionsHistory.path === decisionsPath ? this.decisionsHistory : undefined;\n if (history === undefined) {\n const commits = await git.listCommitsTouching(decisionsPath);\n if (commits === undefined) return unknown('git could not list the commits that changed the decisions file');\n // Every commit's blob (R5), in-window ones included, so a reason can name what a run's commit left.\n const withBlobs = await Promise.all(commits.map(async (commit) => {\n const blobId = await git.readBlobIdAt(commit.sha, decisionsPath);\n return blobId ? { ...commit, blobId } : commit;\n }));\n history = { head, path: decisionsPath, headBlobId: await git.readBlobIdAt('HEAD', decisionsPath), commits: withBlobs };\n this.decisionsHistory = history;\n }\n const windows = await this.readRunWindows(head);\n if (windows.inside === undefined) return unknown(windows.unknownReason ?? 'the coding-run records could not be read', windows.conditions);\n const recordedDoorDecisions = await this.readRecordedDoorDecisions();\n if (recordedDoorDecisions === undefined) return unknown('the decision door\\'s own records could not be read', windows.conditions);\n const verdict = resolveHonouredDecisionsBlob({ headBlobId: history.headBlobId, commits: history.commits, insideRunWindows: windows.inside, recordedDoorDecisions });\n const latestDoorText = verdict.latestDoorCommit && typeof git.readTextAt === 'function' ? await git.readTextAt(verdict.latestDoorCommit.sha, decisionsPath) : undefined;\n return {\n standing: verdict.standing,\n ...(verdict.reason ? { reason: verdict.reason } : {}),\n conditions: windows.conditions,\n ...(latestDoorText !== undefined ? { latestDoorText } : {}),\n };\n }\n\n /**\n * The decisions the door recorded in the companion's own run records (#3284), by nonce, each with the SHA it was\n * committed as once completed. `undefined` when they cannot be read (UNKNOWN). With no executions service bound (a test\n * harness) the door cannot record either, so none is known.\n */\n private async readRecordedDoorDecisions(): Promise<ReadonlyMap<string, { readonly commitSha?: string }> | undefined> {\n if (typeof this.executions?.listActorExecutions !== 'function') return new Map();\n try {\n const rows = await this.executions.listActorExecutions({ systemRef: APPLICATION_BUILD_DECISIONS_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n return new Map(rows.flatMap((row) => {\n const input = row.standaloneTasks[0]?.input as { decisionId?: unknown; commitSha?: unknown } | undefined;\n if (typeof input?.decisionId !== 'string') return [];\n return [[input.decisionId, typeof input.commitSha === 'string' ? { commitSha: input.commitSha } : {}] as const];\n }));\n } catch (error) {\n this.logger.warn?.('Could not read the decision door\\'s records', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The commits made INSIDE some coding run's or generation step's window, each with a sentence naming the run (R3).\n *\n * - A run with a write record: `baseline..postRun` from the record. Records are immutable, so each window is computed\n * once per record id (R4).\n * - A run the actor plane knows with NO readable record: its baseline is on its row from admission. Settled with a\n * post-run HEAD on its output, `baseline..postRun`; otherwise (in flight, or settled with none) the window is OPEN,\n * `baseline..HEAD`: fail closed, since what it committed cannot be bounded.\n * - A record whose baseline or post-run commit no longer exists (history rewritten after it ran) is a NAMED condition,\n * scoped to that record, with its remedy; it never makes every decision unknown.\n *\n * `inside` is undefined when the register, the run listing or git could not answer: the caller reads that as UNKNOWN.\n * The decision door refuses while any run or generation step is live, so no genuine decision is ever inside a window.\n */\n private async readRunWindows(head: string): Promise<{ readonly inside?: ReadonlyMap<string, string>; readonly conditions: readonly string[]; readonly unknownReason?: string }> {\n const inside = new Map<string, string>();\n const conditions: string[] = [];\n const recorded = new Set<string>();\n const add = async (id: string, base: string, tip: string, label: string, cacheable: boolean): Promise<string | undefined> => {\n if (base === tip) return undefined;\n const key = cacheable ? id : `${id}@${tip}`;\n let window = this.runWindowsByRecord.get(key);\n if (window === undefined) {\n const commits = await this.git.listCommitsBetween(base, tip);\n if (commits !== undefined) {\n window = { commits };\n } else {\n const [baseExists, tipExists] = await Promise.all([this.git.commitExists(base), this.git.commitExists(tip)]);\n if (baseExists === undefined || tipExists === undefined || (baseExists && tipExists)) return `git could not list the commits inside ${label}`;\n window = { unresolvable: [baseExists ? undefined : base, tipExists ? undefined : tip].filter(Boolean).map((sha) => sha!.slice(0, 8)).join(' and ') };\n }\n if (cacheable) this.runWindowsByRecord.set(key, window);\n }\n if ('unresolvable' in window) {\n conditions.push(`${label} names a commit this repository no longer holds (${window.unresolvable}): history was rewritten after it ran, so the commits it made cannot be told apart and its window is left out. `\n + 'If that run wrote build-task decisions, they do not count by themselves; record each with `wildo build close` or `wildo build approve`, and remove the stale run record to clear this notice.');\n return undefined;\n }\n for (const sha of window.commits) if (!inside.has(sha)) inside.set(sha, label);\n return undefined;\n };\n if (this.codingRunWrites !== undefined) {\n let records: Awaited<ReturnType<CodingRunWriteRegisterCompanionService['list']>>;\n try {\n records = await this.codingRunWrites.list();\n } catch (error) {\n return { conditions, unknownReason: `the coding-run write records could not be read (${describeCaughtError(error)})` };\n }\n for (const record of records) {\n recorded.add(record.taskId);\n const failed = await add(record.taskId, record.baselineHeadSha, record.postRunHeadSha, `the window of ${record.taskRef}'s run ${record.taskId}`, true);\n if (failed !== undefined) return { conditions, unknownReason: failed };\n }\n }\n if (typeof this.executions?.listActorExecutions === 'function') {\n for (const systemRef of [APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF]) {\n let rows: Awaited<ReturnType<CompanionExecutionsCompanionService['listActorExecutions']>>;\n try {\n rows = await this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n } catch (error) {\n return { conditions, unknownReason: `the runs could not be listed (${describeCaughtError(error)})` };\n }\n for (const row of rows) {\n const task = row.standaloneTasks[0] as {\n _id?: unknown;\n input?: { taskRef?: unknown; baseline?: { headSha?: unknown } };\n output?: { changeSetSummary?: { postRunHeadSha?: unknown }; recoveryEvidence?: { headSha?: unknown } | null } & Record<string, unknown>;\n } | undefined;\n const taskId = task?._id === undefined ? undefined : String(task._id);\n const base = task?.input?.baseline?.headSha;\n if (taskId === undefined || recorded.has(taskId) || typeof base !== 'string') continue;\n const settled = RUN_STATUSES_THAT_ENDED.has(row.status);\n /*\n * A settled run is bounded by what its row recorded (#3224 F2): its change set's post-run HEAD, the HEAD a startup\n * sweep stamped when it settled an interrupted run, or the HEAD stamped when it settled without a change set.\n */\n const stamp = (value: unknown) => (typeof value === 'string' && value.length > 0 ? value : undefined);\n const postRun = settled\n ? stamp(task?.output?.changeSetSummary?.postRunHeadSha) ?? stamp(task?.output?.recoveryEvidence?.headSha) ?? stamp(task?.output?.[SETTLED_HEAD_OUTPUT_FIELD])\n : undefined;\n const taskRef = typeof task?.input?.taskRef === 'string' ? task.input.taskRef : 'a build task';\n const label = postRun !== undefined\n ? `the window of ${taskRef}'s run ${taskId}`\n : settled\n ? `the open window of ${taskRef}'s run ${taskId} (it settled with no record of where HEAD was, so its window runs to HEAD; bound it with \\`wildo build settle-window ${taskRef}\\`, then record again any decision made since)`\n : `the open window of ${taskRef}'s run ${taskId} (still running or parked, so bounded only by HEAD)`;\n const failed = await add(taskId, base, postRun ?? head, label, postRun !== undefined);\n if (failed !== undefined) return { conditions, unknownReason: failed };\n }\n }\n }\n return { inside, conditions };\n }\n\n /**\n * The runs a decision must wait for besides the live coding runs (#3224 review, F1): a generation step selected or\n * running, and ANY run PARKED on a question (`AWAITING_APPROVAL`). A parked run keeps its baseline when it resumes, so\n * a decision committed while it waits would fall inside its window for good. By task ref, each with its state.\n */\n private async listLiveOrParkedRuns(): Promise<readonly { readonly label: string; readonly parked: boolean }[]> {\n if (typeof this.executions?.listActorExecutions !== 'function') return [];\n const found: { label: string; parked: boolean }[] = [];\n const queries: readonly (readonly [string, FlowsActors_Status])[] = [\n [APPLICATION_BUILD_SYSTEM_REF, FlowsActors_Status.PENDING],\n [APPLICATION_BUILD_SYSTEM_REF, FlowsActors_Status.PROCESSING],\n [APPLICATION_BUILD_SYSTEM_REF, FlowsActors_Status.AWAITING_APPROVAL],\n [APPLICATION_CODING_SYSTEM_REF, FlowsActors_Status.AWAITING_APPROVAL],\n ];\n for (const [systemRef, status] of queries) {\n const rows = await this.executions.listActorExecutions({ systemRef, status, limit: 200 });\n for (const row of rows) {\n const taskRef = (row.standaloneTasks[0]?.input as { taskRef?: unknown } | undefined)?.taskRef;\n found.push({ label: typeof taskRef === 'string' ? taskRef : String(row._id), parked: status === FlowsActors_Status.AWAITING_APPROVAL });\n }\n }\n return found;\n }\n\n /**\n * `wildo build settle-window <taskRef>` (#3224 review F2): bound the window of every SETTLED run of the task that left no\n * record of where HEAD was (a legacy row: no change set, no settle stamp), at the current HEAD. Until then the decisions\n * reader keeps such a window open to HEAD and honours no decision made after the run. A person's command: refused while\n * any run is live or parked (a bound taken now would cut a window that is still moving), and when there is nothing to\n * bound. Decisions made while the window was open stay inside it; the note says to record them again.\n */\n public async settleRunWindows(taskRef: string): Promise<{ readonly boundRunTaskIds: readonly string[]; readonly boundHeadSha: string; readonly note: string }> {\n const live = await this.dispatch.listInFlightCodingRuns();\n const waiting = await this.listLiveOrParkedRuns();\n if (live.length > 0 || waiting.length > 0) {\n throw new BuildTaskDecisionRefusedError(`Runs are live or parked right now (${[...live.map((run) => run.taskRef ?? run.executionId), ...waiting.map((run) => run.label)].join(', ')}); a window bounded now could cut one still moving. Try again once they settle.`);\n }\n if (this.codingRunWrites === undefined || typeof this.executions?.listActorExecutions !== 'function') {\n throw new BuildTaskDecisionRefusedError('The run records are not available here, so no window can be bounded.');\n }\n const head = await this.git.readHeadCommitSha();\n if (head === undefined) throw new BuildTaskDecisionRefusedError('git could not say what HEAD is, so no window can be bounded.');\n const recorded = new Set((await this.codingRunWrites.list()).map((record) => record.taskId));\n const bound: string[] = [];\n for (const systemRef of [APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF]) {\n for (const row of await this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING })) {\n const task = row.standaloneTasks[0] as { _id?: unknown; input?: { taskRef?: unknown; baseline?: { headSha?: unknown; capturedAt?: unknown } }; output?: Record<string, unknown> & { changeSetSummary?: { postRunHeadSha?: unknown }; recoveryEvidence?: { headSha?: unknown } | null } } | undefined;\n const taskId = task?._id === undefined ? undefined : String(task._id);\n const base = task?.input?.baseline?.headSha;\n if (taskId === undefined || task?.input?.taskRef !== taskRef || typeof base !== 'string' || recorded.has(taskId) || !RUN_STATUSES_THAT_ENDED.has(row.status)) continue;\n const stamped = [task.output?.changeSetSummary?.postRunHeadSha, task.output?.recoveryEvidence?.headSha, task.output?.[SETTLED_HEAD_OUTPUT_FIELD]].some((value) => typeof value === 'string' && value.length > 0);\n if (stamped) continue;\n await this.codingRunWrites.recordWindowBound({\n taskId, taskRef, baselineHeadSha: base,\n ...(typeof task.input.baseline?.capturedAt === 'string' ? { baselineCapturedAt: task.input.baseline.capturedAt } : {}),\n boundHeadSha: head,\n });\n bound.push(taskId);\n }\n }\n if (bound.length === 0) throw new BuildTaskDecisionRefusedError(`No settled run of ${taskRef} has an open window; there is nothing to bound.`);\n this.landingRunStateGeneration += 1;\n return {\n boundRunTaskIds: bound,\n boundHeadSha: head,\n note: `Bounded ${bound.length} run window(s) of ${taskRef} at ${head.slice(0, 8)}. A decision recorded from now on counts; one recorded while the window was open stays inside it, so record it again (\\`wildo build close\\` / \\`wildo build approve\\`).`,\n };\n }\n\n /**\n * Open the door's record of a decision BEFORE it is committed (#3284, ordering decided after the review of 2c7fd8a3f):\n * one execution of the decisions system whose task carries the decision's NONCE, the id the commit then names in its\n * `Wildo-Decision-Id` trailer. The reader honours a door-shaped commit only when such a record carries its nonce (and,\n * once completed, its SHA), so:\n *\n * - a crash after the record and before the commit leaves a record no commit names: harmless, ignored;\n * - a crash after the commit, before {@link completeDoorDecision}, leaves a pending record that still honours it;\n * - a forged commit cannot carry a nonce a record has (and a completed record pins the SHA, so a rebased copy fails).\n *\n * Refused, before anything is written, when the plane cannot take the record. Returns the task to complete.\n */\n private async openDoorDecisionRecord(decisionId: string, decision: Parameters<typeof withBuildTaskDecision>[1]): Promise<string> {\n const decidedTaskRef = 'closure' in decision ? decision.closure.taskRef : decision.followUpApproval.taskRef;\n const decisionKind = 'closure' in decision ? decision.closure.kind : 'approved';\n try {\n // `finishedAt` is left to the plane: the execution envelope stamps it, as an ISO string, for a terminal status.\n const execution = await this.executions.createActorExecution(CompanionCreateActorExecutionRequestSchema.parse({\n systemRef: APPLICATION_BUILD_DECISIONS_SYSTEM_REF,\n status: FlowsActors_Status.COMPLETED,\n }));\n const task = await this.executions.createActorTask(CompanionCreateActorTaskRequestSchema.parse({\n title: `Build-task decision on ${decidedTaskRef}`,\n description: `A person's ${decisionKind} decision on ${decidedTaskRef}, recorded by the decision door before its commit.`,\n // A decision about what the build plan delivers: planning, never an implementation step.\n topic: Actor_Task_Topics.PLANNING,\n status: FlowsActors_Status.COMPLETED,\n actors: { actorRef: APPLICATION_BUILD_DECISIONS_DOOR_ACTOR_REF },\n wildoApplicationActorSystemExecutionId: String(execution._id),\n // `decidedTaskRef`, never `taskRef`: a decision is not an attempt of the task it decides.\n input: { decisionId, decidedTaskRef, decisionKind },\n }));\n return String(task._id);\n } catch (error) {\n throw new BuildTaskDecisionRefusedError(`The companion could not open its record of the decision (${describeCaughtError(error)}), so nothing was committed. Try again.`);\n }\n }\n\n /**\n * Complete the door's record with the SHA the decision was committed as (#3284): from then on only that SHA is honoured\n * for this nonce. A failure is said, not thrown: the pending record already honours the commit, and the decision stands.\n */\n private async completeDoorDecision(taskId: string, decisionId: string, commitSha: string, decision: Parameters<typeof withBuildTaskDecision>[1]): Promise<string | undefined> {\n const decidedTaskRef = 'closure' in decision ? decision.closure.taskRef : decision.followUpApproval.taskRef;\n const decisionKind = 'closure' in decision ? decision.closure.kind : 'approved';\n try {\n await this.executions.updateActorTask(taskId, CompanionUpdateActorTaskRequestSchema.parse({ input: { decisionId, decidedTaskRef, decisionKind, commitSha } }));\n return undefined;\n } catch (error) {\n this.logger.warn?.('Could not complete the decision door\\'s record with its commit; the pending record still honours it', { decisionId, commitSha, error: describeCaughtError(error) });\n return describeCaughtError(error);\n }\n }\n\n /**\n * Write one decision into the decisions file and commit it as a decision record, under the workspace lock so no\n * coding run's baseline sees it half-written (#3224, #3227). The commit is authored by the person (origin OPERATOR)\n * and carries their reason as its purpose: that is the audit of who decided what and why. While ANY coding run is live\n * (a single-flight run holding the lock, or a wave's runs, which hold none) the decision is refused, naming them, rather\n * than waited on: a person asked, and a wave can take an hour.\n *\n * A decision is not a dispatch: it starts nothing and leaves a `wildo build stop` hold where it is. Undoing one is\n * reverting its commit, like any other decision record.\n */\n private async commitBuildTaskDecision(\n decision: Parameters<typeof withBuildTaskDecision>[1],\n record: { readonly summary: string; readonly purpose: string; readonly actor: DecisionRecordActor },\n ): Promise<{ readonly commitSha?: string; readonly decisionsPath: string; readonly replacedUnhonoured?: { readonly reason: string; readonly carriedEarlier: boolean } }> {\n const decisionsPath = this.buildTaskDecisionsPath();\n let replacedUnhonoured: { readonly reason: string; readonly carriedEarlier: boolean } | undefined;\n let recordIncomplete: string | undefined;\n if (decisionsPath === undefined) throw new BuildTaskDecisionRefusedError('No specifications package is declared in wildo.saas.config.ts; there is nowhere to record the decision.');\n /*\n * A single-flight coding run holds the workspace lock, so the lock below refuses beside it; the runs of a parallel\n * wave hold none (#1528), and a commit made beside them lands inside their change-set window. So any live coding run\n * refuses the decision, named, whatever lock it holds.\n */\n const live = await this.dispatch.listInFlightCodingRuns();\n if (live.length > 0) {\n throw new BuildTaskDecisionRefusedError(`${live.length} coding run(s) are writing the application right now (${live.map((run) => run.taskRef ?? run.executionId).join(', ')}). Nothing was recorded; try again once they settle, or stop the build first (\\`wildo build stop\\`).`);\n }\n // A generation step running, or any run parked on a question, has a window too, so they refuse as well (F1).\n const waiting = await this.listLiveOrParkedRuns();\n const parked = waiting.filter((run) => run.parked).map((run) => run.label);\n if (parked.length > 0) {\n throw new BuildTaskDecisionRefusedError(`${parked.length} run(s) are parked on a question (${parked.join(', ')}), and a parked run keeps its window open until it settles. `\n + 'Nothing was recorded; answer or cancel them (`wildo creation questions`), then record the decision.');\n }\n if (waiting.length > 0) {\n throw new BuildTaskDecisionRefusedError(`${waiting.length} generation step(s) are writing the application right now (${waiting.map((run) => run.label).join(', ')}). Nothing was recorded; try again once they settle.`);\n }\n const absolutePath = path.join(this.companionContext.saasRoot, decisionsPath);\n const write = async (): Promise<string | undefined> => {\n /*\n * Built on what the reader honours, never on the working file (review of 8d6b95d29): an uncommitted or agent-written\n * edit there would otherwise be carried into a commit under the person's name. When HEAD's bytes are honoured they\n * are the base; when they are not, the newest decision a person's door recorded is, so earlier decisions are kept\n * and only the unhonoured bytes are dropped, and the note says so.\n */\n const headText = (await this.git.readCommittedText(decisionsPath)) ?? undefined;\n const door = headText === undefined ? undefined : await this.readBuildTaskDecisionsStanding(decisionsPath);\n // UNKNOWN refuses: writing now would drop every decision it could not read (R2).\n if (door?.standing === BuildTaskDecisionsStanding.UNKNOWN) {\n throw new BuildTaskDecisionRefusedError(`Whether the committed build-task decisions were recorded by a person cannot be known (${door.reason}). Nothing was recorded, so none is lost; repair that and record the decision again.`);\n }\n const current = door === undefined || door.standing === BuildTaskDecisionsStanding.HONOURED ? headText : door.latestDoorText;\n replacedUnhonoured = door !== undefined && door.standing === BuildTaskDecisionsStanding.NOT_HONOURED\n ? { reason: door.reason ?? 'not recorded through a decision door', carriedEarlier: door.latestDoorText !== undefined }\n : undefined;\n if (this.acceptedChangeCommit === undefined) throw new BuildTaskDecisionRefusedError('The companion cannot commit here, so no decision can be recorded.');\n // The door's record FIRST, carrying the nonce the commit names (#3284): a crash after the commit still honours it.\n const decisionId = randomUUID();\n const recordTaskId = await this.openDoorDecisionRecord(decisionId, decision);\n await mkdir(path.dirname(absolutePath), { recursive: true });\n await writeFile(absolutePath, withBuildTaskDecision(current, decision), 'utf8');\n const committed = await this.acceptedChangeCommit.commitDecisionRecord({\n paths: [decisionsPath],\n summary: record.summary,\n purpose: record.purpose,\n actor: record.actor,\n origin: AcceptOrigin.OPERATOR,\n recordsBuildTaskDecisions: true,\n decisionId,\n });\n recordIncomplete = await this.completeDoorDecision(recordTaskId, decisionId, committed.commitSha, decision);\n this.decisionsHistory = undefined;\n return committed.commitSha;\n };\n let commitSha: string | undefined;\n try {\n commitSha = await withDedicatedFileLock(getWorkspaceMutationLockPath(this.companionContext.saasRoot), write, { retries: { retries: 10, minTimeout: 200, maxTimeout: 2_000 } });\n } catch (error) {\n if ((error as { code?: unknown } | null)?.code === 'ELOCKED') {\n throw new BuildTaskDecisionRefusedError('The application\\'s working tree is being written right now (a coding run holds it). Nothing was recorded; try again once it settles, or stop the build first (`wildo build stop`).');\n }\n throw error;\n }\n // The committed decision changes what lands and what may run: the next read derives landing again.\n this.landingRunStateGeneration += 1;\n if (recordIncomplete !== undefined) this.logger.warn?.(`Decision ${commitSha?.slice(0, 8)} is honoured by its pending record; completing it failed: ${recordIncomplete}`);\n return { ...(commitSha ? { commitSha } : {}), decisionsPath, ...(replacedUnhonoured !== undefined ? { replacedUnhonoured } : {}) };\n }\n\n /**\n * `wildo build close <taskRef>` (#3224, #3225, #3227): a person records that a task is done another way, or declines a\n * derived follow-up, and the closure is committed as a decision record so it counts from HEAD. Refused, naming why,\n * for a task the plan does not hold, one already landed, a satisfier that is neither a task of the plan nor a commit on\n * HEAD, a task satisfied by itself, and a decline of anything but a follow-up.\n *\n * A person's door only: no selector, wave or loop calls it, and it starts nothing (see {@link commitBuildTaskDecision}).\n */\n public async closeBuildTask(\n taskRef: string,\n request: { readonly satisfiedBy?: string; readonly declined?: boolean; readonly reason: string; readonly coveredReportRefs?: readonly string[] },\n actor: DecisionRecordActor,\n ): Promise<{ readonly closure: BuildTaskClosure; readonly commitSha?: string; readonly note: string }> {\n if (request.declined === true && request.satisfiedBy !== undefined) throw new BuildTaskDecisionRefusedError('A task is either declined or satisfied by something; name one.');\n if (request.declined === true && !taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) {\n throw new BuildTaskDecisionRefusedError(`Only a derived follow-up can be declined: declining ${taskRef}, a task of the accepted plan, would report the build complete without it. Close it as satisfied by the task or commit that built it, or revise the plan.`);\n }\n const plan = await this.readBuildPlan();\n const planTaskRefs = new Set(plan.tasks.map((task) => task.taskRef));\n if (!planTaskRefs.has(taskRef)) throw new BuildTaskDecisionRefusedError(`\"${taskRef}\" is not a task of this application's build plan, so there is nothing to close.`);\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n const { landed, closedTaskRefs, refusedSpecificationFaults } = resolution;\n // Landed by its own probe: nothing to close. Landed by an earlier closure: this one REPLACES it, the way to correct one.\n if (landed.has(taskRef) && !closedTaskRefs.has(taskRef)) {\n const fault = readBuildPlanSpecificationFault(plan.tasks, resolution);\n if (fault?.ranNotProvenTaskRefs.includes(taskRef)) {\n throw new BuildTaskDecisionRefusedError(`${describeUnprovenWhileAModuleFails(taskRef, fault.failingModules)} Nothing can be closed until then: close it then if it does not land.`);\n }\n throw new BuildTaskDecisionRefusedError(`${taskRef} has already landed by its own check; there is nothing to close.`);\n }\n if (await this.dispatch.findInFlightRunForBuildTask(taskRef) !== null || this.generationSteps.readGenerationStepProgress?.(taskRef) !== undefined) {\n throw new BuildTaskDecisionRefusedError(`${taskRef} is being built right now; close it once its run has settled, if it still does not land.`);\n }\n /*\n * A task an ACTIVE refusal holds is not closed past it (review of 8d6b95d29): its latest run failed its own\n * verification, or its factory refuses its specification. Closing would land it silently while what it wrote is broken,\n * and the refusal is what a person needs to see. Refused rather than noted, because no legitimate closure needs it: the\n * remedy is the refusal's (fix it, or `wildo build rearm` once fixed), after which the task can be closed if it still\n * does not land. A DECLINE is exempt: it says the follow-up's work is not wanted, so a refusal of that work is moot.\n */\n const verificationFailed = request.declined === true ? undefined : await this.readVerificationFailedTaskRefs();\n if (request.declined !== true && (verificationFailed?.has(taskRef) || refusedSpecificationFaults.has(taskRef))) {\n throw new BuildTaskDecisionRefusedError(`${taskRef} is held by an active refusal: ${verificationFailed?.has(taskRef) ? 'its latest run failed its own verification' : 'its factory refuses its specification'}. Closing it would land a result that refusal says is broken. Fix the cause (\\`wildo creation why ${taskRef}\\` shows it), re-arm it with \\`wildo build rearm\\`, then close it if it still does not land.`);\n }\n let closure: BuildTaskClosure;\n const closedAt = new Date().toISOString();\n if (request.declined === true) {\n closure = { taskRef, kind: BuildTaskClosureKind.DECLINED, reason: request.reason, closedAt };\n } else if (request.satisfiedBy === undefined) {\n throw new BuildTaskDecisionRefusedError('Say what satisfied the task (--satisfied-by <taskRef|commit>), or decline a follow-up (--declined).');\n } else if (request.satisfiedBy === taskRef) {\n throw new BuildTaskDecisionRefusedError('A task cannot be satisfied by itself.');\n } else if (planTaskRefs.has(request.satisfiedBy)) {\n // A task that waits on this one can never land before it, so the closure would never count: refused, named.\n if (transitiveDependentsOf(taskRef, plan.tasks).has(request.satisfiedBy)) {\n throw new BuildTaskDecisionRefusedError(`${request.satisfiedBy} waits on ${taskRef}, so it cannot land first and the closure would never count. Name the task or commit that actually built it.`);\n }\n // A declined follow-up built nothing, so it satisfies nothing (the resolution refuses it too).\n if (closedTaskRefs.get(request.satisfiedBy)?.kind === BuildTaskClosureKind.DECLINED) {\n throw new BuildTaskDecisionRefusedError(`${request.satisfiedBy} was declined, so it built nothing; name the task or commit that actually built ${taskRef}.`);\n }\n closure = { taskRef, kind: BuildTaskClosureKind.SATISFIED_BY_TASK, satisfiedBy: request.satisfiedBy, reason: request.reason, closedAt };\n } else {\n const sha = await this.git.resolveCommitOnHead(request.satisfiedBy);\n if (sha === undefined) throw new BuildTaskDecisionRefusedError(`\"${request.satisfiedBy}\" is neither a task of the build plan nor a commit HEAD contains.`);\n closure = { taskRef, kind: BuildTaskClosureKind.SATISFIED_BY_COMMIT, satisfiedBy: sha, reason: request.reason, closedAt };\n }\n // A follow-up's closure covers the gaps its objective showed, and the follow-up carries exactly those (#3832), never\n // one absorbed after the person looked (#3833).\n const coverage = this.decidedFollowUpCoverage(plan.tasks, taskRef);\n refuseFollowUpReportsNotDisplayed(taskRef, coverage.gaps, request.coveredReportRefs);\n closure = { ...closure, ...coverage.fields };\n const { commitSha, decisionsPath, replacedUnhonoured } = await this.commitBuildTaskDecision({ closure }, {\n summary: `${taskRef}: closed (${closure.kind}${closure.satisfiedBy ? ` by ${closure.satisfiedBy}` : ''})${describeFollowUpDecisionOrigins(coverage.gaps)}`,\n purpose: request.reason,\n actor,\n });\n return {\n closure,\n ...(commitSha ? { commitSha } : {}),\n note: (commitSha\n ? `${taskRef} is closed (${closure.kind}), committed ${commitSha.slice(0, 8)}; it counts as landed${closure.kind === BuildTaskClosureKind.SATISFIED_BY_TASK ? ` while ${closure.satisfiedBy} is landed` : ''}. To undo it, revert that commit.`\n : `${taskRef}'s closure is written to ${decisionsPath} and counts once it is committed.`)\n + describeFollowUpDecisionCoverage(coverage.gaps, 'closes', taskRef)\n + describeReplacedDecisions(replacedUnhonoured),\n };\n }\n\n /**\n * `wildo build approve <followUpRef>` (#3227): under a posture that makes derived follow-ups wait for review (GUIDED),\n * a person lets one run; the approval is committed as a decision record like a closure. Declining is the close verb's\n * `--declined`. Refused, naming why, for a task the plan does not hold, a task that is not a derived follow-up, a\n * follow-up already approved or already run, and any approval under a posture where follow-ups do not wait: there it\n * would record a decision that changes nothing.\n */\n public async approveFollowUpTask(\n taskRef: string,\n request: { readonly note?: string; readonly coveredReportRefs?: readonly string[] },\n actor: DecisionRecordActor,\n ): Promise<{ readonly approval: BuildFollowUpApproval; readonly commitSha?: string; readonly note: string }> {\n if (!followUpsAwaitReviewUnder(this.autonomyPosture)) {\n throw new BuildTaskDecisionRefusedError(`Under the ${this.autonomyPosture} autonomy posture derived follow-ups run without review, so there is nothing to approve. Decline one you do not want with \\`wildo build close ${taskRef} --declined --reason \"<why>\" --covers <the reports wildo build tasks lists>\\`.`);\n }\n if (!taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) {\n throw new BuildTaskDecisionRefusedError(`Only a derived follow-up waits for review; ${taskRef} is a task of the accepted plan, which was reviewed with the plan.`);\n }\n const plan = await this.readBuildPlan();\n if (!plan.tasks.some((task) => task.taskRef === taskRef)) throw new BuildTaskDecisionRefusedError(`\"${taskRef}\" is not a task of this application's build plan, so there is nothing to approve.`);\n const decisions = await this.readCommittedBuildTaskDecisions(this.createCommittedTreeReader());\n if (decisions.followUpApprovals.has(taskRef)) throw new BuildTaskDecisionRefusedError(`${taskRef} is already approved.`);\n if (await this.dispatch.findCompletedRunForBuildTask(taskRef, undefined, { fresh: true }) !== null) throw new BuildTaskDecisionRefusedError(`${taskRef} has already run; there is nothing to approve.`);\n // The approval covers the gaps the objective carries now, named in the reply, and the follow-up carries exactly those (#3832).\n const coverage = this.decidedFollowUpCoverage(plan.tasks, taskRef);\n refuseFollowUpReportsNotDisplayed(taskRef, coverage.gaps, request.coveredReportRefs);\n const approval: BuildFollowUpApproval = { taskRef, ...(request.note ? { note: request.note } : {}), approvedAt: new Date().toISOString(), ...coverage.fields };\n const { commitSha, decisionsPath, replacedUnhonoured } = await this.commitBuildTaskDecision({ followUpApproval: approval }, {\n summary: `${taskRef}: follow-up approved to run${describeFollowUpDecisionOrigins(coverage.gaps)}`,\n purpose: request.note ?? 'The creator reviewed the derived follow-up and let it run.',\n actor,\n });\n return {\n approval,\n ...(commitSha ? { commitSha } : {}),\n note: (commitSha\n ? `${taskRef} is approved, committed ${commitSha.slice(0, 8)}; the next wave may run it. To undo it before it runs, revert that commit.`\n : `${taskRef}'s approval is written to ${decisionsPath} and counts once it is committed.`)\n + describeFollowUpDecisionCoverage(coverage.gaps, 'lets run', taskRef)\n + describeReplacedDecisions(replacedUnhonoured),\n };\n }\n\n /**\n * The closures that COUNT now (#3224, #3227): the committed ones the landing resolution honoured, for the feed's \"a task\n * was closed\" line. A closure of a task the plan no longer holds, or whose satisfier has not landed, is left out: it says\n * nothing about the build. `[]` with no build plan.\n */\n public async readHonouredBuildTaskClosures(): Promise<readonly BuildTaskClosure[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n return [...(await this.resolveLandedTaskRefs(plan.tasks)).closedTaskRefs.values()];\n }\n\n /**\n * The derived follow-ups that LANDED while their latest completed run still reports a requirement unmet (#2583), each\n * with what it reported: what the creation home's advisory line names. A projection of the plan, its landing and the\n * latest completed runs, never stored. A follow-up landed by a person's closure is left out (a declined follow-up was\n * decided on, not left behind). `[]` with no build plan, or when the runs cannot be listed (that reader says so).\n */\n public async readFollowUpsLandedWithGaps(): Promise<readonly { readonly taskRef: string; readonly unmetRequirements: readonly ApplicationCodingUnmetRequirement[] }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n const followUps = plan.tasks.filter((task) => task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX));\n if (followUps.length === 0) return [];\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return [];\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n return followUps.flatMap((task) => {\n const unmet = runs.latest.get(task.taskRef)?.unmetRequirements ?? [];\n return resolution.landed.has(task.taskRef) && !resolution.closedTaskRefs.has(task.taskRef) && unmet.length > 0\n ? [{ taskRef: task.taskRef, unmetRequirements: unmet }]\n : [];\n });\n }\n\n /**\n * The reported gaps only a person's decision can close (#3886): what the creation home's ASKED line names. Read from the\n * follow-up derivation the plan appended, so Home and the plan agree about which gaps wait on a decision; a later run of\n * the reporting task that no longer reports it removes it. `[]` with no build plan, or when the runs cannot be listed.\n */\n public async readGapsAwaitingDecision(): Promise<readonly { readonly taskRef: string; readonly requirementRef: string; readonly decision: string }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return [];\n const derivation = await this.readFollowUpDerivation(plan.tasks, runs.latest);\n return derivation.notDerived.flatMap((gap) => (gap.reason === FollowUpGapNotDerivedReason.AWAITS_DECISION && gap.needsDecision !== undefined\n ? [{ taskRef: gap.originTaskRef, requirementRef: gap.requirementRef, decision: gap.needsDecision }]\n : []));\n }\n\n /**\n * The LANDED tasks carrying a landing advisory (#3285), each with its advisories: what the creation home's advisory\n * line names. The same derivation the task records make (`resolveBuildTaskLandingAdvisories` over the committed\n * backend configuration, a declined closure left out), without building the records: the plan, one committed file\n * (only when a task sells something) and, only when some task is advised, the landing. `[]` with no build plan.\n */\n public async readLandedTasksWithAdvisories(): Promise<readonly { readonly taskRef: string; readonly advisories: readonly BuildTaskLandingAdvisory[] }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n const plan = await this.readBuildPlan();\n // The same reads the records make: the billing switch only when a task sells something. Every task is asked, so an\n // advisory kind added to `resolveBuildTaskLandingAdvisories` reaches Home with no change here.\n const backendBillingConfigText = plan.tasks.some(buildTaskProducesBillingCatalogue)\n ? (await this.git.readCommittedText(BACKEND_BILLING_SWITCH_FILE)) ?? undefined\n : undefined;\n const advised = plan.tasks.filter((task) => resolveBuildTaskLandingAdvisories(task, { backendBillingConfigText }).length > 0);\n if (advised.length === 0) return [];\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n return advised.flatMap((task) => {\n if (!resolution.landed.has(task.taskRef) || resolution.closedTaskRefs.get(task.taskRef)?.kind === BuildTaskClosureKind.DECLINED) return [];\n const advisories = resolveBuildTaskLandingAdvisories(task, { backendBillingConfigText });\n return advisories.length > 0 ? [{ taskRef: task.taskRef, advisories }] : [];\n });\n }\n\n /**\n * Put a build task back in the queue after the reason it did not land was fixed (#1535). The ref must\n * be a task of THIS build plan: re-arming a ref the plan does not carry would record a decision about\n * nothing, and a typo would read as success.\n */\n public async rearmBuildTask(\n taskRef: string,\n request: { readonly reason: BuildTaskRearmReason; readonly note: string },\n session?: CompanionExecutionSessionContext,\n ): Promise<{ readonly rearmedRunTaskIds: readonly string[]; readonly rearm: BuildTaskRearm }> {\n const plan = await this.readBuildPlan();\n const task = plan.tasks.find((candidate) => candidate.taskRef === taskRef);\n if (task === undefined) {\n throw new NothingToRearmError(`\"${taskRef}\" is not a task of this application's build plan, so there is nothing to re-arm.`);\n }\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) return this.rearmGenerationStep(taskRef, request, session);\n return this.dispatch.rearmBuildTask(taskRef, request, session);\n }\n\n /**\n * Put a GENERATION STEP back in the queue (#3709): the re-arm is recorded on each of its runs that still holds it, a\n * completed one (#3233) or a failed one (#3709), exactly as a coding task's re-arm is recorded on its runs. The coding\n * lane's re-arm reads coding runs only, so a step's runs, which are the build system's own rows, were never re-armed and\n * a held step had only the named dispatch as its door.\n */\n private async rearmGenerationStep(\n taskRef: string,\n request: { readonly reason: BuildTaskRearmReason; readonly note: string },\n session?: CompanionExecutionSessionContext,\n ): Promise<{ readonly rearmedRunTaskIds: readonly string[]; readonly rearm: BuildTaskRearm }> {\n // Not parsed through the route's query schema, whose 200 is an HTTP request's bound: in-process the listing pages.\n const listed = await this.executions.listActorExecutions({ systemRef: APPLICATION_BUILD_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const holding = listed.flatMap((execution) => {\n const row = execution.standaloneTasks[0];\n const holds = (execution.status === FlowsActors_Status.COMPLETED || execution.status === FlowsActors_Status.FAILED)\n && (row?.input as { taskRef?: unknown } | undefined)?.taskRef === taskRef\n && readBuildTaskRearm(row?.memory) === undefined;\n return holds && row !== undefined ? [row] : [];\n });\n if (holding.length === 0) {\n throw new NothingToRearmError(\n `Build step \"${taskRef}\" has no completed or failed run that still holds it, so there is nothing to re-arm: it was never run, `\n + 'or every run is already re-armed. A step in that state is offered by the next dispatch on its own.',\n );\n }\n const rearm: BuildTaskRearm = { reason: request.reason, note: request.note, rearmedAt: new Date().toISOString() };\n try {\n for (const row of holding) {\n await this.executions.updateActorTask(String(row._id), { memory: withBuildTaskRearm(row.memory as Parameters<typeof withBuildTaskRearm>[0], rearm) }, session);\n }\n } finally {\n // Announced even when a later update threw: the rows re-armed before it did still moved.\n this.dispatch.announceRunStateChanged();\n }\n return { rearmedRunTaskIds: holding.map((row) => String(row._id)), rearm };\n }\n\n /**\n * Where a task's landing was found: its probes' paths, or a generation step's evidence paths. Empty for a probe\n * that names no fixed file (a shell surface, a schema-plan state) — the record then says \"found\" without a place\n * rather than inventing one.\n */\n private async resolveLandedEvidencePaths(task: BuildPlanTask): Promise<readonly string[]> {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n const condition = await this.generationSteps.resolveGenerationStepLandedCondition(task);\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS) return [...condition.paths];\n // Found in the stylesheet: it is committed and its block is current.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT) return [condition.stylesheetPath];\n // Found in the generated modules: each is committed and says what the brand's visual tone renders.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT) return [...condition.modulePaths];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ACCEPTED_BRAND_MARK) return [condition.modulePath];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) return [condition.configPath];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE) return [];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) return [];\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES) {\n const candidates = [...new Set(condition.probes.flatMap(landedProbePaths))];\n const committed = await this.git.selectCommittedPaths(candidates);\n return candidates.filter((path) => committed.has(path));\n }\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) return [condition.configPath];\n return [];\n }\n // Only the paths that ARE committed: a label probe reads one candidate per language, and naming the dozens\n // that do not exist would say the product was found in files that are not there.\n const candidates = [...new Set(resolveBuildTaskLandedProbes(task).flatMap(landedProbePaths))];\n const committed = await this.git.selectCommittedPaths(candidates);\n return candidates.filter((path) => committed.has(path));\n }\n\n /**\n * The per-task build record an operator or an agent reads in ONE call (#1521).\n *\n * Composed entirely from what already exists — the plan, the landing resolution, the actor plane's\n * execution rows, and the stuck classification the selector uses — and stored nowhere. A second\n * ledger of attempts would be a second answer to \"what happened to this task\", and the rows the\n * engine already writes are the first.\n *\n * `undefined` when the application has no build plan, for the reason `resolveLandedTaskEvidence`\n * gives: absence is not an empty build.\n */\n public async describeBuildTaskRecords(session?: CompanionExecutionSessionContext): Promise<ApplicationBuildTaskRecords | undefined> {\n if (!(await this.hasAuthoredBuildPlan())) return undefined;\n const plan = await this.readBuildPlan();\n // One introspection of the live application for the whole read: the landing pass and its explanations.\n const resolution = await this.resolveLandedTaskRefs(plan.tasks);\n const ready = new Set(selectReadyBuildPlanTasks(plan, resolution.landed).map((task) => task.taskRef));\n const unverifiable = new Set(resolution.unverifiableLandedTaskRefs);\n\n // Not parsed through the route's query schema, whose 200 is the HTTP request's bound: in-process the listing pages.\n const listed = await Promise.all([APPLICATION_CODING_SYSTEM_REF, APPLICATION_BUILD_SYSTEM_REF].map((systemRef) =>\n this.executions.listActorExecutions({ systemRef, limit: BUILD_TASK_RECORD_HISTORY_CEILING }, session)));\n const attemptsTruncated = listed.some((page) => page.length >= BUILD_TASK_RECORD_HISTORY_CEILING);\n const attemptsByTask = new Map<string, ApplicationBuildTaskAttempt[]>();\n for (const projected of listed.flat().map(projectBuildTaskAttempt)) {\n if (projected === null) continue;\n const list = attemptsByTask.get(projected.taskRef) ?? [];\n list.push(projected.attempt);\n attemptsByTask.set(projected.taskRef, list);\n }\n for (const list of attemptsByTask.values()) list.sort((left, right) => right.startedAt.localeCompare(left.startedAt));\n\n // The landing pass's own reader (#3219), the working tree (#3204): the records explain exactly the reading that decided landing.\n const landingTree = resolution.landingTree;\n // The committed billing switch (#3285), read once and only when a task sells something: the landing advisories read it.\n const backendBillingConfigText = plan.tasks.some(buildTaskProducesBillingCatalogue)\n ? (await this.git.readCommittedText(BACKEND_BILLING_SWITCH_FILE)) ?? undefined\n : undefined;\n const records: ApplicationBuildTaskRecord[] = [];\n for (const task of plan.tasks) {\n const attempts = attemptsByTask.get(task.taskRef) ?? [];\n const landed = resolution.landed.has(task.taskRef);\n const status = landed ? WorkbenchBuildPlanTaskStatus.LANDED\n : ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY\n : WorkbenchBuildPlanTaskStatus.BLOCKED;\n const isGenerationStep = task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP;\n /*\n * A generation step is not classified like a coding task (its landing is a typed condition of its own), with one\n * exception the selection makes too: a step running now is IN_FLIGHT, so the page offers no second run of it\n * (#2531 review M2).\n */\n /* A running generation step's progress, read once: it is both the record's `progress` and the proof it is live. */\n const progress = isGenerationStep ? this.generationSteps.readGenerationStepProgress(task.taskRef) : undefined;\n const stuck = status !== WorkbenchBuildPlanTaskStatus.READY ? null\n : !isGenerationStep ? await this.classifyStuckBuildTask(task, resolution)\n : progress !== undefined ? { taskRef: task.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.IN_FLIGHT }\n // #3223: a step whose landing check could not answer is not plainly ready — the selection passes it over unrun.\n : resolution.unanswerableGenerationStepTaskRefs.has(task.taskRef)\n ? { taskRef: task.taskRef, priorTaskId: '', reason: Workbench_BuildTaskStuckReason.LANDING_UNKNOWN, landingUnknownCause: describeHeldBySpecificationFault(task, resolution.modulesHoldingGenerationSteps) ?? describeHeldByUnknownDecisions(task.taskRef, resolution.buildTaskDecisions) ?? describeUnanswerableGenerationStepLanding(task) }\n // #3233: a step that ran, did not land, and whose inputs have not moved — the unattended loop passes it over.\n : await this.classifyRanGenerationStep(task, attemptsByTask);\n /*\n * A step the scheduler PASSES OVER because its landing check could not be answered reports that state before it\n * ever ran (#2531 review L6): without it the step read as plainly ready while every dispatch went past it.\n */\n const passedOverUnanswerable = isGenerationStep && resolution.unanswerableGenerationStepTaskRefs.has(task.taskRef);\n let unmetProbes: ApplicationBuildTaskUnmetProbe[] | undefined;\n let schemaPlanSyncState: SchemaPlanSyncState | undefined;\n let designTokenBlockState: DesignTokenBlockState | undefined;\n let brandDesignState: BrandDesignState | undefined;\n let landingBlockedBy: string | undefined;\n // The condition the landing pass already resolved; resolved again only for a step it did not see.\n const generationStepCondition = !landed && isGenerationStep\n ? resolution.generationStepConditions.get(task.taskRef) ?? await this.generationSteps.resolveGenerationStepLandedCondition(task)\n : undefined;\n // Named whether or not the step has run (#2504): a labels plan that hides owed units blocks it before its first attempt,\n // and so does a brand nobody could read (#2694).\n if (generationStepCondition?.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE\n || generationStepCondition?.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) landingBlockedBy = generationStepCondition.detail;\n if (!landed && (attempts.some(isCountedBuildTaskAttempt) || passedOverUnanswerable)) {\n if (isGenerationStep && generationStepCondition !== undefined) {\n const condition = generationStepCondition;\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC) {\n schemaPlanSyncState = await this.generationSteps.readSchemaPlanSyncState();\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT) {\n /*\n * Either half can be what is missing, and they have different remedies: an absent stylesheet\n * is the step's output missing (run it), a stale or unanswerable block is a regeneration or\n * configuration question. Both are reported, never a bare \"not landed\".\n */\n const blockState = await this.generationSteps.readDesignTokenBlockState();\n if (blockState !== DesignTokenBlockState.CURRENT) designTokenBlockState = blockState;\n unmetProbes = [];\n const probe: BuildPlanTaskLandedProbe = { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE, path: condition.stylesheetPath };\n if (!(await this.isLandedProbeSatisfied(probe, landingTree))) {\n unmetProbes.push({ probe });\n }\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT) {\n // The same two halves as the stylesheet: write it, or regenerate it (a stale module) / repair the\n // brand specification (an unanswerable one).\n const designState = await this.generationSteps.readBrandDesignState();\n if (designState !== BrandDesignState.CURRENT) brandDesignState = designState;\n unmetProbes = [];\n // Each generated module: the frontend's, and the website's when one is declared (#2597).\n for (const modulePath of condition.modulePaths) {\n const probe: BuildPlanTaskLandedProbe = { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE, path: modulePath };\n if (!(await this.isLandedProbeSatisfied(probe, landingTree))) {\n unmetProbes.push({ probe });\n }\n }\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.NOT_OWED) {\n // Unreachable while NOT_OWED always lands, and stated rather than read as \"no unmet probe\".\n unmetProbes = [];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.ACCEPTED_BRAND_MARK) {\n // What is missing is a MASTER asset in the module, not the module (the scaffold commits it): say that (#2410).\n unmetProbes = [{\n probe: {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: condition.modulePath,\n declarations: [`BrandAssetPurpose.${BrandAssetPurpose.MASTER}`],\n site: { relation: ProductDeclarationRelation.SET },\n },\n }];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) {\n unmetProbes = [{\n probe: {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: condition.configPath,\n declarations: [`displayName: ${JSON.stringify(condition.displayName)}`],\n site: { relation: ProductDeclarationRelation.SET },\n },\n }];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE\n || condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) {\n // Nothing a file can satisfy: the plan itself is partial (#2504), or the brand could not be read (#2694). Its\n // cause rides on the record.\n unmetProbes = [];\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES) {\n unmetProbes = [];\n for (const probe of condition.probes) {\n if (await this.isLandedProbeSatisfied(probe, landingTree)) continue;\n unmetProbes.push({ probe });\n }\n } else if (condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) {\n // One unmet probe per capability the configuration landing read does not enable (#2497).\n unmetProbes = (await this.capabilitiesNotEnabledIn(condition, landingTree)).map((capability) => ({\n probe: {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: condition.configPath,\n // The condition is ENABLED, not declared: the scaffold declares most capabilities as `enabled: false`.\n declarations: [`[EngineCapability.${capability}]: { enabled: true }`],\n site: { relation: ProductDeclarationRelation.SET },\n },\n }));\n } else {\n unmetProbes = [];\n for (const path of condition.paths) {\n const probe: BuildPlanTaskLandedProbe = { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE, path };\n if (await this.isLandedProbeSatisfied(probe, landingTree)) continue;\n unmetProbes.push({ probe });\n }\n }\n } else {\n unmetProbes = [];\n for (const probe of resolveBuildTaskLandedProbes(task)) {\n if (await this.isLandedProbeSatisfied(probe, landingTree)) continue;\n unmetProbes.push({\n probe,\n ...(isShellProbe(probe) ? { shell: await this.explainShellProbe(probe, landingTree) } : {}),\n ...(isAgentWorkProbe(probe) ? { registered: await this.explainAgentWorkProbe(probe, landingTree) } : {}),\n });\n }\n }\n }\n const waitingOn = status === WorkbenchBuildPlanTaskStatus.BLOCKED\n ? task.prerequisiteTaskRefs.filter((prerequisite) => !resolution.landed.has(prerequisite)) : undefined;\n // A refused dispatch started nothing, so it does not make the landing the task's own (#1581). Never asserted\n // on a TRUNCATED listing: an early task's runs may be the ones the page cap dropped, and \"never run\" would be\n // false — and an invitation to pay for a re-run (#2217 review).\n const landedBeforeAnyRun = landed && !attemptsTruncated && !attempts.some(isCountedBuildTaskAttempt)\n ? { probedPaths: await this.resolveLandedEvidencePaths(task) } : undefined;\n // The follow-ups carrying this task's reports (#3204: an absorbed report is carried under another report's ref, whose\n // FIRST prerequisite is that report's origin; the others are the follow-up before it on its target, #3227, and\n // host-derived steps appended later).\n const followUpTaskRefs = plan.tasks\n .filter((candidate) => candidate.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)\n && (candidate.prerequisiteTaskRefs[0] === task.taskRef || this.followUpOriginTaskRefs(candidate.taskRef)?.has(task.taskRef) === true))\n .map((candidate) => candidate.taskRef);\n // A declined closure accounts for the task without its product, so nothing it declined is owed to be served.\n const landingAdvisories = landed && resolution.closedTaskRefs.get(task.taskRef)?.kind !== BuildTaskClosureKind.DECLINED\n ? resolveBuildTaskLandingAdvisories(task, { backendBillingConfigText }) : [];\n records.push({\n taskRef: task.taskRef,\n targetKind: String(task.target?.kind ?? ''),\n status,\n ...(followUpTaskRefs.length > 0 ? { followUpTaskRefs } : {}),\n ...(task.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX) && task.prerequisiteTaskRefs[0] !== undefined ? { followUpOf: task.prerequisiteTaskRefs[0] } : {}),\n ...(coveredReportsOf(this.decidedFollowUpCoverage(plan.tasks, task.taskRef).gaps)),\n ...(closureOf(resolution.closedTaskRefs.get(task.taskRef))),\n attempts,\n ...(stuck !== null ? { stuck } : {}),\n ...(unmetProbes !== undefined ? { unmetProbes } : {}),\n ...(schemaPlanSyncState !== undefined ? { schemaPlanSyncState } : {}),\n ...(designTokenBlockState !== undefined ? { designTokenBlockState } : {}),\n ...(brandDesignState !== undefined ? { brandDesignState } : {}),\n ...(landingBlockedBy !== undefined ? { landingBlockedBy } : {}),\n ...(waitingOn !== undefined ? { waitingOn } : {}),\n ...(landed && unverifiable.has(task.taskRef) ? { unverifiable: true } : {}),\n ...(landedBeforeAnyRun !== undefined ? { landedBeforeAnyRun } : {}),\n ...(landingAdvisories.length > 0 ? { landingAdvisories } : {}),\n ...(progress !== undefined ? { progress } : {}),\n });\n }\n\n const stuckByReason = Object.fromEntries(\n Object.values(Workbench_BuildTaskStuckReason).map((reason) => [reason, records.filter((record) => record.stuck?.reason === reason).length]),\n ) as Record<Workbench_BuildTaskStuckReason, number>;\n const notLanded = records.filter((record) => record.status !== WorkbenchBuildPlanTaskStatus.LANDED);\n // A dispatch refused before it started is shown in its task's history and counted by no figure below (#1581).\n const started = (record: ApplicationBuildTaskRecord) => record.attempts.filter(isCountedBuildTaskAttempt);\n const unavailableRuntimes = await readUnavailableApplicationRuntimes(this.companionContext.saasRoot);\n /*\n * The candidates for a break, from every attempt the records hold (#2405 review F3), not only one wave's: a run that\n * settled at the end of one wave breaks the start the NEXT wave meets.\n */\n const bootFailures: ApplicationBuildRecordsBootFailure[] = (await this.readCurrentBootFailures()).map((failure) => ({\n ...failure,\n // No task is a candidate for a dev-stack cause (a held port, an orphan or stale backend, unreachable infrastructure) (#3214).\n candidateTaskRefs: failure.lastStartedAt === null || !isApplicationStartupFailure(failure) ? [] : records\n .filter((record) => record.attempts.some((attempt) => attempt.status === FlowsActors_Status.COMPLETED\n // No upper bound (#2405 re-review R1): the watcher restarts the backend on working-tree writes, so the start\n // usually fails while the breaking run is still running its checks, and that run settles AFTER the failure.\n && attempt.settledAt !== undefined && attempt.settledAt > failure.lastStartedAt!))\n .map((record) => record.taskRef),\n }));\n return {\n tasks: records,\n summary: {\n taskCount: records.length,\n // A step that only ran is not counted (#3258), as `resolveBuildExecutionProgress` does not count it.\n landed: records.length - notLanded.length - (readBuildPlanSpecificationFault(plan.tasks, resolution)?.ranNotProvenTaskRefs.length ?? 0),\n landedBeforeAnyRun: records.filter((record) => record.landedBeforeAnyRun !== undefined).length,\n blocked: records.filter((record) => record.status === WorkbenchBuildPlanTaskStatus.BLOCKED).length,\n // A step whose landing is UNKNOWN is not counted as ready to run (#3223): nothing will run it until its check answers.\n // Nor a follow-up waiting for the person's review (#3227): nothing runs it until they approve it.\n readyNeverAttempted: records.filter((record) => record.status === WorkbenchBuildPlanTaskStatus.READY && started(record).length === 0\n && record.stuck?.reason !== Workbench_BuildTaskStuckReason.LANDING_UNKNOWN\n && record.stuck?.reason !== Workbench_BuildTaskStuckReason.FOLLOW_UP_AWAITING_REVIEW).length,\n readyToRetry: records.filter((record) => record.status === WorkbenchBuildPlanTaskStatus.READY && started(record).length > 0 && !record.stuck).length,\n stuckByReason,\n attempts: records.reduce((total, record) => total + started(record).length, 0),\n completedAttemptsWithoutLanding: notLanded.reduce(\n (total, record) => total + record.attempts.filter((attempt) => attempt.status === FlowsActors_Status.COMPLETED).length, 0),\n repeatedlyAttemptedWithoutLanding: notLanded.filter((record) => started(record).length > 1).map((record) => record.taskRef),\n spend: deriveBuildSpend(records),\n parallelism: {\n degree: readBuildParallelism(this.companionContext.saasRoot),\n overlappingAttempts: records.reduce((total, record) => total + record.attempts.filter((attempt) => attempt.concurrency !== undefined).length, 0),\n interferenceSuspectedAttempts: records.reduce((total, record) => total + record.attempts.filter((attempt) => attempt.interferenceSuspected === true).length, 0),\n interferedCompletedAttempts: records.reduce((total, record) => total + record.attempts.filter((attempt) => attempt.interference !== undefined).length, 0),\n contendedPaths: [...new Set(records.flatMap((record) => record.attempts.flatMap((attempt) => attempt.concurrency?.contendedPaths ?? [])))].sort(),\n },\n },\n attemptsTruncated,\n ...(unavailableRuntimes === undefined ? {} : { unavailableRuntimes }),\n ...(bootFailures.length > 0 ? { bootFailures } : {}),\n ...(resolution.buildTaskDecisions.standing !== BuildTaskDecisionsStanding.HONOURED || (resolution.buildTaskDecisions.conditions?.length ?? 0) > 0\n ? { buildTaskDecisions: {\n standing: resolution.buildTaskDecisions.standing,\n ...(resolution.buildTaskDecisions.reason !== undefined ? { reason: resolution.buildTaskDecisions.reason } : {}),\n ...(resolution.buildTaskDecisions.conditions !== undefined ? { conditions: resolution.buildTaskDecisions.conditions } : {}),\n } }\n : {}),\n repairsOwed: deriveRepairsOwed(attemptsByTask),\n };\n }\n\n /**\n * Every build-plan task in the DISPATCH view — the creation board's `workbenchBuildPlanTasks`\n * rows.\n *\n * `status` is computed per read, never stored: `landed` = the task's evidence paths are all\n * committed (the same resolution the dispatcher itself selects by), `ready` = every prerequisite\n * landed and it has not, `blocked` = otherwise. Exactly one holds.\n *\n * An application with NO authored build plan answers ZERO TASKS rather than throwing: the plan\n * file legitimately does not exist until build-decompose runs, so \"nothing there yet\" is the\n * true answer. Absence is tested DIRECTLY (the exports carry no `buildPlanSpecification`) rather\n * than by catching `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that\n * SAME class for a plan that exists and fails schema or semantic validation — and flattening an\n * invalid plan into an empty board would be \"could not look\" wearing \"nothing there\".\n */\n public async describeBuildPlanBoard(): Promise<readonly {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n readonly functionalTopic: string;\n readonly status: WorkbenchBuildPlanTaskStatus;\n readonly prerequisiteTaskRefs: readonly string[];\n }[]> {\n if (!(await this.hasAuthoredBuildPlan())) return [];\n\n const plan = await this.readBuildPlan();\n const { landed } = await this.resolveLandedTaskRefs(plan.tasks);\n const ready = new Set(selectReadyBuildPlanTasks(plan, landed).map((task) => task.taskRef));\n return plan.tasks.map((task) => ({\n taskRef: task.taskRef,\n objective: task.objective,\n targetKind: String(task.target?.kind ?? ''),\n functionalTopic: String(task.functionalTopic),\n status: landed.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.LANDED\n : ready.has(task.taskRef) ? WorkbenchBuildPlanTaskStatus.READY\n : WorkbenchBuildPlanTaskStatus.BLOCKED,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n }));\n }\n\n /**\n * What ONE landing resolution found — returned rather than parked on the instance.\n *\n * These two were fields (`lastUnverifiableLandedTaskRefs`, `lastUnanswerableSchemaPlanTaskRefs`),\n * written as the probe's last statement and read by its caller one microtask later. The service is\n * a singleton in a process serving concurrent requests and the probe is spawn-heavy, so two\n * in-flight resolutions interleave at every await and the caller could read the OTHER pass's\n * answer — a requirement dropping from VERIFIED to BUILT because a workbench poll landed between\n * two lines. Returning them makes each caller's answer its own by construction (#1496's review).\n */\n private async resolveLandedTaskRefs(tasks: readonly BuildPlanTask[]): Promise<LandedTaskResolution> {\n const startedAt = Date.now();\n const { resolution, key, derivedHere, keyReadMs, waitedMs } = await this.resolveLandingUnderGate(tasks);\n /*\n * Where a slow reading went (#3204): the key (git and the build signatures), a wait on a derivation another reader was\n * running, or the resolution, which is either this reader's own derivation or a held answer. The derivation logs its own\n * cost. Measured 41-47 s per slot on reference run 42506906346 against derivations logged at 1-8 s, with nothing saying\n * where the rest went.\n */\n const totalMs = Date.now() - startedAt;\n if (totalMs >= LANDING_RESOLUTION_LOG_THRESHOLD_MS) {\n this.logger.info('Build plan landing resolved', {\n taskCount: tasks.length,\n totalMs,\n keyReadMs,\n // Spent waiting on, or joined to, a derivation another reader was running (one runs at a time).\n waitedMs,\n resolveMs: totalMs - keyReadMs - waitedMs,\n // false: this reader joined a derivation another reader started, or took a held answer.\n derivedHere,\n // Whether the state could be keyed at all; with no key every reader derives and nothing is held.\n keyed: key !== undefined,\n });\n }\n return resolution;\n }\n\n /**\n * The plan's landing, with ONE derivation running at a time (#3204). Every reader of the landing comes through here: the\n * dispatch's selection and the playbook's artifact-state phase alike.\n *\n * **Why.** The key moves with every file a coding run writes, so readers arriving moments apart (a wave's refill, the\n * artifact-state phase, a board, a console poll) each held a different key and each started a derivation of its own. On\n * reference run 42575514613 three ran at once and took 70, 90 and 120 s, every one of them evaluating the whole application\n * in the introspection workers beside ten coding agents' checks, where one alone took 6-27 s.\n *\n * **How.** A derivation of the same plan that STARTED AFTER this reader arrived is joined: it reads the tree no earlier than\n * this reader would, so a commit made before the call is in its answer, which is the freshness a reading owes (#3219). One\n * that started BEFORE is waited for, then the reader asks again, and either joins the next one or reads its key and\n * resolves through the projection cache (a held answer at an unchanged key, else its own derivation). So a reader waits\n * at most once before it joins or derives, when it reads the same plan as the derivations running; a reader of another plan\n * (a re-decompose landing mid-wave) waits at most {@link LANDING_GATE_MAXIMUM_WAITS} times. Each wait is bounded\n * ({@link LANDING_DERIVATION_WAIT_CEILING_MS}): a derivation that does not settle stops gating and is evicted from the\n * projection, so the reader derives beside it, at its key or another, as every reader did before the gate.\n *\n * Joining is by the running derivation's promise, never through the cache's one slot, which a `clear()` or a newer reading\n * may have emptied: going through it at the same key would start a second derivation beside the first (review of 7e5abde26).\n */\n private async resolveLandingUnderGate(tasks: readonly BuildPlanTask[]): Promise<{\n readonly resolution: LandedTaskResolution;\n readonly key: string | undefined;\n readonly derivedHere: boolean;\n readonly keyReadMs: number;\n readonly waitedMs: number;\n }> {\n const planIdentity = JSON.stringify(tasks);\n const arrivedAfter = this.landingDerivationsStarted;\n let keyReadMs = 0;\n let waitedMs = 0;\n let gateLifted = false;\n let waits = 0;\n for (;;) {\n const running = this.runningLandingDerivation();\n if (!gateLifted && running !== undefined) {\n const waitStartedAt = Date.now();\n if (running.ordinal > arrivedAfter && running.planIdentity === planIdentity) {\n const resolution = await running.resolution;\n waitedMs += Date.now() - waitStartedAt;\n return { resolution, key: running.key, derivedHere: false, keyReadMs, waitedMs };\n }\n const settled = await settlesWithin(running.resolution, LANDING_DERIVATION_WAIT_CEILING_MS);\n waitedMs += Date.now() - waitStartedAt;\n waits += 1;\n if (!settled && this.runningLandingDerivation() === running) {\n gateLifted = true;\n // Out of the projection too: at an unchanged key the cache would hand this reader the same pending promise.\n this.landingProjection.evict(running.resolution);\n this.logger.warn('A build plan landing derivation has run past the wait ceiling; the next reader derives beside it', {\n ceilingMs: LANDING_DERIVATION_WAIT_CEILING_MS, taskCount: tasks.length,\n });\n } else if (waits >= LANDING_GATE_MAXIMUM_WAITS) {\n // Only a reader of another plan than the running derivations' gets here (a re-decompose landing mid-wave).\n gateLifted = true;\n }\n continue;\n }\n const keyStartedAt = Date.now();\n const { key, sequence } = await this.readLandingSourceKey(tasks);\n keyReadMs += Date.now() - keyStartedAt;\n // A derivation another reader started while this one read its key started after this reader arrived: join it (same\n // plan) or wait for it (another plan), rather than run beside it.\n if (!gateLifted && this.runningLandingDerivation() !== undefined) continue;\n // Counted around the CALL, which starts a derivation synchronously or returns the held one.\n const derivationsBefore = this.landingProjection.derivations;\n const pendingResolution = this.landingProjection.resolve(key, () => this.computeLandedTaskRefsLogged(tasks), sequence);\n const derivedHere = this.landingProjection.derivations > derivationsBefore;\n if (derivedHere) {\n const registered = { key, planIdentity, ordinal: ++this.landingDerivationsStarted, resolution: pendingResolution };\n this.landingDerivationInFlight = registered;\n const release = (): void => {\n if (this.landingDerivationInFlight === registered) this.landingDerivationInFlight = undefined;\n };\n pendingResolution.then(release, release);\n }\n return { resolution: await pendingResolution, key, derivedHere, keyReadMs, waitedMs };\n }\n }\n\n private runningLandingDerivation(): RunningLandingDerivation | undefined {\n return this.landingDerivationInFlight;\n }\n\n /**\n * {@link computeLandedTaskRefs}, logging what each DERIVATION cost (#3206): one line per derivation, never per held\n * read, so the companion log answers \"how often was landing derived, and how long did it take\" for a wave — the\n * measurement the issue's acceptance is stated in.\n */\n private async computeLandedTaskRefsLogged(tasks: readonly BuildPlanTask[]): Promise<LandedTaskResolution> {\n const startedAt = Date.now();\n const resolution = await this.computeLandedTaskRefs(tasks);\n const durationMs = Date.now() - startedAt;\n const context = {\n taskCount: tasks.length,\n landedCount: resolution.landed.size,\n durationMs,\n provisional: resolution.provisional,\n derivations: this.landingProjection.derivations,\n };\n // Visible without a debug type when it cost something (#3452): deciding what landed took a median 17 s per slot on\n // the reference runs, and nothing reported it.\n if (durationMs >= LANDING_RESOLUTION_LOG_THRESHOLD_MS) this.logger.info('Build plan landing derived', context);\n else this.logDebug('Build plan landing derived', context);\n return resolution;\n }\n\n /**\n * The landing key for this plan at this instant (see `composeLandingSourceKey`), or `undefined` when git could\n * not be read. A read already in progress is joined: the callers of one burst (a wave's selection, a board\n * publication, twenty console polls) arrive within the same moment, and each used to spawn git of its own.\n */\n private readLandingSourceKey(tasks: readonly BuildPlanTask[]): Promise<{ readonly key: string | undefined; readonly sequence: number }> {\n const runStateGeneration = this.landingRunStateGeneration;\n const planIdentity = JSON.stringify(tasks);\n const pending = this.landingKeyRead;\n // Joined only for the same question: the same plan, and no run-state event since the read began.\n if (pending !== undefined && pending.planIdentity === planIdentity && pending.runStateGeneration === runStateGeneration) {\n return pending.key.then((key) => ({ key, sequence: pending.sequence }));\n }\n // The order reads STARTED in: an older reading finishing late must not replace a newer state's slot (F7).\n const sequence = ++this.landingKeyReadSequence;\n const key = this.composeLandingKey(planIdentity, runStateGeneration).finally(() => {\n if (this.landingKeyRead?.key === key) this.landingKeyRead = undefined;\n });\n this.landingKeyRead = { planIdentity, runStateGeneration, key, sequence };\n return key.then((value) => ({ key: value, sequence }));\n }\n\n private async composeLandingKey(planIdentity: string, runStateGeneration: number): Promise<string | undefined> {\n // Feature-detected: a test double of the git service may predate the method, and then nothing is ever held.\n if (typeof this.git.readLandingSourceState !== 'function') return undefined;\n const git = await this.git.readLandingSourceState();\n const saasRoot = this.companionContext.saasRoot;\n /*\n * The build outputs the witnesses read (see the projection's notes), signed exactly as the creation-plane board\n * signs them: each application package's evaluated companion tree, and the schema-plan inputs. Each is walked only\n * when the change feed cannot vouch that no event touched it since its last walk (#3452); a walk is synchronous and\n * about 60-110 ms warm on Wonder Todos, and it used to run on every landing read.\n */\n let buildSignatures: readonly string[];\n try {\n buildSignatures = [\n ...resolveIntrospectedApplicationPackageRoots(this.companionContext)\n .map((packageRoot) => `package:${packageRoot}=${signEvaluatedCompanionTree(packageRoot) ?? 'unreadable'}`),\n `schema-plan:${signSchemaPlanInputs(saasRoot) ?? 'unreadable'}`,\n ];\n } catch (error) {\n // A context this cannot walk authorizes no hit: every reader then derives, as before the projection existed.\n this.logDebug('The landing key could not sign the build outputs; landing is derived without the cache', { error: describeCaughtError(error) });\n return undefined;\n }\n return composeLandingSourceKey({ git, saasRoot, planIdentity, buildSignatures, runStateGeneration });\n }\n\n /**\n * Which of a run's recorded writes git already holds as committed, so nothing of them waits on a commit (#3219): a\n * written path is tracked with HEAD, index and working tree in agreement (landing's own question), and a DELETED path\n * is no longer tracked and no longer on disk. Batched: one `ls-files` + `status` pair, plus one `ls-files` for the\n * deletions. Exposed so \"finished, waiting to be committed\" reads the source landing reads, rather than the stamp the\n * committing doors leave on a run's record.\n *\n * A rename is recorded at its NEW path only, so the origin's removal is not asked; the new path being committed is\n * what the rename's commit carries.\n */\n public async selectSettledRunWrites(files: readonly { readonly path: string; readonly changeKind: string }[]): Promise<ReadonlySet<string>> {\n const deleted = files.filter((file) => file.changeKind === ChangeSetFileChangeKind.DELETED).map((file) => file.path);\n const written = files.filter((file) => file.changeKind !== ChangeSetFileChangeKind.DELETED).map((file) => file.path);\n const [committed, tracked] = await Promise.all([this.git.selectCommittedPaths(written), this.git.selectTrackedPaths(deleted)]);\n const settledDeletions = deleted.filter((path) => !tracked.has(path) && !existsSync(join(this.companionContext.saasRoot, path)));\n // Keyed by path AND kind: one run's deletion of a path another run rewrote is not settled by the rewrite's commit.\n return new Set([\n ...[...committed].map((path) => settledRunWriteKey({ path, changeKind: ChangeSetFileChangeKind.MODIFIED })),\n ...settledDeletions.map((path) => settledRunWriteKey({ path, changeKind: ChangeSetFileChangeKind.DELETED })),\n ]);\n }\n\n /**\n * The derivation behind {@link resolveLandedTaskRefs}: never called except through the projection, so one source\n * state is resolved once however many readers ask.\n */\n private async computeLandedTaskRefs(tasks: readonly BuildPlanTask[]): Promise<LandedTaskResolution> {\n const tracked = trackWitnessAnswers(this.createIntrospectionWitnesses());\n const witnesses = tracked.witnesses;\n // A committed-tree read that FAILED answers \"not committed\"; held, that would be an unknown kept as a fact (F4, #3206 review).\n const readFailuresBefore = this.git.committedReadFailureCount?.() ?? 0;\n /*\n * Three inputs read once for the pass, and read AT ONCE (#3204): none reads another, and two ask workers whose answers\n * the tree's churn invalidates (the specifications evaluation took 18 s on reference run 42523477847, a label plan\n * 17 s). Awaited one after another they made a derivation 36-65 s, once per settled run.\n *\n * - Which tasks' latest run failed verification (#3220): such a task does not land on files that reached HEAD anyway.\n * - The specification findings (#3210, #3211): a task whose own specification its factory refuses has not landed,\n * however committed it is.\n * - Each generation step's landed condition, resolved into a map the loop then reads (see below).\n */\n const generationStepTasks = tasks.filter((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP);\n const [runStanding, specificationFindings, generationStepConditionEntries] = await Promise.all([\n this.readLandingRunStanding(),\n this.readSpecificationFindingsForLanding(),\n Promise.all(generationStepTasks.map(async (task) => [task.taskRef, await this.generationSteps.resolveGenerationStepLandedCondition(task)] as const)),\n ]);\n const refusedSpecificationFaults = this.refusedSpecificationsByTask(tasks, specificationFindings);\n const landed = new Set<string>();\n const unverifiable = new Set<string>();\n const unanswerable = new Set<string>();\n /*\n * The WORKING tree (#3204): a task lands when its product is there and its checks pass, not when it is committed.\n * The agents read the working tree, so a dependent can build on a product the moment it is written; the commit is a\n * checkpoint that records, decided by Paul 2026-11-09. A person's decisions file alone is still read from HEAD (below).\n */\n const landingTree = this.createLandingTreeReader(witnesses);\n // HEAD, for the person's decisions file and for a task no run of its own has checked (`readLandingRunStanding`).\n const committedTree = this.createCommittedTreeReader(witnesses);\n /*\n * Ask git ONCE for the whole plan's probe paths, before the per-task loop asks for them one at a\n * time. Each `isCommitted` costs an `ls-files` + `status` PAIR of subprocesses, and a plan's\n * probes run to hundreds of distinct paths — so this loop was the companion's dominant cost and,\n * because a spawn storm starves the event loop, the reason `/health/ready` stopped answering\n * inside the ten seconds the workbench allows it (see `selectCommittedPaths`, which records the\n * measurement and the repo-root-prefix trap it contains).\n *\n * EVERY probe's paths, the DECLARES kinds included (#3219), although only `COMMITTED_FILE` asks\n * `isCommitted` while LANDING is decided. The answer is not discarded: when a task is found NOT\n * landed, its build record explains it from this same reader, and a path absent from this batch was\n * answered by live git at that later moment. On `app-creation-test-007` that later reading had moved\n * on — a commit landed during a minutes-long pass — and schema tasks were explained by a tree the\n * pass had not judged. Inside the batch the extra paths cost no spawn; it is the one reading of the\n * tree this pass stands on, so a path it explains must be in it.\n *\n * Generation-step conditions ARE gathered, by resolving them once into a map the loop then reads.\n * \"They are few, and they still resolve per path\" was true of the TASKS and wrong about the\n * PATHS: the i18n steps' evidence is `planner units x their locales`, so three generation-step\n * tasks expanded to seventeen `status --porcelain` spawns per resolution — measured at the spawn\n * site 2026-09-22, where they were the largest source left after the probe paths were batched.\n * Resolving the condition here rather than inside the loop is what lets them join the same batch\n * without asking for each condition twice.\n */\n const generationStepConditions = new Map<string, ApplicationBuildGenerationStepLandedCondition>(generationStepConditionEntries);\n await landingTree.primeCommitted([\n ...tasks.flatMap((task) => resolveBuildTaskLandedProbes(task).flatMap(landedProbePaths)),\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.COMMITTED_PATHS ? condition.paths\n : condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT ? [condition.stylesheetPath]\n : condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT ? condition.modulePaths\n : []\n )),\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES ? condition.probes.flatMap(landedProbePaths) : []\n )),\n ]);\n /*\n * And ONE `cat-file --batch` for every path whose committed TEXT a DECLARES probe will read,\n * rather than a `git show` each. Measured at the spawn site 2026-09-22, these were 20 of 45\n * spawns in a ten-second window — four distinct paths, re-read once per resolution.\n *\n * `ANY_COMMITTED_FILE_DECLARES` short-circuits, so this reads candidates the lazy route might\n * have skipped. That is deliberate and it is not a cost: the whole set rides one subprocess, and\n * the bytes are the same bytes. What it buys is that the count no longer depends on which\n * candidate happened to satisfy the probe first.\n */\n await landingTree.primeTexts([\n ...tasks.flatMap((task) => resolveBuildTaskLandedProbes(task)\n .filter((probe) => probe.kind !== BuildPlanTaskLandedProbeKind.COMMITTED_FILE)\n .flatMap(landedProbePaths)),\n // The engine-capabilities step reads the committed configuration's text (#2497): one batch, not its own spawn.\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES\n ? condition.probes.filter((probe) => probe.kind !== BuildPlanTaskLandedProbeKind.COMMITTED_FILE).flatMap(landedProbePaths)\n : []\n )),\n ...[...generationStepConditions.values()].flatMap((condition) => (\n condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED\n || condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED ? [condition.configPath] : []\n )),\n ]);\n /*\n * The COMMITTED reading a task no run of its own has checked must also satisfy (#3204 review F2): one batch for all of\n * them, never a git pair per path (the #1005 storm, at the start of a build when no task has run).\n */\n const uncheckedTasks = tasks.filter((task) => task.target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && (runStanding === undefined || !runStanding.ranTaskRefs.has(task.taskRef)));\n const uncheckedProbes = uncheckedTasks.flatMap((task) => resolveBuildTaskLandedProbes(task));\n await committedTree.primeCommitted(uncheckedProbes.flatMap(landedProbePaths));\n await committedTree.primeTexts(uncheckedProbes.filter((probe) => probe.kind !== BuildPlanTaskLandedProbeKind.COMMITTED_FILE).flatMap(landedProbePaths));\n for (const task of tasks) {\n if (task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) {\n /*\n * A generation step declares HOW it proves it landed, because not every step proves it with\n * files. Most name the exact unit files their pipelines write (see that service's JSDoc for\n * why a directory prefix would be dishonest). The migration step cannot — its artifact is\n * `backend-api/migrations/<timestamp>_<name>/migration.sql` and the timestamp is minted\n * during the run — so it lands on the STATE it exists to reach instead.\n *\n * Read the condition, never the evidence paths: for the migration step those name the\n * accepted lockfile, which predates the step, so landing on it would pass having verified\n * nothing.\n */\n // Resolved ONCE above, so its paths could join the batch; reading it again here would ask the\n // generation-step service the same question twice per resolution.\n const condition = generationStepConditions.get(task.taskRef)\n ?? await this.generationSteps.resolveGenerationStepLandedCondition(task);\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.SCHEMA_PLAN_IN_SYNC) {\n const syncState = await this.generationSteps.readSchemaPlanSyncState();\n if (syncState === SchemaPlanSyncState.IN_SYNC) landed.add(task.taskRef);\n else if (syncState === SchemaPlanSyncState.UNANSWERABLE) unanswerable.add(task.taskRef);\n continue;\n }\n // The application owes this step nothing (a translation step on a one-locale app): landed, or it\n // would sit at the head of the queue forever on an evidence list that is empty by construction.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.NOT_OWED) {\n landed.add(task.taskRef);\n continue;\n }\n /*\n * The `design-tokens` step: the stylesheet is committed AND its block is current. The block check\n * is asked even when the stylesheet is uncommitted, because an UNANSWERABLE answer (a config that\n * does not load, a CLI that is absent) is what tells the selector to pass the step over rather than\n * run a `generate` that would fail the same way.\n */\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DESIGN_TOKEN_BLOCK_CURRENT) {\n const blockState = await this.generationSteps.readDesignTokenBlockState();\n if (blockState === DesignTokenBlockState.UNANSWERABLE) unanswerable.add(task.taskRef);\n else if (blockState === DesignTokenBlockState.CURRENT && await landingTree.isCommitted(condition.stylesheetPath)) landed.add(task.taskRef);\n continue;\n }\n /*\n * The `design-system-brand` step: every module it writes (the frontend's brand design, and the website's colours\n * when a website is declared) is committed AND says what the brand's visual tone renders. Asked even when a\n * module is uncommitted, for the design-tokens reason: an UNANSWERABLE answer (a brand\n * specification that does not evaluate) is what tells the selector to pass the step over.\n */\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.BRAND_DESIGN_CURRENT) {\n const designState = await this.generationSteps.readBrandDesignState();\n if (designState === BrandDesignState.UNANSWERABLE) unanswerable.add(task.taskRef);\n else if (designState === BrandDesignState.CURRENT && (await Promise.all(condition.modulePaths.map((modulePath) => landingTree.isCommitted(modulePath)))).every(Boolean)) {\n landed.add(task.taskRef);\n }\n continue;\n }\n // The logo step: landed on a committed MASTER asset the committed module lists, never on the module's\n // presence — the scaffold commits the module empty (#2410).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ACCEPTED_BRAND_MARK) {\n if (await this.readsAcceptedBrandMark(condition.modulePath, landingTree)) landed.add(task.taskRef);\n continue;\n }\n // A labels plan that hides owed units never lands (#2504).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LABEL_PLAN_INCOMPLETE) continue;\n // The display-name step on a brand nobody could read (#2694): not landed, and passed over as unanswerable, like\n // the design steps, so the scheduler does not run a step that would fail the same way.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) {\n unanswerable.add(task.taskRef);\n continue;\n }\n // The labels step (#2504): every unit file committed and every frontend root id declared.\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.LANDED_PROBES) {\n const satisfied = await Promise.all(condition.probes.map((probe) => this.isLandedProbeSatisfied(probe, landingTree)));\n if (satisfied.every(Boolean)) landed.add(task.taskRef);\n continue;\n }\n // The display-name step: landed when the committed configuration carries the brand's name (#2505).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) {\n if (await this.displayNameApplied(condition, landingTree)) landed.add(task.taskRef);\n continue;\n }\n // The engine-capabilities step: landed when the committed configuration enables every capability it owes (#2497).\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) {\n if ((await this.capabilitiesNotEnabledIn(condition, landingTree)).length === 0) landed.add(task.taskRef);\n continue;\n }\n if (condition.paths.length === 0) continue;\n const committedPaths = await Promise.all(condition.paths.map((path) => landingTree.isCommitted(path)));\n if (committedPaths.every(Boolean)) landed.add(task.taskRef);\n continue;\n }\n const probes = resolveBuildTaskLandedProbes(task);\n if (probes.length === 0) {\n /*\n * A task that declares NO product cannot prove it landed — and that is a WORKFLOW gap, not a\n * gate. `application-creation-directive.md` asks the deciding question directly: if this\n * refuses, what does the operator do next? The answer here is \"declare what the task\n * produces\", which is authoring work — so it must MARK and let the loop continue, exactly as\n * an unapproved release travels with its advisory instead of stopping the build.\n *\n * It was a gate until 2026-09-12, and the cost is measured. Readiness is \"not landed\", so an\n * unprovable task is ready FOREVER and is permanently `ready[0]`: `dispatch-next` re-ran\n * `build-task-contact-schema` three times at roughly $7.50 a turn, and the loop guard below\n * then converted that into a permanent refusal at the same task. Both are stuck; neither is\n * honest about WHY. Against Wonder CRM's 42-task plan the two candidate fixes measure\n * 1 reachable (skip it, leave its dependents blocked) against 42 (run it once, mark it,\n * advance) — because every product-declaring task there sits behind one that declares none.\n *\n * So landing here means RAN, not PROVEN, and the difference is carried rather than hidden:\n * the ref goes into `unverifiableLandedTaskRefs`, which rides the dispatch plan to every\n * caller. Keyed on a COMPLETED durable run, never on the task's mere existence — a task\n * nobody has run has not landed by any reading, and admitting it would let the whole plan\n * report itself finished having done nothing.\n */\n /*\n * A FOLLOW-UP (#2496) lands here too, even when its own run still reports a gap: it declares no product, so it\n * lands RAN-not-PROVEN, and the gap stays on its run's record, where the build record shows it under \"reported a\n * requirement still unmet\". Holding it unlanded was tried (review F7) and is the defect\n * `application-creation-directive.md` names: the only remedy was a person's decision, and meanwhile the whole\n * plan read as stuck. To have the gap worked again, a person runs the follow-up once more, saying why:\n * `wildo build run <ref> --despite-landed --reason operator-judgement --note \"<why>\"`.\n */\n const priorRun = await this.dispatch.findCompletedRunForBuildTask(task.taskRef);\n if (priorRun !== null) {\n landed.add(task.taskRef);\n unverifiable.add(task.taskRef);\n }\n continue;\n }\n const answered = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, landingTree)));\n if (!answered.every(Boolean) || runStanding?.heldBack.has(task.taskRef) || refusedSpecificationFaults.has(task.taskRef)) continue;\n // A task no run of its own checked lands only once its product is committed too (see `readLandingRunStanding`).\n if (runStanding === undefined || !runStanding.ranTaskRefs.has(task.taskRef)) {\n const committed = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, committedTree)));\n if (!committed.every(Boolean)) continue;\n }\n landed.add(task.taskRef);\n }\n /*\n * A failing specifications module (#3258): a read of the package may be short whatever it answered, so a check that reads\n * it cannot answer, and a short brand reads as stale. A step whose check could not answer lands RAN-not-PROVEN if it has\n * a completed run, the mark a task with no product carries: leaving it out would stop every task behind it, the coding\n * task that repairs the module among them. A check that answered \"no\" (paths not committed, no accepted logo) stays not\n * landed, and one that never ran is passed over, never run. The pass is provisional for as long as the fault lasts, so\n * the first clean pass proves a marked step or takes it back.\n *\n * Not undone by that: a task prepared behind a step later found stale stands, and the step runs again after it. The mark\n * lets tasks pass and proves nothing: `resolveBuildExecutionProgress` does not count a marked step, and every reading of\n * \"done\" goes through `buildPlanIsFinished`.\n *\n * LIMIT: a fault only a step's own output can cure stays held, with no write: the step that would cure it is the one\n * passed over, so a coding task or a person has to. No ordinary case of this was found.\n */\n const modulesHoldingGenerationSteps = specificationFindings === undefined ? [] : specificationFaultModules(specificationFindings);\n if (modulesHoldingGenerationSteps.length === 0) this.modulesWithNoRepairToRun = undefined;\n const specificationRepairOwed = modulesHoldingGenerationSteps.length > 0 && await this.readSpecificationRepairOwed(specificationFindings);\n if (modulesHoldingGenerationSteps.length > 0) {\n const attemptHistory = await this.readGenerationStepAttemptHistory();\n for (const task of tasks) {\n if (task.target?.kind !== BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP || landed.has(task.taskRef)) continue;\n if (!generationStepReadsSpecifications(task.target.generationStepRef)) continue;\n const latest = attemptHistory?.get(task.taskRef)?.[0];\n const ran = latest?.status === FlowsActors_Status.COMPLETED && latest.rearm === undefined;\n const checkKind = generationStepConditions.get(task.taskRef)?.kind;\n if (ran && checkKind !== undefined && generationStepCheckReadsSpecifications(checkKind)) {\n landed.add(task.taskRef);\n unverifiable.add(task.taskRef);\n unanswerable.delete(task.taskRef);\n } else if (!ran || await this.classifyRanGenerationStep(task, attemptHistory) === null) {\n // A step that ran and awaits its commit stays out of this: the selection reports it as that.\n unanswerable.add(task.taskRef);\n }\n }\n }\n // A person's committed closures (#3224, #3227), after every probe and mark: a closure satisfied by a task counts only while it is landed.\n // From HEAD: a decision counts once a person's door committed it (`readBuildTaskDecisionsStanding`), never as a working edit.\n const decisions = await this.readCommittedBuildTaskDecisions(committedTree);\n const closedTaskRefs = resolveClosedBuildTaskRefs({ closures: decisions.closures, planTaskRefs: new Set(tasks.map((task) => task.taskRef)), landed });\n for (const taskRef of closedTaskRefs.keys()) {\n landed.add(taskRef);\n unanswerable.delete(taskRef);\n }\n // UNKNOWN decisions (R2): a generation step they name is passed over as unanswerable rather than run again.\n const decisionsUnknown = decisions.standing === BuildTaskDecisionsStanding.UNKNOWN;\n if (decisionsUnknown) {\n for (const task of tasks) {\n if (decisions.heldTaskRefs?.has(task.taskRef) && task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP && !landed.has(task.taskRef)) unanswerable.add(task.taskRef);\n }\n }\n return {\n closedTaskRefs,\n followUpApprovals: decisions.followUpApprovals,\n modulesHoldingGenerationSteps,\n specificationRepairOwed,\n buildTaskDecisions: {\n standing: decisions.standing,\n ...(decisions.reason !== undefined ? { reason: decisions.reason } : {}),\n ...(decisions.conditions !== undefined ? { conditions: decisions.conditions } : {}),\n ...(decisions.heldTaskRefs !== undefined ? { heldTaskRefs: decisions.heldTaskRefs } : {}),\n },\n landed,\n unverifiableLandedTaskRefs: [...unverifiable].sort(),\n unanswerableGenerationStepTaskRefs: unanswerable,\n generationStepConditions,\n witnesses,\n landingTree,\n ...(runStanding !== undefined ? { heldBackTaskRefs: runStanding.heldBack, awaitingIsolatedRecheck: runStanding.awaitingIsolatedRecheck } : {}),\n refusedSpecificationFaults,\n provisional: decisionsUnknown || unanswerable.size > 0 || modulesHoldingGenerationSteps.length > 0 || await tracked.anyUnanswered() || (this.git.committedReadFailureCount?.() ?? 0) > readFailuresBefore\n // A run history nobody could read may hide a failed verification that would hold a task back (#3220).\n || (runStanding === undefined && typeof this.executions?.listActorExecutions === 'function'),\n };\n }\n\n /**\n * Whether a task that already COMPLETED a run without landing may be offered once more (#3204, #3210), and if not, why.\n *\n * - A PARKED later run wins (review B2): re-dispatching would abandon its persisted session.\n * - The bound counts every attempt since, not only completed ones (review B1): completed runs nobody re-armed PLUS\n * the task's own attributable failed runs. Counting completed runs alone let a task whose retries kept failing be\n * re-offered for ever, which is the #606 loop. A cancelled run or one a restart interrupted is not counted, exactly as\n * for a task that never completed (the attempt budget, #1536, does not count them either).\n * - An unmet probe that cannot be ANSWERED (a configuration that cannot be materialized, an unreadable witness) is not\n * an absent product (review B3, #3223 \"unknown is not not-landed\"): the task is held rather than sent to rebuild\n * something that may be there. Asked only when `resolution` is passed (the absent-product branch).\n *\n * A port without the completed-run listing holds the task, as the loop guard always did.\n */\n private async retryOfACompletedTask(\n candidate: BuildPlanTask,\n maximumAttempts: number,\n resolution?: Pick<LandedTaskResolution, 'witnesses'>,\n ): Promise<CompletedTaskRetry | ApplicationBuildStuckTask> {\n if (typeof this.dispatch.listCompletedRunsForBuildTask !== 'function') return CompletedTaskRetry.HOLD;\n const parkedRun = await this.dispatch.findParkedRunForBuildTask(candidate.taskRef);\n if (parkedRun !== null) {\n return { taskRef: candidate.taskRef, priorTaskId: parkedRun.taskId, reason: Workbench_BuildTaskStuckReason.PARKED_AWAITING_ANSWER, question: parkedRun.question };\n }\n const completedRuns = (await this.dispatch.listCompletedRunsForBuildTask(candidate.taskRef)).filter((run) => readBuildTaskRearm(run.memory) === undefined).length;\n const failedRuns = (await this.dispatch.listAttributableFailedRunsForBuildTask(candidate.taskRef)).length;\n if (completedRuns + failedRuns >= maximumAttempts) return CompletedTaskRetry.HOLD;\n if (resolution !== undefined && (await this.readUnmetProbes(candidate, resolution)).unanswerable) return CompletedTaskRetry.HOLD;\n return CompletedTaskRetry.OFFER;\n }\n\n /**\n * The task's probes the WORKING TREE does not satisfy, and whether any of them cannot be answered at all (a shell or\n * agent-work probe whose explanation is `unanswerable`). Read against the landing pass's witnesses, so the brief and\n * the classification agree (#3204).\n */\n private async readUnmetProbes(task: BuildPlanTask, resolution: Pick<LandedTaskResolution, 'witnesses'>): Promise<{ readonly unmet: readonly BuildPlanTaskLandedProbe[]; readonly unanswerable: boolean }> {\n const worktree = this.createWorktreeReader(resolution.witnesses);\n const probes = resolveBuildTaskLandedProbes(task);\n const satisfied = await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, worktree)));\n const unmet = probes.filter((_, index) => !satisfied[index]);\n const explanations = await Promise.all(unmet.map(async (probe) => {\n if (isShellProbe(probe)) return this.explainShellProbe(probe, worktree);\n if (isAgentWorkProbe(probe)) return this.explainAgentWorkProbe(probe, worktree);\n return undefined;\n }));\n const unanswerable = explanations.some((explanation) => explanation?.unanswerable !== undefined);\n return { unmet: unmet.filter((_, index) => explanations[index]?.unanswerable === undefined), unanswerable };\n }\n\n /**\n * The probes a task's COMPLETED runs left unmet in the WORKING TREE, for the brief of its next run (#3204), with how many\n * runs completed; `undefined` for a task with no completed run, or none unmet. A probe that cannot be answered is left\n * out (review B3): the brief must not tell the agent something is missing that the companion could not read.\n */\n private async readUnmetProductOfACompletedTask(\n task: BuildPlanTask,\n resolution: Pick<LandedTaskResolution, 'witnesses'>,\n ): Promise<{ readonly probes: readonly BuildPlanTaskLandedProbe[]; readonly completedRuns: number } | undefined> {\n if (typeof this.dispatch.listCompletedRunsForBuildTask !== 'function') return undefined;\n const completedRuns = (await this.dispatch.listCompletedRunsForBuildTask(task.taskRef)).filter((run) => readBuildTaskRearm(run.memory) === undefined).length;\n if (completedRuns === 0) return undefined;\n const { unmet } = await this.readUnmetProbes(task, resolution);\n return unmet.length > 0 ? { probes: unmet, completedRuns } : undefined;\n }\n\n /**\n * Whether a stuck task's declared product is in the tree its landing pass judged (#3204: the working tree), asked of\n * THAT pass's reader (#3219), so the answer is the pass's own and never a later reading: a task that holds its product\n * and is still not landed was held back by something else (a failed verification), never by the tree. `undefined` for\n * a task that declares no product. Asked only for a task that already ran and is stuck, so it costs nothing on the hot\n * path.\n */\n private async productPresentInLandingTree(task: BuildPlanTask, resolution: Pick<LandedTaskResolution, 'landingTree'>): Promise<boolean | undefined> {\n const probes = resolveBuildTaskLandedProbes(task);\n if (probes.length === 0) return undefined;\n return (await Promise.all(probes.map((probe) => this.isLandedProbeSatisfied(probe, resolution.landingTree)))).every(Boolean);\n }\n\n /**\n * Does the resolved-assets module, as `tree` holds it, record an accepted brand mark (#2410)? The same predicate the\n * logo step's skip check uses, so the step and its landing cannot disagree about what \"accepted\" means.\n */\n private async readsAcceptedBrandMark(modulePath: string, tree: CommittedTreeReader): Promise<boolean> {\n return hasAcceptedBrandMark(await tree.readText(modulePath), (path) => tree.isCommitted(path));\n }\n\n /**\n * The tree a build task's LANDING is judged on (#3204): the WORKING tree, through the git service's working-tree port\n * (`isWorktreePathPresent`, `readWorktreeText` and their batches), where \"is committed\" reads as \"the application holds\n * this file\": on disk and seen by git, so an ignored file is never a product. Memoized for one pass and primed in one\n * batch, exactly like {@link createCommittedTreeReader}, so a pass rests on ONE reading of the tree. Never throws.\n */\n private createLandingTreeReader(witnesses: IntrospectionWitnesses = this.createIntrospectionWitnesses()): CommittedTreeReader {\n const present = new Map<string, Promise<boolean>>();\n const texts = new Map<string, Promise<string | undefined>>();\n const isPresent = (path: string) => memoizeByPath(present, path, () => this.git.isWorktreePathPresent(path));\n const primePresence = async (paths: readonly string[]) => {\n const unanswered = [...new Set(paths)].filter((path) => !present.has(path));\n if (unanswered.length === 0) return;\n const seen = await this.git.selectPresentPaths(unanswered);\n for (const path of unanswered) {\n if (!present.has(path)) present.set(path, Promise.resolve(seen.has(path)));\n }\n };\n return {\n isCommitted: isPresent,\n // Text only of a path the application holds: an ignored file's text never satisfies a DECLARES probe either.\n readText: (path) => memoizeByPath(texts, path, async () => ((await isPresent(path)) ? this.git.readWorktreeText(path) : undefined)),\n primeCommitted: primePresence,\n primeTexts: async (paths) => {\n const unread = [...new Set(paths)].filter((path) => !texts.has(path));\n if (unread.length === 0) return;\n await primePresence(unread);\n const held = (await Promise.all(unread.map(async (path) => ((await isPresent(path)) ? path : undefined)))).filter((path): path is string => path !== undefined);\n const read = await this.git.readWorktreeTexts(held);\n for (const path of unread) {\n if (!texts.has(path)) texts.set(path, Promise.resolve(read.get(path)));\n }\n },\n ...witnesses,\n };\n }\n\n /** The working tree behind the same reader shape: a path \"is committed\" here when it exists on disk. Never throws. */\n private createWorktreeReader(witnesses: IntrospectionWitnesses = this.createIntrospectionWitnesses()): CommittedTreeReader {\n const texts = new Map<string, Promise<string | undefined>>();\n const readText = (path: string) => memoizeByPath(texts, path, () => readFile(join(this.companionContext.saasRoot, path), 'utf8').catch(() => undefined));\n return {\n isCommitted: async (path) => (await readText(path)) !== undefined,\n readText,\n // Reading the worktree spawns nothing, so there is no batch to win here.\n primeCommitted: async () => {},\n primeTexts: async () => {},\n ...witnesses,\n };\n }\n\n /**\n * The tree as a pathspec commit of `committing` would leave it (#2209): those paths as they stand on disk\n * (`commitPaths` takes each whole working file), every other path as HEAD has it. Behind the reader shape\n * landing asks, so the accept asks exactly landing's question of the commit it is about to make.\n */\n private createProspectiveCommitReader(committing: ReadonlySet<string>): CommittedTreeReader {\n const witnesses = this.createIntrospectionWitnesses();\n const worktree = this.createWorktreeReader(witnesses);\n const committed = this.createCommittedTreeReader(witnesses);\n return {\n isCommitted: (path) => (committing.has(path) ? worktree.isCommitted(path) : committed.isCommitted(path)),\n readText: (path) => (committing.has(path) ? worktree.readText(path) : committed.readText(path)),\n primeCommitted: (paths) => committed.primeCommitted(paths.filter((path) => !committing.has(path))),\n primeTexts: (paths) => committed.primeTexts(paths.filter((path) => !committing.has(path))),\n shellWitness: committed.shellWitness,\n agentWorkWitness: committed.agentWorkWitness,\n applicationConfigurationWitness: committed.applicationConfigurationWitness,\n };\n }\n\n /** A fresh {@link CommittedTreeReader} for one landing resolution; never shared across resolutions. */\n private createCommittedTreeReader(witnesses: IntrospectionWitnesses = this.createIntrospectionWitnesses()): CommittedTreeReader {\n const committed = new Map<string, Promise<boolean>>();\n const texts = new Map<string, Promise<string | undefined>>();\n return {\n isCommitted: (path) => memoizeByPath(committed, path, () => this.git.isWorktreePathCommitted(path)),\n readText: (path) => memoizeByPath(texts, path, () => this.git.readCommittedText(path)),\n primeCommitted: async (paths) => {\n /*\n * One batched answer for the whole set, seeded into the SAME memo the per-path route fills.\n * Paths already resolved (or in flight) are left alone: their answer is the one this\n * resolution has been handing out, and replacing it mid-pass would let one landing decision\n * rest on two different readings of the tree.\n */\n const unanswered = [...new Set(paths)].filter((path) => !committed.has(path));\n if (unanswered.length === 0) return;\n const committedPaths = await this.git.selectCommittedPaths(unanswered);\n for (const path of unanswered) {\n if (!committed.has(path)) committed.set(path, Promise.resolve(committedPaths.has(path)));\n }\n },\n primeTexts: async (paths) => {\n // Same contract as `primeCommitted`: seed the memo `readText` fills, never replace an answer\n // this resolution has already handed out.\n const unread = [...new Set(paths)].filter((path) => !texts.has(path));\n if (unread.length === 0) return;\n const committedTexts = await this.git.readCommittedTexts(unread);\n for (const path of unread) {\n if (!texts.has(path)) texts.set(path, Promise.resolve(committedTexts.get(path)));\n }\n },\n ...witnesses,\n };\n }\n\n /**\n * The introspection witnesses of ONE landing resolution, shared by every reader it creates: the working tree, HEAD and\n * the prospective commit ask the same live application, so a records read explaining unmet probes on both trees\n * introspects once rather than once per reader (#2966 review).\n */\n private createIntrospectionWitnesses(): IntrospectionWitnesses {\n return {\n shellWitness: this.memoizedShellWitness(),\n agentWorkWitness: this.memoizedAgentWorkWitness(),\n applicationConfigurationWitness: this.memoizedApplicationConfigurationWitness(),\n };\n }\n\n /** A once-per-reader memo of {@link resolveShellWitness}, so a landing resolution introspects at most once. */\n private memoizedShellWitness(): () => Promise<ShellWitness> {\n let pending: Promise<ShellWitness> | undefined;\n return () => (pending ??= this.resolveShellWitness());\n }\n\n /** A once-per-reader memo of {@link resolveAgentWorkWitness} (#2966). */\n private memoizedAgentWorkWitness(): () => Promise<AgentWorkWitness> {\n let pending: Promise<AgentWorkWitness> | undefined;\n return () => (pending ??= this.resolveAgentWorkWitness());\n }\n\n /**\n * What the application's backend registers of its agent work (#2966), through the `agent-work-declarations` behavior.\n * Every failure is an `answered: false` with its reason, never a throw and never an empty registry, for the reason\n * {@link resolveShellWitness} gives: a registry nobody could read is not one that registers nothing.\n */\n private async resolveAgentWorkWitness(): Promise<AgentWorkWitness> {\n const serviceKey = this.introspection.describeCatalog().defaultBackendServiceKey;\n if (!serviceKey) return { answered: false, reason: 'The application declares no SaaS backend to read its registered agents from.' };\n try {\n // Landing acts on this answer either way (a task lands, or is held back), so a held answer is checked against the\n // source as it stands (#2305 review), never served from before the last edit the watcher has not reported yet.\n const result = await this.introspection.requestInfo({ serviceKey, behavior: 'agent-work-declarations' }, { verifyAgainstSource: true });\n if (!result.success) return { answered: false, reason: `The backend's registry could not be read: ${result.error.message}` };\n return { answered: true, declarations: result.data as AgentWorkDeclarations };\n } catch (error) {\n return { answered: false, reason: `The backend's registry could not be read: ${describeCaughtError(error)}` };\n }\n }\n\n /** A once-per-reader memo of {@link resolveApplicationConfigurationWitness} (#2305 S6). */\n private memoizedApplicationConfigurationWitness(): () => Promise<ApplicationConfigurationWitness> {\n let pending: Promise<ApplicationConfigurationWitness> | undefined;\n return () => (pending ??= this.resolveApplicationConfigurationWitness());\n }\n\n /**\n * What the application's configuration declares (#2305 S6, #3035, #3039), read from `wildo.saas.config.ts` FRESH: a\n * build task may have just conferred a role, declared an organization type or a relationship kind, or declared the\n * system-of-record instance a binding names. Asked only when a probe needing it is judged, and independent of the\n * backend, which a configuration fact never needs. Never the companion's startup copy as a fallback, which would prove a role nobody\n * conferred: an unreadable configuration answers `false` with the loader's own message, which is where the likeliest\n * mistake (a conferred role a granting type does not offer, refused by `defineSaasConfig`) is named.\n *\n * Fresh means the configuration module and the files it imports by RELATIVE path are re-evaluated. A value it imports\n * from a PACKAGE (a role constant from `@app/shared-lib`) is not: a native ESM package import is evaluated once and\n * held for the process's lifetime (`loader.ts`), so an edit to that value is seen only after the companion restarts,\n * and until then the probe answers on the value it first read (#2305 review). Declaring the conferred roles in the\n * configuration itself, or in a file it imports by relative path, avoids that.\n */\n private async resolveApplicationConfigurationWitness(): Promise<ApplicationConfigurationWitness> {\n try {\n const config = await loadSaasConfig(join(this.companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true });\n if (!config) return { answered: false, reason: 'wildo.saas.config.ts was not found at the application root.' };\n /*\n * #3045: whether each instance's vendor can split its records, from the facet library where the backend resolves it\n * (or the framework checkout). Read only when an instance is partitioned, the one case that needs it.\n */\n const systemsOfRecord = (config as { systemsOfRecord?: Record<string, SystemOfRecordInstanceFacetRequest & { partition?: unknown } | undefined> }).systemsOfRecord ?? {};\n // Each instance's EFFECTIVE facet, augmentations included, through the engine's own resolver (#3053).\n const facets = Object.values(systemsOfRecord).some((instance) => instance?.partition === true)\n ? await loadEffectiveSystemOfRecordFacets({\n applicationRoot: this.companionContext.saasRoot,\n frameworkRoot: this.companionContext.resolvedHomes?.framework?.repositoryRoot ?? undefined,\n systemsOfRecord,\n })\n : undefined;\n return {\n answered: true,\n configuration: applicationConfigurationDeclarationsOf(config, facets === undefined ? undefined : systemOfRecordInstancePartitionSupportOf(facets, Object.keys(systemsOfRecord))),\n };\n } catch (error) {\n return { answered: false, reason: `wildo.saas.config.ts could not be loaded: ${describeCaughtError(error)}` };\n }\n }\n\n /**\n * Every file a configuration file reaches by relative import, read from the WORKING TREE (#2305 review): the registry\n * and the configuration witness evaluate the working tree, so these are the files whose content they read, and each\n * must then be committed in whichever tree the caller asks about. Reading them from that tree instead (an earlier\n * version) dropped a NEW imported file HEAD lacks, so a task landed on content no commit carried. Followed to closure,\n * a directory specifier resolving to its `index.ts`. A specifier naming nothing on disk is left out, since the\n * configuration could not load with it, which the registry read reports. A closure that would pass\n * {@link CONFIGURATION_IMPORT_CLOSURE_LIMIT} files answers `truncated` instead of a partial list.\n */\n private async configurationImportClosure(importerPath: string): Promise<{ readonly files: readonly string[]; readonly truncated: boolean }> {\n const readFromDisk = (path: string): Promise<string | undefined> => readFile(join(this.companionContext.saasRoot, path), 'utf8').catch(() => undefined);\n const reached: string[] = [];\n const seen = new Set<string>([importerPath]);\n const pending: { path: string; text: string }[] = [];\n const root = await readFromDisk(importerPath);\n if (root !== undefined) pending.push({ path: importerPath, text: root });\n while (pending.length > 0) {\n const { path: importer, text } = pending.shift()!;\n for (const candidate of relativeImportedFiles(importer, text)) {\n for (const path of [candidate, `${candidate.replace(/\\.ts$/u, '')}/index.ts`]) {\n if (seen.has(path)) break;\n const imported = await readFromDisk(path);\n if (imported === undefined) continue;\n if (reached.length === CONFIGURATION_IMPORT_CLOSURE_LIMIT) return { files: reached, truncated: true };\n seen.add(path);\n reached.push(path);\n pending.push({ path, text: imported });\n break;\n }\n }\n }\n return { files: reached, truncated: false };\n }\n\n /** Why a registry probe is or is not satisfied (#2966) — the answer landing uses and the detail the record reports. */\n private async explainAgentWorkProbe(probe: AgentWorkLandedProbe, tree: CommittedTreeReader): Promise<AgentWorkProbeExplanation> {\n let missing: readonly AgentWorkShortfall[];\n if (isConfigurationProvenProduct(probe.product)) {\n // #2305 S6, #3035: a configuration fact, judged from the configuration alone. One that could not be loaded is\n // unanswerable (#2305 review), like a registry nobody could read: it says nothing about what the application declares.\n const configuration = await tree.applicationConfigurationWitness();\n if (!configuration.answered) return { satisfied: false, unanswerable: configuration.reason, missing: [], absentPaths: [] };\n missing = findConfigurationShortfalls(probe.product, configuration.configuration);\n } else {\n const witness = await tree.agentWorkWitness();\n if (!witness.answered) return { satisfied: false, unanswerable: witness.reason, missing: [], absentPaths: [] };\n // A resource whose configuration could not be materialized declares nothing that can be read, which is not the same\n // as declaring nothing (#2305 review).\n const unreadable = unreadableResourceConfigurationFor(probe.product, witness.declarations);\n if (unreadable) {\n return { satisfied: false, unanswerable: `The configuration of ${unreadable.resourceType} could not be materialized: ${unreadable.reason}`, missing: [], absentPaths: [] };\n }\n missing = findAgentWorkShortfalls(probe.product, probe.moduleRef, witness.declarations);\n if (probe.product.kind === BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) {\n // #3039: the binding is the registry's to say and the instance it names is the configuration's. A binding on an\n // instance the application does not declare is refused by the backend at startup, so it has not landed.\n const configuration = await tree.applicationConfigurationWitness();\n if (!configuration.answered) return { satisfied: false, unanswerable: configuration.reason, missing, absentPaths: [] };\n missing = [...missing, ...findSystemOfRecordDeclarationShortfalls(probe.product, configuration.configuration)];\n // #3045: a partition whose vendor's facet could not be read is unknown, never landed.\n const partitionUnknown = systemOfRecordPartitionUnanswerable(probe.product, configuration.configuration);\n if (partitionUnknown !== undefined) return { satisfied: false, unanswerable: partitionUnknown, missing, absentPaths: [] };\n }\n }\n /*\n * The registration files, and every file THIS reader's copy of the agent index imports: the committed index's imports\n * must be committed, and the working tree's index's imports must exist. A sibling task's draft that no index imports\n * yet is nobody's registration, so it holds nothing back.\n */\n const indexText = probe.followImportsOf === undefined ? undefined : await tree.readText(probe.followImportsOf);\n const configurationImports = probe.followRelativeImportsOf === undefined\n ? { files: [], truncated: false }\n : await this.configurationImportClosure(probe.followRelativeImportsOf);\n if (configurationImports.truncated) {\n return {\n satisfied: false,\n unanswerable: `${probe.followRelativeImportsOf} reaches more than ${CONFIGURATION_IMPORT_CLOSURE_LIMIT} files by relative import, so whether they are all committed was not asked.`,\n missing,\n absentPaths: [],\n };\n }\n const files = [...new Set([\n ...probe.registrationFiles,\n ...(indexText === undefined ? [] : flowsActorsIndexImportedFiles(probe.followImportsOf!, indexText)),\n ...configurationImports.files,\n ])];\n // One batched question for every file, as `landedProbePaths` primes registration files (#2305 review).\n await tree.primeCommitted(files);\n const held = await Promise.all(files.map((path) => tree.isCommitted(path)));\n const absentPaths = files.filter((_, index) => !held[index]);\n return { satisfied: missing.length === 0 && absentPaths.length === 0, missing, absentPaths };\n }\n\n /**\n * The resolved shell beside the placement plan (#1538): what each surface carries, by identity,\n * against what the plan PLACED there and what it DECLINED.\n *\n * Read through introspection because the identities exist only in the RESOLVED configuration: a\n * module's contribution merges into the shell at runtime, and the tree's text spells none of the\n * plan's refs. Every failure is an `answered: false` with its reason — never a throw, which would\n * abort the whole landing resolution for one surface, and never an empty \"carries nothing\", which\n * would read as a real no.\n */\n private async resolveShellWitness(): Promise<ShellWitness> {\n const exports = await loadSpecificationFamilyData(this.companionContext);\n let authored: unknown;\n try {\n authored = (exports as unknown as Record<string, unknown>).placementPlanSpecification;\n } catch (error) {\n if (error instanceof SpecificationUnavailableError) return { answered: false, reason: error.message };\n throw error;\n }\n if (authored === undefined || authored === null) {\n return { answered: false, reason: 'The application has no placement plan, so nothing says what its shell should carry.' };\n }\n const plan = PlacementPlanSchema.safeParse(authored);\n if (!plan.success) {\n return { answered: false, reason: `The placement plan does not satisfy its schema: ${plan.error.issues.slice(0, 2).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}` };\n }\n const serviceKey = this.introspection.describeCatalog().defaultFrontendServiceKey;\n if (!serviceKey) {\n return { answered: false, reason: 'The application declares no SaaS frontend to read its shell from.' };\n }\n /*\n * The shell is read from the frontend's BUILT config library, so it is dated first (#3226): a library older than its\n * source answers about a shell nobody has any more, and read as \"carries nothing\" it kept app-creation-test-007's\n * correctly committed sidebar unlanded. Unanswerable, never empty, until the library is rebuilt.\n */\n const frontendPath = this.companionContext.servicesByKey?.[serviceKey]?.path;\n if (typeof frontendPath === 'string') {\n const frontendRoot = join(this.companionContext.saasRoot, frontendPath);\n const unrecognised = readFrontendLibraryProgram(frontendRoot).unrecognised;\n if (unrecognised.length > 0) {\n this.logger.warn?.('The frontend library config has include/exclude entries the staleness check does not follow; a stale file they cover is not detected', { unrecognised });\n }\n const stale = findStaleFrontendLibraryOutputs(frontendRoot);\n if (stale.length > 0) return { answered: false, reason: describeStaleFrontendLibrary(stale) };\n }\n let shell: AppShellPlacementContentResult;\n try {\n // Checked against the source for the same reason as the agent-work witness: landing acts on it (#2305 review).\n const result = await this.introspection.requestInfo({ serviceKey, behavior: 'app-shell-placement-content' }, { verifyAgainstSource: true });\n if (!result.success) return { answered: false, reason: `The shell could not be read: ${result.error.message}` };\n shell = result.data as AppShellPlacementContentResult;\n } catch (error) {\n return { answered: false, reason: `The shell could not be read: ${describeCaughtError(error)}` };\n }\n\n const carried = new Map<PlacementSurface, Set<string>>();\n const carriedAudiences = new Map<PlacementSurface, Map<string, PlacementAudienceLayers[]>>();\n const contributingPaths = new Map<PlacementSurface, string[]>();\n for (const row of shell.surfaces) {\n const identities = new Set<string>();\n const audiences = new Map<string, PlacementAudienceLayers[]>();\n for (const launcher of row.launchers) {\n // Every identity it answers to: the plan names a resource in the singular, the shell carries its type (#3204).\n const launcherIdentities = launcherShellIdentities(launcher);\n if (launcherIdentities.length === 0) continue;\n const layers: PlacementAudienceLayers = {\n ...(launcher.requiredRoles === undefined ? {} : { item: launcher.requiredRoles }),\n ...(launcher.sectionRequiredRoles === undefined ? {} : { section: launcher.sectionRequiredRoles }),\n };\n for (const identity of launcherIdentities) {\n identities.add(identity);\n audiences.set(identity, [...(audiences.get(identity) ?? []), layers]);\n }\n }\n carriedAudiences.set(row.surface, audiences);\n for (const destinationRef of row.destinationRefs) identities.add(settingsDestinationShellIdentity(destinationRef));\n carried.set(row.surface, identities);\n contributingPaths.set(row.surface, [shellSurfaceConfigFile(row.surface), ...row.contributingModuleIds.map(shellModuleContributionFile)]);\n }\n const expectations = derivePlacementPlanShellExpectations(plan.data);\n const placed = new Map([...expectations.placed].map(([surface, entries]) => [surface, entries.map((entry) => entry.shellIdentity)] as const));\n const placedAudiences = new Map([...expectations.placed].map(([surface, entries]) => [\n surface, new Map(entries.map((entry) => [entry.shellIdentity, entry.audience] as const)),\n ] as const));\n const declined = expectations.declined.map((entry) => entry.shellIdentity);\n return { answered: true, carried, contributingPaths, placed, declined, carriedAudiences, placedAudiences };\n }\n\n /**\n * Why a shell probe is or is not satisfied (#1538) — the answer landing uses, and the detail the build\n * record and the stuck classification report. One function, so the three cannot disagree.\n */\n private async explainShellProbe(\n probe: ShellLandedProbe,\n tree: CommittedTreeReader,\n ): Promise<ShellProbeExplanation> {\n const witness = await tree.shellWitness();\n if (!witness.answered) {\n return { satisfied: false, unanswerable: witness.reason, missing: [], declinedButPresent: [], audienceMismatches: [], absentPaths: [] };\n }\n const absentOf = async (surface: PlacementSurface): Promise<string[]> => {\n const paths = witness.contributingPaths.get(surface) ?? [];\n const held = await Promise.all(paths.map((path) => tree.isCommitted(path)));\n return paths.filter((_, index) => !held[index]);\n };\n if (probe.kind === BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN) {\n /*\n * The settings rail is read from the companion export, which imports the config file directly; the RUNTIME receives\n * it only through `settingsHub` in the committed frontend registry (#3101). A registry that does not pass it carries\n * nothing at runtime — Settings opens empty (#3100) — so the rail lands only when the registry passes it too.\n */\n const runtimeReceivesRail = probe.surface !== PlacementSurface.SETTINGS_HUB\n || await settingsRailReachesRuntime(tree);\n const carried = runtimeReceivesRail ? (witness.carried.get(probe.surface) ?? new Set<string>()) : new Set<string>();\n const missing = (witness.placed.get(probe.surface) ?? []).filter((identity) => !carried.has(identity));\n const declinedButPresent = witness.declined.filter((identity) => carried.has(identity));\n // Every entry carrying a placed identity must show it to the audience the plan decided.\n const carriedAudiences = witness.carriedAudiences.get(probe.surface) ?? new Map();\n const audienceMismatches = [...(witness.placedAudiences.get(probe.surface) ?? new Map())].flatMap(([identity, expected]) => {\n const shown = carriedAudiences.get(identity) ?? [];\n const wrong = shown.filter((audience) => !samePlacementAudienceLayers(expected, audience));\n return wrong.length === 0 ? [] : [`${identity}: plan ${describePlacementAudience(expected)}, shell ${wrong.map(describePlacementAudience).join(' and ')}`];\n });\n const absentPaths = await absentOf(probe.surface);\n return {\n satisfied: missing.length === 0 && declinedButPresent.length === 0 && audienceMismatches.length === 0 && absentPaths.length === 0,\n missing,\n declinedButPresent,\n audienceMismatches,\n absentPaths,\n };\n }\n // SHELL_CARRIES_A_PLACEMENT: some surface carries some subject the plan placed on it, from files at HEAD.\n const allAbsent: string[] = [];\n for (const [surface, identities] of witness.placed) {\n const carried = witness.carried.get(surface) ?? new Set<string>();\n if (!identities.some((identity) => carried.has(identity))) continue;\n const absentPaths = await absentOf(surface);\n if (absentPaths.length === 0) return { satisfied: true, missing: [], declinedButPresent: [], audienceMismatches: [], absentPaths: [] };\n allAbsent.push(...absentPaths);\n }\n return {\n satisfied: false,\n missing: allAbsent.length > 0 ? [] : [...witness.placed.values()].flat(),\n declinedButPresent: [],\n audienceMismatches: [],\n absentPaths: [...new Set(allAbsent)],\n };\n }\n\n /**\n * Is one landed probe satisfied by `tree`?\n *\n * Landing asks the WORKING tree (#3204, {@link createLandingTreeReader}): a path is held when it is on disk and git\n * sees it. The committed reader asks the same question of HEAD, for a task no run of its own checked and for a\n * person's decisions, and the prospective-commit reader of the commit an accept is about to make.\n *\n * A declaration is matched as a WHOLE WORD, not as a substring. `deal.schemas.ts` carries prose\n * naming its own build tasks, so a bare `includes` would find `pipelineStageId` inside a comment\n * that merely mentions it and report a task landed on its own documentation. A TypeScript or\n * JavaScript file is read with its comments blanked first (#2216), because whole-word matching alone\n * counted a mention in a comment: a page task wrote every section ref of its plan into its sections\n * file's header, and 18 section tasks of `app-creation-test-004` read landed with no section written.\n * A STRING mention still counts — an AST question is the sound version and needs the introspection\n * subprocess — so this errs toward LANDED only for a file that names the symbol in code without\n * declaring it, and never for the scaffold shapes that produced #597, where the symbol is absent.\n */\n private async isLandedProbeSatisfied(probe: BuildPlanTaskLandedProbe, tree: CommittedTreeReader): Promise<boolean> {\n switch (probe.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE:\n return tree.isCommitted(probe.path);\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES: {\n const text = await tree.readText(probe.path);\n if (typeof text !== 'string') return false;\n /*\n * The probe's SITE says whether the declarations are a set or a relation, and where a relation\n * must sit (#1539). A relation read as a set reports a missing edge as landed (#1273 — six of\n * eleven relationship tasks).\n */\n // The PATH rides along so a script source is read with its comments blanked (#2216): prose naming a\n // product is not the product.\n return declarationsAppearAt(text, probe.declarations, probe.site, probe.path);\n }\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES: {\n const texts = await Promise.all(probe.paths.map((path) => tree.readText(path)));\n return texts.some((text, index) => typeof text === 'string' && declarationsAppearAt(text, probe.declarations, probe.site, probe.paths[index]));\n }\n // #2216: a section's words, for every committed locale, in its pack or in the section's own file (#3204).\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE:\n return labelPacksDeclareKeyPrefix(\n await Promise.all(probe.paths.map((path) => tree.readText(path))),\n probe.keyPrefix,\n await Promise.all(probe.fragmentPaths.map((path) => tree.readText(path))),\n );\n // #2504: a labelling unit's planned keys, each exactly, in its committed primary-locale file.\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS:\n return labelFileDeclaresKeys(await tree.readText(probe.path), probe.keys);\n case BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN:\n case BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT:\n return (await this.explainShellProbe(probe, tree)).satisfied;\n case BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED:\n return (await this.explainAgentWorkProbe(probe, tree)).satisfied;\n default: {\n const unhandled: never = probe;\n throw new Error(`Unhandled build-plan landed probe ${JSON.stringify(unhandled)}.`);\n }\n }\n }\n\n /**\n * Whether the application has AUTHORED a build plan at all — the one absence test every read of the plan shares.\n *\n * A plan legitimately does not exist until `build-decompose` has run, so every NEW application starts in this\n * state, and \"no plan yet\" is a true answer rather than a failure. It is tested DIRECTLY, never by catching\n * `ApplicationBuildPlanUnavailableError`, because `readBuildPlan` throws that same class for a plan that EXISTS\n * and fails validation — flattening an invalid plan into \"nothing there\" would be \"could not look\" wearing\n * \"nothing there\".\n *\n * Two reads use it: the board's task list, which had it inline, and the next-task projection, which did not —\n * so on every new application the board's dispatch-plan list answered 500 CONFIGURATION, logged at high\n * severity with an alert, on every poll (measured 2026-09-21, the first minutes of the end-to-end run #1273).\n *\n * A plan whose module failed counts as authored (#3258): it cannot be read, and \"no plan\" would tell a board to\n * decompose work that exists. `readBuildPlan` then refuses, naming the module.\n */\n public async hasAuthoredBuildPlan(): Promise<boolean> {\n const exports = await loadSpecificationFamilyData(this.companionContext);\n try {\n const authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n return authored !== undefined && authored !== null;\n } catch (error) {\n if (error instanceof SpecificationUnavailableError) return true;\n throw error;\n }\n }\n\n /** The application's accepted build plan, validated before anything is selected from it, with the host's derived tasks. */\n private async readBuildPlan(): ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync> {\n const { exports, plan } = await this.readAuthoredBuildPlan();\n // The website plan's orderings are derived onto the website tasks first; they add edges between authored tasks\n // only, never a cycle, so the floor {@link readAuthoredBuildPlan} validated still holds (`deriveWebsiteTaskOrdering`).\n // Read past the guard: an ordering preference is never the reason the plan cannot be read, and a plan that cannot be read\n // cannot be repaired (#3258). A module failing elsewhere costs these derivations an edge at most.\n const decided = unguardedSpecifications(exports);\n const websiteOrdered = deriveWebsiteTaskOrdering(plan, decided);\n /*\n * Two orderings below are load-bearing. Follow-ups are derived first, so the website claim step makes a website task\n * wait on a follow-up that delivers what it cites, and so a follow-up of a design-system config task (it keeps its\n * origin's target, so it writes the config too) waits on the brand step and is waited on by the design-tokens step,\n * like every other writer of that file.\n */\n return this.withHostDerivedDesignTokensStep(await this.withHostDerivedBrandDesignStep(this.withHostDerivedWebsiteClaimPrerequisites(\n this.withHostDerivedTranslationStep(this.withHostDerivedDocumentationPublicationStep(\n await this.withHostDerivedMigrationStep(await this.withHostDerivedEngineCapabilitiesStep(await this.withHostDerivedDisplayNameStep(await this.withHostDerivedFollowUpTasks(websiteOrdered)))),\n )),\n decided,\n )));\n }\n\n /**\n * The build plan as the build-plan family AUTHORS it, validated (#3204): no follow-up, no host generation step.\n *\n * Everything {@link readBuildPlan} adds is derived by this host on every read, from the run records and the\n * specifications, so a re-decompose must not be asked to keep any of it: on reference run 42845651222 the landed\n * follow-ups of three relationship tasks were listed as \"already built, keep every one\", and a follow-up keeps its\n * origin's RELATIONSHIP target with no product, which the plan's hard floor refuses. Every re-decompose failed three\n * attempts on tasks the model never authored, for half an hour each, round after round.\n */\n private async readAuthoredBuildPlan(): Promise<{ readonly exports: Awaited<ReturnType<typeof loadSpecificationFamilyData>>; readonly plan: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> }> {\n const exports = await loadSpecificationFamilyData(this.companionContext);\n let authored: unknown;\n try {\n authored = (exports as unknown as Record<string, unknown>).buildPlanSpecification;\n } catch (error) {\n if (error instanceof SpecificationUnavailableError) throw new ApplicationBuildPlanUnavailableError(error.message, { cause: error });\n throw error;\n }\n if (authored === undefined || authored === null) {\n throw new ApplicationBuildPlanUnavailableError(\n 'This application has no build plan. Run the build-decompose playbook first.',\n );\n }\n const parsed = BuildPlanTaskGraphSchema.safeParse(authored);\n if (!parsed.success) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan does not satisfy its schema: ${parsed.error.issues.slice(0, 3).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}`,\n );\n }\n // Semantic validation too, not just the shape: a graph whose ordering is unsound would let\n // `selectReadyBuildPlanTasks` report a task ready before the work it depends on can have landed.\n //\n // Gated on the FLOOR codes, not on `findings.length > 0` as it was until 2026-09-09. That older\n // reading made this gate disagree with the landing gate about the same graph: an authoring\n // warning — a resource stage whose predecessor is absent from the plan, which is legitimate when\n // the tree already carries that stage — landed happily at the semantic authority and then made\n // the whole plan permanently undispatchable HERE, with the refusal naming a warning. One\n // classification, named once in `_core` beside the codes.\n const findings = validateBuildPlanTaskGraph(parsed.data);\n const blocking = findings.filter((finding) => BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES.includes(finding.code));\n if (blocking.length > 0) {\n throw new ApplicationBuildPlanUnavailableError(\n `The application's build plan fails semantic validation: ${blocking.slice(0, 3).map((finding) => finding.message).join('; ')}`,\n );\n }\n return { exports, plan: parsed.data };\n }\n\n /**\n * A website task waits for the tasks that BUILD what its copy describes (#2507 re-review N1).\n *\n * Its copy is written once, from each cited requirement's standing at dispatch. The decomposer orders a section only\n * after its page, so website tasks ran beside the module tasks serving their requirements, read IN_PROGRESS, and wrote\n * \"coming soon\" for features that shipped an hour later, with nothing ever rewriting them. So each website task gains\n * a prerequisite on every task delivering a requirement it cites (website and documentation tasks excluded), follow-ups\n * included, as they are appended before this step.\n *\n * A page waits on everything its sections cite, since its title and description summarize them, so one feature task\n * that stays stuck holds back the whole page and its sections (re-review R4). That is the plan-stuck path, by design.\n *\n * A delivering task that itself waits on a website task would close a cycle with the added edges. Each website task's\n * edges are kept or dropped TOGETHER, re-checked against the schema and the semantic floors (PREREQUISITE_CYCLE among\n * them), so one cycle costs only the tasks it involves (re-review R2), and each is named in a warning: an ordering\n * preference is never the reason the plan cannot be read.\n */\n private withHostDerivedWebsiteClaimPrerequisites(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n companionExports: unknown,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const citedByTask = citedRequirementRefsByWebsiteTask(graph.tasks, companionExports);\n /*\n * Held per plan content (#3204): the plan is read on every selection, board and landing read, many times a second at a\n * wave's end, and when the combined edges close a cycle the fallback below re-parses and re-validates the whole plan\n * once per website task. On reference run 42621319676 that warned 68 times per read (3,196 lines in 40 minutes) beside\n * the companion's event-loop stalls. The answer depends only on the tasks and on what each website task cites.\n */\n const memoKey = JSON.stringify({ tasks: graph.tasks, cited: [...citedByTask].sort(([left], [right]) => left.localeCompare(right)) });\n if (this.websiteClaimPrerequisitesMemo?.key === memoKey) return this.websiteClaimPrerequisitesMemo.graph;\n const derived = this.deriveWebsiteClaimPrerequisites(graph, citedByTask);\n this.websiteClaimPrerequisitesMemo = { key: memoKey, graph: derived };\n return derived;\n }\n\n private websiteClaimPrerequisitesMemo: { readonly key: string; readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> } | undefined;\n\n private deriveWebsiteClaimPrerequisites(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n citedByTask: ReturnType<typeof citedRequirementRefsByWebsiteTask>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const additions = new Map<string, readonly string[]>();\n for (const task of graph.tasks) {\n const cited = citedByTask.get(task.taskRef) ?? [];\n const delivering = cited.flatMap((requirementRef) => deliveringTasksFor(requirementRef, graph.tasks)).map((entry) => entry.taskRef);\n const added = [...new Set(delivering)].filter((taskRef) => taskRef !== task.taskRef && !task.prerequisiteTaskRefs.includes(taskRef));\n if (added.length > 0) additions.set(task.taskRef, added);\n }\n if (additions.size === 0) return graph;\n const withEdges = (current: typeof graph, edges: ReadonlyMap<string, readonly string[]>) => BuildPlanTaskGraphSchema.safeParse({\n ...current,\n tasks: current.tasks.map((task) => {\n const added = edges.get(task.taskRef);\n return added === undefined ? task : { ...task, prerequisiteTaskRefs: [...task.prerequisiteTaskRefs, ...added] };\n }),\n });\n const isValid = (candidate: ReturnType<typeof withEdges>): candidate is Extract<ReturnType<typeof withEdges>, { success: true }> => candidate.success\n && !validateBuildPlanTaskGraph(candidate.data).some((finding) => BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES.includes(finding.code));\n const all = withEdges(graph, additions);\n if (isValid(all)) return all.data;\n // Some task's edges close a cycle: add them task by task, keeping each set that leaves the plan valid.\n let current = graph;\n for (const [taskRef, added] of additions) {\n const candidate = withEdges(current, new Map([[taskRef, added]]));\n if (isValid(candidate)) {\n current = candidate.data;\n } else {\n this.logger.warn?.(`Website task \"${taskRef}\" keeps its authored prerequisites: waiting on the tasks its claims cite would make the plan invalid`, { wouldWaitOn: added });\n }\n }\n return current;\n }\n\n /**\n * The build plan as the DISPATCH HOST reads it: the authored graph, plus the `database-migrations`\n * generation step whenever the application owes one and the plan does not author it (#1027).\n *\n * ## Why the host derives it rather than trusting the plan\n *\n * `bottom_up.build-decompose`'s method requires that step for every PostgreSQL-backed application,\n * and Wonder CRM's regenerated plan (2026-09-13) carried none — while all six of its schema tasks\n * could only write `shared-lib/`, never `backend-api/migrations/`. Each accepted schema change would\n * have left the model ahead of the accepted plan, and the application's boot gate refuses a missing\n * column (`postgresql_table_schema_mismatch`), so the lane would have taken its own application down.\n *\n * The model was given the rule and never the fact the rule keys on: the brief's workspace truth does\n * not state the database engine, and the method's instruction to `rg` the infra config is a command a\n * generation call cannot run. The validator could not catch it either — it receives the graph alone.\n * And no judgement is involved: whether a migration step is owed is a TOTAL function of two facts the\n * host already holds (`derive-before-you-ask.md`, \"could a function have produced my answer?\").\n *\n * ## The population, and the shape\n *\n * - Owed, per `assessSchemaPlanObligation`, in two cases that differ in whether a schema stage matters:\n * - an ACCEPTED plan and at least one SCHEMA stage — schema changes are what create drift against it;\n * - a declared PostgreSQL store with NO plan yet (#1144), with or without a schema stage — the initial\n * migration is owed by the ENGINE's resources alone, and the backend cannot boot before it exists.\n * This case was invisible while the lockfile was the only fact read: the foundation playbook was\n * believed to write the baseline and never did.\n * An UNDETERMINED store with a schema stage derives the step too, so the obligation stays visible: its\n * sync state is unanswerable, so it is passed over while other work is ready, and when nothing is its\n * refusal names why the store could not be read. A MongoDB-backed application is never offered it.\n * - An AUTHORED `database-migrations` step always wins. The derivation fills an omission; it never\n * second-guesses a plan that states its own ordering.\n * - PREPENDED, with NO prerequisites. Its landing condition is `SCHEMA_PLAN_IN_SYNC`, so it is landed\n * whenever the model and the accepted plan agree and becomes the FIRST ready task the moment an\n * accepted schema change creates drift — which is when it has to run, before anything restarts the\n * backend against a table it cannot build. The method's \"after the last schema stage\" was rejected\n * as the ordering: a schema task the loop guard skips forever (a stuck task never lands) would hold\n * the migration step behind it forever too.\n * - The obligation is read only after an authored step is ruled out, and costs a `stat` whenever a plan\n * is accepted; the authored infra config is loaded only for an application with no lockfile.\n *\n * ## What it costs\n *\n * `SCHEMA_PLAN_IN_SYNC` runs `wildo db diff --check` on every landed resolution, so every build-plan\n * read for such an application now asks the schema planner. Only an IN_SYNC answer lands the step. A\n * DRIFTED answer puts it first. An UNANSWERABLE one (any answer that is neither pass nor drift; the\n * causes are listed on `SchemaPlanSyncState`) leaves it un-landed but PASSED OVER while other tasks are ready, because running it then only throws.\n * This said an unanswerable check \"reads as NOT in sync, the step is offered, and running it over a\n * clean plan generates nothing\" — true of a clean plan, false of an unanswerable one, where offering\n * it first made every dispatch fail and stopped the whole plan (review, 2026-09-13).\n */\n /**\n * A plan that generates labels, for an application that enables more than one locale, owes a step\n * that TRANSLATES them (#2204).\n *\n * Translation used to be the second half of `i18n-labels`, so the graph had no node for \"the labels\n * exist\" separate from \"every locale is translated\", and every step that needed only the first\n * waited for the second. Measured on app-creation-test-004 (2026-10-01): the primary-locale labels\n * existed within minutes, translation into four locales ran for hours, and the documentation portal\n * — which reads primary-locale labels only — stayed dark the whole time.\n *\n * Derived rather than authored, for the reason {@link withHostDerivedMigrationStep} is: the\n * obligation follows from what the application declares (a second enabled locale) and from the plan\n * carrying a labels step, not from a decision the plan makes. A plan that authors its own\n * `i18n-translations` step gets none derived.\n *\n * - **Its only prerequisite is the labels step**, since translation reads the primary-locale files.\n * - **Nothing is made to depend on it.** The website and the application read their label files at\n * run time, so a translation landing needs no republish, and the portal is single-locale (#1993).\n * - **A one-locale application gets nothing**: the step would have no evidence paths, and an empty\n * list never lands, so it would sit at the head of the queue forever.\n */\n private withHostDerivedTranslationStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const isGenerationStep = (task: (typeof graph.tasks)[number], step: ApplicationBuildGenerationStep): boolean =>\n task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP && task.target.generationStepRef === step;\n if (graph.tasks.some((task) => isGenerationStep(task, ApplicationBuildGenerationStep.I18N_TRANSLATIONS))) return graph;\n\n const labelStepRefs = graph.tasks\n .filter((task) => isGenerationStep(task, ApplicationBuildGenerationStep.I18N_LABELS))\n .map((task) => task.taskRef);\n if (labelStepRefs.length === 0) return graph;\n if (this.generationSteps.resolveTranslationTargetLocales().length === 0) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF)) {\n // Same refusal as the other derived steps: a duplicate ref is rejected by the graph schema.\n this.logger.warn?.(\n `The build plan owes an i18n-translations step, but \"${HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n ...graph.tasks,\n {\n taskRef: HOST_DERIVED_I18N_TRANSLATIONS_TASK_REF,\n objective: 'Translate the application\\'s labels into every enabled locale other than the primary one. '\n + 'Derived by the dispatch host because the build plan generates primary-locale labels and the application '\n + 'enables further locales.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.I18N_TRANSLATIONS,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.ASSEMBLE_VERIFY_AND_ITERATE,\n skillRefs: ['i18n-translation-rerun'],\n prerequisiteTaskRefs: labelStepRefs,\n servesRefs: [],\n },\n ],\n });\n }\n\n /**\n * A plan that authors documentation CHAPTERS owes a step that PUBLISHES them.\n *\n * Derived rather than authored, for the reason {@link withHostDerivedMigrationStep} is: the\n * obligation follows from what the plan CONTAINS, not from a decision the plan makes. An\n * application with a documentation chapter owes a portal; one without owes nothing.\n *\n * Measured on the first end-to-end journey run (#1273). The plan carried SIX\n * `DOCUMENTATION_CHAPTER` tasks and no publication step, so the chapters were authored and nothing\n * rendered them. The cost was not only an unbuilt portal: `technical-doc/src/pages/search.tsx`\n * imports the search index the publish writes, so that package could not typecheck at all, and\n * `check:technical-doc-typecheck` stayed red for the whole build — failing a documentation task on\n * a red it did not cause, at $19.33. Publishing by hand made 87 outputs and turned the check green\n * in one command.\n *\n * ## The prerequisites are the whole design\n *\n * Unlike the migration step, this one cannot run with `prerequisiteTaskRefs: []`:\n *\n * - **every chapter task**, or it renders a portal missing the chapters still being written;\n * - **`i18n-labels`**, and that one is not a nicety. Publication resolves the application's\n * organization-role documentation and REFUSES without the primary-locale label — *\"requires\n * primary-locale label 'roles.ORG_ADMIN.label'; generate the application's role labels before\n * publishing documentation\"*. Run before labels, it fails on exactly that, which is how the\n * first hand-run of this pipeline failed.\n *\n * Both are read off the graph, so a plan with no labels step simply contributes no such edge\n * rather than acquiring a dangling one.\n *\n * `i18n-labels` means the PRIMARY locale only. Translation is the separate `i18n-translations` step\n * ({@link withHostDerivedTranslationStep}), and publication deliberately has no edge to it: the\n * portal reads primary-locale labels and nothing else, so waiting on translation only kept it dark\n * for hours (#2204).\n */\n private withHostDerivedDocumentationPublicationStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const authorsPublicationStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION);\n if (authorsPublicationStep) return graph;\n\n const chapterTaskRefs = graph.tasks\n .filter((task) => (task.produces ?? []).some((product) => product.kind === BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER))\n .map((task) => task.taskRef);\n if (chapterTaskRefs.length === 0) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF)) {\n // Same refusal as the migration step's: deriving would duplicate a ref, which the graph schema\n // rejects — so say so rather than silently dropping the obligation.\n this.logger.warn?.(\n `The build plan owes a documentation-publication step, but \"${HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n const labelStepRefs = graph.tasks\n .filter((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.I18N_LABELS)\n .map((task) => task.taskRef);\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n ...graph.tasks,\n {\n taskRef: HOST_DERIVED_DOCUMENTATION_PUBLICATION_TASK_REF,\n objective: 'Publish the application\\'s customer documentation portal, so the chapters this build authored are '\n + 'something a reader can reach. Derived by the dispatch host because the build plan authors documentation '\n + 'chapters and does not author the step that renders them.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DOCUMENTATION_PUBLICATION,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.ASSEMBLE_VERIFY_AND_ITERATE,\n skillRefs: ['application-consumer-documentation-authoring'],\n prerequisiteTaskRefs: [...chapterTaskRefs, ...labelStepRefs],\n servesRefs: [],\n },\n ],\n });\n }\n\n /**\n * A plan that writes the design-system config owes a step that regenerates the stylesheet block from it\n * (#2358).\n *\n * The block in `frontend/src/index.css` is what the loading screen and the first paint use; the runtime\n * applies the config only after mount. A DESIGN_SYSTEM task may write the config file and nothing else\n * (`application-build-task-coding-policy`), and nothing else ran `wildo design-tokens generate`, so a\n * design system authored during creation reached the page after mount while the first paint kept the\n * scaffold's palette.\n *\n * Derived rather than authored, for the reason {@link withHostDerivedDocumentationPublicationStep} is:\n * the obligation follows from what the plan CONTAINS. A plan that authors its own `design-tokens` step\n * gets none derived.\n *\n * - **Its prerequisites are every writer of the block's inputs** ({@link isDesignTokenBlockInputWriter}): the\n * config's writers and the brand step, whose module the config imports (#2353). The block is a function\n * of the config's FINAL state, so it runs after the last of them.\n * - **Appended**, after everything it waits on, like the publication step.\n * - **Landing is the block, not the file**: the stylesheet is committed in every scaffolded application,\n * so the step lands only when that file is committed AND `wildo design-tokens validate` calls its block\n * current. A design-system change that does not move the block (a `theme`-only edit) lands it with no\n * run at all, which is the honest answer.\n */\n private withHostDerivedDesignTokensStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>> {\n const authorsDesignTokensStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DESIGN_TOKENS);\n if (authorsDesignTokensStep) return graph;\n\n const writerTaskRefs = graph.tasks.filter(isDesignTokenBlockInputWriter).map((task) => task.taskRef);\n if (writerTaskRefs.length === 0) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DESIGN_TOKENS_TASK_REF)) {\n // Same refusal as the other derived steps: a duplicate ref is rejected by the graph schema.\n this.logger.warn?.(\n `The build plan owes a design-tokens step, but \"${HOST_DERIVED_DESIGN_TOKENS_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n ...graph.tasks,\n {\n taskRef: HOST_DERIVED_DESIGN_TOKENS_TASK_REF,\n objective: 'Regenerate the design-token block of the frontend stylesheet from the design-system config, so the '\n + 'first paint and the running application show the same design system. Derived by the dispatch host because '\n + 'the build plan writes the design-system config.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DESIGN_TOKENS,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.SHAPE_USER_EXPERIENCE,\n skillRefs: ['config-design-system'],\n prerequisiteTaskRefs: writerTaskRefs,\n servesRefs: [],\n },\n ],\n });\n }\n\n /**\n * The facts of the resource a website section's demo is drawn from (#2742 step 5e), read from the application's\n * domain model the way the target-resource neighbourhood is: one cached derivation, the plan's slug matched to the\n * registry's type by slugifying the registry's own keys. Best effort: a read that fails says so in the brief, and the\n * agent draws less rather than inventing a field.\n */\n private async resolveWebsiteDemoFacts(resourceRef: string | undefined): Promise<WebsiteSectionDemoFactsResolution | undefined> {\n if (resourceRef === undefined) return undefined;\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey).find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey === undefined) return { unavailable: 'The application declares no backend service, so its resources cannot be read.' };\n const { index } = await readWorkspaceElements(this.introspection, backendServiceKey);\n const resourceType = [...index.resources.keys()].find((candidate) => slugifyRegistryIdentifier(candidate) === resourceRef);\n const resource = resourceType === undefined ? undefined : index.resources.get(resourceType);\n if (resource === undefined) {\n return { unavailable: `The application has no resource \"${resourceRef}\" yet (it may be built by a task that has not landed), so the demo cannot be bound to its fields: draw it from what the plan says, and report the missing binding.` };\n }\n return { facts: websiteDemoResourceFacts(resource) };\n } catch (error) {\n this.logger.warn('Could not read the application\\'s resources for a website demo', { resourceRef, error: String(error) });\n return { unavailable: 'The application\\'s resources could not be read right now, so the demo is not bound to its fields: draw only fields you have read in its schema.' };\n }\n }\n\n /**\n * A plan that writes the design-system config owes a step that writes what the brand's visual tone decides — its\n * palette seeds and its theme personality — where the config can derive from them (#2353, #2359).\n *\n * The brand names its colours and its style (`visualTone`) and the config is where the palette and the theme live;\n * before this step nothing joined them, so the DESIGN_SYSTEM coding task picked colours by eye, copied a named theme,\n * and the brand reached the page only if the agent carried it over. Derived rather than authored, for the reason\n * {@link withHostDerivedMigrationStep} is: whether it is owed is a total function of what the plan contains and what\n * the config already imports.\n *\n * - **Owed** when the plan writes the design-system config ({@link isDesignSystemConfigWriter}), when it builds the\n * website ({@link isWebsiteBuildTask}: the site's theme is the brand's website palette and personality, so its\n * tempo, type and surfaces follow the visual tone too, #2742 step 5d), or when the config already imports the\n * module — so a config an earlier build wrote still follows a rebrand when the current plan writes no config.\n * Website tasks get no edge to it: the scaffold already carries the module they import.\n * - **Prepended, with no prerequisites**, the migration step's shape: its landing condition is\n * `BRAND_DESIGN_CURRENT`, so it is landed whenever its modules (the frontend's, and the website's colours when a\n * website is declared) say what the brand now renders, and becomes the first ready task the moment the brand\n * changes.\n * - **Every config writer waits on it**, the one derivation here that adds an edge to an authored task. The config\n * a writer produces imports this module, so a writer running first would be written against a file that does not\n * exist yet; and a wave (#1528) would otherwise dispatch the two together. The edge says only that.\n * - **An AUTHORED brand step wins**, ordering and all: the derivation fills an omission.\n */\n private async withHostDerivedBrandDesignStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n if (graph.tasks.some(isDesignSystemBrandStep)) return graph;\n\n const writerTaskRefs = new Set(graph.tasks.filter(isDesignSystemConfigWriter).map((task) => task.taskRef));\n const buildsWebsite = graph.tasks.some(isWebsiteBuildTask);\n if (writerTaskRefs.size === 0 && !buildsWebsite && !(await readDesignSystemConfigImportsBrandDesign(this.companionContext.saasRoot))) return graph;\n\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF)) {\n // Same refusal as the other derived steps: a duplicate ref is rejected by the graph schema.\n this.logger.warn?.(\n `The build plan owes a design-system-brand step, but \"${HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF,\n objective: 'Write the brand\\'s palette seeds and theme personality to frontend/src/config/brand-design.ts, and the '\n + 'website\\'s palette and personality to website/src/brand-theme.ts when the application has a website, so the design-system '\n + 'config derives a readable palette and composes its theme from the brand, and the site shows the same primary, tempo and type. Derived '\n + 'by the dispatch host because the build plan writes the design-system config or builds the website, or the config already derives from '\n + 'this module.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DESIGN_SYSTEM_BRAND,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.SHAPE_USER_EXPERIENCE,\n skillRefs: ['config-design-system'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks.map((task) => (writerTaskRefs.has(task.taskRef) && !task.prerequisiteTaskRefs.includes(HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF)\n ? { ...task, prerequisiteTaskRefs: [...task.prerequisiteTaskRefs, HOST_DERIVED_DESIGN_SYSTEM_BRAND_TASK_REF] }\n : task)),\n ],\n });\n }\n\n /**\n * The build plan with an `engine-capabilities` step at its head whenever the application's decisions imply a\n * capability its COMMITTED configuration does not enable (#2497).\n *\n * The foundation step is where those capabilities were turned on, and a build can be planned without it:\n * app-creation-test-005's capability composition was blocked (#2416), its modules came from ensure-module\n * tasks, and it shipped `ORGANIZATIONS: false` and no transactional email under an organization-tenancy plan.\n * Derived for the reason {@link withHostDerivedMigrationStep} is: the obligation follows from what the\n * application declares, not from a decision the plan makes, and the decomposer was never given the fact.\n *\n * - **Derived from the committed configuration, landed on the working tree** (#3204): the step lands as soon as the\n * configuration in the working tree enables the capabilities, and once a checkpoint commits it the host derives the\n * step no longer. The two readings differ for at most one checkpoint interval, and with no edges nothing waits on it.\n * - **At the head, with no edges.** Composed resources assume their primary scope's capability, so it runs\n * first; and nothing names it as a prerequisite, because once it has landed the host derives it no longer\n * and an edge to it would dangle.\n * - **Only what a step can satisfy.** A capability only a commercial provider serves (BILLING, SMS) is left\n * out by the derivation, or the step could never land and would hold the build.\n * - **Best effort.** A derivation that cannot be read derives nothing: the foundation's own run is still the\n * primary door, and refusing the whole plan over this read would trade a missing capability for a stopped build.\n */\n private async withHostDerivedEngineCapabilitiesStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const authorsStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.ENGINE_CAPABILITIES);\n if (authorsStep) return graph;\n let unmet: readonly string[];\n try {\n const condition = await this.generationSteps.resolveGenerationStepLandedCondition({\n taskRef: HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF,\n target: { kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP, generationStepRef: ApplicationBuildGenerationStep.ENGINE_CAPABILITIES },\n } as BuildPlanTask);\n if (condition.kind !== ApplicationBuildGenerationStepLandedKind.ENGINE_CAPABILITIES_ENABLED) return graph;\n unmet = await this.capabilitiesNotEnabledIn(condition, this.createCommittedTreeReader());\n } catch (error) {\n this.logger.warn?.('Could not derive the engine capabilities this application\\'s decisions imply; deriving no step for them', {\n error: describeCaughtError(error),\n });\n return graph;\n }\n if (unmet.length === 0) return graph;\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF)) {\n this.logger.warn?.(\n `The build plan owes an engine-capabilities step, but \"${HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_ENGINE_CAPABILITIES_TASK_REF,\n objective: `Turn on the engine capabilities this application's decisions imply and its configuration does not enable: ${unmet.join(', ')}. `\n + 'Derived by the dispatch host, the same derivation the foundation step applies.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.ENGINE_CAPABILITIES,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.CONFIGURE_APPLICATION_FOUNDATION,\n skillRefs: ['config-saas'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks,\n ],\n });\n }\n\n /**\n * Where each requirement stands in the build, for the website copy that cites it (#2507 review F1, F5): the tasks\n * serving it, whether each landed, what a run serving it reported still unmet, and the roadmap phase delivering it.\n * A requirement is DELIVERED only when it is served, every serving task landed, no serving run reported it unmet,\n * and no phase AFTER the current one is the only one delivering it.\n *\n * Website tasks are left out of the serving set: a page does not deliver the capability it describes. Best effort:\n * `undefined` when the plan, its landings or the completed coding runs cannot be read, and the brief then describes\n * nothing as available. Without the runs, a gap a run reported would not count against delivery (#2672).\n */\n private async resolveWebsiteClaimDelivery(companionExports: unknown): Promise<((requirementRef: string) => WebsiteClaimDelivery) | undefined> {\n try {\n const plan = await this.readBuildPlan();\n const { landed: landedOrClosed, closedTaskRefs } = await this.resolveLandedTaskRefs(plan.tasks);\n // A DECLINED follow-up is landed for the plan, but the gap it answers is not worked: it delivers nothing (#3227).\n const landed = new Set([...landedOrClosed].filter((taskRef) => closedTaskRefs.get(taskRef)?.kind !== BuildTaskClosureKind.DECLINED));\n // Unreadable runs say nothing about what a run reported still unmet, so nothing is described as available (#2672).\n // A projection error is not swallowed here either: it reaches the catch below, which names it.\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return undefined;\n const roadmap = RoadmapSnapshotSchema.safeParse(\n decidedFamilyValuesFromCompanionExports(companionExports as Record<string, unknown>)[ApplicationSpecificationFamily.ROADMAP],\n );\n const phases = roadmap.success ? roadmap.data.phases : [];\n const followUps = await this.readFollowUpDerivation(plan.tasks, runs.latest);\n return (requirementRef) => deriveWebsiteClaimDelivery(requirementRef, {\n tasks: plan.tasks,\n landedTaskRefs: landed,\n // A gap a landed later run stated met (#3227) is no longer missing, as the follow-up derivation reads it.\n reportedMissing: (taskRef, ref) => (followUps.gapMetSince(taskRef, ref)\n ? undefined\n : runs.latest.get(taskRef)?.unmetRequirements?.find((entry) => entry.requirementRef === ref)?.missing),\n // The follow-up `withHostDerivedFollowUpTasks` derives for THIS report, by the same derivation (re-review R1, #3227).\n followUpTaskRefFor: followUps.followUpTaskRefFor,\n phases,\n });\n } catch (error) {\n this.logger.warn?.('Website claim delivery could not be read; the brief will describe nothing as available', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n /**\n * The latest COMPLETED coding run of each build task (#2496), read by the follow-up derivation and cached for two\n * seconds: `readBuildPlan` runs on every board poll and dispatch, and one listing per burst is enough. Nothing that\n * decides LANDING reads it, so a listing up to two seconds old can only delay a follow-up by one poll.\n *\n * Read to {@link BUILD_TASK_RECORD_HISTORY_CEILING}, the build record's bound, not to the 200-run window: a follow-up is\n * derived again on every plan read, so an origin whose latest completed run fell out of a narrower window would lose\n * the follow-up it had already derived, and the plan would drop a task it was running (#2530). `truncated` says the\n * listing still hit that ceiling, so an old origin's report may be missing from it.\n *\n * `undefined` means the LISTING could not be read, and only that (#2672). Every caller then says less: no follow-up\n * is derived, and the website brief describes nothing as available. Projecting a listed row is our own code, so an\n * error there is a programming error and REJECTS. It used to share the listing's catch, which reported it as \"no\n * follow-up tasks\": rows carrying strings where the row type has dates made the projection throw, and every reported\n * gap went unbuilt while the plan read as complete.\n */\n private readLatestCompletedCodingRuns(): Promise<{ readonly latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>; readonly truncated: boolean } | undefined> {\n const now = Date.now();\n if (this.latestCompletedCodingRuns !== undefined && now - this.latestCompletedCodingRuns.at < LATEST_COMPLETED_CODING_RUNS_TTL_MS) {\n return this.latestCompletedCodingRuns.value;\n }\n const value = this.fetchLatestCompletedCodingRuns();\n this.latestCompletedCodingRuns = { at: now, value };\n value.catch(() => { this.latestCompletedCodingRuns = undefined; });\n return value;\n }\n\n /**\n * {@link readLatestCompletedCodingRuns} without its cache: for a reader that must see a record it just wrote (#2593).\n * Same contract: read to the build record's ceiling, `undefined` only when the listing cannot be read, and a\n * projection error rejects (#2672).\n */\n private async fetchLatestCompletedCodingRuns(): Promise<{ readonly latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>; readonly truncated: boolean } | undefined> {\n let rows: Awaited<ReturnType<CompanionExecutionsCompanionService['listActorExecutions']>>;\n try {\n // Not parsed through the route's query schema, whose 200 is the HTTP request's bound: in-process the listing pages.\n rows = await this.executions.listActorExecutions({\n systemRef: APPLICATION_CODING_SYSTEM_REF,\n status: FlowsActors_Status.COMPLETED,\n limit: BUILD_TASK_RECORD_HISTORY_CEILING,\n });\n } catch (error) {\n this.logger.warn?.('Could not list the completed coding runs: no follow-up task is derived, the website brief describes nothing as available, and no website copy or drawing is reviewed', { error: describeCaughtError(error) });\n return undefined;\n }\n const latest = new Map<string, ApplicationBuildTaskAttempt>();\n for (const projected of rows.map(projectBuildTaskAttempt)) {\n if (projected === null || projected.attempt.status !== FlowsActors_Status.COMPLETED) continue;\n const previous = latest.get(projected.taskRef);\n if (previous === undefined || previous.startedAt < projected.attempt.startedAt) latest.set(projected.taskRef, projected.attempt);\n }\n return { latest, truncated: rows.length >= BUILD_TASK_RECORD_HISTORY_CEILING };\n }\n\n /**\n * The follow-up tasks the requirements COMPLETED coding runs reported still unmet derive (#2496, #3227, #3204), appended\n * to the plan. The derivation is {@link deriveBuildPlanFollowUpTasks}: every requirement a run reported folded into one\n * follow-up, a follow-up not dispatched yet absorbing every later report on its target, each with a stable identity,\n * chained to the follow-up before it on the same target.\n *\n * 005's workers wrote \"office/field access is only partly met\" and \"the roles do nothing yet … it still needs its own\n * work\" into closing reports that every run was accepted on, and no later task, coherence entry or judge picked any of\n * it up. A run now states such a gap in a typed block; this derives the task that answers it, so the gap re-enters the\n * build loop instead of ending in prose. Under the YOLO posture it marks and proceeds: the reporting run still lands.\n * A follow-up's own report derives nothing further, which keeps the chain one step long. The follow-up still lands\n * (RAN-not-PROVEN, see `resolveLandedTaskRefs`), and its record keeps the gap it still reports, for a person to read.\n * One bad follow-up is skipped and named, never the reason the plan cannot be read.\n */\n private async withHostDerivedFollowUpTasks(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n // `undefined` only when the listing could not be read, which the reader has already said (#2672). A projection error\n // propagates and fails the plan read: read as \"no follow-ups\", it left every reported gap unbuilt.\n const runs = await this.readLatestCompletedCodingRuns();\n if (runs === undefined) return graph;\n /*\n * Held per (plan tasks, latest completed runs, absorption inputs) (#3204): the plan is read on every selection, board\n * and landing read, and this re-validated the whole plan once per follow-up and warned again on each read. On reference\n * run 42666728304 a re-decomposed plan already naming the follow-ups logged \"already names another task\" 184 times in\n * one burst, beside the companion's event-loop stalls. Nothing else decides the answer, so a read with none of them\n * changed reuses it.\n */\n const absorption = await this.readFollowUpAbsorptionInputs();\n const runsKey = JSON.stringify([...runs.latest].map(([taskRef, attempt]) => [taskRef, attempt.runTaskId]).sort(([left], [right]) => String(left).localeCompare(String(right))));\n const memoKey = JSON.stringify({ tasks: graph.tasks, runs: runsKey, absorption: describeAbsorptionInputs(absorption) });\n if (this.followUpDerivationMemo?.key === memoKey) return this.followUpDerivationMemo.graph;\n const { graph: derived, derivation } = await this.deriveFollowUpTaskGraph(graph, runs, absorption);\n this.followUpDerivationMemo = { key: memoKey, runsKey, graph: derived, derivation };\n // What each appended follow-up carries, by the objective it carries it under: stamped on its run at dispatch.\n for (const followUp of derivation.followUps) {\n const objectiveKey = `${followUp.task.taskRef}\\u0000${followUp.task.objective}`;\n // Re-inserted, so the eviction below drops the objectives no read has derived for longest (review N5).\n this.carriedFollowUpGapKeys.delete(objectiveKey);\n this.carriedFollowUpGapKeys.set(objectiveKey, followUp.gaps);\n }\n while (this.carriedFollowUpGapKeys.size > CARRIED_FOLLOW_UP_GAP_KEYS_RETAINED) this.carriedFollowUpGapKeys.delete(this.carriedFollowUpGapKeys.keys().next().value!);\n return derived;\n }\n\n private followUpDerivationMemo: {\n readonly key: string;\n /** The completed runs it was derived from, so a reader can tell it still answers for the runs it read. */\n readonly runsKey: string;\n readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>;\n /** The derivation over what was APPENDED (a follow-up refused by the plan replaced by the reports it absorbed). */\n readonly derivation: FollowUpDerivation;\n } | undefined;\n\n /**\n * The gap keys each derived follow-up carries, by `<ref>\\u0000<objective>` (#3204): looked up by the objective a dispatch\n * selected, and stamped on the run, so what a dispatched follow-up carried is RECORDED rather than inferred. An objective\n * is a function of its gaps, so a lookup that misses records nothing, and the follow-up then carries its own report only\n * (a report it held is carried again by the next follow-up: one run too many, never a gap nobody was told about).\n */\n private readonly carriedFollowUpGapKeys = new Map<string, readonly FollowUpGap[]>();\n\n /**\n * The follow-up derivation the plan read APPENDED, for these runs (#3204 review N6): read again when the last plan read\n * was over other runs, so a reader always answers from what the plan holds. Derived without the plan only if even that\n * read answers for other runs (the listing moved in between), which cannot name a refused follow-up but never hides a gap.\n */\n private async readFollowUpDerivation(tasks: readonly BuildPlanTask[], latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>): Promise<FollowUpDerivation> {\n const runsKey = JSON.stringify([...latest].map(([taskRef, attempt]) => [taskRef, attempt.runTaskId]).sort(([left], [right]) => String(left).localeCompare(String(right))));\n if (this.followUpDerivationMemo?.runsKey !== runsKey) await this.readBuildPlan();\n if (this.followUpDerivationMemo?.runsKey === runsKey) return this.followUpDerivationMemo.derivation;\n return this.deriveFollowUps(tasks, latest, await this.readFollowUpAbsorptionInputs());\n }\n\n /** Every origin whose report a follow-up carries, as the last plan read appended it (#3204); undefined before any read. */\n private followUpOriginTaskRefs(followUpTaskRef: string): ReadonlySet<string> | undefined {\n const followUp = this.followUpDerivationMemo?.derivation.followUps.find((candidate) => candidate.task.taskRef === followUpTaskRef);\n return followUp === undefined ? undefined : new Set(followUp.gaps.map((gap) => gap.originTaskRef));\n }\n\n /**\n * What a decision on a derived follow-up covers (#3832): the gaps its objective carries AT THE DECISION, recorded on the\n * decision so the follow-up carries exactly those from then on. Nothing for a task that is not a follow-up, or whose\n * objective was never derived (the follow-up then stays fixed to its own report).\n *\n * A pending follow-up keeps absorbing reports until it is decided, so this can hold a report that arrived after the person\n * last looked (review of #3832). A caller sends the reports it displayed (`coveredReportRefs`), and the door refuses a\n * decision that sends none or covers one more ({@link refuseFollowUpReportsNotDisplayed}, #3833). It also NAMES every report it covers, in\n * its reply and in the decision commit's summary, so one revert undoes it.\n */\n private decidedFollowUpCoverage(tasks: readonly BuildPlanTask[], taskRef: string): { readonly fields: { readonly carriedFollowUpGapKeys?: string[] }; readonly gaps: readonly FollowUpGap[] } {\n if (!taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) return { fields: {}, gaps: [] };\n const task = tasks.find((candidate) => candidate.taskRef === taskRef);\n const carried = task === undefined ? undefined : this.carriedFollowUpGapKeys.get(`${taskRef}\\u0000${task.objective}`);\n return carried === undefined ? { fields: {}, gaps: [] } : { fields: { carriedFollowUpGapKeys: carried.map((gap) => followUpGapKey(gap)) }, gaps: carried };\n }\n\n /** The carried gap keys of the follow-up a dispatch selected (#3204), for its run's input. */\n private withCarriedFollowUpGaps(prepared: PreparedBuildTask, origin: ApplicationBuildDispatchOrigin | undefined): ApplicationBuildDispatchOrigin | undefined {\n if (!prepared.plan.taskRef.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX)) return origin;\n const carried = this.carriedFollowUpGapKeys.get(`${prepared.plan.taskRef}\\u0000${prepared.plan.objective}`);\n return carried === undefined ? origin : { ...origin, carriedFollowUpGapKeys: carried.map((gap) => followUpGapKey(gap)) };\n }\n\n private async deriveFollowUpTaskGraph(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n runs: NonNullable<Awaited<ReturnType<ApplicationBuildDispatchCompanionService['readLatestCompletedCodingRuns']>>>,\n absorption: FollowUpAbsorptionInputs | undefined,\n ): Promise<{ readonly graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>; readonly derivation: FollowUpDerivation }> {\n const derivation = await this.deriveFollowUps(graph.tasks, runs.latest, absorption);\n for (const skipped of derivation.notDerived) {\n if (skipped.reason === FollowUpGapNotDerivedReason.MET_SINCE && skipped.metSince !== undefined) {\n // Every drop is logged, with the run that stated it met and where (#3227).\n this.logger.info?.(`A reported gap on ${skipped.originTaskRef} derives no follow-up: ${skipped.metSince.metByTaskRef}'s landed run ${skipped.metSince.metByRunTaskId} states ${skipped.requirementRef} met (${skipped.metSince.evidence}).`, {\n requirementRef: skipped.requirementRef,\n reportingRunTaskId: skipped.reportingRunTaskId,\n metByTaskRef: skipped.metSince.metByTaskRef,\n metByRunTaskId: skipped.metSince.metByRunTaskId,\n });\n continue;\n }\n // A decision only a person can make (#3886, review M2): asked on Home, and said here at debug, since every plan read meets it.\n if (skipped.reason === FollowUpGapNotDerivedReason.AWAITS_DECISION) {\n this.logDebug(`A reported gap on ${skipped.originTaskRef} waits on a decision, so no coding task is derived: ${skipped.requirementRef}: ${skipped.needsDecision ?? ''}`, { requirementRef: skipped.requirementRef });\n continue;\n }\n this.logger.warn?.(`A reported gap on ${skipped.originTaskRef} derives no follow-up (${skipped.reason}): that target does not land by a coding run, so a follow-up would read as landed without running, or never run. The gap stays on the run's record.`, { requirementRef: skipped.requirementRef });\n }\n const taskRefs = new Set(graph.tasks.map((task) => task.taskRef));\n let current = graph;\n const appended: DerivedFollowUp[] = [];\n /*\n * Each follow-up waits on the last one APPENDED on its target (#3227 review F3): a follow-up skipped below would\n * otherwise be named as the next one's prerequisite, which the plan refuses as unknown, and the rest of its target's\n * chain would be dropped with it.\n */\n const lastAppendedOnTarget = new Map<string, string>();\n const append = (derived: Omit<DerivedFollowUp, 'absorbed'>): boolean => {\n const followUp = chainFollowUpAfter(derived, lastAppendedOnTarget.get(derived.targetKey));\n if (taskRefs.has(followUp.taskRef)) {\n this.logger.warn?.(`Reported gaps derive \"${followUp.taskRef}\", which already names another task; not deriving it`, { origins: followUp.prerequisiteTaskRefs });\n return false;\n }\n const extended = BuildPlanTaskGraphSchema.safeParse({ ...current, tasks: [...current.tasks, followUp] });\n if (!extended.success) {\n this.logger.warn?.(`Reported gaps on ${followUp.prerequisiteTaskRefs.join(', ')} could not become a follow-up task; they stay on the runs' records`, { issues: extended.error.issues.map((issue) => issue.message) });\n return false;\n }\n current = extended.data;\n taskRefs.add(followUp.taskRef);\n lastAppendedOnTarget.set(derived.targetKey, followUp.taskRef);\n appended.push({ ...derived, task: followUp, absorbed: [] });\n return true;\n };\n // A gap whose follow-up could not join the plan still reads OPEN, with no follow-up (#3204 review N1).\n const refused: FollowUpGapNotDerived[] = [];\n const refuse = (gaps: readonly FollowUpGap[]) => refused.push(...gaps.map((gap) => ({ ...gap, reason: FollowUpGapNotDerivedReason.FOLLOW_UP_NOT_APPENDED })));\n for (const derived of derivation.followUps) {\n if (append(derived)) continue;\n // A follow-up that cannot join the plan does not take the reports it absorbed with it (#3204): each gets its own.\n const absorbedKeys = new Set(derived.absorbed.flatMap((absorbed) => absorbed.gaps.map((gap) => followUpGapKey(gap))));\n refuse(derived.gaps.filter((gap) => !absorbedKeys.has(followUpGapKey(gap))));\n for (const absorbed of derived.absorbed) if (!append(absorbed)) refuse(absorbed.gaps);\n }\n /*\n * Whenever the cap is hit, derived or not (#2496 review N1): the gap the cap hides is exactly the case that derives\n * nothing. Once per process, since the plan is read on every board poll and the answer does not change between them.\n */\n if (runs.truncated && !this.followUpListingTruncationWarned) {\n this.followUpListingTruncationWarned = true;\n this.logger.warn?.(`The coding-run listing hit its ${BUILD_TASK_RECORD_HISTORY_CEILING}-run ceiling: a gap an older run reported may not have derived its follow-up.`);\n }\n // Every reader answers from what was appended, so none names a follow-up the plan does not hold (#3204 review F7).\n return { graph: current, derivation: assembleFollowUpDerivation(appended, [...derivation.notDerived, ...refused]) };\n }\n\n /**\n * The follow-up derivation over a plan and the latest completed runs (#2496, #3227): one function for every reader.\n *\n * A gap a later run STATED met is dropped only once this host confirms two things the pure candidates cannot know\n * ({@link collectFollowUpGapsMetSince}): the stating run LANDED, meaning every file its write record holds as its own is\n * committed (a statement about a tree whose work is still uncommitted is about a tree HEAD does not have), and no\n * follow-up holding the gap was ever attempted, in any state: neither its own report's, nor the one that absorbed it\n * (#3204), since a follow-up the build ran or is running keeps what it was given (#2530). Both are read only when a\n * candidate exists, so a plan with no met statement costs nothing extra. Anything this cannot read keeps the gap: an\n * unknown is not a statement that it is met.\n */\n private async deriveFollowUps(\n tasks: readonly BuildPlanTask[],\n latest: ReadonlyMap<string, ApplicationBuildTaskAttempt>,\n absorption: FollowUpAbsorptionInputs | undefined,\n ): Promise<FollowUpDerivation> {\n const withAbsorption = absorption ? { absorption } : {};\n const candidates = collectFollowUpGapsMetSince({ tasks, latestCompletedRuns: latest });\n if (candidates.length === 0) return deriveBuildPlanFollowUpTasks({ tasks, latestCompletedRuns: latest, ...withAbsorption });\n const metSince = new Map<string, FollowUpGapMetSince>();\n try {\n // Every task with ANY run (#2530); unknown when the listing could not be read or reached its ceiling.\n if (absorption === undefined) throw new Error('the coding-run listing could not be read whole, so an attempted follow-up may be missing from it');\n const attempted = absorption.dispatched;\n // Every gap a dispatched follow-up carries, before anything is dropped: an absorbed gap is carried under another\n // report's ref, and a gap routed to several modules by several follow-ups (#3204 review N2).\n const carriedByAttempted = new Set(deriveBuildPlanFollowUpTasks({ tasks, latestCompletedRuns: latest, absorption }).followUps\n .filter((followUp) => attempted.has(followUp.task.taskRef))\n .flatMap((followUp) => followUp.gaps.map((gap) => followUpGapKey(gap))));\n const landedRuns = await this.selectLandedRunTaskIds([...new Set(candidates.map((candidate) => candidate.metByRunTaskId))]);\n for (const candidate of candidates) {\n if (attempted.has(candidate.followUpTaskRef) || carriedByAttempted.has(followUpGapKey(candidate.gap)) || !landedRuns.has(candidate.metByRunTaskId)) continue;\n // The first confirmed statement, in plan order, is the one the log names.\n if (!metSince.has(followUpGapKey(candidate.gap))) metSince.set(followUpGapKey(candidate.gap), candidate);\n }\n } catch (error) {\n this.logger.warn?.('Could not confirm the runs that state a reported gap met; every reported gap derives its follow-up', { error: describeCaughtError(error) });\n }\n return deriveBuildPlanFollowUpTasks({ tasks, latestCompletedRuns: latest, metSince, ...withAbsorption });\n }\n\n /**\n * What decides which reports a follow-up absorbs (#3204), cached like {@link readLatestCompletedCodingRuns}, which every\n * plan read also makes:\n *\n * - `dispatched`: every build task with ANY coding run in the history, whatever its state, with the gap keys its runs\n * recorded at dispatch (`carriedFollowUpGapKeys`). Also the attempted set the met-since confirmation reads (#2530).\n * - `decided`: every task the COMMITTED build-task decisions name (a closure, a follow-up approval), with the gap keys\n * the decision recorded (#3832), read without asking whether they are honoured: a follow-up a person decided on, or\n * that an unread decision may name, absorbs nothing more than the decision covered.\n *\n * `undefined` when either cannot be read whole (the listing failed or reached its ceiling, the decisions do not parse):\n * a dispatch outside the window would read as never made, so every caller derives as if nothing were absorbed or\n * confirmed met.\n */\n private readFollowUpAbsorptionInputs(): Promise<FollowUpAbsorptionInputs | undefined> {\n const now = Date.now();\n if (this.followUpAbsorptionInputs !== undefined && now - this.followUpAbsorptionInputs.at < LATEST_COMPLETED_CODING_RUNS_TTL_MS) {\n return this.followUpAbsorptionInputs.value;\n }\n const value = this.fetchFollowUpAbsorptionInputs();\n this.followUpAbsorptionInputs = { at: now, value };\n return value;\n }\n\n private followUpAbsorptionInputs: { readonly at: number; readonly value: Promise<FollowUpAbsorptionInputs | undefined> } | undefined;\n\n private async fetchFollowUpAbsorptionInputs(): Promise<FollowUpAbsorptionInputs | undefined> {\n let rows: Awaited<ReturnType<CompanionExecutionsCompanionService['listActorExecutions']>>;\n let decisionsText: string | null | undefined;\n try {\n rows = await this.executions.listActorExecutions({ systemRef: APPLICATION_CODING_SYSTEM_REF, limit: BUILD_TASK_RECORD_HISTORY_CEILING });\n const decisionsPath = this.buildTaskDecisionsPath();\n decisionsText = decisionsPath === undefined ? undefined : await this.createCommittedTreeReader().readText(decisionsPath);\n } catch (error) {\n this.logger.warn?.('Could not read the coding runs or the build-task decisions: no pending follow-up absorbs a later report, and no reported gap is confirmed met', { error: describeCaughtError(error) });\n return undefined;\n }\n if (rows.length >= BUILD_TASK_RECORD_HISTORY_CEILING) return undefined;\n const decisions = parseBuildTaskDecisions(decisionsText ?? undefined);\n if (decisions.unreadable !== undefined) return undefined;\n const dispatched = new Map<string, Set<string>>();\n for (const row of rows) {\n const input = row.standaloneTasks[0]?.input as { taskRef?: unknown; carriedFollowUpGapKeys?: unknown } | undefined;\n if (typeof input?.taskRef !== 'string') continue;\n const carried = dispatched.get(input.taskRef) ?? new Set<string>();\n if (Array.isArray(input.carriedFollowUpGapKeys)) for (const key of input.carriedFollowUpGapKeys) if (typeof key === 'string') carried.add(key);\n dispatched.set(input.taskRef, carried);\n }\n const decided = new Map<string, Set<string>>();\n for (const decision of [...decisions.closures.values(), ...decisions.followUpApprovals.values()]) {\n decided.set(decision.taskRef, new Set([...(decided.get(decision.taskRef) ?? []), ...(decision.carriedFollowUpGapKeys ?? [])]));\n }\n return { dispatched, decided };\n }\n\n /**\n * Which completed coding runs LANDED (#3227): their write record exists. Since #3204 a task lands on the WORKING tree, so\n * what a completed run wrote reached the tree the moment it settled, and a gap it states as met counts from then; it used\n * to wait for the run's files to be committed, which a checkpoint now does up to a minute later (review of 4a1b1f1bf F3:\n * the refill right after the settlement derived the follow-up, and a dispatched follow-up never leaves the plan). A run\n * with no record is unknown, so not landed.\n */\n private async selectLandedRunTaskIds(runTaskIds: readonly string[]): Promise<ReadonlySet<string>> {\n if (this.codingRunWrites === undefined) return new Set();\n const records = await Promise.all(runTaskIds.map((taskId) => this.codingRunWrites!.read(taskId)));\n return new Set(records.flatMap((record) => (record ? [record.taskId] : [])));\n }\n\n /**\n * The build plan with a `display-name` step at its head whenever the landed brand's name is not the COMMITTED\n * `displayName` (#2505). Derived for the reason {@link withHostDerivedEngineCapabilitiesStep} is: the brand decided\n * the name, and applying it is a consequence, not a decision the plan makes. No edges, so it never dangles once it\n * has landed and is derived no longer. Best effort: an unreadable brand derives nothing.\n */\n private async withHostDerivedDisplayNameStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const authorsStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DISPLAY_NAME);\n if (authorsStep) return graph;\n let condition: Awaited<ReturnType<typeof this.generationSteps.resolveGenerationStepLandedCondition>>;\n try {\n condition = await this.generationSteps.resolveGenerationStepLandedCondition({\n taskRef: HOST_DERIVED_DISPLAY_NAME_TASK_REF,\n target: { kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP, generationStepRef: ApplicationBuildGenerationStep.DISPLAY_NAME },\n } as BuildPlanTask);\n } catch (error) {\n this.logger.warn?.('Could not read the brand\\'s name; deriving no display-name step', { error: describeCaughtError(error) });\n return graph;\n }\n if (condition.kind === ApplicationBuildGenerationStepLandedKind.INPUT_UNREADABLE) {\n this.logger.warn?.('Could not read the brand\\'s name; deriving no display-name step', { detail: condition.detail });\n return graph;\n }\n if (condition.kind !== ApplicationBuildGenerationStepLandedKind.DISPLAY_NAME_APPLIED) return graph;\n if (await this.displayNameApplied(condition, this.createCommittedTreeReader())) return graph;\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DISPLAY_NAME_TASK_REF)) {\n this.logger.warn?.(`The build plan owes a display-name step, but \"${HOST_DERIVED_DISPLAY_NAME_TASK_REF}\" already names another task; not deriving it.`);\n return graph;\n }\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_DISPLAY_NAME_TASK_REF,\n objective: `Name the application \"${condition.displayName}\", as its brand decided: the SaaS config's displayName and every file the scaffold wrote the provisional name into. `\n + 'Derived by the dispatch host because the brand names the application and nothing has applied it.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DISPLAY_NAME,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.CONFIGURE_APPLICATION_FOUNDATION,\n skillRefs: ['config-saas'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks,\n ],\n });\n }\n\n /** Does `tree`'s configuration declare the display name a DISPLAY_NAME_APPLIED condition names (#2505)? */\n private async displayNameApplied(condition: { readonly configPath: string; readonly displayName: string }, tree: CommittedTreeReader): Promise<boolean> {\n const content = await tree.readText(condition.configPath);\n return content !== undefined && content !== null && readApplicationDisplayName(content) === condition.displayName;\n }\n\n /** The capabilities an ENGINE_CAPABILITIES_ENABLED condition names that `tree`'s configuration does not enable (#2497). */\n private async capabilitiesNotEnabledIn(\n condition: { readonly configPath: string; readonly capabilities: readonly string[] },\n tree: CommittedTreeReader,\n ): Promise<readonly string[]> {\n const content = await tree.readText(condition.configPath);\n // No committed configuration (or none readable) enables nothing.\n if (content === undefined || content === null) return [...condition.capabilities];\n return condition.capabilities.filter((capability) => readEngineCapabilityEnabled({ filePath: condition.configPath, content, capability }) !== true);\n }\n\n private async withHostDerivedMigrationStep(\n graph: Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>,\n ): Promise<Awaited<ReturnType<typeof BuildPlanTaskGraphSchema.parseAsync>>> {\n const authorsMigrationStep = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP\n && task.target.generationStepRef === ApplicationBuildGenerationStep.DATABASE_MIGRATIONS);\n if (authorsMigrationStep) return graph;\n const hasSchemaStage = graph.tasks.some((task) => task.target?.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE\n && task.target.stage === BuildPlanResourceStage.SCHEMA);\n const { obligation } = await this.generationSteps.assessSchemaPlanObligation();\n const owed = obligation === ApplicationSchemaPlanObligation.BASELINE_OWED\n || (hasSchemaStage && (obligation === ApplicationSchemaPlanObligation.ACCEPTED_PLAN || obligation === ApplicationSchemaPlanObligation.UNDETERMINED));\n if (!owed) return graph;\n if (graph.tasks.some((task) => task.taskRef === HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF)) {\n // The ref is taken by a task that is NOT a migration step. Deriving would duplicate a ref, which\n // the graph schema refuses — so say so rather than silently dropping the obligation.\n this.logger.warn?.(\n `The build plan owes a database-migrations step, but \"${HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF}\" already names another task; not deriving it.`,\n );\n return graph;\n }\n return BuildPlanTaskGraphSchema.parse({\n ...graph,\n tasks: [\n {\n taskRef: HOST_DERIVED_DATABASE_MIGRATIONS_TASK_REF,\n objective: (obligation === ApplicationSchemaPlanObligation.BASELINE_OWED\n ? 'Generate the initial migration and its schema-plan baseline, so the tables this PostgreSQL application declares exist before its backend boots. '\n : 'Migrate the schema drift that accepted schema-stage changes created, so the application can still boot. ')\n + 'Derived by the dispatch host because the build plan owes this step and does not author it.',\n target: {\n kind: BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP,\n generationStepRef: ApplicationBuildGenerationStep.DATABASE_MIGRATIONS,\n },\n produces: [],\n functionalTopic: MetaWorkflow_FunctionalTopic.MODEL_DOMAIN_GRAPH,\n skillRefs: ['application-database-migrations'],\n prerequisiteTaskRefs: [],\n servesRefs: [],\n },\n ...graph.tasks,\n ],\n });\n }\n\n /**\n * What the run is allowed to see — the PUSH floor of the dispatch lane's context (issue #253).\n *\n * Widened 2026-09-02 from \"the task itself and nothing else yet\" to the lean mandatory core the\n * epic's re-analysis decided, and deliberately no further: everything an agent might need beyond\n * its target's blast radius is the PULL door's job (`wildo context …`, issue #252), which the\n * `live-queries` source below points at. Anticipating everything here would be the planner trap\n * (#254) re-entering through the push door. Everything is model-safe by construction — the\n * application's own accepted build plan, its own live registry, its own domain plan, its installed\n * skill index and its own configuration (#2495) — and the contract's composer re-asserts\n * `SAFE_FOR_MODEL` on every source regardless.\n *\n * The skill-index source is the one deliberate widening past \"the target's blast radius\" (#2495):\n * measured over 005's coding runs, workers never opened the index and read the engine's compiled\n * code instead, so a door they do not know to open is not a pull door. It carries only the domains\n * the task's own skills belong to (median ~5 KB over 005's plan; a website task reaches ~26 KB,\n * the Website domain being the index's largest), plus the names of the others.\n *\n * ## Failure posture: best-effort on the derived sources, deliberately\n *\n * The playbook lane's workspace-truth section fails CLOSED, because a tool-less planner with no\n * workspace truth invents module ids. A CODING agent is the opposite case on both counts: it has\n * tools (it can read the tree, and the door), so a missing derived source degrades speed rather\n * than truth — while refusing the dispatch because a subprocess hiccuped would block the build on\n * context the run could recover for itself. So: the TASK is always present, the derived sources\n * are added when their reads succeed, and a failed read is a WARN naming what was omitted.\n *\n * ## No new cache, verified rather than assumed\n *\n * The re-analysis asked for the introspection read to be cached across a 55-task plan. It already\n * is: `CompanionIntrospectionService.requestInfo` carries its own source-state derivation cache,\n * keyed on the observed workspace state — asking again after nothing changed is a cache hit, and\n * a landed task invalidates it by changing the sources it hashes. Adding a second cache here would\n * be a copy that can only ever disagree.\n */\n\n /** The coding contract for one task: its skills resolved once, and carried by both the contract and its self-description. */\n private async composeTaskCodingContract(\n task: BuildPlanTask,\n boundary: Parameters<typeof composeBuildTaskCodingContract>[0]['boundary'],\n totalTasks: number,\n landedOverride?: BuildTaskLandedOverride,\n refusedSpecifications?: readonly SpecificationRefusal[],\n unmetProduct?: { readonly probes: readonly BuildPlanTaskLandedProbe[]; readonly completedRuns: number },\n ): Promise<ReturnType<typeof composeBuildTaskCodingContract>> {\n const skillRefs = await this.resolveTaskSkillRefs(task);\n const contextSources = await this.buildContextSources(task, totalTasks, skillRefs);\n return composeBuildTaskCodingContract({\n task,\n boundary,\n // An operator ran this task although its probe calls it landed: the run is told why (#2409). A task whose\n // specification its factory refused is told the validator's error (#3210).\n contextSources: [\n ...contextSources,\n ...(landedOverride ? [landedOverrideContextSource(landedOverride)] : []),\n ...(refusedSpecifications !== undefined && refusedSpecifications.length > 0 ? [refusedSpecificationContextSource(refusedSpecifications)] : []),\n ...(unmetProduct !== undefined && unmetProduct.probes.length > 0 ? [unmetProductContextSource(unmetProduct.probes, unmetProduct.completedRuns)] : []),\n ],\n objectiveRef: 'application-creation:objective/build-plan',\n installedSkillRefs: skillRefs,\n });\n }\n\n /**\n * The skills a coding task is authored with — the ONE list the contract's `installedSkillRefs`, the\n * task self-description and the dispatch plan all carry. A website task's are DERIVED from the website\n * plan (a section is authored with the skill its kind names), and an experience task's from its\n * products (a view, a frontend configuration, a milestone, a piece of guidance — #1660), not trusted\n * from the decomposer's model; every other task keeps what it declared.\n *\n * One list on purpose: the agent's prompt loads `installedSkillRefs` and treats context sources as\n * data, so a derivation that reached only the self-description was a skill the agent was never told to\n * load — the first version of this fix did exactly that.\n *\n * Whichever list that is, the skills the task's PRODUCTS require are added to it (#1832): an inbound\n * channel handler is authored with `inbound-channels` on every path, including a task that also carries\n * an experience product and so takes the experience derivation. So are the skills its TARGET requires\n * (#2495): a CONFIG task on a resource whose schema declares personal data carries the retention skill.\n */\n private async resolveTaskSkillRefs(task: BuildPlanTask): Promise<readonly string[]> {\n const targetDeclaresPersonalData = await this.targetResourceDeclaresPersonalData(task);\n return [...new Set([...(await this.resolveTargetSkillRefs(task)), ...productDerivedSkillRefs(task), ...targetDerivedSkillRefs(task, { targetDeclaresPersonalData })])];\n }\n\n /**\n * Whether a resource-stage task's target DECLARES personal data in its schema (#2495), read from the file its SCHEMA\n * task wrote (every CONFIG task depends on it). A schema that cannot be read is answered `false` and logged: the\n * retention skill is then not routed, which is the state before #2495, never a guess.\n */\n private async targetResourceDeclaresPersonalData(task: BuildPlanTask): Promise<boolean> {\n if (task.target.kind !== BuildPlanTaskTargetKind.RESOURCE_STAGE || task.target.stage !== BuildPlanResourceStage.CONFIG) return false;\n const schemaPath = resourceSchemaFilePath(task.target.moduleRef, task.target.resourceRef);\n try {\n return schemaSourceDeclaresPersonalData(await readFile(join(this.companionContext.saasRoot, schemaPath), 'utf8'));\n } catch (error) {\n this.logger.warn('Personal-data probe skipped: the target schema could not be read, so the retention skill is not routed', { taskRef: task.taskRef, schemaPath, error: String(error) });\n return false;\n }\n }\n\n private async resolveTargetSkillRefs(task: BuildPlanTask): Promise<readonly string[]> {\n if (task.target.kind === BuildPlanTaskTargetKind.WEBSITE) {\n try {\n return websiteTaskSkillRefs(task, await this.readSpecificationsForBrief());\n } catch (error) {\n this.logger.warn('Website skill derivation skipped; the task keeps its declared skills', { taskRef: task.taskRef, error: String(error) });\n return task.skillRefs;\n }\n }\n if (taskHasExperienceProduct(task)) {\n try {\n return experienceTaskSkillRefs(task, await this.readSpecificationsForBrief());\n } catch (error) {\n // Only an execution view needs the plan; every other experience product still derives from itself.\n this.logger.warn('Experience plan unreadable; skills derived from the products alone', { taskRef: task.taskRef, error: String(error) });\n return experienceTaskSkillRefs(task, undefined);\n }\n }\n return task.skillRefs;\n }\n\n /**\n * The specifications a brief is built from: everything that evaluated, with no read refused. One unavailable family\n * must not cost a section that never needed it, and `decidedFamilyValuesFromCompanionExports` reads every slot.\n * What is missing is said by {@link buildIncompleteBriefContextSource}, so a served hole is never read as an absence.\n * Only for a brief: a reader that DECIDES from an absence keeps the guarded surface.\n */\n private async readSpecificationsForBrief(): Promise<SpecificationFamilyData> {\n return unguardedSpecifications(await loadSpecificationFamilyData(this.companionContext));\n }\n\n /** The section saying which specifications modules failed and what this brief does not carry, or `null` when it is whole. */\n private async buildIncompleteBriefContextSource(omitted: readonly string[]): Promise<BuildTaskContextSource | null> {\n const { moduleFaults, loadError } = await readSpecificationsEvaluationFindings(this.companionContext);\n const failedModules = moduleFaults.filter((fault) => fault.causedBy.length === 0);\n if (failedModules.length === 0 && loadError === null && omitted.length === 0) return null;\n return {\n sourceRef: BRIEF_INCOMPLETE_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own statement about how it built this brief.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n statement: 'This brief is incomplete. It was built from what could be read, and every gap the companion knows of is listed here.',\n ...(failedModules.length === 0 ? {} : {\n failedSpecificationModules: failedModules.map((fault) => ({\n modulePath: fault.modulePath,\n reading: fault.reading,\n ...(fault.authoredFrame === null ? {} : { authoredFrame: fault.authoredFrame }),\n unavailableUntilFixed: fault.withheldSpecifications,\n })),\n note: 'While a module fails, a specification missing from this brief may exist: it is not known to be absent, so do not create it. '\n + 'Other writes to the specifications through the companion are refused until the module evaluates. If the failing module is within '\n + 'this task\\'s allowed paths, fix it first; if not, do the task on what is here and report the module in your result. '\n + '`wildo creation feed` prints each module\\'s error.',\n }),\n // What a failure said is left out: a thrown message is not the companion's own statement. `wildo creation feed` prints it.\n ...(loadError === null ? {} : { specificationsPackageUnreadable: 'The package did not evaluate: `wildo creation feed` prints why.' }),\n ...(omitted.length === 0 ? {} : { omittedSections: omitted }),\n },\n };\n }\n\n /**\n * Every section of one coding brief. Each declares its TRUST class where it is built (#2846): `BuildTaskContextSource`\n * requires one, so a section added without a class does not compile. Every section here is TRUSTED except the\n * third-party element sections appended last, which carry what the trusted ones routed out through `thirdParty`.\n */\n private async buildContextSources(task: BuildPlanTask, totalTasks: number, skillRefs: readonly string[]): Promise<readonly BuildTaskContextSource[]> {\n const sources: BuildTaskContextSource[] = [buildTaskSelfDescriptionContextSource(task, totalTasks, skillRefs)];\n // Every section below that could not be built, said in the brief as well as in the log (#3258): see the end of this method.\n const omitted: string[] = [];\n const omit = (section: string, error: unknown): void => {\n omitted.push(section);\n this.logger.warn(`${section} omitted from the dispatch context`, { taskRef: task.taskRef, error: String(error) });\n };\n /*\n * WHICH ELEMENTS CAME FROM THE WEB, from the compiled catalog. Never throws: a catalog that cannot be read, or names\n * no research step (a shipped one always does, so it was misread), routes EVERY decided element to a third-party\n * section (#2846 review L1). That marks more and blocks nothing. The brief says why, in a trusted section the run's\n * row copies.\n */\n const researchInformed = readCompiledResearchInformedContent();\n const thirdParty = new ThirdPartyBriefContent(researchInformed);\n // assurance-control: WILDO.SOFTWARE.AI_PRODUCED_CHANGE_CONTROL — a brief built without a readable catalog says so, and the run row records why.\n if (researchInformed.reading !== ResearchProvenanceCatalogReading.READ) {\n if (!this.unreadableProvenanceWarned) {\n this.unreadableProvenanceWarned = true;\n this.logger.warn('The compiled playbook catalog could not say which brief elements came from web research; every decided element is routed as third-party', {\n taskRef: task.taskRef, reading: researchInformed.reading, reason: researchInformed.unreadableReason,\n });\n }\n sources.push({\n sourceRef: BRIEF_PROVENANCE_UNAVAILABLE_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own statement about how it built this brief.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n reading: researchInformed.reading,\n ...(researchInformed.unreadableReason !== undefined ? { reason: researchInformed.unreadableReason } : {}),\n /*\n * Only what the brief's builders ROUTE (#2846 review N5): served elements and the website plan's resolved elements.\n * The vision one-liner, the task labels, the domain-plan slice, the placement plan and the build-task objective\n * never pass through routing. Their producers read research-informed input only screened or marked (#2937), and\n * with no classifier bound the brief says so in its own section (`DERIVED_TEXT_UNSCREENED_SOURCE_REF`).\n */\n effect: 'Every served element and every element the website plan resolves is in a THIRD_PARTY section, screened or marked '\n + 'as unscreened, because the companion could not tell which ones came from web research. The rest of the brief is '\n + 'carried as usual.',\n },\n });\n }\n\n /*\n * WHAT THE LAST ATTEMPT RAN INTO (#1536). A retry used to be byte-identical to the attempt that\n * failed, which is the definition of the loop an attempt budget exists to stop: the one input the\n * next attempt lacks is how the previous one failed. Shown with the re-arm note when there is one,\n * because \"it failed like this, and this was fixed\" is exactly what a retry needs. Best-effort.\n */\n try {\n const [latest] = await this.dispatch.listAttributableFailedRunsForBuildTask(task.taskRef, undefined, { includeRearmed: true });\n // Its check outputs and closing report are screened before they travel (#2937).\n if (latest !== undefined) sources.push(await screenRunOutputSection(previousAttemptContextSource(latest), this.briefScreeningHost(task.taskRef)));\n } catch (error) {\n omit('What the last attempt ran into', error);\n }\n\n /*\n * WHAT HAPPENED TO THE LAST COMPLETED ATTEMPT, when a sibling overwrote its product (#2210). The re-run\n * meets a shared file that now holds other tasks' entries and not its own; told nothing, an agent may\n * \"restore\" the file to what it wrote last time and remove theirs. Only the LATEST completed run is\n * read, so a task that has since completed cleanly is not told about an old collision. Best-effort.\n */\n try {\n const [latestCompleted] = [...(await this.dispatch.listCompletedRunsForBuildTask(task.taskRef))]\n .sort((left, right) => (right.completedAt ?? '').localeCompare(left.completedAt ?? ''));\n if (latestCompleted?.interference !== undefined) sources.push(interferedAttemptContextSource(latestCompleted.taskId, latestCompleted.interference));\n } catch (error) {\n omit('What happened to the last completed attempt', error);\n }\n\n /*\n * The DOOR MENU — tier-0 of the pull half: the live-query ids and the two commands that expand\n * them. Ids only, not descriptions: `wildo context list` IS the descriptions, one command away,\n * and rendering ~27 descriptions into every dispatch prompt would spend the budget this source\n * exists to save. Read from the same catalog the CLI menu serves, so it cannot drift from what\n * the companion actually answers.\n */\n const catalog = this.introspection.describeCatalog();\n sources.push({\n sourceRef: 'application-creation:context/live-queries',\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own catalog of what it answers.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance: 'Live application state is one shell command away — prefer asking over re-deriving from the tree. '\n + '`wildo context list` prints the menu with descriptions; `wildo context info <behaviorId>` runs one query; '\n + '`wildo context journey` shows the creation journey; `wildo context coherence` the cross-family coherence report; '\n + '`wildo context elements map|get|related` retrieves the product decisions already made (ICPs, requirements, phases…) '\n + 'a subset at a time — map first, then get the refs your task needs.',\n behaviorIds: catalog.behaviors.map((behavior) => behavior.behaviorId),\n },\n });\n\n /*\n * THE SKILLS BEYOND THE ROUTED ONES (#2495). Measured over ~100 coding runs of app-creation-test-005: the skill\n * index was opened 0 times, and where the routed skills fell short the workers read the engine's compiled `dist`.\n * The index is installed in the application; the brief carries the sections of the domains its routed skills\n * belong to (every sibling skill, with its trigger phrases) and the name of every other domain. Best-effort.\n */\n try {\n const indexMarkdown = await readFile(join(this.companionContext.saasRoot, INSTALLED_SKILL_INDEX_RELATIVE_PATH), 'utf8');\n const slice = sliceSkillIndexForTask(indexMarkdown, skillRefs);\n if (slice !== undefined) {\n sources.push({\n sourceRef: 'application-creation:context/skill-index',\n originRef: 'application-creation:origin/installed-skill-index',\n // Framework knowledge, compiled and installed by the framework.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance: `Your installed skills are listed above; these are the domains they belong to, with every sibling skill. A skill named here is at \\`.claude/skills/<id>/SKILL.md\\` — read it before reaching for the engine's compiled code. The whole catalogue is \\`${INSTALLED_SKILL_INDEX_RELATIVE_PATH}\\`.`,\n routedDomains: slice.routedDomains,\n otherDomains: slice.otherDomains,\n },\n });\n }\n } catch (error) {\n // A brief silently missing its skill index is the 005 state again.\n omit('The skill index', error);\n }\n\n /*\n * WHAT THE APPLICATION HAS TURNED ON (#2495). 005 shipped ORGANIZATIONS disabled under an organization-scoped domain\n * plan, and no worker could see it. Read from the configuration (total over the capability vocabulary) and the\n * domain plan's tenancy decision; a contradiction between them is stated, never resolved here. Best-effort.\n */\n try {\n const configContent = await readFile(join(this.companionContext.saasRoot, SAAS_CONFIG_FILE_NAME), 'utf8');\n let tenancy: DomainPlanTenancyModel | undefined;\n try {\n const exports = await this.readSpecificationsForBrief();\n const declared = (exports as { domainPlanSpecification?: { tenancy?: unknown } }).domainPlanSpecification?.tenancy;\n tenancy = Object.values(DomainPlanTenancyModel).find((member) => member === declared);\n } catch (error) {\n // The capabilities still reach the brief, without the tenancy comparison.\n omit('The comparison of the capabilities with the domain plan\\'s tenancy', error);\n }\n const facts = readApplicationCapabilityFacts({ configContent, configPath: SAAS_CONFIG_FILE_NAME, tenancy });\n sources.push({\n sourceRef: 'application-creation:context/application-capabilities',\n originRef: 'application-creation:origin/application-configuration',\n // The application's own committed configuration.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n ...facts,\n note: 'Engine capabilities as `wildo.saas.config.ts` declares them. Build only on what is enabled: an organization-scoped resource or an '\n + 'organization role assumes ORGANIZATIONS, a sent email assumes EMAIL_TRANSACTIONAL. A capability this task needs and the configuration '\n + 'does not enable is reported in your result, not enabled by you.',\n },\n });\n } catch (error) {\n omit('What the application has turned on', error);\n }\n\n const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;\n const resourceRef = task.target && 'resourceRef' in task.target ? task.target.resourceRef : undefined;\n\n // WORKSPACE TRUTH, sliced to the target: the target module's real resources and present schema\n // fields, plus the exact list of every module id (counts stay exact — a slice that hid the\n // population would under-report, and an agent that invents a module id dispatches a no-op).\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey) {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });\n if (result.success) {\n const snapshot = result.data as {\n modules?: ReadonlyArray<{ moduleId: string; resourceTypes: readonly string[] }>;\n resourceSchemaFields?: Record<string, readonly string[]>;\n };\n const modules = snapshot.modules ?? [];\n const targetModule = moduleRef === undefined\n ? undefined\n : modules.find((sharedModule) => slugifyRegistryIdentifier(sharedModule.moduleId) === moduleRef);\n sources.push({\n sourceRef: 'application-creation:context/workspace-truth',\n originRef: 'application-creation:origin/resources-registry-introspection',\n // The application's own registry, introspected: names of modules, resources and fields.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n allModuleIds: modules.map((sharedModule) => sharedModule.moduleId),\n ...(targetModule\n ? {\n targetModule: {\n moduleId: targetModule.moduleId,\n resources: targetModule.resourceTypes.map((resourceType) => ({\n resourceType,\n slugRef: slugifyRegistryIdentifier(resourceType),\n presentSchemaFields: snapshot.resourceSchemaFields?.[resourceType] ?? [],\n })),\n },\n }\n : {}),\n note: 'A resource listed here already EXISTS as a registered skeleton — its task is enrichment, not creation. '\n + 'A domain-plan resource NOT listed here does not exist yet. Full registry: `wildo context info resources-registry`.',\n },\n });\n } else {\n omit('The workspace truth', result.error.message);\n }\n }\n } catch (error) {\n omit('The workspace truth', error);\n }\n\n /*\n * THE TARGET RESOURCE AND WHAT IT IS CONNECTED TO (#1437).\n *\n * The module slice above answers \"what else is in this module\", which is neither what a\n * resource-targeted task needs nor all of it: it OVER-supplies the siblings the task never\n * touches, and UNDER-supplies the engine resources the target's own foreign keys point at —\n * `users`, `organizations`, the scope anchors, which are the most load-bearing edges a resource\n * has and are in no application module at all. It also carries field NAMES only: no\n * relationships, no operations, no specification prose.\n *\n * One hop from the target is the honest neighbourhood. Two hops reaches most of the application\n * through the scope anchors, which is the whole-registry answer with extra steps.\n *\n * Best-effort like every source here, and it costs a derivation the first time (~35 s) that\n * every later task on this application reads from cache. A dispatch runs for minutes and spends\n * real money; paying that once to stop the agent guessing at a relationship is the cheaper half.\n */\n if (resourceRef !== undefined) {\n try {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (backendServiceKey) {\n const { index, freshness } = await readWorkspaceElements(this.introspection, backendServiceKey);\n /*\n * The plan addresses resources by SLUG and the registry by `resourceType`; they differ\n * (`todoList` vs `todo-list`). Resolved by slugifying the index's own keys rather than by\n * un-slugifying the ref, because the slug is lossy and the registry is the authority on\n * which resources exist.\n */\n const resourceType = [...index.resources.keys()].find((candidate) => slugifyRegistryIdentifier(candidate) === resourceRef);\n const related = resourceType === undefined ? undefined : relatedWorkspaceResources(index, resourceType);\n if (related) {\n sources.push({\n sourceRef: 'application-creation:context/target-resource-neighbourhood',\n originRef: 'application-creation:origin/application-domain-model',\n // The application's own resources as its code declares them.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n freshness: describeWorkspaceFreshness(freshness),\n target: resourceType,\n edges: related.edges,\n resources: related.resources,\n ...(related.unresolved.length > 0 ? { unresolvedNeighbours: related.unresolved } : {}),\n note: 'The target resource as it EXISTS today, with its fields, operations and relationships, plus the '\n + 'resources one hop away. Direction matters: `foreignKeyHolderResourceType` says which side carries the key. '\n + 'Ask for more with `wildo context workspace get <resourceType>` or `wildo context workspace related <resourceType>`.',\n },\n });\n } else {\n // Said rather than omitted: a target the registry does not carry is a CREATION task, and\n // an absent section would read as a failed read.\n this.logDebug('Target resource is not registered yet — no neighbourhood to supply', { taskRef: task.taskRef, resourceRef });\n }\n }\n } catch (error) {\n omit('The target resource and what it is connected to', error);\n }\n }\n\n // THE DOMAIN-PLAN SLICE for the target: WHAT this task's objective enriches toward, in the\n // application's own accepted words — the module semantics and, for a relationship task, the\n // relationship drafts touching the target. Absent plan (older app, or foundation not run) is\n // simply absent; nothing here invents a fallback.\n try {\n const exports = await this.readSpecificationsForBrief();\n const domainPlan = (exports as { domainPlanSpecification?: unknown }).domainPlanSpecification as {\n modules?: ReadonlyArray<{ relatedModuleId: string; mainResources?: readonly string[]; supportingResources?: readonly string[] }>;\n relationships?: ReadonlyArray<{ relationshipRef: string; sourceResourceRef: string; targetResourceRef: string }>;\n lifecycles?: ReadonlyArray<{ resourceRef: string; transitions: ReadonlyArray<{ createsResourceRef?: string }> }>;\n } | undefined;\n const planModules = domainPlan?.modules ?? [];\n const targetPlanModule = moduleRef === undefined\n ? undefined\n : planModules.find((planModule) => slugifyRegistryIdentifier(planModule.relatedModuleId) === moduleRef);\n if (targetPlanModule) {\n const moduleResourceSlugs = new Set(\n [...(targetPlanModule.mainResources ?? []), ...(targetPlanModule.supportingResources ?? [])]\n .map((resourceType) => slugifyRegistryIdentifier(resourceType)),\n );\n sources.push({\n sourceRef: 'application-creation:context/domain-plan-slice',\n originRef: 'application-creation:origin/domain-plan',\n /*\n * The committed domain plan. Its producer reads no research step's evidence directly, so the derivation does not\n * taint it, and the research-informed families it reads reached its model screened or marked (#2937).\n */\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n targetModule: targetPlanModule,\n ...(resourceRef !== undefined ? { targetResourceRef: resourceRef } : {}),\n relationshipsTouchingModule: (domainPlan?.relationships ?? []).filter((relationship) =>\n moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.sourceResourceRef))\n || moduleResourceSlugs.has(slugifyRegistryIdentifier(relationship.targetResourceRef))),\n /*\n * The states, transitions and stamped fields of the module's resources (#2491 review F5), and any lifecycle\n * whose conversion creates one of them. The schema task creates the status enum and the stamped fields\n * from these, and a transition task needs its starting states; carried only in prose objectives, the\n * states were whatever the decomposer happened to restate.\n */\n lifecyclesTouchingModule: (domainPlan?.lifecycles ?? []).filter((lifecycle) =>\n moduleResourceSlugs.has(slugifyRegistryIdentifier(lifecycle.resourceRef))\n || lifecycle.transitions.some((transition) => transition.createsResourceRef !== undefined\n && moduleResourceSlugs.has(slugifyRegistryIdentifier(transition.createsResourceRef)))),\n },\n });\n }\n } catch (error) {\n omit('The domain plan slice', error);\n }\n\n // WHAT THIS TASK IS FOR (#1419): the full text of every element its `servesRefs` names — the\n // requirements, phases, success criteria and constraints it answers to — and a map of the other\n // tasks building the same module. Without it the agent knew WHAT to build and not what it was for:\n // no acceptance criterion, no served success criterion, no constraint. A deterministic derivation\n // through the one decided-element index (#1416), so it sits inside the push floor of decision\n // #251 — nothing here chooses context.\n try {\n const servedSource = buildServedElementsContextSource(task, await this.readSpecificationsForBrief(), thirdParty);\n if (servedSource !== null) sources.push(servedSource);\n } catch (error) {\n omit('What this task serves', error);\n }\n\n // WHAT A WEBSITE TASK IS BUILDING: its page or section as the website plan decided it, and the\n // boundary between a page task and its section tasks. See `buildWebsitePlanContextSource`.\n if (task.target.kind === BuildPlanTaskTargetKind.WEBSITE) {\n try {\n const companionExports = await this.readSpecificationsForBrief();\n const websiteSource = buildWebsitePlanContextSource(\n task,\n companionExports,\n await this.resolveWebsiteClaimDelivery(companionExports),\n await this.resolveWebsiteDemoFacts(websiteTaskDemoResourceRef(task, companionExports)),\n thirdParty,\n );\n if (websiteSource !== null) sources.push(websiteSource);\n } catch (error) {\n omit('The website plan', error);\n }\n }\n\n // WHAT A SHELL TASK MUST MAKE THE SHELL CARRY (#1554): the placement plan's decisions for its\n // surface, in the identities the landing probe compares. Same derivation as the probe's witness.\n if (task.target.kind === BuildPlanTaskTargetKind.SHELL_PLACEMENT) {\n try {\n sources.push(buildShellPlacementPlanContextSource(task.target.surface, await this.readSpecificationsForBrief()));\n } catch (error) {\n omit('The placement plan', error);\n }\n }\n\n /*\n * WHAT THIS BRIEF COULD NOT CARRY (#3258). Dispatch never holds on a failed specifications module: in an unattended\n * build the coding run is what repairs it, so a hold would be a deadlock whose remedy needs the run it stopped\n * (`continuity-drift-and-cas-basis.md` Rule 3). So the run goes, on what evaluated, and is told exactly what it lacks.\n */\n const incomplete = await this.buildIncompleteBriefContextSource(omitted);\n if (incomplete !== null) sources.push(incomplete);\n\n /*\n * WHAT WAS WRITTEN OUTSIDE THE REPOSITORY (#2846), last: every research-informed element the sections above would\n * have inlined, each in its own THIRD_PARTY section, screened through the application's content-safety classifier\n * before it travels. A flagged element is withheld with a notice; an element nothing could screen travels MARKED as\n * unscreened. Never a refusal: the lane runs whatever the classifier answers.\n */\n sources.push(...await screenThirdPartyBriefElements(thirdParty.elements(), this.briefScreeningHost(task.taskRef)));\n\n /*\n * WHAT NOTHING SCREENED UPSTREAM (#2937). A generation step's research-informed input is screened before its model\n * reads it, so with a classifier bound the requirements, plans and this task's objective were never derived from a\n * flagged instruction. With none bound that input was only marked, and the text those steps wrote is in TRUSTED\n * sections here: the brief says so rather than reclassing the whole application third-party (#2846's rejected\n * alternative). Read at brief time, from the companion's current binding.\n */\n const unscreened = unscreenedClassifierReason(this.briefScreeningHost(task.taskRef));\n if (unscreened !== undefined) {\n sources.push({\n sourceRef: DERIVED_TEXT_UNSCREENED_SOURCE_REF,\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own statement about how the text in this brief was produced.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n outcome: unscreened.outcome,\n ...('reason' in unscreened && unscreened.reason !== undefined ? { reason: unscreened.reason } : {}),\n note: DERIVED_TEXT_UNSCREENED_NOTICE,\n },\n });\n }\n return sources;\n }\n}\n\n/**\n * The previous FAILED attempt of a task, as a retry is shown it (#1536): its disposition, each check it\n * failed with the tail of that check's output, the agent's own closing words, and the re-arm note when\n * an operator released it. Read off the durable row; nothing new is recorded to produce it.\n */\nexport function previousAttemptContextSource(run: {\n readonly taskId: string;\n readonly settledAt?: string;\n /** When the run started; absent for one that never did (`deriveCodingRunStart`). */\n readonly startedAt?: string;\n readonly memory: unknown;\n readonly output: Record<string, unknown>;\n}): BuildTaskContextSource {\n const tail = (value: unknown): string | undefined =>\n typeof value === 'string' && value.length > 0 ? value.slice(-PREVIOUS_ATTEMPT_OUTPUT_TAIL_CHARS) : undefined;\n const verification = Array.isArray(run.output.verification) ? run.output.verification : [];\n const failedChecks = verification\n .filter((entry): entry is { checkRef?: unknown; outcome?: Record<string, unknown> } => typeof entry === 'object' && entry !== null)\n .filter((entry) => entry.outcome?.success === false)\n .map((entry) => ({\n checkRef: String(entry.checkRef ?? ''),\n ...(tail(entry.outcome?.message) ? { message: tail(entry.outcome?.message) } : {}),\n ...(tail(entry.outcome?.stdoutTail) ? { stdoutTail: tail(entry.outcome?.stdoutTail) } : {}),\n ...(tail(entry.outcome?.stderrTail) ? { stderrTail: tail(entry.outcome?.stderrTail) } : {}),\n }));\n const rearm = readBuildTaskRearm(run.memory);\n // A coding run records its failure as `error`, a refusal as `failure` — one reader for both (#2390).\n const failureMessage = readSettledRunFailureMessage(run.output);\n /*\n * Three different histories, told apart (#1581, second review A5). Telling the agent \"repeat the same\n * approach and it fails the same way\" is right only when the approach WAS judged: a turn the host took\n * away, or a dispatch refused before anything ran, judged nothing about the work.\n */\n // The budget lists FAILED runs only; whether one ever started is the shared derivation's answer.\n const start = deriveCodingRunStart({ status: FlowsActors_Status.FAILED, ...(run.startedAt ? { startedAt: run.startedAt } : {}), output: run.output });\n const guidance = start === CodingRunStart.REFUSED_CONTRACT\n ? 'A previous dispatch of this task was refused at admission for its OWN contract — nothing ran. The '\n + 'refusal below names what the contract gets wrong (for example a verification check this host does '\n + 'not register); dispatching it unchanged is refused the same way.'\n : start === CodingRunStart.REFUSED_BY_HOST\n ? 'A previous dispatch of this task was refused before it started, so nothing ran and nothing was judged. '\n + 'The refusal is below for context; it is not a verdict on any approach.'\n : run.output.failureAttribution === CodingRunFailureAttribution.HOST\n ? 'The previous attempt of this task was stopped by the HOST, not by its work: the turn was taken away '\n + '(a provider limit, a killed process, an operator cancel), the result could not be recorded, or a '\n + 'required check could not be asked. Nothing about the approach was judged; start the work normally, '\n + 'and read what it had reached if that helps.'\n : 'This task was attempted before and FAILED. Read why before starting: repeating the same approach '\n + 'will fail the same way. Fix what the failure names; do not work around a check.';\n return {\n sourceRef: 'application-creation:context/previous-attempt',\n originRef: 'application-creation:origin/dev-companion',\n /*\n * TRUSTED (#2846): the lane's own record of its own run, the application's checks on its own tree and the previous\n * worker's closing report. That worker read a brief whose third-party sections were screened or marked, but its own\n * words, and a check's output, may still carry text it read there or fetched itself: every caller passes this section\n * through `screenRunOutputSection` before a brief carries it (#2937).\n */\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance,\n runTaskId: run.taskId,\n ...(typeof run.output.failureAttribution === 'string' ? { failureAttribution: run.output.failureAttribution } : {}),\n ...(typeof failureMessage === 'string' ? { failure: failureMessage } : {}),\n ...(run.settledAt ? { failedAt: run.settledAt } : {}),\n ...(typeof run.output.disposition === 'string' ? { disposition: run.output.disposition } : {}),\n failedChecks,\n ...(tail(run.output.agentOutputTail) ? { agentClosingWords: tail(run.output.agentOutputTail) } : {}),\n ...(rearm ? { rearmedBecause: { reason: rearm.reason, note: rearm.note } } : {}),\n },\n };\n}\n\n/**\n * The previous COMPLETED attempt lost its product to a concurrent run (#2210). Pure, so what the re-run is\n * told can be pinned without composing a dispatch.\n */\nexport function interferedAttemptContextSource(runTaskId: string, interference: BuildTaskInterference): BuildTaskContextSource {\n return {\n sourceRef: 'application-creation:context/interfered-attempt',\n originRef: 'application-creation:origin/dev-companion',\n // The companion's own record of which runs collided.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n guidance: 'The previous attempt of this task COMPLETED, but other tasks running at the same time edited the same '\n + 'file(s) and its product was overwritten before it was committed. Nothing about the approach was judged. '\n + 'The files below are SHARED: open them as they stand now, add this task\\'s product beside what the other '\n + 'tasks put there, and do not remove or rewrite entries this task did not author.',\n runTaskId,\n sharedFiles: interference.contendedProductPaths,\n concurrentTasks: interference.overlappingTaskRefs,\n detectedAt: interference.detectedAt,\n },\n };\n}\n\n/**\n * The task's own DETERMINISTIC self-description — no introspection, no LLM.\n *\n * The first (and mandatory) context source of every coding task: what the task is, what it must\n * produce, and how its landing will be judged. A pure function of the task, so what the agent is told\n * about its own accountability can be pinned without composing a dispatch.\n *\n * (It was first extracted so a RESUME could rebuild a contract cheaply; that caller went when a parked\n * run's resume moved onto its actor execution in 02e241ae, which carries the context itself.)\n */\nexport function buildTaskSelfDescriptionContextSource(\n task: BuildPlanTask,\n totalTasks: number,\n /** The skills the agent is told to author with — the task's own unless the host derived better (a website task). */\n skillRefs: readonly string[] = task.skillRefs,\n): BuildTaskContextSource {\n return {\n sourceRef: 'application-creation:context/build-task',\n originRef: 'application-creation:origin/build-plan',\n // The committed build plan, decomposed from the application's own specifications.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n taskRef: task.taskRef,\n objective: task.objective,\n target: task.target,\n /*\n * WHAT THIS RUN IS ACCOUNTABLE FOR, and the agent has to be told.\n *\n * Landing is decided from `produces` (#597), so an agent that is not shown the artifacts it\n * must deliver can do excellent work on the objective's prose and still leave the task\n * unlanded — the host would re-offer it forever, and the cause would be invisible to\n * everyone. Handing it over costs nothing and is the same shape as `target`: a semantic\n * declaration the model reads, never a path it could author.\n */\n produces: task.produces,\n /*\n * HOW LANDING IS DECIDED, exactly (#1554). `produces` is the task's declaration; these are the\n * probes the host evaluates after the run, resolved by the same function landing calls. They\n * differ where the declaration is not what the tree spells: a SHELL_PLACEMENT task's refs name\n * the placement plan's decisions and appear in no file, so its probe asks what the composed\n * shell CARRIES (the `shell-placement-plan` source spells that out). An agent shown only\n * `produces` authored those refs as text, got one of two right by guessing from the objective,\n * and the run finished `completed_unlanded`.\n */\n landedWhen: resolveBuildTaskLandedProbes(task),\n /*\n * THE REQUIREMENTS THIS TASK SERVES (#2496). The agent reports one it could not fully meet against these refs, in\n * its closing report's `wildo-unmet-requirements` block; without them it could only describe a gap in prose, which\n * is how 005's workers said \"the roles do nothing yet\" and nothing ever acted on it.\n */\n servesRefs: task.servesRefs,\n functionalTopic: task.functionalTopic,\n skillRefs,\n prerequisiteTaskRefs: task.prerequisiteTaskRefs,\n positionInPlan: `one of ${totalTasks} tasks in the application's accepted build plan`,\n },\n };\n}\n\n/** One plan decision, with the identity the shell probe compares it by. */\nexport interface PlacementPlanShellExpectation {\n readonly decision: PlacementPlan['decisions'][number];\n readonly shellIdentity: string;\n /**\n * Who the placed entry is shown to (#2512), PER LAYER: the decision's own `requiredRoles` (written on the entry) and\n * its sidebar group's (written on the section). Never combined into one list: the browser expands core roles through\n * their inheritance, so an `ORG_MEMBER` group with an `ORG_ADMIN` decision intersects to nothing while admins see the\n * row. Each absent means everyone.\n */\n readonly audience: PlacementAudienceLayers;\n}\n\n/** The two layers a sidebar row's audience is written in; `undefined` is everyone. */\nexport interface PlacementAudienceLayers {\n readonly item?: readonly string[];\n readonly section?: readonly string[];\n}\n\n/** Whether two audiences admit the same roles; `undefined` is everyone. */\nfunction samePlacementAudience(left: readonly string[] | undefined, right: readonly string[] | undefined): boolean {\n if (left === undefined || right === undefined) return left === right;\n const leftSet = new Set(left);\n return leftSet.size === new Set(right).size && right.every((role) => leftSet.has(role));\n}\n\n/** Whether both layers admit the same roles. */\nfunction samePlacementAudienceLayers(left: PlacementAudienceLayers, right: PlacementAudienceLayers): boolean {\n return samePlacementAudience(left.section, right.section) && samePlacementAudience(left.item, right.item);\n}\n\n/** An audience as a reader sees it in a build record: `everyone`, or each restricted layer. */\nfunction describePlacementAudience(audience: PlacementAudienceLayers): string {\n const list = (roles: readonly string[]) => `[${[...roles].sort().join(', ')}]`;\n const layers = [\n ...(audience.section === undefined ? [] : [`section ${list(audience.section)}`]),\n ...(audience.item === undefined ? [] : [`item ${list(audience.item)}`]),\n ];\n return layers.length === 0 ? 'everyone' : layers.join(' + ');\n}\n\n/** What a placement plan asks of the shell, decision by decision. */\nexport interface PlacementPlanShellExpectations {\n /** What the plan PLACED on each surface. */\n readonly placed: ReadonlyMap<PlacementSurface, readonly PlacementPlanShellExpectation[]>;\n /** What the plan DECLINED — to be carried by no surface. */\n readonly declined: readonly PlacementPlanShellExpectation[];\n}\n\n/**\n * The PLAN half of the shell witness (#1538), as a pure function of the plan.\n *\n * Two readers need it and must not disagree: the landing probe, which compares it with what the\n * composed shell carries, and the coding agent, which has to be told it BEFORE the run (#1554). One\n * derivation is what makes \"the agent was shown the criterion it is judged by\" true by construction\n * rather than by two loops agreeing.\n */\nexport function derivePlacementPlanShellExpectations(plan: PlacementPlan): PlacementPlanShellExpectations {\n const placed = new Map<PlacementSurface, PlacementPlanShellExpectation[]>();\n const declined: PlacementPlanShellExpectation[] = [];\n const groupAudience = new Map(plan.groups.map((group) => [`${group.surface}::${group.groupRef}`, group.requiredRoles] as const));\n for (const decision of plan.decisions) {\n const shellIdentity = placementSubjectShellIdentity(decision.subject);\n if (decision.disposition === PlacementDisposition.DECLINED) {\n // A declined subject is shown to nobody, so it has no audience to compare.\n declined.push({ decision, shellIdentity, audience: {} });\n continue;\n }\n const address = decision.address;\n const section = address.surface === PlacementSurface.SIDEBAR ? groupAudience.get(`${address.surface}::${address.groupRef}`) : undefined;\n const audience: PlacementAudienceLayers = {\n ...(decision.requiredRoles === undefined ? {} : { item: decision.requiredRoles }),\n ...(section === undefined ? {} : { section }),\n };\n const entry = { decision, shellIdentity, audience };\n placed.set(address.surface, [...(placed.get(address.surface) ?? []), entry]);\n }\n return { placed, declined };\n}\n\n/**\n * A SHELL_PLACEMENT task's landing criterion, spelled for the agent that has to meet it (#1554).\n *\n * The task's `produces` names the plan's decision refs, which no file spells; the probe asks whether\n * the composed surface carries every subject the plan PLACED there and none it DECLINED, from\n * committed files. So the agent is handed the decisions themselves — subject, address and rationale —\n * each with the identity the probe compares, plus the command that reads the shell as the probe\n * reads it, so it can check its own work before finishing.\n *\n * Never `null` for a shell task: a missing or invalid plan is SAID, because \"nothing to place\" and\n * \"nothing says what to place\" lead the agent to opposite conclusions — the witness draws the same line.\n */\nexport function buildShellPlacementPlanContextSource(surface: PlacementSurface, companionExports: unknown): BuildTaskContextSource {\n // The committed placement plan: the application's own decisions about its shell.\n const base = { sourceRef: 'application-creation:context/shell-placement-plan', originRef: 'application-creation:origin/specification-families', trust: MetaWorkflow_ContextSourceTrust.TRUSTED, };\n const authored = (companionExports as Record<string, unknown> | null)?.['placementPlanSpecification'];\n const parsed = authored === undefined || authored === null ? undefined : PlacementPlanSchema.safeParse(authored);\n if (parsed === undefined || !parsed.success) {\n return {\n ...base,\n content: {\n surface,\n unanswerable: parsed === undefined\n ? 'The application has no placement plan, so nothing says what this surface should carry; the task cannot land until one exists.'\n : `The placement plan does not satisfy its schema (${parsed.error.issues.slice(0, 2).map((issue) => `${issue.path.join('.')}: ${issue.message}`).join('; ')}); the task cannot land until it does.`,\n },\n };\n }\n const describe = ({ decision, shellIdentity, audience }: PlacementPlanShellExpectation) => ({\n decisionRef: decision.decisionRef,\n subject: decision.subject,\n ...(decision.disposition === PlacementDisposition.PLACED ? { address: decision.address } : {}),\n rationale: decision.rationale,\n shellIdentity,\n // The entry's OWN audience, written on the entry; its section's is on its group in `groupsOnThisSurface`.\n ...(audience.item === undefined ? {} : { requiredRoles: audience.item }),\n });\n const expectations = derivePlacementPlanShellExpectations(parsed.data);\n /*\n * The containers the decisions address (#2481, #2512): each group on this surface with its purpose and order, on the\n * settings rail its sub-categories, and on the sidebar its audience. A decision names a group by ref only, so without\n * them the agent could place every section and still not know what heading to create, how to order it, that a category\n * has sub-categories a section's `subGroupRef` points into, or who a section is for.\n */\n const groupsOnThisSurface = parsed.data.groups.filter((group) => group.surface === surface).map((group) => ({\n groupRef: group.groupRef,\n purpose: group.purpose,\n order: group.order,\n ...(group.subGroups === undefined || group.subGroups.length === 0 ? {} : { subGroups: group.subGroups }),\n ...(group.requiredRoles === undefined ? {} : { requiredRoles: group.requiredRoles }),\n }));\n return {\n ...base,\n content: {\n surface,\n landingCriterion: `This task lands when the ${surface} surface, as the composed shell resolves it, carries every subject `\n + 'placed on it below and none of the declined subjects, and every file that surface is composed from is committed. '\n + 'The declarationRefs in `produces` name these decisions; they are never spelled in the tree, so writing them as text lands nothing. '\n + 'Roles are written per layer, exactly as listed: a group\\'s `requiredRoles` as `runtimeAvailability.requiredRoles` on its '\n + 'sidebar section, and an entry\\'s own `requiredRoles` on the entry. A layer that lists none carries none.',\n ...(groupsOnThisSurface.length === 0 ? {} : { groupsOnThisSurface }),\n placedOnThisSurface: (expectations.placed.get(surface) ?? []).map(describe),\n declinedEverywhere: expectations.declined.map(describe),\n selfCheck: '`wildo context info app-shell-placement-content` reports what each surface carries, in the same identities as '\n + '`shellIdentity` above. Run it before finishing: a placed identity it does not list is still missing.',\n },\n };\n}\n\n/**\n * The elements a build task SERVES, resolved, plus a map of its module's other tasks (#1419).\n *\n * Reads the task's own `servesRefs` edge through the decided-element index, so resolution is the same\n * membership routing every other surface uses. A ref that resolves to nothing is REPORTED in the\n * source, never skipped: the agent must know the task claims to serve something the application has\n * not decided (Wonder CRM carries one), rather than conclude it serves nothing. `null` when the task\n * declares nothing to serve and has no sibling in its module — the source would be empty.\n */\nexport function buildServedElementsContextSource(\n task: BuildPlanTask,\n companionExports: unknown,\n /**\n * Where a research-informed element goes instead of this section (#2846). REQUIRED, because this section is TRUSTED:\n * a served compliance constraint, or any element a research step filled, leaves it for its own screened section.\n */\n thirdParty: ThirdPartyBriefContent,\n): BuildTaskContextSource | null {\n const index = indexDecidedAspects(decidedFamilyValuesFromCompanionExports(companionExports as Record<string, unknown>));\n const TASK_ASPECT = 'build-plan.task';\n const SERVES_FIELD = 'servesRefs';\n const served = index.links\n .filter((link) => link.field === SERVES_FIELD && link.from.aspectKey === TASK_ASPECT && link.from.ref === task.taskRef)\n .map((link) => thirdParty.route({\n aspectKey: link.to.aspectKey,\n family: link.to.family,\n ref: link.to.ref,\n element: link.to.item,\n }));\n const unresolved = index.unresolved\n .filter((entry) => entry.field === SERVES_FIELD && entry.fromAspectKey === TASK_ASPECT && entry.fromRef === task.taskRef)\n .map((entry) => entry.key);\n\n const moduleRef = task.target && 'moduleRef' in task.target ? task.target.moduleRef : undefined;\n const moduleTasks = moduleRef === undefined\n ? []\n : (index.aspects.get(TASK_ASPECT)?.elements ?? [])\n .filter((element) => element.ref !== task.taskRef)\n .filter((element) => {\n const target = (element.item as { target?: { moduleRef?: string } }).target;\n return target?.moduleRef === moduleRef;\n })\n .map((element) => ({ taskRef: element.ref, objective: element.label }));\n /*\n * The OTHER planned tasks serving each requirement this task serves (#3886): what a closing report names as the owner of\n * a gap (`ownedByTaskRef`) when what is missing is their work. Until #3886 a task saw only its module's siblings, so a\n * website section that found a feature missing could not say which task builds it, and 24 follow-up runs on reference\n * run 43691253927 changed nothing because they ran before that task had landed.\n */\n const otherTasksServing = Object.fromEntries(task.servesRefs.flatMap((requirementRef) => {\n const serving = (index.aspects.get(TASK_ASPECT)?.elements ?? [])\n // A follow-up is never an owner the derivation honours (review LOW): only the plan's own tasks are listed.\n .filter((element) => element.ref !== task.taskRef && !element.ref.startsWith(HOST_DERIVED_FOLLOW_UP_TASK_REF_PREFIX))\n .filter((element) => ((element.item as { servesRefs?: readonly string[] }).servesRefs ?? []).includes(requirementRef))\n .map((element) => ({ taskRef: element.ref, objective: element.label }));\n return serving.length > 0 ? [[requirementRef, serving] as const] : [];\n }));\n\n if (served.length === 0 && unresolved.length === 0 && moduleTasks.length === 0 && Object.keys(otherTasksServing).length === 0) return null;\n return {\n sourceRef: 'application-creation:context/served-elements',\n originRef: 'application-creation:origin/specification-families',\n // The committed specifications this task answers to, with every research-informed element routed out.\n trust: MetaWorkflow_ContextSourceTrust.TRUSTED,\n content: {\n servedElements: served,\n ...(unresolved.length > 0\n ? {\n unresolvedServesRefs: unresolved,\n unresolvedNote: 'These servesRefs name nothing the application has decided. Do not invent what they would say; '\n + 'build what the resolved elements require, and report the gap.',\n }\n : {}),\n ...(moduleRef !== undefined ? { moduleRef, otherTasksInModule: moduleTasks } : {}),\n ...(Object.keys(otherTasksServing).length > 0 ? { otherTasksServing } : {}),\n note: 'servedElements are what this task is accountable to — its acceptance criteria. otherTasksInModule and '\n + 'otherTasksServing (by requirement) are maps only: read a task with `wildo context elements get --refs <taskRef>` if '\n + 'you need it. When what is missing for a requirement is one of otherTasksServing\\'s own work, name it as '\n + '`ownedByTaskRef` in your unmet-requirements block.',\n },\n };\n}\n\n/**\n * Does the committed frontend registry pass the Settings rail to the runtime (#3101)? A registry that cannot be read (no\n * frontend, or not committed) is not judged here: the rail's own probe paths already say whether the config is committed.\n */\nasync function settingsRailReachesRuntime(tree: Pick<CommittedTreeReader, 'readText'>): Promise<boolean> {\n const registry = await tree.readText(FRONTEND_MODULES_REGISTRY_RELATIVE_PATH);\n return typeof registry !== 'string' || frontendRegistryPassesSettingsHub(registry);\n}\n"]}