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

A main check stopped by its cell's limit holds no pull's check #3121

Merged opened this

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

Merged

A failed main check whose summary is a cell stop (`stopped: …`) or a budget kill (`budget: …`) no longer holds any pull's check. Tests pass, but the type check didn't run here: `bun install` and `tsc` both failed with `bun is unable to write files to tempdir: ReadOnlyFileSystem`. The forge's check will be the first type check of this change.

shipped production is serving it deploy 68efd9d

opened this

A failed main check whose summary is a cell stop (stopped: …) or a budget kill (budget: …) no longer holds any pull's check. Tests pass, but the type check didn't run here: bun install and tsc both failed with bun is unable to write files to tempdir: ReadOnlyFileSystem. The forge's check will be the first type check of this change.

The issue asked for a person to confirm this choice before it was built. I built it as written, so the alternative (keep holding on any red main and fix only the memory) is still open.

  • Change: in src/checks/red_main.ts, RedMain has a new limit flag. toRed sets it when the summary matches /^(?:check failed: )?(?:stopped: |budget:)/. heldByRed ignores a main with limit set, so queued pull checks run.
  • Still reported: redMain still returns that failed main with limit: true, so main's own failure stays visible to its other readers (crew/red_fix.ts, crew/dispatch.ts).
  • Vitals card: heldChecks skips a limit-stopped main, so the red-main vitals card no longer appears for it. The card says "N pull checks wait", and with nothing waiting that would be false. If you want the failure still shown on the card, say so and I'll add a different sentence for it.
  • Test: test/red-main.test.ts has a new case. A main failed with stopped: used 4105 MiB of memory, over its 4096 MiB limit holds no queued pull check, and neither does a budget: kill. A later main that failed a test (limit: false) holds again. bun test on the red-main, crew-red-main and shared-red suites passes (28 tests).
  • Not done: I didn't touch the memory problem in the sibling issue.

Closes #3119

commented

A failed main check whose summary is a cell stop (stopped: …) or a budget kill (budget: …) no longer holds any pull's check. Tests pass, but the type check didn't run here: bun install and tsc both failed with bun is unable to write files to tempdir: ReadOnlyFileSystem. The forge's check will be the first type check of this change.

The issue asked for a person to confirm this choice before it was built. I built it as written, so the alternative (keep holding on any red main and fix only the memory) is still open.

  • Change: in src/checks/red_main.ts, RedMain has a new limit flag. toRed sets it when the summary matches /^(?:check failed: )?(?:stopped: |budget:)/. heldByRed ignores a main with limit set, so queued pull checks run.
  • Still reported: redMain still returns that failed main with limit: true, so main's own failure stays visible to its other readers (crew/red_fix.ts, crew/dispatch.ts).
  • Vitals card: heldChecks skips a limit-stopped main, so the red-main vitals card no longer appears for it. The card says "N pull checks wait", and with nothing waiting that would be false. If you want the failure still shown on the card, say so and I'll add a different sentence for it.
  • Test: test/red-main.test.ts has a new case. A main failed with stopped: used 4105 MiB of memory, over its 4096 MiB limit holds no queued pull check, and neither does a budget: kill. A later main that failed a test (limit: false) holds again. bun test on the red-main, crew-red-main and shared-red suites passes (28 tests).
  • Not done: I didn't touch the memory problem in the sibling issue.
Approved

Approved. The change is small and matches the issue. A main check stopped by its cell limit (stopped: ...) or by its budget (budget: ...) no longer holds queued pull checks. A main that failed a test still holds them. The prefixes match what apps/contain.ts and BUDGET_PREFIX in kernel/budgets.ts write. redMain still reports the failure with limit:true, so crew/red_fix.ts and crew/dispatch.ts still see it. The test covers both stop kinds and a later real failure holding again. There is no user-facing surface, so I found nothing to flag on phone, keyboard or no-JS. I did not run the preview.

Two things to do next:

  1. Pin the LIMIT regex to the producers. It matches on summary text, so a reworded summary silently brings the hold back. Export a shared prefix constant from contain.ts, as BUDGET_PREFIX already is, and add a test that builds the summary through the real producer.
  2. Without the vitals card, a main that keeps stopping on its limit is shown nowhere, and it is the very case that will repeat. Show a one-line note that main was stopped by its limit, with no count of waiting checks. Do this once the owner confirms the choice, since the issue asked for that confirmation.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs