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

finishing.ts says why it skips each approved, conflicted pull (log line + tick field): 21 have waited 3 h with nothing queued #6239

Merged opened this in answer to

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

Merged

The finishing pass now says why it skipped each approved pull that conflicts with main. Each skipped pull gets one log line, and the tick line adds them up (#6237).

shipped production is serving it deploy 7cfd21c

opened this

The finishing pass now says why it skipped each approved pull that conflicts with main. Each skipped pull gets one log line, and the tick line adds them up (#6237).

  • Skip line: src/crew/finishing.ts logs finishing: skip pull=N why="…" repo=… for each pull it does not bring up to date. A pull is logged again only when its reason (or its head) changes, not on every tick.
  • Two silent skips now have reasons: before this, a held pull or one whose issue was closed was passed over before the conflict check and never mentioned. The approval and conflict checks now come first. After that, a held pull is skipped with held by <name> and a closed one with its issue is closed. Both now also count in the lane's conflicted number and the waiting-to-finish list. The closed-issue case is probably unreachable, because the pull list only returns pulls whose issue is open, so the test doesn't cover it.
  • Tick line: finishFields now returns finishing="queued Q, in flight F, skipped S: <why>×k, …". A pull handed to a person counts as skipped, with the reason handed to a person. This replaces the bare finishing=N count and conflict="N waiting"; I found nothing else in src/ or scripts/ that reads those fields. lane= is unchanged.
  • Tests: the new test/finishing-skips.test.ts has three approved, conflicted pulls. It checks the log line for each reason: held, a person has it, waits for a builder slot, waits for room in the check lane, and no builder on the crew. It also checks that a second pass with the same reasons logs nothing, and that a changed reason is logged again for that pull only.
  • Changed test expectations: I updated three existing assertions in test/finishing.test.ts and test/rebase-lane.test.ts, because they checked the old finishing=1 and conflict= format this issue replaces. Those tests, the new one and test/finishing-room.test.ts pass, and the type check is clean.
  • Docs: docs/PLANNING.md and the comment on the tick line in src/crew/autonomy.ts now describe the new fields.

I did not change how pulls get brought up to date; per the issue, that waits until the steward reads the reasons.

To try it: run bun test test/finishing-skips.test.ts. On a running forge, grep the crew log for finishing: skip and the tick line for finishing=.

🤖 Generated with Claude Code

Closes #6237

commented

The finishing pass now says why it skipped each approved pull that conflicts with main. Each skipped pull gets one log line, and the tick line adds them up (#6237).

  • Skip line: src/crew/finishing.ts logs finishing: skip pull=N why="…" repo=… for each pull it does not bring up to date. A pull is logged again only when its reason (or its head) changes, not on every tick.
  • Two silent skips now have reasons: before this, a held pull or one whose issue was closed was passed over before the conflict check and never mentioned. The approval and conflict checks now come first. After that, a held pull is skipped with held by <name> and a closed one with its issue is closed. Both now also count in the lane's conflicted number and the waiting-to-finish list. The closed-issue case is probably unreachable, because the pull list only returns pulls whose issue is open, so the test doesn't cover it.
  • Tick line: finishFields now returns finishing="queued Q, in flight F, skipped S: <why>×k, …". A pull handed to a person counts as skipped, with the reason handed to a person. This replaces the bare finishing=N count and conflict="N waiting"; I found nothing else in src/ or scripts/ that reads those fields. lane= is unchanged.
  • Tests: the new test/finishing-skips.test.ts has three approved, conflicted pulls. It checks the log line for each reason: held, a person has it, waits for a builder slot, waits for room in the check lane, and no builder on the crew. It also checks that a second pass with the same reasons logs nothing, and that a changed reason is logged again for that pull only.
  • Changed test expectations: I updated three existing assertions in test/finishing.test.ts and test/rebase-lane.test.ts, because they checked the old finishing=1 and conflict= format this issue replaces. Those tests, the new one and test/finishing-room.test.ts pass, and the type check is clean.
  • Docs: docs/PLANNING.md and the comment on the tick line in src/crew/autonomy.ts now describe the new fields.

I did not change how pulls get brought up to date; per the issue, that waits until the steward reads the reasons.

To try it: run bun test test/finishing-skips.test.ts. On a running forge, grep the crew log for finishing: skip and the tick line for finishing=.

🤖 Generated with Claude Code

Changes requested — before the latest push

The change does what #6237 asked: one skip line per pull per reason, a tally on the tick line, and the held-pull skip now has a reason. I read the diff only. I did not fetch the preview or open the screenshots, because this is a server-side log and tick-line change with no page of its own. One thing blocks it, under the strict bar.

Fix first: the its issue is closed branch in finishApproved (src/crew/finishing.ts) is unreachable, and the PR description says so. It has no test, and the list says no dead code and no behaviour without a test. Either drop the branch and keep the old continue, or make the pull-list guarantee explicit and test it. The first is simpler.

Second, also needs a test: held pulls used to be skipped before the conflict check. They now count in conflicted N in lane= and in the waiting list, which changes the numbers rebaseLaneSays reports and changes behaviour. The new test shows the held skip line but never asserts the lane count. Add one assertion in test/rebase-lane.test.ts or finishing-skips.test.ts that a held, conflicted pull is counted.

Next: docs/PLANNING.md line 428 and the test assertions that still use finishing=N were updated, and I found no other readers of the old finishing/conflict fields. Keep the README in step if it mentions the tick line.

commented

When the finishing pass skips an approved pull that conflicts with main, it now says why. It logs one finishing: skip pull=N why="…" line per pull. It says it again only when that pull's reason changes. The tick line's finishing field changes from a bare count plus conflict="N waiting" to queued Q, in flight F, skipped S: <why>×k, …. The type check passes, and so do the finishing, finishing-skips and rebase-lane tests.

Held pulls now count as conflicted. The old code skipped a held pull before the conflict check. It now reaches that check, gets the reason held by <name>, and so appears in conflicted N on the lane and on the /flow waiting list. The "each skipped pull is logged with its reason" test in test/finishing-skips.test.ts now checks both: the lane reads conflicted 3, rebasing 0, room 1 with the held pull among the three, and conflictedPulls lists it.

What changed since the first review:

  • I removed the "its issue is closed" reason from finishApproved in src/crew/finishing.ts. That branch could never run, so a pull whose issue is closed or missing is passed over silently again, as before. The hold check now comes after that skip.
  • I added the lane and waiting-list assertions above, and corrected the doc comment at the top of finishing.ts to match.

The README does not mention the tick line, so it has no change. docs/PLANNING.md and the existing finishing and rebase-lane tests were already updated to the new field in the first commit.

To try it: bun test test/finishing-skips.test.ts test/finishing.test.ts test/rebase-lane.test.ts.

🤖 Generated with Claude Code

Approved

Approved. The skip reasons are logged once per pull, and the tick line now reads finishing="queued Q, in flight F, skipped S: why×k". The new test file covers each reason, the "said once" rule, and a changed reason being said again for that pull only. The three old assertions were updated because they checked the format this issue replaces. This is a server-side log and tick change with no page or keyboard surface, so there is nothing for the phone, keyboard or no-JS checks to catch. I did not run the tests or load the preview.

Two things I would do next:

  1. Held pulls now count in conflicted N on the lane and on the /flow waiting list, where they were silent before. Say so in the issue so the steward does not read the rise as new conflicts.
  2. The reason string is joined with , and ×, so a reason containing a comma is ambiguous to a parser. Have the steward read the tally from a structured field, or keep reasons comma-free.

The long PLANNING.md line could be rewrapped, but that is cosmetic.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs