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

Raise or lower a limb against its siblings, and the crew takes ready work in that order #1019

Closed opened this in answer to
Closed without merging

Raise and Lower move a limb one place among its siblings, and the crew's ready order follows that place. I changed nothing this time. The parked check failure was test/capacity.test.ts, which this change doesn't touch.

Notes

stopped closed without shipping deploy 7fac904

opened this

Raise and Lower move a limb one place among its siblings, and the crew's ready order follows that place. I changed nothing this time. The parked check failure was test/capacity.test.ts, which this change doesn't touch.

I couldn't confirm what failed in the forge's run:

  • Without the sandbox: test/capacity.test.ts passes (11 of 11), and so does test/limb_order.test.ts.
  • Inside the sandbox: test/capacity.test.ts fails 7 tests, on main too. The cause is an EPERM when the server tries to listen on a Unix socket.
  • Not run: tsc --noEmit and the full sharded gate. tsc stops here with "Cannot find type definition file for 'bun'", so the type check is unconfirmed. The forge's check will run both on this push.

If the check fails again, the log is what will show what actually broke.

What changed

  • Storage: a new table limb_place (migration 71) holds one number per limb, 1 for first. A limb with no place comes after the placed ones, by number, as before. The order survives a restart (tested).
  • One action: a new fleet verb place in src/fleet/verbs.ts takes raise or lower. It uses the fleet's own preview, receipt and undo. A limb already first or last shows as "unchanged".
  • Ready order: readyNow sorts first by the places of the limbs above an issue, then by what it frees, then by age. An issue beneath two limbs takes the higher one. It stays one pass over the graph, with no query per issue.
  • Page: the limbs list on /milestones and on a milestone page shows each limb in order. Someone who administers the repository gets Raise and Lower links. The link opens the existing limb preview, which shows the new order and the top five ready issues before and after.
  • API and MCP: the limb route and tool take raise and lower, as a dry run unless dryRun is false. Only a person who administers the repository can apply. A reader, a crew agent, an agent's admin token, and ro and rw tokens cannot (tested first in test/limb_order.test.ts).
  • Docs: docs/PLANNING.md and docs/MCP.md are updated.

Left out or to know

  • Looks: the before/after screenshots at phone and desktop widths are not done.
  • Removed: nothing is removed, because Raise and Lower reuse the existing limb preview, receipt and undo pages. No dependency is added.
  • Ties: a leaf beneath two limbs in the same group has the same place under both, so what it frees and then its age decide between them.
  • First move: the first move in a group writes places for all its siblings, in their current display order. From then on the siblings' order decides first, and the preview shows that change.
  • Two groups: a limb that stands in two sibling groups has one place, used in both.

Try it: open /:owner/:name/milestones/:number as an admin, choose Raise on a limb, check the preview, and apply it. Then undo it from the receipt. bun test test/limb_order.test.ts covers the same path.

🤖 Generated with Claude Code

Closes #760

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