The best way to control Claude Code, Codex and more from any computer or phone
fix(source-control): keep distinct CI checks with overlapping names (#19162)
Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Simone committed
Oct 14, 2026 at 04:34 UTC
5e5c52b7a70c16734e42faa072248a597e1333ee
2 files changed
+23
-1
packages/source-control-core/src/server/pullRequestChecks.test.ts
+22
@@ -50,6 +50,28 @@ describe("dedupeChecks", () => {
50
]);
51
});
52
53
+ it("keeps distinct workflow and check pairs even when their names join to the same text", () => {
54
+ const checks = dedupeChecks([
55
+ entry("Linux tests", "success", {
56
+ workflowName: "Build",
57
+ at: "2026-08-11T16:00:00Z",
58
+ }),
59
+ entry("tests", "success", {
60
+ workflowName: "Build Linux",
61
+ at: "2026-08-11T17:00:00Z",
62
+ }),
63
+ entry("Linux tests", "failure", {
64
+ workflowName: "Build",
65
+ at: "2026-08-11T18:00:00Z",
66
+ }),
67
+ ]);
68
+
69
+ expect(checks.map((check) => [check.name, check.status])).toEqual([
70
+ ["Linux tests", "failure"],
71
+ ["tests", "success"],
72
+ ]);
73
+ });
74
+
75
it("loses a run that never said when it happened to one that did, whichever came first", () => {
76
const undated = dedupeChecks([
77
entry("build", "success", { at: "2026-08-11T16:00:00Z" }),
packages/source-control-core/src/server/pullRequestChecks.ts
+1
-1
@@ -36,7 +36,7 @@ export function dedupeChecks(
36
): ReadonlyArray<PullRequestCheck> {
37
const newestByCheck = new Map<string, (typeof entries)[number]>();
38
for (const entry of entries) {
39
- const key = `${entry.workflowName ?? ""} ${entry.check.name}`;
39
+ const key = JSON.stringify([entry.workflowName ?? "", entry.check.name]);
40
const kept = newestByCheck.get(key);
41
// Re-setting a key a Map already holds keeps its first position, which is the order wanted.
42
if (kept === undefined || isAtLeastAsNew(entry.at, kept.at)) newestByCheck.set(key, entry);