From 9ef7536f3d6be56830c24767abe511104bc6e7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=82CHES?= Date: Fri, 13 Mar 2026 23:13:06 -0600 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/resources/extensions/gsd/auto.ts | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/resources/extensions/gsd/auto.ts b/src/resources/extensions/gsd/auto.ts index 5ec41aab5..cfdc36952 100644 --- a/src/resources/extensions/gsd/auto.ts +++ b/src/resources/extensions/gsd/auto.ts @@ -1181,21 +1181,25 @@ async function dispatchNextUnit( // reach the next dispatchNextUnit call the manifest exists but hasn't been // presented to the user yet. Without this re-check the model would proceed // into plan-slice / execute-task with no real credentials and mock everything. - try { - const manifestStatus = await getManifestStatus(basePath, mid); - if (manifestStatus && manifestStatus.pending.length > 0) { - const result = await collectSecretsFromManifest(basePath, mid, ctx); + const runSecretsGate = async () => { + try { + const manifestStatus = await getManifestStatus(basePath, mid); + if (manifestStatus && manifestStatus.pending.length > 0) { + const result = await collectSecretsFromManifest(basePath, mid, ctx); + ctx.ui.notify( + `Secrets collected: ${result.applied.length} applied, ${result.skipped.length} skipped, ${result.existingSkipped.length} already set.`, + "info", + ); + } + } catch (err) { ctx.ui.notify( - `Secrets collected: ${result.applied.length} applied, ${result.skipped.length} skipped, ${result.existingSkipped.length} already set.`, - "info", + `Secrets collection error: ${err instanceof Error ? err.message : String(err)}`, + "warning", ); } - } catch (err) { - ctx.ui.notify( - `Secrets collection error: ${err instanceof Error ? err.message : String(err)}`, - "warning", - ); - } + }; + + await runSecretsGate(); const needsRunUat = await checkNeedsRunUat(basePath, mid, state, prefs); // Flag: for human/mixed UAT, pause auto-mode after the prompt is sent so the user