Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
TÂCHES 2026-03-13 23:13:06 -06:00 committed by GitHub
parent 0810aec739
commit 9ef7536f3d

View file

@ -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