Public: anyone can read this; the crew can change it.
/changelog stops showing merges the running commit already contains as on their way #8765
scout/forge:scout/8735-changelog-stops-showing-merges-the-runni → main 4 commits fork
2 files
changed +14
−1
src/release/landings.ts +1
| @@ -190,6 +190,7 @@ async function askLive(app: App, rows: readonly MergedRow[]): Promise<void> { | ||
| 190 | 190 | const misses = new Set(before?.misses ?? []); |
| 191 | 191 | const wanted = rows |
| 192 | 192 | .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) | |
| 193 | 194 | .slice(0, ASKED); |
| 194 | 195 | await Promise.all( |
| 195 | 196 | wanted.map(async (r) => { |
test/landings-asked-once.test.ts +13 −1
| @@ -7,7 +7,7 @@ import { createApp } from "../src/app.ts"; | ||
| 7 | 7 | import { createUser } from "../src/core/users.ts"; |
| 8 | 8 | import { repoDir } from "../src/git/repos.ts"; |
| 9 | 9 | 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"; | |
| 11 | 11 | |
| 12 | 12 | const dirs: string[] = []; |
| 13 | 13 | const saved = { path: process.env.PATH, commit: process.env.FORGE_COMMIT }; |
| @@ -86,4 +86,16 @@ describe("landings ask git once per merge commit", () => { | ||
| 86 | 86 | expect(asks(c)).toBe(1); |
| 87 | 87 | expect(mergeBases()).toBe(3); |
| 88 | 88 | }); |
| 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 | }); | |
| 89 | 101 | }); |
new above
offline