diff --git a/src/resources/extensions/sf/auto/phases-finalize.js b/src/resources/extensions/sf/auto/phases-finalize.js index ada0a96b4..e82782cba 100644 --- a/src/resources/extensions/sf/auto/phases-finalize.js +++ b/src/resources/extensions/sf/auto/phases-finalize.js @@ -37,6 +37,7 @@ import { import { resumeAutoAfterProviderDelay } from "../bootstrap/provider-error-resume.js"; import { debugLog } from "../debug-logger.js"; import { PROJECT_FILES } from "../detection.js"; +import { getErrorMessage } from "../error-utils.js"; import { MergeConflictError } from "../git-service.js"; import { recordLearnedOutcome } from "../learning/runtime.js"; import { sfRoot } from "../paths.js"; @@ -115,14 +116,16 @@ import { FINALIZE_PRE_TIMEOUT_MS, withTimeout, } from "./finalize-timeout.js"; +import { + recordLearningOutcomeForUnit, + shouldSkipArtifactVerification, +} from "./phases-helpers.js"; import { runUnit } from "./run-unit.js"; -import { getErrorMessage } from "../error-utils.js"; import { BUDGET_THRESHOLDS, MAX_FINALIZE_TIMEOUTS, MAX_RECOVERY_CHARS, } from "./types.js"; -import { recordLearningOutcomeForUnit, shouldSkipArtifactVerification } from "./phases-helpers.js"; // ─── runFinalize ────────────────────────────────────────────────────────────── /** @@ -426,6 +429,16 @@ export async function runFinalize(ic, iterData, loopState, sidecarItem) { return { action: "continue" }; } } + if (verificationResult === "continue") { + // Verification was auto-deferred (low-risk findings) — proceed normally. + // The defer logic in runPostUnitVerification already notified the user + // and wrote deferred evidence; we just need to avoid the break/retry + // paths above and fall through to post-verification processing. + debugLog("autoLoop", { + phase: "verification-deferred", + iteration: ic.iteration, + }); + } } } // Post-verification processing (DB dual-write, hooks, triage, quick-tasks)