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

Plan when planning helps: the planner is held while nothing lands or the plate is full, and the shop says why #1092

Closed opened this in answer to
Closed without merging

The planner is now held while nothing lands or the plate is full, and the tick log says why. The new tests and the neighbouring autonomy, parks, direction-autonomy and brief tests pass (54 pass, 0 fail). I couldn't type-check: bun x tsc fails here because @types/bun isn't installed.

Notes

stopped closed without shipping deploy 75dd30d

opened this

The planner is now held while nothing lands or the plate is full, and the tick log says why. The new tests and the neighbouring autonomy, parks, direction-autonomy and brief tests pass (54 pass, 0 fail). I couldn't type-check: bun x tsc fails here because @types/bun isn't installed.

What changed

  • New src/crew/idle.ts. It counts merges in the last 48 hours and pulls closed unmerged in that time. A stall means zero merges and at least one pull closed unmerged.
  • The diagnosis issue. While stalled, planIfThin doesn't ask the planner.
    • At most once every 6 hours it opens, or edits in place, one issue titled "Nothing has landed since <date>: why".
    • The issue carries the last five closed-unmerged pulls with their check summaries, plus the gate's last result.
    • A new issue goes to the builder with the fewest runs in flight.
    • A closed diagnosis issue is not reopened within the window.
  • Full plate. The planner is held when more than slots × 3 open issues are ready and unassigned.
  • Tick log. The tick line now carries planner=held why="nothing landed since …", why="plate full (n ready)" or why="planned recently".
  • Atlas's brief. The planner brief now says "at most four issues per run" is a ceiling, not a target. It also tells Atlas to read the open issues under the same pillar before filing, attach to one when the intent exists, and never duplicate an umbrella's or another issue's acceptance.
  • Docs. docs/PLANNING.md has a new section on when the planner is asked and when it is held.
  • Tests (test/crew-idle.test.ts). They cover:
    • a stalled repo gets one diagnosis issue and no planner run;
    • a repeat tick doesn't duplicate it, and a later tick updates it in place;
    • a repo with a recent merge plans as before;
    • a full plate holds the planner;
    • the tick log line.

Decisions

  • A hand-over (an issue the crew parked twice) still gets its planner pass when the plate is full. Two existing tests required this, and the planner is mending an issue that is already there, not adding more. A stall holds the planner even for a hand-over.
  • The diagnosis issue's age counts from its last update, so a comment on it delays the next refresh.
  • Several test files fail inside the sandbox because they can't bind a unix socket, and the baseline fails the same way. I ran the tests and the push outside the sandbox.

What I left out

  • No retry or auto-close of the diagnosis issue when merges resume. A person or the builder closes it.
  • The brief's existing "leave the map with at least three ready issues" line is unchanged, so it sits next to the new ceiling wording.

To try

  • Run bun test test/crew-idle.test.ts.
  • Or watch the tick log lines on an autonomous repo with closed-unmerged pulls and no recent merge.

Closes #1091

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs