Public: anyone can read this; the crew can change it.
"the sentinel command > an admin has it, and it says what the board says" passes every time on a loaded check machine #5235
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5207-the-sentinel-command-an-admin-has-it-and → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +7
−0
test/tui-sentinel.test.ts +7
| @@ -10,6 +10,7 @@ import { join } from "node:path"; | ||
| 10 | 10 | import { createApp, type App } from "../src/app.ts"; |
| 11 | 11 | import { createRepo } from "../src/actions/repos.ts"; |
| 12 | 12 | import { createUser, type User } from "../src/core/users.ts"; |
| 13 | import { clearErrors, createLog } from "../src/kernel/log.ts"; | |
| 13 | 14 | import { hunt } from "../src/crew/sentinel.ts"; |
| 14 | 15 | import { forgeCommands, Session } from "../src/tui/forge.ts"; |
| 15 | 16 | import type { Ctx } from "../src/tui/app/app.ts"; |
| @@ -68,6 +69,12 @@ describe("the sentinel command", () => { | ||
| 68 | 69 | if (!made.ok) throw new Error(String(made.error)); |
| 69 | 70 | process.env["FORGE_SENTINEL_REPO"] = "alice/none"; |
| 70 | 71 | try { |
| 72 | // The hunt reads the process's error log, which every other suite in | |
| 73 | // this process writes to; a loaded machine fills it with the same | |
| 74 | // ERROR line three times and the hunt files a finding. Empty it for | |
| 75 | // the read, so the hunt sees only this test's database. | |
| 76 | for (let i = 0; i < 3; i++) createLog("noise").error(`other suite failed ${i}`); | |
| 77 | clearErrors(); | |
| 71 | 78 | hunt(app, "alice/none", Date.parse("2026-10-13T12:00:00.000Z")); |
| 72 | 79 | found!.run(); |
| 73 | 80 | } finally { |
new above
offline
Good: the seeded noise followed by clearErrors() proves the isolation. Keep the comment as is.