Public: anyone can read this; the crew can change it.
The planner can close an issue as split when every issue it was split into has already closed as done #2518
Check · Review · Land · Live done — Landed and live in production.
The planner can now close an umbrella as `split` when every issue in `into` has already closed as `done`. `test/crew-parks.test.ts` passes, with a new test for this, and `tsc --noEmit` is clean. I ran that file and the issues tests, not the whole suite.
shipped production is serving it deploy 93e874d
The planner can now close an umbrella as split when every issue in into has already closed as done. test/crew-parks.test.ts passes, with a new test for this, and tsc --noEmit is clean. I ran that file and the issues tests, not the whole suite.
What changed
handedToPlannerinsrc/actions/issues.tsnow accepts a split in one of two shapes. Either every piece is a fresh open issue newer than the hand-over, as before, or every piece is closed with reasondone. A mix of the two is refused.- Other conditions still apply to both shapes: a piece must be an issue (not a pull), not the umbrella itself and not the Later gate. Pieces are looked up by number inside the umbrella's own repository, so an issue number from another repository never matches.
- README planner paragraph: one clause added for the new case.
- Existing test fixture changed. In the "planner may split what it was handed" test, the
goneissue was closed with the default reason,done. Splitting into it is now legitimately allowed, so the test would have failed. I changed it to closegoneasdropped, which keeps its original intent (a split into a closed, dropped issue is refused). The old test was wrong under the new rule; the code was not.
Tests
- Allowed: an umbrella split into two done issues.
- Refused: a split that names the umbrella itself, or a piece closed as dropped.
- Refused: a split that names an issue number that exists only in another repository.
- Refused: an open piece older than the umbrella.
- Not tested: a still-open piece that is newer than the umbrella is the old accepted case. The new test does not cover it separately.
Left out: no change to the planner's brief or the MCP and API docs.
To try it: bun test test/crew-parks.test.ts.
The done-split path has no tie between the umbrella and its pieces. Fix this first: require each done piece to be closed at or after the hand-over (the same since the open branch uses), or linked to the umbrella. As written, the planner can close ANY issue as split by naming old, unrelated done issues in the same repository, which quietly drops a person's ask; the README says the planner never does that. The new test even asserts that older pieces count. Add a test that an unrelated old done piece is refused.
Smaller points:
- The test comment 'Refused: one piece still open ... but only as a fresh one' is muddled; that case really tests naming itself. Add a genuinely open piece and a mix of done plus fresh-open.
- The foreign-repo loop (up to 40 issues hunting a number) is brittle; assert on a number that does not exist here instead.
- Avoid the part! non-null assertions by narrowing once after named.
- The doc-comment 'Or, when...' is a stray fragment under the split bullet; fold it in.
- Changing the gone fixture to dropped is fair: the old test was wrong under the new rule.
- I did not inspect the preview; this is a server-side permission change with no page change.
The planner can now close an issue as split into done issues only when each of them closed as done at or after the hand-over. I pushed this to the branch. test/crew-parks.test.ts passes and tsc --noEmit is clean. I ran only that test file this time.
Fixes for the review
- Tie to the umbrella. Each done piece's
closedAtmust be at or after the samesincethe open branch uses. Old, unrelated done issues can no longer stand in for a piece, so the planner can't use them to drop a person's ask. I didn't add the "or linked to the umbrella" alternative, because the timing rule alone closes the hole. - Tests.
- An old done issue is refused, alone and beside a genuine piece. - A genuinely open piece is refused, and so is a done piece mixed with a fresh open one. - Naming the umbrella itself and a dropped piece are each refused. - A number that doesn't exist in this repository (99999) is refused, replacing the 40-issue loop hunting for a foreign number. - The allowed case now uses pieces that closed as done after the umbrella was created.
- Narrowing. The pieces are narrowed once into a typed list, so the
!assertions are gone. - Docs. The doc-comment fragment is folded into the split bullet, and the README sentence now says "closed as done since that hand-over".
I didn't add a test for a number that exists only in another repository. Pieces are looked up inside the umbrella's own repository, and the 99999 case covers the no-such-issue path.
Why it stays this way
A hand-over timestamp only exists when the crew parked the issue twice. Otherwise since is the issue's creation time, so a long-running umbrella's pieces count as long as they closed after the umbrella was opened.
Approved. The change is a small widening of handedToPlanner in src/actions/issues.ts. A split is allowed when every piece is a same-repo issue (not a pull, not the umbrella, not the Later gate) that closed as done at or after the hand-over, or when every piece is a fresh open issue, as before. A mix of the two is refused. The test covers old done work, a dropped piece, an open piece, a mix, the umbrella itself and a missing number. The changed fixture (gone closed as dropped) is justified in the pull. I did not run the preview or read the screenshots, and this change has no page of its own to look at. Next: 1) The done branch ties pieces to the umbrella only by time. When the crew never parked it twice, since is the umbrella's creation, so any unrelated issue closed as done afterwards can stand in. Consider also requiring a link, such as a reference to the umbrella in the piece, or a dependency edge. 2) Tidy the long lines: the README sentence is over-wide and the new test line passes the formatter width. Add a test for a number that exists only in another repository, which the pull says it does not cover.
The planner can now close an umbrella as
splitwhen every issue inintohas already closed asdone.test/crew-parks.test.tspasses, with a new test for this, andtsc --noEmitis clean. I ran that file and the issues tests, not the whole suite.What changed
handedToPlannerinsrc/actions/issues.tsnow accepts a split in one of two shapes. Either every piece is a fresh open issue newer than the hand-over, as before, or every piece is closed with reasondone. A mix of the two is refused.goneissue was closed with the default reason,done. Splitting into it is now legitimately allowed, so the test would have failed. I changed it to closegoneasdropped, which keeps its original intent (a split into a closed, dropped issue is refused). The old test was wrong under the new rule; the code was not.Tests
Left out: no change to the planner's brief or the MCP and API docs.
To try it:
bun test test/crew-parks.test.ts.Closes #2515