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

The planner is held while nothing lands or the plate is full, and the tick log says why #1350

Closed opened this
Closed without merging

The planner is now held while nothing is landing or the plate is full, and the tick log and the board both say why. Three new tests pass. I could not run the typecheck here because the bun type definitions are missing in this sandbox.

Notes

stopped closed without shipping deploy 7b11fb5

opened this

The planner is now held while nothing is landing or the plate is full, and the tick log and the board both say why. Three new tests pass. I could not run the typecheck here because the bun type definitions are missing in this sandbox.

The existing test/autonomy.test.ts suite (the "a repository on its own" tests) and the board tests fail here because the app cannot listen on its unix socket (EPERM). The two failing autonomy tests failed the same way with my change stashed. I did not get a clean run of those, so they are unchecked.

What changed (src/crew/autonomy.ts, src/web/pages/board.ts, test/autonomy.test.ts)

  • New plannerHold: planIfThin now asks it before starting the planner. It holds in two cases:
    • Nothing landed: no pull merged in 48 h while at least one pull closed unmerged in that time.
    • Plate full: more than slots × 3 ready, unassigned open issues. Slots come from repo.autonomySlots, not the live pace, so a rate-limit wall doesn't change the threshold.
  • Owner steer: a new comment on the direction issue, from a human who can write to the repository and newer than the planner's last run, lifts the hold. Agent comments, imported comments and reader comments don't.
  • Log line: a hold logs tick … planner=held why="nothing landed since 2026-10-06", why="plate full (7 ready)" or why="planned recently". The "planned recently" case is the existing replan floor, now logged in the same format.
  • Board: each autonomous app's card in the Today region shows "Planning paused: nothing has landed since Oct 6" or "Planning paused: 7 issues are ready and waiting". It shows only the two holds; "planned recently" appears in the log but not on the board.
  • Tests:
    • The nothing-landed hold, its release when a pull merges, and the owner's steer going through.
    • The 48 h boundary.
    • The plate-full hold, and it draining when an issue closes.
    • The merge in the release test is simulated by setting merged_at on a closed pull, not by a real merge.

Left out: the auto-filed "Nothing has landed: why" issue, as the issue said. The hold has no timeout: if the gate stays red, the planner stays held until a pull merges or the owner steers, and the board line is how a person sees it.

To try it: in an autonomous repo with a planner on the crew, close a pull unmerged and watch planner=held in the log and the line on the board. Comment on the direction issue as the owner and the next tick starts the planner.

🤖 Generated with Claude Code

Closes #1127

commented

The planner is now held while nothing lands or the plate is full, and the held reason is written to the tick log and shown on the board. This update fixes the check failure: src/crew/autonomy.ts conflicted with main.

What changed

  • Hold rules: plannerHold holds the planner when no pull has merged in 48 hours and one was closed unmerged. It also holds when more issues are ready and unassigned than slots × 3. A comment on the direction issue from someone who can write there lifts the hold. holdWhy words it for the tick log and holdWords for the board.
  • Merge: I merged origin/main into the branch and kept both changes. The skip-replan check from #1097 stays beside the hold check, and the "planned recently" branch goes back to notPlanned as on main.

Testing

  • I ran test/autonomy.test.ts. 10 tests passed and 2 failed. The two failures come from the sandbox refusing to open a unix socket (EPERM on listen), not from the code.
  • I did not run the full bun test or the type check. The full run timed out at 120 seconds, and tsc could not find the bun type definitions here.

To try it Open the preview at https://lab--1350--forge-trevato-apps.open-platform.sh. On a repository with autonomy on, a held planner logs tick planner=held why="…".

commented

Parked by the crew: the check failed ("an issue parked twice is the planner's > the planner's next pass is owed it once: with a full map, and after it declined") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs