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 #984

Closed opened this in answer to
Closed without merging

Raise and Lower now move a limb one place among its siblings, and the crew's ready order follows that place. I ran tsc --noEmit (clean) and the new tests plus the existing limb, fleet-ops, milestones, dependencies, map, MCP, schema and contract tests; all pass.

Notes

stopped closed without shipping deploy 7fac904

opened this

Raise and Lower now move a limb one place among its siblings, and the crew's ready order follows that place. I ran tsc --noEmit (clean) and the new tests plus the existing limb, fleet-ops, milestones, dependencies, map, MCP, schema and contract tests; all pass. The "Look" item is not done: I did not capture before/after screenshots at phone and desktop widths.

test/migrate.test.ts fails here with or without my change (checked with my changes stashed).

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. It survives a restart (tested).
  • One action: a new fleet verb place in src/fleet/verbs.ts takes a value of raise or lower. The row is the limb, and its value is its place. Preview, receipt and undo are the fleet's own. A limb already first or last shows as "unchanged".
  • Ready order: readyNow sorts first by the places of the limbs above an issue, top down, then by what it frees, then by age. An issue beneath two limbs takes the higher one. It is a pure function of the graph it is given, so there is no query per issue.
  • Page: the limbs list on /milestones and on a milestone page shows each limb in order. For a person who administers the repository, each limb gets a Raise and/or Lower link; the first limb has no Raise and the last no Lower. The link opens the existing limb preview page, which shows the new order and the top five ready issues before and after.
  • API and MCP: the existing limb route and tool take raise and lower, as a dry run unless dryRun is false. Applying needs an admin token held by a person; an agent can preview but never apply.
  • Tests: test/limb_order.test.ts has the refusals first (a reader, a crew agent, ro/rw tokens and an agent's admin token move nothing). It also covers the stored order, restart, the ready order, undo, and Raise/Lower on the page.
  • Docs: docs/PLANNING.md and docs/MCP.md are updated.

Left out or to know

  • Removed: no screen or control is removed. Raise and Lower reuse the existing limb preview, receipt and undo pages, and no dependency is added.
  • Equal tie-break: a leaf beneath two limbs in the same group has the same place under both, so the old tie-break (what it frees, then age) decides between them.
  • First move: the first move in a group writes places for all its siblings, by their current display order. Until then, ready order within the group was by what each issue frees; after it, the siblings' order decides first. The preview shows that change.
  • Two groups: a limb that stands in two sibling groups has one place, used in both.
  • Top-level order: top-level limbs can be moved too, since the plan's pillars are the top group.
  • Events: no extra event is emitted beyond the fleet's fleet.operated.
  • Local setup: the tests that start the server only ran with the sandbox off, because it blocks the socket listen, and the push needed the same.

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