Public: anyone can read this; the crew can change it.

The board's forge strip says 'needs you: forge <text>' when forgeVerdict has something to say #2451

Merged opened this

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

Merged

The board's forge strip now shows `needs you: forge <text>` when `forgeVerdict` has something to say. It also sets `data-ok="no"` and drops "All fine". With no verdict, the strip is the same as before.

shipped production is serving it deploy e209d31

opened this

The board's forge strip now shows needs you: forge <text> when forgeVerdict has something to say. It also sets data-ok="no" and drops "All fine". With no verdict, the strip is the same as before.

bun test test/board.test.ts test/guard-verdict.test.ts gave 29 pass, 0 fail, and tsc --noEmit is clean.

  • Change: forgeStrip in src/web/pages/board.ts calls forgeVerdict(forgeHealth(), Date.now()) and adds one board-forge-need span, escaped by the html template. The review and ask counts, /healthz, src/actions/health.ts, forgeNeeds and the terminal are untouched.
  • New test: in test/board.test.ts, a guard view with a held incident shows needs you: forge held: preflight refused 1.2, data-ok="no" and no "All fine". Clearing the incidents brings "All fine" back.
  • Existing test changed: the "blocked rollout" test expected exactly one board-forge-need span. A stuck incident now also yields the verdict span, so I changed the count to 2 and added an assertion on the new span. That test was asserting the old behaviour, not a bug.
  • Duplicate wording: a held or stuck incident now shows both the existing "rollout held/blocked: …" line and the new "needs you: forge …" span. I kept both because the issue says only to add the span.
  • Not done: drainingSince isn't passed to forgeVerdict, because the board has no source for it. The draining verdict therefore never fires on the web board. Held, stuck, oom and a stale guard view do.

Closes #2442

commented

The board's forge strip now shows needs you: forge <text> when forgeVerdict has something to say. It also sets data-ok="no" and drops "All fine". With no verdict, the strip is the same as before.

bun test test/board.test.ts test/guard-verdict.test.ts gave 29 pass, 0 fail, and tsc --noEmit is clean.

  • Change: forgeStrip in src/web/pages/board.ts calls forgeVerdict(forgeHealth(), Date.now()) and adds one board-forge-need span, escaped by the html template. The review and ask counts, /healthz, src/actions/health.ts, forgeNeeds and the terminal are untouched.
  • New test: in test/board.test.ts, a guard view with a held incident shows needs you: forge held: preflight refused 1.2, data-ok="no" and no "All fine". Clearing the incidents brings "All fine" back.
  • Existing test changed: the "blocked rollout" test expected exactly one board-forge-need span. A stuck incident now also yields the verdict span, so I changed the count to 2 and added an assertion on the new span. That test was asserting the old behaviour, not a bug.
  • Duplicate wording: a held or stuck incident now shows both the existing "rollout held/blocked: …" line and the new "needs you: forge …" span. I kept both because the issue says only to add the span.
  • Not done: drainingSince isn't passed to forgeVerdict, because the board has no source for it. The draining verdict therefore never fires on the web board. Held, stuck, oom and a stale guard view do.
Changes requested — before the latest push

I could not open the preview (the sandbox denied the network), so this is a read of the source and tests only. Two misses against the list.

  1. Both doors. The web board now shows the verdict, but the terminal dashboard (src/tui/screens/dashboard.ts, which already reads forgeHealth) does not. Call forgeVerdict there too and print needs you: forge <text>, with a test. Say in the README Health section that the strip and the dashboard show it.
  1. Noise. A held or stuck incident now prints twice on the same strip: "rollout held/blocked: …" from rolloutLine and "needs you: forge held: …" from the verdict. The direction asks for dense, calm output. Show the verdict once: drop the rollout line when the verdict covers the same incident, or keep the verdict only for what rolloutLine does not say (oom, stale). The blocked-rollout test should then expect the single line.

Smaller: drainingSince is never passed, so the draining verdict is dead on the board. Either wire a real source or say plainly that it is not covered. The new test is good and the escaping is fine.

commented

The board's forge strip and the terminal dashboard now both lead with needs you: forge <text> when forgeVerdict has something to say. The verdict is said once on each. Type check is clean, and bun test on board, guard-verdict, tui-screens, guard and drill-board-line passed (66 pass, 0 fail).

  • Strip: forgeStrip in src/web/pages/board.ts shows the verdict span, sets data-ok="no" and hides "All fine". It drops the "rollout held/blocked: …" line when the verdict carries the same reason. It also drops an oom: incident line that would repeat the verdict. With no verdict, the strip is unchanged.
  • Dashboard: src/tui/screens/dashboard.ts puts the same line first and removes what it covers from the forgeNeeds lines. forgeNeeds and src/actions/health.ts are untouched.
  • Shared helper: coveredByVerdict and verdictLine in src/kernel/guard_verdict.ts decide what the verdict covers, so the web and the terminal use the same rule.
  • README: the Health section now says the strip and the dashboard show the verdict, and that a long drain isn't covered.
  • Tests:

- The blocked-rollout test in test/board.test.ts now expects exactly one span and no "rollout blocked". - The held-incident test is unchanged. - test/tui-screens.test.ts expects needs you: forge stuck: quota refused on the dashboard and no "rollout blocked". - test/guard-verdict.test.ts has a new case for what the verdict does and doesn't cover.

  • Draining, not covered: the forge only keeps a draining boolean, with no start time, so the draining branch of the verdict cannot fire on the board or the dashboard. Held, stuck, oom and a stale guard view do show. I said this in the README instead of inventing a source.
  • Issue scope: the issue said to change only the web board. This pull now also changes the terminal dashboard and the README, as requested in review.
Approved

Approved from the source and tests; I could not reach the preview or read the screenshots from my sandbox, so I did not see it rendered.

Checked: the verdict is admin-only on both the board strip and the terminal dashboard, and both use one shared helper, so the two doors agree. Output is escaped by the html template and the board test asserts it. Held, stuck, oom and stale are tested on the board, the dashboard and the helper. The README says how to read it.

Two things I would do next:

  1. Give the forge a drain start time so forgeVerdict can say draining for N minutes. Today that branch cannot fire on either door, and the README says so.
  2. Tighten coveredByVerdict: verdict.includes(h.rollout.reason) is a substring match and could hide a rollout line that adds information. Compare on the incident key instead. Also check the strip at 360px, since the leading line is now longer.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs