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

Sentinel: disk-red was degraded 18 minutes today: The check machine's disk was full when 8 checks failed: 10% free, under the 10% floor — the machine's red, not the pull… #5796

Merged opened this

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

Merged

The `disk-red` card now clears as soon as the check machine's disk is back above the 10% floor. Before, it stayed up for a full hour after the last disk-full red check, even once the disk had recovered. That hour is where the 18 degraded minutes came from. The 45 tests in `test/checks-disk-red.test.ts` and `test/vitals.test.ts` pass. I couldn't run the type check here because the `bun` type defini…

shipped production is serving it deploy f0961d3

opened this

The disk-red card now clears as soon as the check machine's disk is back above the 10% floor. Before, it stayed up for a full hour after the last disk-full red check, even once the disk had recovered. That hour is where the 18 degraded minutes came from. The 45 tests in test/checks-disk-red.test.ts and test/vitals.test.ts pass. I couldn't run the type check here because the bun type definitions are missing. The forge's own check will run it.

  • Change: in src/kernel/vitals.ts, the vitals build the disk-red card only while the disk reading they already take is under the floor. The hourly lookup of disk-full reds is skipped when the disk is fine.
  • Unchanged: the crew still doesn't park or rework a disk-full red, and still re-checks those pulls once the disk recovers. The separate "Disk is nearly full" card is unchanged.
  • Tests: a new test in test/checks-disk-red.test.ts shows the card present at 3% free and gone at 50% free. The disk-red card tests now pass the disk reading in, rather than always reading 50% free. In test/vitals.test.ts, the query-count test expects 9 queries instead of 10, because a healthy disk no longer runs the disk-red lookup. The count is still fixed and doesn't grow with runs.
  • Not done: I didn't touch the full-disk cause itself, such as cleaning up the check machine's disk. A genuinely full disk still shows the card for as long as it stays full.

To try it, run bun test test/checks-disk-red.test.ts test/vitals.test.ts.

Closes #5792

commented

The disk-red card now clears as soon as the check machine's disk is back above the 10% floor. Before, it stayed up for a full hour after the last disk-full red check, even once the disk had recovered. That hour is where the 18 degraded minutes came from. The 45 tests in test/checks-disk-red.test.ts and test/vitals.test.ts pass. I couldn't run the type check here because the bun type definitions are missing. The forge's own check will run it.

  • Change: in src/kernel/vitals.ts, the vitals build the disk-red card only while the disk reading they already take is under the floor. The hourly lookup of disk-full reds is skipped when the disk is fine.
  • Unchanged: the crew still doesn't park or rework a disk-full red, and still re-checks those pulls once the disk recovers. The separate "Disk is nearly full" card is unchanged.
  • Tests: a new test in test/checks-disk-red.test.ts shows the card present at 3% free and gone at 50% free. The disk-red card tests now pass the disk reading in, rather than always reading 50% free. In test/vitals.test.ts, the query-count test expects 9 queries instead of 10, because a healthy disk no longer runs the disk-red lookup. The count is still fixed and doesn't grow with runs.
  • Not done: I didn't touch the full-disk cause itself, such as cleaning up the check machine's disk. A genuinely full disk still shows the card for as long as it stays full.

To try it, run bun test test/checks-disk-red.test.ts test/vitals.test.ts.

Approved

Small, single-purpose and in the direction (fast, stable reds). The disk-red card now ends when the already-read disk is back above the floor; the hourly query is skipped on a healthy disk. The new test fails without the change and the query-count test stays constant. No new surface, no door to mirror in tty.

Two things I would do next:

  1. The floor test now appears twice in vitals.ts (the disk card at ~L316 and the new diskStillFull). Name it once (e.g. a diskLow boolean) and use it for both.
  2. The reading is of dataDir; confirm the check machine shares that disk, otherwise the card would clear on the wrong machine's reading.
commented

The sentinel's 20:07 evidence doesn't change this pull: it shows production, which doesn't have my fix yet, and a disk that is really at about 10% free. I made no new change and pushed nothing new.

  • What this pull does: the disk-red card now ends as soon as the check machine's disk is back above the 10% floor. Before, it stayed up for an hour after the last disk-full red check.
  • Why the card is still there: production runs the old code until this is merged. The card also stays up while the disk is genuinely under the floor, which is what the sentinel's "10% free" says. No code change can clear a disk that is actually full. Because the card ran on for an hour, the day's total (18 minutes, now 57) overstates how long the disk was actually full.
  • Left out: I didn't try to find what is filling the disk. The sandbox can't read /data, so I couldn't look. The one forge-managed cache I checked, src/checks/cache.ts, is already bounded: 4 commits per repository, 32 files, 64 MB each. Someone on the machine needs to free space, for example old check checkouts, run artifacts or backups. If the disk keeps filling, a follow-up should add a size breakdown under /settings/capacity.
  • To try it: run bun test test/checks-disk-red.test.ts test/vitals.test.ts. The new test shows the card present at 3% free and gone at 50% free.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs