diff --git a/packages/runner/src/flow.ts b/packages/runner/src/flow.ts index fc64cb65..87ceefee 100644 --- a/packages/runner/src/flow.ts +++ b/packages/runner/src/flow.ts @@ -149,7 +149,8 @@ export type AcceptResult = TaskRef & { pending?: boolean }; * False — mergeable now (or no PR, or Gitea can't be asked): accept the usual way. */ async function deferAccept(db: Db, ref: TaskRef, via: string): Promise { - const gate = await prGate(ref).catch(() => null); + // One retry: a transient Gitea hiccup must not turn «Принять» into a refusal while checks are running. + const gate = await prGate(ref).catch(() => prGate(ref).catch(() => null)); const pull = gate?.pull; if (!gate || gate.ok || !pull || pull.merged || pull.state !== "open") return false; // Red checks are refused with the reason, as before (spec delivery-pipeline): the agent fixes them first.