fix(review): apply code-review fixes — runId/foreachNodeId wiring, worktree-leak cleanup, rework re-execution, instance pruning, SIGKILL fallback, type dedup, board memo split, agent-native field-schema context + fn_workflow_get

17 findings from 12-reviewer code review applied:
- P1 runId trio (pin-probe/resume/markIntegrated used placeholder runId; 4-reviewer corroboration) + production-wiring tests
- P1 worktree/branch release on instance failure/exhaustion/abort
- P2 runGraphTaskStep no longer masks step-session failures; rejected memo cleared so rework re-executes
- P2 clearStaleInstanceStates wired at run start/end (mirrors branch pruning)
- P2 code-node timeout killSignal SIGKILL; dead template-recursion removed
- P1/P2 field-type re-declarations replaced with @fusion/core imports (stale comments removed)
- P2 Board memo split + TaskCard comparator stringify guard + modal prop-driven field defs
- HIGH agent-native: executor prompt injects custom-field schema/values; self-correcting rejection text; fn_workflow_get; fn_task_update bare-call guard; integration-conflict task log

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-04 14:01:55 -07:00
parent 94da14cd81
commit 3ebaa321f8
24 changed files with 1142 additions and 160 deletions

View File

@@ -79,6 +79,10 @@ import type {
TaskIdIntegrityReport,
BranchGroup,
BranchGroupPrState,
WorkflowFieldDefinition,
WorkflowFieldType,
WorkflowFieldOption,
WorkflowFieldRender,
} from "@fusion/core";
import type { PlanningQuestion, PlanningSummary } from "@fusion/core";
import type { GithubIssueAction, ScheduledTask, ScheduledTaskCreateInput, ScheduledTaskUpdateInput, AutomationRunResult, Routine, RoutineCreateInput, RoutineUpdateInput, RoutineExecutionResult } from "@fusion/core";
@@ -552,44 +556,9 @@ export interface BoardWorkflowColumn {
flags: BoardWorkflowColumnFlags;
}
/** Supported custom-field value types (mirrors core `WorkflowFieldType`, KTD-13).
* Duplicated client-side (same posture as the BoardWorkflow* types above) since
* the core field-schema types are not exported through the `@fusion/core`
* barrel. */
export type WorkflowFieldType =
| "string"
| "text"
| "number"
| "boolean"
| "enum"
| "multi-enum"
| "date"
| "url";
/** A single enum/multi-enum option (KTD-13). */
export interface WorkflowFieldOption {
value: string;
label: string;
color?: string;
}
/** Rendering instructions for a custom field (KTD-14). */
export interface WorkflowFieldRender {
placement?: "card" | "detail" | "detail-section";
widget?: "select" | "radio" | "chips" | "input" | "textarea" | "toggle";
badge?: boolean;
}
/** A workflow-defined custom task field (KTD-13). */
export interface WorkflowFieldDefinition {
id: string;
name: string;
type: WorkflowFieldType;
required?: boolean;
default?: unknown;
options?: WorkflowFieldOption[];
render?: WorkflowFieldRender;
}
// WorkflowFieldDefinition, WorkflowFieldType, WorkflowFieldOption, WorkflowFieldRender
// are re-exported from @fusion/core above (KTD-13/14).
export type { WorkflowFieldDefinition, WorkflowFieldType, WorkflowFieldOption, WorkflowFieldRender };
export interface BoardWorkflowDefinition {
id: string;