fix(server): fail closed on unmatched PR status

This commit is contained in:
Theo Browne committed 2026-08-13 16:47:21 -07:00
1 parent fe50cbcb90
commit f3fb3cb36a
2 files changed
+1 -2

No files matched your search

@@ -279,7 +279,6 @@ it.effect("does not settle when PR verification fails or belongs to another bran
id: "mismatched-merge",
branch: "feature/current",
cwd: "/repo/mismatched",
pinned: true,
});
const { reactor, dispatched } = yield* makeHarness({
threads: [lookupFailed, mismatchedMerge],
@@ -68,7 +68,7 @@ function liveChangeRequestState(
status: VcsStatusResult,
): AutomaticSettlementChangeRequestState {
if (thread.branch === null) return null;
if (status.refName !== thread.branch || status.pr?.headRef !== thread.branch) return null;
if (status.refName !== thread.branch || status.pr?.headRef !== thread.branch) return "unknown";
return status.pr.state;
}