fix(engine): honor project execution model overrides in spawned children + workflow-step timeout fallback

Two related executor fixes:

1. Spawned child agents previously bypassed the executor model lane hierarchy
   and used settings.defaultProvider/defaultModelId directly, ignoring
   project-level executionProvider/executionModelId from .fusion/config.json.
   Resolve via resolveExecutorModelPair() so children honor the same
   precedence as the parent executor.

2. Pre-merge workflow step AI calls now have a wall-clock timeout
   (settings.workflowStepTimeoutMs, default 6 min) and fall back to the
   configured validatorFallback / fallback model on timeout. The 20-min
   stuck-detector kill loop was the only escape hatch when a provider's
   streaming API hung mid-response, and the kill triggered a same-provider
   retry — guaranteeing repeat hangs. The runner now races the prompt against
   a timeout; on timeout it disposes the session, logs a clear entry, and
   re-runs the step once with a distinct fallback provider/model. If neither
   completes (or no fallback is configured), the step returns a normal
   failure that flows into the existing handleWorkflowStepFailure retry path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-28 14:20:23 -07:00
parent 58510e179f
commit 621bee1cd6
3 changed files with 115 additions and 37 deletions

View File

@@ -114,6 +114,7 @@ export const DEFAULT_PROJECT_SETTINGS = {
smartConflictResolution: true,
worktreeRebaseBeforeMerge: true,
worktreeRebaseRemote: "",
workflowStepTimeoutMs: 360_000,
strictScopeEnforcement: false,
buildRetryCount: 0,
verificationFixRetries: 3,