@runfusion/fusion 0.77.0-beta.5 → 0.77.0-beta.7

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 (167) hide show
  1. package/dist/bin.js +42668 -39363
  2. package/dist/child-process-worker.js +7647 -4857
  3. package/dist/client/.vite/manifest.json +259 -322
  4. package/dist/client/assets/{AgentDetailView-CSK_Rnlk.js → AgentDetailView-C1eh_vXv.js} +4 -4
  5. package/dist/client/assets/{AgentPermissionPolicyEditor-kG44Adcm.js → AgentPermissionPolicyEditor-CeKsO1LR.js} +2 -2
  6. package/dist/client/assets/{AgentsView-ClKwKWnU.js → AgentsView-BNe2ABOc.js} +4 -4
  7. package/dist/client/assets/CommandCenter-BuREM-G1.js +102 -0
  8. package/dist/client/assets/DevServerView-D0i1b-QO.js +1 -0
  9. package/dist/client/assets/DirectoryPicker-VOx91hQt.js +1 -0
  10. package/dist/client/assets/DocumentsView-CO5W_WVb.js +1 -0
  11. package/dist/client/assets/EvalsView-BqSINSrZ.js +1 -0
  12. package/dist/client/assets/ExperimentalAgentOnboardingModal-DEcFgONi.js +1 -0
  13. package/dist/client/assets/{GoalsView-ysh3X2x6.js → GoalsView-DZ57wXmJ.js} +1 -1
  14. package/dist/client/assets/{InsightsView-BbMjCu7J.js → InsightsView-DSWfXG7Q.js} +3 -3
  15. package/dist/client/assets/{MemoryView-B3IgA8Bx.js → MemoryView-BEX10uhl.js} +1 -1
  16. package/dist/client/assets/{PiExtensionsManager-CZlIw7C3.js → PiExtensionsManager-DcAmXXoR.js} +2 -2
  17. package/dist/client/assets/PluginManager-BU0omQUv.js +1 -0
  18. package/dist/client/assets/{PullRequestView-DhhsJV8I.js → PullRequestView-B-JL_8Kk.js} +2 -2
  19. package/dist/client/assets/{ReportModal-CQMn4i1y.js → ReportModal-DxggF_RH.js} +5 -5
  20. package/dist/client/assets/{ResearchView-CVwfs4l3.js → ResearchView-CnwTXfQO.js} +1 -1
  21. package/dist/client/assets/{SecretsView-CrJfHle9.js → SecretsView-BDvzsLFz.js} +1 -1
  22. package/dist/client/assets/SettingsModal-801eFQ9u.js +21 -0
  23. package/dist/client/assets/{SettingsModal-B6U5Umru.js → SettingsModal-BZHeQ3ED.js} +1 -1
  24. package/dist/client/assets/{SettingsTextareaRow-O7-u9uMC.js → SettingsTextareaRow-B0rTuelr.js} +1 -1
  25. package/dist/client/assets/SetupWizardModal-CoExPwIn.js +2 -0
  26. package/dist/client/assets/{SkillsView-CoWAjvWU.js → SkillsView-WVP25LPj.js} +1 -1
  27. package/dist/client/assets/WorkflowNodeEditor-pCMyKcnS.js +8 -0
  28. package/dist/client/assets/{agent-import-generation-BqDmtTur.js → agent-import-generation-M_hKtjgN.js} +1 -1
  29. package/dist/client/assets/{agentsOrgChartLayout-C4cLqlV6.js → agentsOrgChartLayout-DjvIMhFD.js} +1 -1
  30. package/dist/client/assets/{app-C_PTWuI1.js → app-BOvA34XN.js} +3 -3
  31. package/dist/client/assets/{app-BBSLJDbV.js → app-Bic4iWXQ.js} +3 -3
  32. package/dist/client/assets/{app-Bvr57EZQ.js → app-BlbH7Tir.js} +2 -2
  33. package/dist/client/assets/{app-DwvelD-n.js → app-C6TctczU.js} +3 -3
  34. package/dist/client/assets/{app-DRW5hIgr.js → app-D3qZmEIu.js} +3 -3
  35. package/dist/client/assets/{app-BKwOvuxE.js → app-DLnMkUt5.js} +2 -2
  36. package/dist/client/assets/{app-DKx18PHE.js → app-mNy0DeDM.js} +3 -3
  37. package/dist/client/assets/{architectureDiagram-3BPJPVTR-CdxcwdRe.js → architectureDiagram-3BPJPVTR-CkzEm8i9.js} +1 -1
  38. package/dist/client/assets/{blockDiagram-GPEHLZMM-CfQrRfHR.js → blockDiagram-GPEHLZMM-Dc-dUMjY.js} +1 -1
  39. package/dist/client/assets/{c4Diagram-AAUBKEIU-Cx7-2SOm.js → c4Diagram-AAUBKEIU-DnYjsrR0.js} +1 -1
  40. package/dist/client/assets/channel-CxQ40s_U.js +1 -0
  41. package/dist/client/assets/{chunk-2J33WTMH-D8jvgP3M.js → chunk-2J33WTMH-0E1GEFEr.js} +1 -1
  42. package/dist/client/assets/{chunk-4BX2VUAB-B5tBx_s_.js → chunk-4BX2VUAB-Dj5oZd51.js} +1 -1
  43. package/dist/client/assets/{chunk-55IACEB6-C-F-HQ5Z.js → chunk-55IACEB6-DfNT0s8E.js} +1 -1
  44. package/dist/client/assets/{chunk-727SXJPM-BP8Ln-8C.js → chunk-727SXJPM-BnFjhiIQ.js} +1 -1
  45. package/dist/client/assets/{chunk-AQP2D5EJ-DMnTmRmn.js → chunk-AQP2D5EJ-DR84wSqR.js} +1 -1
  46. package/dist/client/assets/{chunk-FMBD7UC4-D_YdfnNc.js → chunk-FMBD7UC4-IjByNOrR.js} +1 -1
  47. package/dist/client/assets/{chunk-ND2GUHAM-CULXyuXq.js → chunk-ND2GUHAM-By0q_jZm.js} +1 -1
  48. package/dist/client/assets/{chunk-QZHKN3VN-CT1BWEJL.js → chunk-QZHKN3VN-BELcl3N5.js} +1 -1
  49. package/dist/client/assets/classDiagram-4FO5ZUOK-C2ARdiRL.js +1 -0
  50. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C2ARdiRL.js +1 -0
  51. package/dist/client/assets/{common-13IRj_PO.js → common-BsNuuNOe.js} +1 -1
  52. package/dist/client/assets/{common-BBynATth.js → common-CASsTuSW.js} +1 -1
  53. package/dist/client/assets/{common-BG-vw0tL.js → common-CfyFt5OG.js} +1 -1
  54. package/dist/client/assets/{common-DSo46rnH.js → common-DS98trLj.js} +1 -1
  55. package/dist/client/assets/common-DeoHWJCq.js +1 -0
  56. package/dist/client/assets/common-PpMdoH5r.js +1 -0
  57. package/dist/client/assets/{common-vpHuuvkd.js → common-cN--mrmm.js} +1 -1
  58. package/dist/client/assets/{cose-bilkent-S5V4N54A-M-3DXa6e.js → cose-bilkent-S5V4N54A-D4cCw9-_.js} +1 -1
  59. package/dist/client/assets/{dagre-BM42HDAG-Bsiqvroz.js → dagre-BM42HDAG-JJp5dVeY.js} +1 -1
  60. package/dist/client/assets/dashboard-view-6zPJm9zC.js +1 -0
  61. package/dist/client/assets/{dashboard-view-BEBh_Ei5.js → dashboard-view-Bl9CPhxE.js} +1 -1
  62. package/dist/client/assets/{dashboard-view-CnFFG3cW.js → dashboard-view-C5Nt8cvY.js} +1 -1
  63. package/dist/client/assets/{dashboard-view-DAHn20ph.js → dashboard-view-MAC_LHDX.js} +2 -2
  64. package/dist/client/assets/{diagram-2AECGRRQ-CZiHoXo5.js → diagram-2AECGRRQ-D4L7j_t_.js} +1 -1
  65. package/dist/client/assets/{diagram-5GNKFQAL-BoJVz4Or.js → diagram-5GNKFQAL-VAGFaXqG.js} +1 -1
  66. package/dist/client/assets/{diagram-KO2AKTUF-DivGQuAL.js → diagram-KO2AKTUF-hqXSggfW.js} +1 -1
  67. package/dist/client/assets/{diagram-LMA3HP47-DkMK7OJp.js → diagram-LMA3HP47-B3eAIuy8.js} +1 -1
  68. package/dist/client/assets/{diagram-OG6HWLK6-DFFvRcpW.js → diagram-OG6HWLK6-BGufp0RK.js} +1 -1
  69. package/dist/client/assets/{erDiagram-TEJ5UH35--217vrom.js → erDiagram-TEJ5UH35-DplXdx8w.js} +1 -1
  70. package/dist/client/assets/{flowDiagram-I6XJVG4X-CQgWO3xf.js → flowDiagram-I6XJVG4X-C1Ms2bko.js} +1 -1
  71. package/dist/client/assets/{folder-open-DR6cRcNR.js → folder-open-nMraSDXu.js} +1 -1
  72. package/dist/client/assets/{ganttDiagram-6RSMTGT7-BjDMUrS3.js → ganttDiagram-6RSMTGT7-DVgxMtXb.js} +1 -1
  73. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-gKUcDnln.js → gitGraphDiagram-PVQCEYII-DH2_n0J8.js} +1 -1
  74. package/dist/client/assets/index-BJc-A7eB.css +1 -0
  75. package/dist/client/assets/index-CBFPgFTp.js +2787 -0
  76. package/dist/client/assets/{infoDiagram-5YYISTIA-BA91T8S5.js → infoDiagram-5YYISTIA-DmZdWVcU.js} +1 -1
  77. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-0BY5xe-c.js → ishikawaDiagram-YF4QCWOH-DsEIHSXr.js} +1 -1
  78. package/dist/client/assets/{journeyDiagram-JHISSGLW-B_OwenbQ.js → journeyDiagram-JHISSGLW-CsfIWmu1.js} +1 -1
  79. package/dist/client/assets/{kanban-definition-UN3LZRKU-GLabUTKp.js → kanban-definition-UN3LZRKU-CQKqeZvc.js} +1 -1
  80. package/dist/client/assets/{mermaid.core-BXo4rxYI.js → mermaid.core-DkC_dr4-.js} +4 -4
  81. package/dist/client/assets/{mindmap-definition-RKZ34NQL-DZl6LPoE.js → mindmap-definition-RKZ34NQL-RnmE-NUe.js} +1 -1
  82. package/dist/client/assets/{pieDiagram-4H26LBE5-DtHq-4py.js → pieDiagram-4H26LBE5-DPu6FPc4.js} +1 -1
  83. package/dist/client/assets/{puzzle-OVm-I1L4.js → puzzle-DwhHOf32.js} +1 -1
  84. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BdjXhd5d.js → quadrantDiagram-W4KKPZXB-CYbypO2p.js} +1 -1
  85. package/dist/client/assets/{requirementDiagram-4Y6WPE33-BoFVjELN.js → requirementDiagram-4Y6WPE33-DFk1vK_N.js} +1 -1
  86. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-B0qyJh-P.js → sankeyDiagram-5OEKKPKP-CkUY1Zzu.js} +1 -1
  87. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-ByY62Eqp.js → sequenceDiagram-3UESZ5HK-CFivaLOO.js} +1 -1
  88. package/dist/client/assets/{standing-instructions-template-BsnnRlwm.js → standing-instructions-template-BbqKGAC1.js} +2 -2
  89. package/dist/client/assets/{stateDiagram-AJRCARHV-CwJ-_Phi.js → stateDiagram-AJRCARHV-BPeD5PwG.js} +1 -1
  90. package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-Cfvhq8mV.js → stateDiagram-v2-BHNVJYJU-DduiCPMb.js} +1 -1
  91. package/dist/client/assets/{timeline-definition-PNZ67QCA-Co8VfGN9.js → timeline-definition-PNZ67QCA-CGUNNVro.js} +1 -1
  92. package/dist/client/assets/{upload-CkqDbEeE.js → upload-BS96H1o7.js} +1 -1
  93. package/dist/client/assets/{users-B8DkpbXD.js → users--irrWoyU.js} +1 -1
  94. package/dist/client/assets/{vennDiagram-CIIHVFJN-XSJteQrL.js → vennDiagram-CIIHVFJN-CybTaJJH.js} +1 -1
  95. package/dist/client/assets/{wardley-L42UT6IY-Btc0FRfF.js → wardley-L42UT6IY-DSxaSCGi.js} +1 -1
  96. package/dist/client/assets/{wardleyDiagram-YWT4CUSO--IcDNmrf.js → wardleyDiagram-YWT4CUSO-YFb0AxNt.js} +1 -1
  97. package/dist/client/assets/{xychartDiagram-2RQKCTM6-CZW93G6X.js → xychartDiagram-2RQKCTM6-Cv6zlMJC.js} +1 -1
  98. package/dist/client/index.html +2 -2
  99. package/dist/client/version.json +1 -1
  100. package/dist/droid-cli/package.json +1 -1
  101. package/dist/extension.js +37513 -34387
  102. package/dist/migrations/0065_fn_149_review_convergence_stage.sql +3 -0
  103. package/dist/pi-claude-cli/package.json +1 -1
  104. package/dist/plugin-sdk/index.d.ts +66 -10
  105. package/dist/plugin-sdk/index.js +103 -33
  106. package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +158 -36
  107. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  108. package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +103 -33
  109. package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
  110. package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +103 -33
  111. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  112. package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +103 -33
  113. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  114. package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +103 -33
  115. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  116. package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +103 -33
  117. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  118. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +103 -33
  119. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  120. package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +103 -33
  121. package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
  122. package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +103 -33
  123. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  124. package/dist/plugins/fusion-plugin-linear-import/bundled.js +103 -33
  125. package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
  126. package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +103 -33
  127. package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
  128. package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +103 -33
  129. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  130. package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +103 -33
  131. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  132. package/dist/plugins/fusion-plugin-quality/bundled.js +103 -33
  133. package/dist/plugins/fusion-plugin-quality/package.json +1 -1
  134. package/dist/plugins/fusion-plugin-reports/bundled.js +103 -33
  135. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  136. package/dist/plugins/fusion-plugin-roadmap/bundled.js +103 -33
  137. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  138. package/dist/plugins/fusion-plugin-todos/bundled.js +103 -33
  139. package/dist/plugins/fusion-plugin-todos/package.json +1 -1
  140. package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +103 -33
  141. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  142. package/package.json +1 -1
  143. package/skill/fusion/references/engine-tools.md +5 -5
  144. package/dist/client/assets/ChatView-DS4XiCm_.css +0 -1
  145. package/dist/client/assets/ChatView-DoOqgkPX.js +0 -13
  146. package/dist/client/assets/CommandCenter-CJxvPbgn.js +0 -102
  147. package/dist/client/assets/DevServerView-C4nyLONX.js +0 -1
  148. package/dist/client/assets/DirectoryPicker-BIvXWIB5.js +0 -1
  149. package/dist/client/assets/DocumentsView-DH_aZysM.js +0 -1
  150. package/dist/client/assets/EvalsView-klRK-GJQ.js +0 -1
  151. package/dist/client/assets/ExperimentalAgentOnboardingModal-CgBmukIm.js +0 -1
  152. package/dist/client/assets/PluginManager-vy0YZ2Nx.js +0 -1
  153. package/dist/client/assets/SessionTerminal-2ZSXmOkG.css +0 -1
  154. package/dist/client/assets/SessionTerminal-BRI8W1-G.js +0 -2
  155. package/dist/client/assets/SettingsModal-h1A_aFqD.js +0 -21
  156. package/dist/client/assets/SetupWizardModal-nXfJp8cA.js +0 -2
  157. package/dist/client/assets/WorkflowNodeEditor-BFMM3RF_.js +0 -8
  158. package/dist/client/assets/channel-B4WN1jC_.js +0 -1
  159. package/dist/client/assets/classDiagram-4FO5ZUOK-CKE8RSOv.js +0 -1
  160. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CKE8RSOv.js +0 -1
  161. package/dist/client/assets/common-DbOCE-0i.js +0 -1
  162. package/dist/client/assets/common-DnXF4Jmj.js +0 -1
  163. package/dist/client/assets/dashboard-view-Bo_gFjdO.js +0 -1
  164. package/dist/client/assets/index-Dki2LBAp.css +0 -1
  165. package/dist/client/assets/index-oxnX59eO.js +0 -2774
  166. package/dist/client/assets/shield-alert-CDy69fl7.js +0 -6
  167. package/dist/client/assets/useDiscoveredSkillsCache-BHUasRiZ.js +0 -1
@@ -0,0 +1,3 @@
1
+ -- FN-149 durable bounded review-convergence state.
2
+ ALTER TABLE project.tasks ADD COLUMN IF NOT EXISTS review_convergence_stage integer DEFAULT 0;
3
+ ALTER TABLE project.tasks ADD COLUMN IF NOT EXISTS review_convergence_escalation_count integer DEFAULT 0;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusion/pi-claude-cli",
3
- "version": "0.77.0-beta.5",
3
+ "version": "0.77.0-beta.7",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "main": "index.ts",
@@ -233,7 +233,7 @@ type WorkflowStepMode = "prompt" | "script";
233
233
  type WorkflowStepToolMode = "readonly" | "coding";
234
234
  type WorkflowStepGateMode = "gate" | "advisory";
235
235
  type WorkflowReviewFindingSeverity = "low" | "medium" | "high" | "critical";
236
- type WorkflowReviewFindingResolution = "open" | "resolved-in-review" | "superseded";
236
+ type WorkflowReviewFindingResolution = "open" | "resolved-in-review" | "superseded" | "dispute-upheld";
237
237
  interface WorkflowReviewFinding {
238
238
  id: string;
239
239
  title: string;
@@ -242,6 +242,10 @@ interface WorkflowReviewFinding {
242
242
  line?: number;
243
243
  severity?: WorkflowReviewFindingSeverity;
244
244
  resolution?: WorkflowReviewFindingResolution;
245
+ disputeRationale?: string;
246
+ disputedAt?: string;
247
+ disputeRebuttedAt?: string;
248
+ rebutsDisputedFindingId?: string;
245
249
  }
246
250
  interface WorkflowRepositoryReviewOutcome {
247
251
  repository: string;
@@ -327,6 +331,14 @@ interface WorkflowStepResult {
327
331
  findings?: WorkflowReviewFinding[];
328
332
  repositoryReviewOutcomes?: WorkflowRepositoryReviewOutcome[];
329
333
  repositoryScopeRevision?: number;
334
+ remediationArchivedAt?: string;
335
+ remediationArchivedFromStatus?: WorkflowStepResult["status"];
336
+ reviewInputFingerprint?: string;
337
+ arbitrationDecision?: "UPHOLD_REVIEW" | "UPHOLD_IMPLEMENTER" | "SPLIT";
338
+ arbitrationBindingFindingCount?: number;
339
+ arbitratedAttemptAt?: string;
340
+ arbitratedAt?: string;
341
+ arbitrationNotes?: string;
330
342
  supersededFindingSourceWorkflowStepId?: string;
331
343
  supersededFindingIds?: string[];
332
344
  verdict?: "APPROVE" | "APPROVE_WITH_NOTES" | "REVISE" | "CLOSE_NO_OP";
@@ -338,7 +350,7 @@ interface WorkflowStepResult {
338
350
  bypassedBy?: string;
339
351
  bypassedAt?: string;
340
352
  bypassReason?: string;
341
- bypassedFromStatus?: WorkflowStepResult["status"];
353
+ bypassedFromStatus?: WorkflowStepResult["status"] | "absent";
342
354
  bypassedFromVerdict?: WorkflowStepResult["verdict"];
343
355
  supersededAt?: string;
344
356
  supersededReason?: "dependency-change";
@@ -610,6 +622,8 @@ interface TaskRow {
610
622
  branchConflictRecoveryCount: number | null;
611
623
  reviewerContextRetryCount: number | null;
612
624
  reviewerFallbackRetryCount: number | null;
625
+ reviewConvergenceStage: number | null;
626
+ reviewConvergenceEscalationCount: number | null;
613
627
  nextRecoveryAt: string | null;
614
628
  error: string | null;
615
629
  summary: string | null;
@@ -1188,7 +1202,7 @@ interface CustomFieldRejection {
1188
1202
  detail: string;
1189
1203
  }
1190
1204
 
1191
- type WorkflowLifecycleWarningCode = "missing-completion-summary" | "missing-merge-region" | "unsafe-terminal-before-merge" | "optional-group-after-execution" | "review-gate-without-failure-route";
1205
+ type WorkflowLifecycleWarningCode = "missing-completion-summary" | "missing-merge-region" | "unsafe-terminal-before-merge" | "optional-group-after-execution" | "review-gate-without-failure-route" | "write-capable-node-after-code-review";
1192
1206
  interface WorkflowLifecycleWarning {
1193
1207
  code: WorkflowLifecycleWarningCode;
1194
1208
  nodeId?: string;
@@ -5593,6 +5607,8 @@ declare class TaskStore extends EventEmitter<TaskStoreEvents> {
5593
5607
  branchConflictRecoveryCount?: number | null;
5594
5608
  reviewerContextRetryCount?: number | null;
5595
5609
  reviewerFallbackRetryCount?: number | null;
5610
+ reviewConvergenceStage?: number | null;
5611
+ reviewConvergenceEscalationCount?: number | null;
5596
5612
  nextRecoveryAt?: string | null;
5597
5613
  enabledWorkflowSteps?: string[];
5598
5614
  noCommitsExpected?: boolean | null;
@@ -5698,12 +5714,17 @@ declare class TaskStore extends EventEmitter<TaskStoreEvents> {
5698
5714
  dismissAiMergeReviewFinding(taskId: string, findingId: string, reason: string, actor?: string): Promise<Task>;
5699
5715
  linkTaskRecommendation(id: string, recommendationId: string, createdTaskId: string, completeColumns?: ReadonlySet<string>): Promise<Task>;
5700
5716
  normalizeWorkspaceTaskWorktreeMetadata(id: string): Promise<Task>;
5701
- mergeWorkspaceWorktreeEntry(id: string, repoRelPath: string, patch: Partial<WorkspaceWorktreeEntry>, options?: {
5717
+ mergeWorkspaceWorktreeEntry(id: string, repoRelPath: string, patch: Partial<WorkspaceWorktreeEntry> | ((current: Task) => Promise<Partial<WorkspaceWorktreeEntry>>), options?: {
5702
5718
  requireExistingEntry?: boolean;
5703
5719
  clearSingularWorktree?: boolean;
5720
+ validateBeforePersist?: (current: Task) => Promise<void>;
5704
5721
  }): Promise<Task>;
5705
5722
  updateTaskRepositoryScope(id: string, repositoryScope: TaskRepositoryScope | undefined): Promise<Task>;
5706
5723
  mutateTaskRepositoryScope(id: string, mutation: TaskRepositoryScopeMutation): Promise<Task>;
5724
+ updateWorkspaceReviewState(id: string, expectedScopeRevision: number, reviewRemediation: TaskRepositoryScope["reviewRemediation"] | null): Promise<{
5725
+ task: Task;
5726
+ updated: boolean;
5727
+ }>;
5707
5728
  resolveTaskWedgeNotificationEpisode(id: string, episodeId: string): Promise<{
5708
5729
  task: Task;
5709
5730
  resolved: boolean;
@@ -5754,6 +5775,12 @@ declare class TaskStore extends EventEmitter<TaskStoreEvents> {
5754
5775
  checkAndRecordUnplannedExecutionBlock(id: string, episode: string): Promise<boolean>;
5755
5776
  transitionQueuedEpisode(id: string, transition: QueuedEpisodeTransition): Promise<QueuedEpisodeTransitionResult>;
5756
5777
  logEntry(id: string, action: string, outcome?: string, runContext?: RunMutationContext): Promise<Task>;
5778
+ logEntryOnce(id: string, input: {
5779
+ action: string;
5780
+ outcome?: string;
5781
+ dedupeKey: string;
5782
+ windowMs: number;
5783
+ }): Promise<boolean>;
5757
5784
  getMutationsForRun(runId: string): Promise<TaskLogEntry[]>;
5758
5785
  rowToMergeQueueEntry(row: MergeQueueRow): MergeQueueEntry;
5759
5786
  normalizeMergeRequestState(value: string): MergeRequestState;
@@ -5800,6 +5827,13 @@ declare class TaskStore extends EventEmitter<TaskStoreEvents> {
5800
5827
  replaceActiveTaskWorkflowContinuation(input: WorkflowWorkItemUpsertInput & {
5801
5828
  kind: "task";
5802
5829
  }): Promise<WorkflowWorkItem>;
5830
+ seedWorkspaceCodeReviewContinuationIfIdle(input: WorkflowWorkItemUpsertInput & {
5831
+ kind: "task";
5832
+ }): Promise<{
5833
+ seeded: boolean;
5834
+ reason?: "active-continuation";
5835
+ workItemId?: string;
5836
+ }>;
5803
5837
  seedStrandedPlanReviewContinuation(input: WorkflowWorkItemUpsertInput & {
5804
5838
  kind: "task";
5805
5839
  }, options?: {
@@ -6939,6 +6973,7 @@ interface TaskLogEntry {
6939
6973
  timestamp: string;
6940
6974
  action: string;
6941
6975
  outcome?: string;
6976
+ dedupeKey?: string;
6942
6977
  runContext?: RunMutationContext;
6943
6978
  }
6944
6979
  type WorkflowTransitionNotificationKind = "manual-merge-hold" | "recovery-requeue";
@@ -7004,7 +7039,7 @@ type TaskReviewVerdict = "APPROVE" | "APPROVE_WITH_NOTES" | "REVISE" | "RETHINK"
7004
7039
  type TaskReviewerType = "plan" | "code";
7005
7040
  type TaskReviewItemStatus = "queued" | "in-progress" | "addressed" | "failed";
7006
7041
  type TaskReviewFindingSeverity = "low" | "medium" | "high" | "critical";
7007
- type TaskReviewFindingResolution = "open" | "resolved-in-review" | "superseded";
7042
+ type TaskReviewFindingResolution = "open" | "resolved-in-review" | "superseded" | "dispute-upheld";
7008
7043
  interface LegacyTaskReviewItem {
7009
7044
  id: string;
7010
7045
  source: TaskReviewSource;
@@ -7600,6 +7635,11 @@ interface TaskRepositoryScope {
7600
7635
  fingerprint: string;
7601
7636
  approvedAt: string;
7602
7637
  }>;
7638
+ reviewRemediation?: {
7639
+ scopeRevision: number;
7640
+ repository: string;
7641
+ inputSignature: string;
7642
+ };
7603
7643
  extensions?: Array<{
7604
7644
  repository: string;
7605
7645
  requestedAt: string;
@@ -7611,6 +7651,16 @@ interface TaskRepositoryScope {
7611
7651
  refusalReason?: string;
7612
7652
  }>;
7613
7653
  }
7654
+ interface WorkspaceLandFailure {
7655
+ category: "environment" | "review" | "content-conflict" | "internal-technical";
7656
+ message: string;
7657
+ at: string;
7658
+ branch?: string;
7659
+ repository?: string;
7660
+ resource?: string;
7661
+ action?: string;
7662
+ technicalDetail?: string;
7663
+ }
7614
7664
  interface WorkspaceWorktreeEntry {
7615
7665
  worktreePath: string;
7616
7666
  branch: string;
@@ -7619,11 +7669,7 @@ interface WorkspaceWorktreeEntry {
7619
7669
  baseCommitSha?: string;
7620
7670
  landedSha?: string;
7621
7671
  revertBoundarySha?: string;
7622
- landFailure?: {
7623
- message: string;
7624
- at: string;
7625
- branch?: string;
7626
- };
7672
+ landFailure?: WorkspaceLandFailure;
7627
7673
  }
7628
7674
  type AiMergeFindingDisposition = "pending" | "corrected" | "absent-from-squash" | "still-present" | "dismissed";
7629
7675
  interface AiMergeReviewFinding {
@@ -7645,6 +7691,7 @@ interface AiMergeReviewReconciliation {
7645
7691
  findings: AiMergeReviewFinding[];
7646
7692
  consecutiveCleanApprovals: number;
7647
7693
  correctivePasses: number;
7694
+ invalidAcknowledgementCandidateSha?: string;
7648
7695
  terminal?: boolean;
7649
7696
  }
7650
7697
  interface Task {
@@ -7772,6 +7819,8 @@ interface Task {
7772
7819
  branchConflictRecoveryCount?: number;
7773
7820
  reviewerContextRetryCount?: number;
7774
7821
  reviewerFallbackRetryCount?: number;
7822
+ reviewConvergenceStage?: number;
7823
+ reviewConvergenceEscalationCount?: number;
7775
7824
  retrySummary?: RetrySummary;
7776
7825
  nextRecoveryAt?: string;
7777
7826
  awaitingApprovalReason?: "release-authorization" | "plan-review-replan-cap" | "merge-blocked-by-policy" | "code-review-non-convergence";
@@ -8167,6 +8216,7 @@ interface GlobalSettings {
8167
8216
  openrouterModelFilters?: OpenRouterModelFilters;
8168
8217
  openrouterProviderPreferences?: OpenRouterProviderPreferences;
8169
8218
  opencodeGoModelSync?: boolean;
8219
+ orcarouterModelSync?: boolean;
8170
8220
  updateCheckEnabled?: boolean;
8171
8221
  fnBinaryCheckEnabled?: boolean;
8172
8222
  githubTrackingDefaultRepo?: string;
@@ -8348,6 +8398,12 @@ interface ProjectSettings {
8348
8398
  executorEscalationProvider?: string;
8349
8399
  executorEscalationModelId?: string;
8350
8400
  executorEscalationNodeId?: string;
8401
+ reviewConvergenceEscalationEnabled?: boolean;
8402
+ reviewConvergenceEscalationProvider?: string;
8403
+ reviewConvergenceEscalationModelId?: string;
8404
+ reviewArbitrationEnabled?: boolean;
8405
+ reviewArbitrationProvider?: string;
8406
+ reviewArbitrationModelId?: string;
8351
8407
  maxConcurrentVerifications?: number;
8352
8408
  maxWorktrees: number;
8353
8409
  worktreeLimitEnabled?: boolean;
@@ -5879,6 +5879,8 @@ var tasks = projectSchema.table("tasks", {
5879
5879
  branchConflictRecoveryCount: integer("branch_conflict_recovery_count").default(0),
5880
5880
  reviewerContextRetryCount: integer("reviewer_context_retry_count").default(0),
5881
5881
  reviewerFallbackRetryCount: integer("reviewer_fallback_retry_count").default(0),
5882
+ reviewConvergenceStage: integer("review_convergence_stage").default(0),
5883
+ reviewConvergenceEscalationCount: integer("review_convergence_escalation_count").default(0),
5882
5884
  nextRecoveryAt: text("next_recovery_at"),
5883
5885
  error: text("error"),
5884
5886
  summary: text("summary"),
@@ -8976,6 +8978,7 @@ var DEFAULT_GLOBAL_SETTINGS = {
8976
8978
  openrouterAppAttribution: void 0,
8977
8979
  openrouterModelFilters: void 0,
8978
8980
  openrouterProviderPreferences: void 0,
8981
+ orcarouterModelSync: true,
8979
8982
  opencodeGoModelSync: true,
8980
8983
  updateCheckEnabled: true,
8981
8984
  fnBinaryCheckEnabled: true,
@@ -9391,6 +9394,12 @@ var DEFAULT_PROJECT_SETTINGS = {
9391
9394
  executorEscalationProvider: void 0,
9392
9395
  executorEscalationModelId: void 0,
9393
9396
  executorEscalationNodeId: void 0,
9397
+ reviewConvergenceEscalationEnabled: true,
9398
+ reviewConvergenceEscalationProvider: void 0,
9399
+ reviewConvergenceEscalationModelId: void 0,
9400
+ reviewArbitrationEnabled: true,
9401
+ reviewArbitrationProvider: void 0,
9402
+ reviewArbitrationModelId: void 0,
9394
9403
  /**
9395
9404
  * FNXC:Merge 2026-06-26-00:00:
9396
9405
  * New and unconfigured projects default AI merge to sync a dirty checked-out integration branch, restoring the legacy stash → fast-forward → restore landing behavior. Explicit persisted merger.allowDirtyLocalCheckoutSync values still win, and no existing-project migration stamps this default into storage.
@@ -12461,6 +12470,49 @@ var BUILTIN_REVIEW_REVISION_SETTINGS = [
12461
12470
  default: DEFAULT_CODE_REVIEW_BLOCKING_SEVERITY,
12462
12471
  description: 'Minimum finding severity that lets Code Review block merge. A REVISE carrying no finding at or above this level is recorded as APPROVE_WITH_NOTES and its findings are handed to the implementer. Choose "any" to block on every REVISE.'
12463
12472
  },
12473
+ /*
12474
+ * FNXC:ReviewConvergence 2026-08-22-05:42:
12475
+ * FN-149 keeps recovery targets workflow-native so operators choose the cost and
12476
+ * capability of automatic review convergence without widening project policy.
12477
+ */
12478
+ {
12479
+ id: "reviewConvergenceEscalationEnabled",
12480
+ name: "Review convergence escalation",
12481
+ type: "boolean",
12482
+ default: true,
12483
+ description: "Run one bounded alternate-model or replan recovery when a review repeats unchanged input."
12484
+ },
12485
+ {
12486
+ id: "reviewConvergenceEscalationProvider",
12487
+ name: "Review convergence escalation provider",
12488
+ type: "string",
12489
+ description: "Provider for the optional alternate-model review remediation target."
12490
+ },
12491
+ {
12492
+ id: "reviewConvergenceEscalationModelId",
12493
+ name: "Review convergence escalation model",
12494
+ type: "string",
12495
+ description: "Model for the optional alternate-model review remediation target."
12496
+ },
12497
+ {
12498
+ id: "reviewArbitrationEnabled",
12499
+ name: "Review arbitration",
12500
+ type: "boolean",
12501
+ default: true,
12502
+ description: "Enable bounded third-model arbitration after a review disagreement persists."
12503
+ },
12504
+ {
12505
+ id: "reviewArbitrationProvider",
12506
+ name: "Review arbitration provider",
12507
+ type: "string",
12508
+ description: "Provider for the optional review arbitration target."
12509
+ },
12510
+ {
12511
+ id: "reviewArbitrationModelId",
12512
+ name: "Review arbitration model",
12513
+ type: "string",
12514
+ description: "Model for the optional review arbitration target."
12515
+ },
12464
12516
  {
12465
12517
  id: "planReviewReplanCap",
12466
12518
  name: "Plan Review replan cap",
@@ -12666,16 +12718,11 @@ You have tools to report progress. The board updates in real-time.
12666
12718
 
12667
12719
  /*
12668
12720
  FNXC:TaskRecommendations 2026-08-09-04:06:
12669
- FN-8850 requires optional, non-blocking discoveries to be captured only at the explicit accepted
12670
- completion boundary. Immediate task creation remains for required dependency coordination or an
12671
- operator-directed filing, while workflow step sessions remain unable to write recommendations.
12721
+ FN-125 requires task-execution sessions to preserve optional, non-blocking discoveries only at the
12722
+ accepted completion boundary. Durable Workflow Executor sessions cannot create or delegate tasks;
12723
+ in-scope work remains in the current task and external blockers use the honest blocked exit.
12672
12724
  */
12673
- **Out-of-scope findings at completion:** Do not automatically create a task for optional, non-blocking work discovered outside this task. When recommendation capture is enabled, at the final accepted \`fn_task_done(outcome="completed")\` checkpoint evaluate genuine task-ready follow-ups and send \`recommendations\` (or \`recommendations: []\` when none qualify). Each recommendation needs a stable unique \`id\`, \`title\`, \`description\`, and \`category\`; never use it for a required current-task fix, blocker, secret, executable command, reasoning transcript, or filler.
12674
-
12675
- Use \`task_create\` or \`fn_delegate_task\` only when the task explicitly requires immediate filing, necessary dependency coordination, or the operator directs it. When creating multiple related tasks, declare dependencies between them:
12676
- \`task_create(description="load door sounds", dependencies=[])\` \u2192 returns KB-050
12677
- \`task_create(description="play sound on door open/close", dependencies=["KB-050"])\`
12678
-
12725
+ **Out-of-scope findings at completion:** This task-execution session cannot create or delegate tasks. When recommendation capture is enabled, at the final accepted \`fn_task_done(outcome="completed")\` checkpoint evaluate optional, non-blocking findings as genuine task-ready \`recommendations\` (or \`recommendations: []\` when none qualify). Each recommendation needs a stable unique \`id\`, \`title\`, \`description\`, and \`category\`; never use it for a required current-task fix, blocker, secret, executable command, reasoning transcript, or filler. Implement required in-scope work directly in this task.
12679
12726
  **Discovered a dependency:** \`task_add_dep(task_id="KB-XXX")\` \u2014 use when you discover mid-execution that another task must be completed first. This will return a warning first \u2014 you must call again with \`confirm=true\` to proceed. Adding a dependency stops execution, discards current work, and moves the task to triage for re-specification.
12680
12727
 
12681
12728
  ## Task Documents
@@ -12747,16 +12794,16 @@ If you attempt to write to a path outside the worktree, the file tools will reje
12747
12794
  FNXC:WorkflowRouting 2026-06-22-17:26:
12748
12795
  Executors must not move the workflow of the task they are executing unless the user explicitly asked for that task's workflow. Agents remain free to set workflows on tasks they create because they are the creator for those new tasks.
12749
12796
  -->
12750
- - Do not call \`fn_workflow_select\` to change the workflow of the task you are executing; you did not create that task, the user or triage did. The only exception is when the user explicitly requested a specific workflow for this task in a steering comment, task instruction, or similar direct instruction. You may still set the workflow on tasks you create via \`fn_task_create\` or \`fn_delegate_task\`, because you are the creator of those new tasks.
12797
+ - Do not call \`fn_workflow_select\` to change the workflow of the task you are executing; you did not create that task, the user or triage did. The only exception is when the user explicitly requested a specific workflow for this task in a steering comment, task instruction, or similar direct instruction.
12751
12798
  - **NEVER kill processes on port 4040.** Port 4040 is the production dashboard. Do not run \`kill\`, \`pkill\`, \`killall\`, or \`lsof -ti:4040 | xargs kill\` against it. If you need to start a test server, use \`--port 0\` for a random free port. If port 4040 is occupied, pick a different port \u2014 do NOT kill the occupant.
12752
12799
  - Treat the File Scope in PROMPT.md as the expected starting scope, not a hard boundary when quality gates fail
12753
12800
  - Read "Context to Read First" files before starting
12754
12801
  - Follow the "Do NOT" section strictly
12755
12802
  - If tests, lint, build, or typecheck fail and the fix requires touching code outside the declared File Scope, fix those failures directly and keep the repo green
12756
- - Use \`task_create\` for genuinely separate follow-up work, not for mandatory fixes required to make this task land cleanly
12803
+ - Implement mandatory and in-scope work directly in this task. Preserve optional out-of-scope follow-ups as completion recommendations.
12757
12804
  - Update documentation listed in "Must Update" and check "Check If Affected"
12758
12805
  - NEVER delete, remove, or gut modules, interfaces, settings, exports, or test files outside your File Scope
12759
- - NEVER remove features as "cleanup" \u2014 if something seems unused, create a task for investigation instead
12806
+ - NEVER remove features as "cleanup" \u2014 if something seems unused, record an optional completion recommendation for investigation instead
12760
12807
  - Removing code is acceptable ONLY when it is explicitly part of your task's mission
12761
12808
  - If you remove existing functionality, you MUST create a changeset in \`.changeset/\` explaining the removal and rationale
12762
12809
 
@@ -13430,7 +13477,7 @@ You have tools to report progress. The board updates in real-time.
13430
13477
 
13431
13478
  **Logging important actions:** \`task_log(message="what happened")\`
13432
13479
 
13433
- **Out-of-scope findings at completion:** When recommendation capture is enabled, retain optional, non-blocking discoveries as task-ready \`fn_task_done\` recommendations at accepted completion, or send \`recommendations: []\` when none qualify. Use \`task_create\` only for explicit immediate filing, dependency coordination, or operator direction; never recommend required current-task work, blockers, secrets, commands, reasoning, or filler.
13480
+ **Out-of-scope findings at completion:** This task-execution session cannot create or delegate tasks. When recommendation capture is enabled, retain optional, non-blocking discoveries as task-ready \`fn_task_done\` recommendations at accepted completion, or send \`recommendations: []\` when none qualify. Implement required in-scope work directly here; use the honest blocked exit only for a real external blocker. Never recommend required current-task work, blockers, secrets, commands, reasoning, or filler.
13434
13481
 
13435
13482
  **Discovered a dependency:** \`task_add_dep(task_id="KB-XXX")\` \u2014 use when you discover mid-execution that another task must be completed first. This will return a warning first \u2014 you must call again with \`confirm=true\` to proceed. Adding a dependency stops execution, discards current work, and moves the task to triage for re-specification.
13436
13483
 
@@ -13500,15 +13547,15 @@ If you attempt to write to a path outside the worktree, the file tools will reje
13500
13547
  FNXC:WorkflowRouting 2026-06-22-17:26:
13501
13548
  Executors must not move the workflow of the task they are executing unless the user explicitly asked for that task's workflow. Agents remain free to set workflows on tasks they create because they are the creator for those new tasks.
13502
13549
  -->
13503
- - Do not call \`fn_workflow_select\` to change the workflow of the task you are executing; you did not create that task, the user or triage did. The only exception is when the user explicitly requested a specific workflow for this task in a steering comment, task instruction, or similar direct instruction. You may still set the workflow on tasks you create via \`fn_task_create\` or \`fn_delegate_task\`, because you are the creator of those new tasks.
13550
+ - Do not call \`fn_workflow_select\` to change the workflow of the task you are executing; you did not create that task, the user or triage did. The only exception is when the user explicitly requested a specific workflow for this task in a steering comment, task instruction, or similar direct instruction.
13504
13551
  - **NEVER kill processes on port 4040.** Port 4040 is the production dashboard. Do not run \`kill\`, \`pkill\`, \`killall\`, or \`lsof -ti:4040 | xargs kill\` against it. If you need to start a test server, use \`--port 0\` for a random free port. If port 4040 is occupied, pick a different port \u2014 do NOT kill the occupant.
13505
13552
  - Treat the File Scope in PROMPT.md as the expected starting scope, not a hard boundary when quality gates fail
13506
13553
  - Read "Context to Read First" files before starting
13507
13554
  - Follow the "Do NOT" section strictly
13508
13555
  - If tests, lint, build, or typecheck fail and the fix requires touching code outside the declared File Scope, fix those failures directly and keep the repo green
13509
- - Use \`task_create\` for genuinely separate follow-up work, not for mandatory fixes required to make this task land cleanly
13556
+ - Implement mandatory and in-scope work directly in this task. Preserve optional out-of-scope follow-ups as completion recommendations.
13510
13557
  - NEVER delete, remove, or gut modules, interfaces, settings, exports, or test files outside your File Scope
13511
- - NEVER remove features as "cleanup" \u2014 if something seems unused, create a task for investigation instead
13558
+ - NEVER remove features as "cleanup" \u2014 if something seems unused, record an optional completion recommendation for investigation instead
13512
13559
  - If you remove existing functionality, you MUST create a changeset in \`.changeset/\` explaining the removal and rationale
13513
13560
 
13514
13561
  ## Spawning Child Agents
@@ -14375,11 +14422,15 @@ var RAW_BUILTIN_CODING_WORKFLOW_IR = {
14375
14422
  // execute → browser-verification (optional-group) → review. When the group is
14376
14423
  // disabled it passes through with outcome=success and routes straight to review.
14377
14424
  { from: "execute", to: "browser-verification", condition: "success" },
14378
- // browser-verification → code-review → review. Each optional-group passes through with
14379
- // outcome=success when disabled, so a task with both off routes straight to review.
14380
- { from: "browser-verification", to: "code-review", condition: "success" },
14381
- { from: "code-review", to: "completion-summary", condition: "success" },
14382
- { from: "completion-summary", to: "review", condition: "success" },
14425
+ /*
14426
+ FNXC:WorkspaceReviewSeal 2026-08-21-19:36:
14427
+ Completion summary runs before Code Review because its agent may acquire and write the task
14428
+ worktree. The approving review is the final write-capable pre-merge stage, so landing consumes
14429
+ evidence for the branch it will publish rather than evidence invalidated by a later summary.
14430
+ */
14431
+ { from: "browser-verification", to: "completion-summary", condition: "success" },
14432
+ { from: "completion-summary", to: "code-review", condition: "success" },
14433
+ { from: "code-review", to: "review", condition: "success" },
14383
14434
  { from: "review", to: "merge-gate", condition: "success" },
14384
14435
  { from: "merge-gate", to: "branch-group-member-integration", condition: "outcome:auto-on" },
14385
14436
  { from: "merge-gate", to: "merge-manual-hold", condition: "outcome:auto-off" },
@@ -14392,6 +14443,12 @@ var RAW_BUILTIN_CODING_WORKFLOW_IR = {
14392
14443
  { from: "merge-attempt", to: "post-merge-verification", condition: "success" },
14393
14444
  { from: "post-merge-verification", to: "end", condition: "success" },
14394
14445
  { from: "merge-attempt", to: "merge-retry", condition: "outcome:transient-failure" },
14446
+ /*
14447
+ FNXC:WorkspaceReviewReroute 2026-08-21-20:11:
14448
+ Evidence rejected during an active graph merge is a fresh Code Review obligation, never a
14449
+ merge retry. Route the typed result to the final review gate before another landing attempt.
14450
+ */
14451
+ { from: "merge-attempt", to: "code-review", condition: "outcome:workspace-review-required", kind: "rework" },
14395
14452
  { from: "merge-attempt", to: "merge-manual-hold", condition: "outcome:manual-required" },
14396
14453
  { from: "recovery-router", to: "merge-attempt", condition: "outcome:wake-merge", kind: "rework" },
14397
14454
  { from: "planning", to: "end", condition: "failure" },
@@ -14689,12 +14746,15 @@ var RAW_BUILTIN_STEPWISE_CODING_WORKFLOW_IR = {
14689
14746
  // KTD-5: bounded rework exhaustion → manual hold; release re-enters the group.
14690
14747
  { from: "steps", to: "rework-hold", condition: "outcome:rework-exhausted" },
14691
14748
  { from: "rework-hold", to: "browser-verification", condition: "success" },
14692
- // browser-verification → code-review → completion-summary → merge-gate; each
14693
- // optional-group passes through (outcome=success) when disabled, so a task with
14694
- // both off routes straight to completion summary and merge policy.
14695
- { from: "browser-verification", to: "code-review", condition: "success" },
14696
- { from: "code-review", to: "completion-summary", condition: "success" },
14697
- { from: "completion-summary", to: "merge-gate", condition: "success" },
14749
+ /*
14750
+ FNXC:WorkspaceReviewSeal 2026-08-21-19:36:
14751
+ A completion-summary agent can acquire the task worktree. It therefore precedes Code Review;
14752
+ the approval becomes the final write-sensitive pre-merge gate and cannot be invalidated by the
14753
+ built-in workflow after it is recorded.
14754
+ */
14755
+ { from: "browser-verification", to: "completion-summary", condition: "success" },
14756
+ { from: "completion-summary", to: "code-review", condition: "success" },
14757
+ { from: "code-review", to: "merge-gate", condition: "success" },
14698
14758
  { from: "browser-verification", to: "browser-verification-remediation", condition: "failure" },
14699
14759
  { from: "browser-verification-remediation", to: "browser-verification", condition: "success", kind: "rework" },
14700
14760
  { from: "code-review", to: "code-review-remediation", condition: "failure" },
@@ -14720,6 +14780,12 @@ var RAW_BUILTIN_STEPWISE_CODING_WORKFLOW_IR = {
14720
14780
  { from: "merge-attempt", to: "post-merge-verification", condition: "success" },
14721
14781
  { from: "post-merge-verification", to: "end", condition: "success" },
14722
14782
  { from: "merge-attempt", to: "merge-retry", condition: "outcome:transient-failure" },
14783
+ /*
14784
+ FNXC:WorkspaceReviewReroute 2026-08-21-20:11:
14785
+ A stale workspace approval returns to the final Code Review gate through a bounded rework
14786
+ edge, preserving the existing graph owner instead of burning a merge retry.
14787
+ */
14788
+ { from: "merge-attempt", to: "code-review", condition: "outcome:workspace-review-required", kind: "rework" },
14723
14789
  { from: "merge-attempt", to: "merge-manual-hold", condition: "outcome:manual-required" },
14724
14790
  { from: "recovery-router", to: "merge-attempt", condition: "outcome:wake-merge", kind: "rework" },
14725
14791
  { from: "merge-attempt", to: "end", condition: "failure" }
@@ -14782,11 +14848,11 @@ var RAW_BUILTIN_STEPWISE_FINAL_REVIEW_CODING_WORKFLOW_IR = (() => {
14782
14848
  if (!ir.edges.some((edge) => edge.from === "plan-replan" && edge.to === "plan-review" && edge.condition === "success")) {
14783
14849
  ir.edges.push({ from: "plan-replan", to: "plan-review", condition: "success", kind: "rework" });
14784
14850
  }
14785
- if (!ir.edges.some((edge) => edge.from === "code-review" && edge.to === "completion-summary" && edge.condition === "success")) {
14786
- ir.edges.push({ from: "code-review", to: "completion-summary", condition: "success" });
14851
+ if (!ir.edges.some((edge) => edge.from === "completion-summary" && edge.to === "code-review" && edge.condition === "success")) {
14852
+ ir.edges.push({ from: "completion-summary", to: "code-review", condition: "success" });
14787
14853
  }
14788
- if (!ir.edges.some((edge) => edge.from === "completion-summary" && edge.to === "merge-gate" && edge.condition === "success")) {
14789
- ir.edges.push({ from: "completion-summary", to: "merge-gate", condition: "success" });
14854
+ if (!ir.edges.some((edge) => edge.from === "code-review" && edge.to === "merge-gate" && edge.condition === "success")) {
14855
+ ir.edges.push({ from: "code-review", to: "merge-gate", condition: "success" });
14790
14856
  }
14791
14857
  return ir;
14792
14858
  })();
@@ -14866,8 +14932,8 @@ var RAW_BUILTIN_CODING_IDEAS_WORKFLOW_IR = (() => {
14866
14932
  ]);
14867
14933
  v2.nodes = v2.nodes.filter((node) => !removedNodeIds.has(node.id));
14868
14934
  v2.edges = v2.edges.filter((edge) => !removedNodeIds.has(edge.from) && !removedNodeIds.has(edge.to));
14869
- if (!v2.edges.some((edge) => edge.from === "steps" && edge.to === "code-review")) {
14870
- v2.edges.push({ from: "steps", to: "code-review", condition: "success" });
14935
+ if (!v2.edges.some((edge) => edge.from === "steps" && edge.to === "completion-summary")) {
14936
+ v2.edges.push({ from: "steps", to: "completion-summary", condition: "success" });
14871
14937
  }
14872
14938
  if (!v2.edges.some((edge) => edge.from === "merge-attempt" && edge.to === "end" && edge.condition === "success")) {
14873
14939
  v2.edges.push({ from: "merge-attempt", to: "end", condition: "success" });
@@ -15454,10 +15520,12 @@ function linear(spec) {
15454
15520
  ...hasBrowserVerification ? [browserVerificationRemediationNode("in-progress")] : [],
15455
15521
  ...hasCodeReview ? [codeReviewRemediationNode("in-progress")] : []
15456
15522
  ] : [];
15523
+ const noOpTerminalNode = hasPlanReview ? { id: "plan-review-no-op", kind: "gate", column: "todo", config: { workflowAction: "plan-review-no-op" } } : void 0;
15457
15524
  const nodes2 = [
15458
15525
  { id: "start", kind: "start" },
15459
15526
  ...workflowNodes,
15460
15527
  ...remediationNodes,
15528
+ ...noOpTerminalNode ? [noOpTerminalNode] : [],
15461
15529
  { id: "end", kind: "end" }
15462
15530
  ];
15463
15531
  const edges = [];
@@ -15473,6 +15541,8 @@ function linear(spec) {
15473
15541
  }
15474
15542
  if (hasPlanReview) {
15475
15543
  edges.push({ from: "plan-replan", to: "plan-review", condition: "success", kind: "rework" });
15544
+ edges.push({ from: "plan-review", to: "plan-review-no-op", condition: "outcome:close-no-op" });
15545
+ edges.push({ from: "plan-review-no-op", to: "end", condition: "success" });
15476
15546
  }
15477
15547
  if (hasBrowserVerification) {
15478
15548
  edges.push({