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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/2443-the-board-s-forge-strip-and-the-terminal → main 1 commit fork

  • Merged. scout/2443-the-board-s-forge-strip-and-the-terminal was merged into main as 894e519.

Review

Sign in to review this change.
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
7373 const rollout = rolloutLine(h);
7474 return [
7575 ...(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}`),
7977 ...h.degraded.map(needLine),
8078 ];
8179 }
src/web/pages/board.ts +1 −4
@@ -332,10 +332,7 @@ function forgeStrip(ctx: Ctx): Html | null {
332332 const verdict = forgeVerdict(fh, Date.now());
333333 const said = (line: string) => coveredByVerdict(line, verdict, fh);
334334 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}`));
339336 const ok = v.ok && fh.ok && verdict === undefined;
340337 const lane = laneLine(v.lane);
341338 return html`<div
test/board.test.ts +3
@@ -11,6 +11,7 @@ import { mkdtemp, rm } from "node:fs/promises";
1111 import { tmpdir } from "node:os";
1212 import { join } from "node:path";
1313 import { createApp, type App } from "../src/app.ts";
14 import { forgeNeeds } from "../src/actions/health.ts";
1415 import { changeCapacity } from "../src/actions/capacity.ts";
1516 import { enableApp } from "../src/actions/apps.ts";
1617 import { addToCrew, createAgent } from "../src/actions/crew.ts";
@@ -536,6 +537,8 @@ describe("the board's forge strip", () => {
536537 expect(held).toContain("needs you: forge held: preflight refused 1.2");
537538 expect(held).toMatch(/data-ok="no"/);
538539 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");
539542 writeFileSync(join(guard, "status.json"), JSON.stringify({ incidents: {} }));
540543 expect(await board("root")).toContain("All fine");
541544 } finally {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs