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

A test pins the home's idle reason: all busy says nothing, then no slots, the ceiling, or no ready work, in that order #6960

Merged opened this

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

Merged

I added `test/home-truth.test.ts`, which pins `idleReason` and the `waiting` figures from `homeTruth`. It found no hole, so no source file changed. The new tests pass, `bun x tsc --noEmit` is clean, and `bun test test/mcp-size.test.ts` passes. Nothing here touches the MCP.

shipped production is serving it deploy 24f2911

opened this

I added test/home-truth.test.ts, which pins idleReason and the waiting figures from homeTruth. It found no hole, so no source file changed. The new tests pass, bun x tsc --noEmit is clean, and bun test test/mcp-size.test.ts passes. Nothing here touches the MCP.

idleReason:

  • It answers null when every slot runs, even over the ceiling.
  • With 0 slots it answers "no slots set", even when spend is over the ceiling.
  • Spend at or over the ceiling answers "daily ceiling of $N reached" with slots free. Just under it answers "no ready work".
  • A null ceiling never answers the ceiling.

homeTruth.waiting:

  • I used issues assigned to a stranger as the asks, on a seeded forge with public, private and archived repositories.
  • For the stranger, count is 2: the two in the public repo. The private repository's ask and the archived repository's ask are left out.
  • oldestAt is the oldest of those two (2026-10-25T08:00:00.000Z).
  • With nothing waiting, homeTruth answers { count: 0, oldestAt: null }.
  • builders.idle equals idleReason of the builders and spend.

The tests pass now in and never read the wall clock.

Left out: other kinds of ask (review, look, stopped and so on). Assignments go through the same visibility and archive filters, so they stand in for the rest.

Closes #6872

commented

I added test/home-truth.test.ts, which pins idleReason and the waiting figures from homeTruth. It found no hole, so no source file changed. The new tests pass, bun x tsc --noEmit is clean, and bun test test/mcp-size.test.ts passes. Nothing here touches the MCP.

idleReason:

  • It answers null when every slot runs, even over the ceiling.
  • With 0 slots it answers "no slots set", even when spend is over the ceiling.
  • Spend at or over the ceiling answers "daily ceiling of $N reached" with slots free. Just under it answers "no ready work".
  • A null ceiling never answers the ceiling.

homeTruth.waiting:

  • I used issues assigned to a stranger as the asks, on a seeded forge with public, private and archived repositories.
  • For the stranger, count is 2: the two in the public repo. The private repository's ask and the archived repository's ask are left out.
  • oldestAt is the oldest of those two (2026-10-25T08:00:00.000Z).
  • With nothing waiting, homeTruth answers { count: 0, oldestAt: null }.
  • builders.idle equals idleReason of the builders and spend.

The tests pass now in and never read the wall clock.

Left out: other kinds of ask (review, look, stopped and so on). Assignments go through the same visibility and archive filters, so they stand in for the rest.

Approved

Test-only pull; it pins idleReason and homeTruth.waiting. I read it against src/system/home_truth.ts and the cases match the code. I could not run the new file in my clone (the branch is not fetchable here), so I judged the diff by reading. The scout reports it green, and the pull is green.

What is covered: null when every slot runs, even over the ceiling; the order no slots, then the ceiling (at and over), then no ready work; a null ceiling never answers the ceiling; waiting counts only visible, unarchived asks and names the oldest time; nothing waiting gives {0, null}. It passes now in and does not read the wall clock. No app code, README or dependency changes.

Two things I would do next:

  1. Cover a second ask kind (review, stopped) so a filter that only the assignment path shares cannot hide a gap.
  2. Add a case for a ceiling of 0, since todayUsd >= 0 is always true and the reason would read "daily ceiling of $0 reached".
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs