fix(FN-7335): keep fast completion summaries
This commit is contained in:
7
.changeset/fast-completion-summary.md
Normal file
7
.changeset/fast-completion-summary.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
summary: Keep workflow completion summaries running for fast-mode tasks.
|
||||
category: fix
|
||||
dev: Excludes completion-summary/summaryTarget task nodes from the fast-mode custom review/gate skip path.
|
||||
@@ -377,6 +377,24 @@ describe("fast mode workflow/runtime invariants", () => {
|
||||
expect(executeScript).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each([
|
||||
["completion-summary id", { id: "completion-summary", kind: "prompt", config: { prompt: "summarize" } }],
|
||||
["summaryTarget task", { id: "custom-summary", kind: "prompt", config: { prompt: "summarize", summaryTarget: "task" } }],
|
||||
])("does not skip completion summary nodes in fast mode by %s", async (_label, node) => {
|
||||
const { executor } = makeExecutorForTask(task({ executionMode: "fast", worktree: "/tmp/wt" }));
|
||||
const executeStep = vi.spyOn(executor as any, "executeWorkflowStep").mockResolvedValue({ success: true, output: "Done." });
|
||||
|
||||
const result = await (executor as any).runGraphCustomNode(
|
||||
node,
|
||||
task({ executionMode: "fast" }),
|
||||
{},
|
||||
undefined,
|
||||
);
|
||||
|
||||
expect(result).toMatchObject({ outcome: "success", value: "passed" });
|
||||
expect(executeStep).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it.each(["prompt", "script", "gate"])("executes optional-group template %s nodes in fast mode", async (kind) => {
|
||||
const { executor } = makeExecutorForTask(task({ executionMode: "fast", worktree: "/tmp/wt" }));
|
||||
const executeStep = vi.spyOn(executor as any, "executeWorkflowStep").mockResolvedValue({ success: true });
|
||||
|
||||
@@ -7058,7 +7058,12 @@ export class TaskExecutor {
|
||||
FNXC:FastOptionalSteps 2026-06-30-09:14:
|
||||
Fast skips top-level custom prompt/script/gate review bodies by default, but an enabled optional-group template is explicit operator intent. The graph marks those template nodes so Browser Verification and custom optional groups still run under fast mode.
|
||||
*/
|
||||
if (live.executionMode === "fast" && !optionalGroupId && !cfg.seam && (node.kind === "prompt" || node.kind === "script" || node.kind === "gate")) {
|
||||
const isCompletionSummaryNode = cfg.summaryTarget === "task" || node.id === "completion-summary";
|
||||
/*
|
||||
FNXC:WorkflowCompletion 2026-07-01-18:42:
|
||||
Fast mode skips review/validation work, not the agent-authored completion summary. FN-7335 reached review with "Fast mode — custom graph node 'completion-summary' skipped"; keep summary nodes executable so fast tasks still produce the same review/done card summary as standard tasks.
|
||||
*/
|
||||
if (live.executionMode === "fast" && !isCompletionSummaryNode && !optionalGroupId && !cfg.seam && (node.kind === "prompt" || node.kind === "script" || node.kind === "gate")) {
|
||||
executorLog.log(`${live.id}: fast mode — skipping custom graph node '${node.id}'`);
|
||||
await this.store.logEntry(
|
||||
live.id,
|
||||
|
||||
Reference in New Issue
Block a user