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

opened this

Merged 17h 44m ago, live in production

fix/flow-clog-isolate → main 0 commits

  • Merged. fix/flow-clog-isolate was merged into main as 6049b3e.

Review

Sign in to review this change.
1 file changed +14 −1
test/flow-clog-page.test.ts +14 −1
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
55 import { join } from "node:path";
66 import { createRepo } from "../src/actions/repos.ts";
77 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";
99 import { createUser } from "../src/core/users.ts";
1010 import { serve, type Servers } from "../src/http/server.ts";
1111 import { id } from "../src/kernel/id.ts";
@@ -44,7 +44,19 @@ const red = (num: number, names: string[]) => {
4444 .run(id(), repoId, issue.id, JSON.stringify({ names }));
4545 };
4646
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
4758 beforeAll(async () => {
59 forgetLearned();
4860 dataDir = await mkdtemp(join(tmpdir(), "forge-clogpage-"));
4961 app = createApp({ dataDir, port: 0 });
5062 servers = await serve(app);
@@ -61,6 +73,7 @@ beforeAll(async () => {
6173 }, 60_000);
6274
6375 afterAll(async () => {
76 forgetLearned();
6477 rememberPullFiles(repoId, []);
6578 servers.stop();
6679 app.close();

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs