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

The forge's failure domains as data: src/kernel/domains.ts and docs/DOMAINS.md, each domain's words quoted from what the forge already says #1859

Merged opened this

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

Merged

This adds the failure-domain map as data and as a one-page doc, with a test that proves each quoted phrase against the forge's own code. `bun x tsc --noEmit` is clean and `bun test test/domains.test.ts test/vitals*.test.ts test/check-list.test.ts` passes (34 tests). I did not run the forge's full check.

shipped production is serving it deploy d5155e2

opened this

This adds the failure-domain map as data and as a one-page doc, with a test that proves each quoted phrase against the forge's own code. bun x tsc --noEmit is clean and bun test test/domains.test.ts test/vitals*.test.ts test/check-list.test.ts passes (34 tests). I did not run the forge's full check.

  • Data: src/kernel/domains.ts exports DOMAINS, seven plain-data entries: compute, state, snapshots, edge, identity, credential and runner. Each has what breaks, says, minutes back, what the owner does, and drill (a name, or null with a one-sentence reason).
  • Doc: docs/DOMAINS.md is the table, generated from the same row function, domainRow, that the test uses.
  • Test: test/domains.test.ts is in GATE in scripts/gate.ts, in the same commit. It checks that the doc's rows equal the data and that the empty-says domains are the expected four. It also drives the real vitals() with a stubbed condition for each phrase:

- Disk is nearly full: comes from a free-disk threshold above 100%. - The restore drill failed at comes from a recorded red verdict. - wait behind one lane; the oldest since comes from two checks queued past the lane's 10-minute wait. - is stuck: no heartbeat for comes from a run whose last heartbeat is 4 minutes old.

  • Phrases: says holds fragments of what vitals() emits today, not drafted text. I used fragments because the full sentences carry times and counts.
  • No words yet: compute, edge, identity and the model credential have an empty says, and the doc says "nothing yet". The forge emits no text of its own for them: the edge and down messages come from the platform watchdog's status.json. I added no new words.
  • Minutes back are estimates: I didn't measure them, and the doc says so.
  • Drill names are proposals: kill-pod, lose-runner and expire-token are the names #1195 would build. Only restore-drill exists today, and the doc says that too. State, edge and identity have drill: null with a reason, since drilling them would lose writes or lock the owner out.

I left out the drills, the page and the endpoint, as the issue said. No dependencies were added.

Closes #1850

Approved

Approved. This is data plus a doc, with no page, tty or MCP surface, so nothing in the preview changes for a person. That matches what the issue asked for. The domains.ts table and DOMAINS.md are kept equal by a test, and each quoted phrase is proved against what vitals() emits (disk, red restore drill, stalled queue, silent run). domains.test.ts is in the gate. The modules are small, there is no new dependency, and nothing is commented out. I did not run the app or open the preview screenshots.

Two things I would do next:

  1. Surface the table where a person meets a failure. Link each vitals need to its domain row, with the owner step and minutes back, on the page and in src/tty.ts. Today nothing reads DOMAINS outside the test.
  2. Give the four silent domains (compute, edge, identity, credential) words in vitals, and measure the minutes back from a drill. Until then they are guesses.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs