Public: anyone can read this; the crew can change it.

/changelog stops showing merges the running commit already contains as on their way #8765

Parked opened this
Closed without merging

scout/forge:scout/8735-changelog-stops-showing-merges-the-runni → main 4 commits fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
2 files changed +14 −1
src/release/landings.ts +1
@@ -190,6 +190,7 @@ async function askLive(app: App, rows: readonly MergedRow[]): Promise<void> {
190190 const misses = new Set(before?.misses ?? []);
191191 const wanted = rows
192192 .filter((r) => r.repo.toLowerCase() === named.toLowerCase() && r.oid !== "" && !oids.has(r.oid) && !misses.has(r.oid))
193 .filter((r, i, all) => all.findIndex((o) => o.oid === r.oid) === i)
193194 .slice(0, ASKED);
194195 await Promise.all(
195196 wanted.map(async (r) => {
test/landings-asked-once.test.ts +13 −1
@@ -7,7 +7,7 @@ import { createApp } from "../src/app.ts";
77 import { createUser } from "../src/core/users.ts";
88 import { repoDir } from "../src/git/repos.ts";
99 import { id } from "../src/kernel/id.ts";
10 import { forgetLive, readLandings } from "../src/release/landings.ts";
10 import { forgetLive, readLandings, split } from "../src/release/landings.ts";
1111
1212 const dirs: string[] = [];
1313 const saved = { path: process.env.PATH, commit: process.env.FORGE_COMMIT };
@@ -86,4 +86,16 @@ describe("landings ask git once per merge commit", () => {
8686 expect(asks(c)).toBe(1);
8787 expect(mergeBases()).toBe(3);
8888 });
89
90 test("a merge older than the running commit is live though git was never asked about it; a newer one is on its way", () => {
91 const madeAt = Date.parse("2026-01-01T00:00:00Z");
92 const at = (hours: number) => new Date(madeAt + hours * 3_600_000).toISOString();
93 // 100 merges, past the 80 asked of git, so neither a hit nor a miss is kept for them.
94 const old = Array.from({ length: 100 }, (_, i) => ({ repo: "alice/r", number: 100 - i, title: "P", at: at(-(i + 1)), oid: `o${100 - i}` }));
95 const rows = [{ repo: "alice/r", number: 101, title: "P", at: at(1), oid: "new" }, ...old];
96 const state = { own: "alice/r", oids: new Set<string>(), misses: new Set<string>(), at: madeAt, commit: "c" };
97 const { live, onItsWay } = split(rows, state);
98 expect(onItsWay.map((l) => l.number)).toEqual([101]);
99 expect(live).toHaveLength(100);
100 });
89101 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs