Public: anyone can read this; the crew can change it.
The board's forge strip and the terminal's Needs list also show held and stuck incidents #2467
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/2443-the-board-s-forge-strip-and-the-terminal → main 1 commit fork
3 files
changed +5
−7
src/actions/health.ts +1 −3
| @@ -73,9 +73,7 @@ export function forgeNeeds(app: App, actor: User | undefined): string[] | undefi | ||
| 73 | 73 | const rollout = rolloutLine(h); |
| 74 | 74 | return [ |
| 75 | 75 | ...(rollout === null ? [] : [rollout]), |
| 76 | ...h.incidents | |
| 77 | .filter((i) => i.key !== "stuck" && i.key !== "held") | |
| 78 | .map((i) => `${i.key}: ${i.message}`), | |
| 76 | ...h.incidents.map((i) => `${i.key}: ${i.message}`), | |
| 79 | 77 | ...h.degraded.map(needLine), |
| 80 | 78 | ]; |
| 81 | 79 | } |
src/web/pages/board.ts +1 −4
| @@ -332,10 +332,7 @@ function forgeStrip(ctx: Ctx): Html | null { | ||
| 332 | 332 | const verdict = forgeVerdict(fh, Date.now()); |
| 333 | 333 | const said = (line: string) => coveredByVerdict(line, verdict, fh); |
| 334 | 334 | const rollout = rolloutLine(fh); |
| 335 | const others = fh.incidents.filter( | |
| 336 | (i) => | |
| 337 | i.key !== "stuck" && i.key !== "held" && !said(`${i.key}: ${i.message}`), | |
| 338 | ); | |
| 335 | const others = fh.incidents.filter((i) => !said(`${i.key}: ${i.message}`)); | |
| 339 | 336 | const ok = v.ok && fh.ok && verdict === undefined; |
| 340 | 337 | const lane = laneLine(v.lane); |
| 341 | 338 | return html`<div |
test/board.test.ts +3
| @@ -11,6 +11,7 @@ import { mkdtemp, rm } from "node:fs/promises"; | ||
| 11 | 11 | import { tmpdir } from "node:os"; |
| 12 | 12 | import { join } from "node:path"; |
| 13 | 13 | import { createApp, type App } from "../src/app.ts"; |
| 14 | import { forgeNeeds } from "../src/actions/health.ts"; | |
| 14 | 15 | import { changeCapacity } from "../src/actions/capacity.ts"; |
| 15 | 16 | import { enableApp } from "../src/actions/apps.ts"; |
| 16 | 17 | import { addToCrew, createAgent } from "../src/actions/crew.ts"; |
| @@ -536,6 +537,8 @@ describe("the board's forge strip", () => { | ||
| 536 | 537 | expect(held).toContain("needs you: forge held: preflight refused 1.2"); |
| 537 | 538 | expect(held).toMatch(/data-ok="no"/); |
| 538 | 539 | expect(held).not.toContain("All fine"); |
| 540 | expect(held.split("held: preflight refused 1.2").length - 1).toBe(1); | |
| 541 | expect(forgeNeeds(app, admin)).toContain("held: preflight refused 1.2"); | |
| 539 | 542 | writeFileSync(join(guard, "status.json"), JSON.stringify({ incidents: {} })); |
| 540 | 543 | expect(await board("root")).toContain("All fine"); |
| 541 | 544 | } finally { |
new above
offline