Public: anyone can read this; the crew can change it.
flow-clog-page starts with no learned pulls in the process and leaves none, so a neighbour's hot file is never its sentence #17590
Merged 17h 44m ago, live in production
fix/flow-clog-isolate → main 0 commits
1 file
changed +14
−1
test/flow-clog-page.test.ts +14 −1
| @@ -5,7 +5,7 @@ import { tmpdir } from "node:os"; | ||
| 5 | 5 | import { join } from "node:path"; |
| 6 | 6 | import { createRepo } from "../src/actions/repos.ts"; |
| 7 | 7 | import { createApp, type App } from "../src/app.ts"; |
| 8 | import { rememberPullFiles } from "../src/crew/hot_files.ts"; | |
| 8 | import { adoptTouched, learnedPulls, rememberPullFiles } from "../src/crew/hot_files.ts"; | |
| 9 | 9 | import { createUser } from "../src/core/users.ts"; |
| 10 | 10 | import { serve, type Servers } from "../src/http/server.ts"; |
| 11 | 11 | import { id } from "../src/kernel/id.ts"; |
| @@ -44,7 +44,19 @@ const red = (num: number, names: string[]) => { | ||
| 44 | 44 | .run(id(), repoId, issue.id, JSON.stringify({ names })); |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | /** | |
| 48 | * The pulls each repository's open pulls touch are one map per process (`crew/hot_files.ts`), and | |
| 49 | * the clog sentence names the hottest file of all of them. Under `bun test --no-isolate` a file | |
| 50 | * before this one in the worker left its own there (hot-files-relieves: "8 open pulls touch | |
| 51 | * src/tui/forge.ts"), and this page named that file, not src/a.ts (red on three pulls, 2026-12-02). | |
| 52 | * This file starts from none, and leaves none. | |
| 53 | */ | |
| 54 | const forgetLearned = (): void => { | |
| 55 | for (const repo of new Set(learnedPulls().map((p) => p.repoId))) adoptTouched(repo, undefined); | |
| 56 | }; | |
| 57 | ||
| 47 | 58 | beforeAll(async () => { |
| 59 | forgetLearned(); | |
| 48 | 60 | dataDir = await mkdtemp(join(tmpdir(), "forge-clogpage-")); |
| 49 | 61 | app = createApp({ dataDir, port: 0 }); |
| 50 | 62 | servers = await serve(app); |
| @@ -61,6 +73,7 @@ beforeAll(async () => { | ||
| 61 | 73 | }, 60_000); |
| 62 | 74 | |
| 63 | 75 | afterAll(async () => { |
| 76 | forgetLearned(); | |
| 64 | 77 | rememberPullFiles(repoId, []); |
| 65 | 78 | servers.stop(); |
| 66 | 79 | app.close(); |
new above
offline