Repository navigation
stewards: a binding never ends with open work; handoff and re-homing (BB-386) - #428
Conversation
|
Independent review running in bb thread @thread:thr_8b3d2rxact. — from bb thread thr_pdnrztk8w4 |
Review round 1 (Claude Opus 5.5, at 7ecc94b)Owner review required: yes — a store migration (the new Blockers
Suggestions
Tested
— from bb thread thr_8b3d2rxact |
…, fresh re-homing, teammate exclusion)
|
Round 2 pushed at 2d3e221.
— from bb thread thr_pdnrztk8w4 |
Review round 2 (Claude Opus 5.5, at 2d3e221)Blockers
Resolved since round 1
Tested
— from bb thread thr_8b3d2rxact |
|
Round 3 pushed at 477fc77.
— from bb thread thr_pdnrztk8w4 |
Review round 3 (Claude Opus 5.5, at 477fc77)Blockers
Resolved since round 2
Tested
— from bb thread thr_8b3d2rxact |
…386 review round 3)
|
Round 4 pushed at 15cbd33.
— from bb thread thr_pdnrztk8w4 |
Review round 4 (Claude Opus 5.5, at 15cbd33)Owner review required: yes — a store migration ( Resolved since round 3
Tested
Looks good. — from bb thread thr_8b3d2rxact |
|
Approved bb-plugins#428 at 15cbd33, with no added limits. The two new tables are appended at the end of MIGRATIONS and are create-if-not-exists, so they are safe on a live store. The rest is stewards code outside the gate, approval, roles and ready-gate modules. The spec-approval limits hold: stacked and held-behind bindings are listed but never block an ending, and handOff and adoptPull refuse a PR this server did not open. An approval does not move with a handed-off PR. Reviewer round 4 approved this head and checks are green. — from bb thread thr_rkn6gtwp8m |
|
Merged: owner-reviewed lane, reviewer approved 15cbd33, checks green, approved by the project steward. |
…429) Implements [BB-386](https://linear.app/bit-complete/issue/BB-386) fix 4. When the project steward asks the owner to merge a pull request whose `prGate` is already met and whose decide list routes it to the project steward, the plugin marks the item as a workaround and attaches the gate's verdict, so the owner sees "gate met: no binding can merge" instead of a made-up reason. The item is never refused: the owner still receives it, marked. It covers a forwarded escalation and the project steward's own `ask`. > A merge to `bb-plugins` moves the `BB_PLUGINS_REF` pin, builds a new `bb-server` image, and stages a restart for every developer's server. The server restarts when the developer presses Restart now, or in the 03:00–05:00 quiet window. Sibling PR: fixes 1–3 landed in #428. ## Classification owner-reviewed: the change is in the stewards plugin's escalation routing — it changes what reaches the user from the project steward. It touches no lane, gate rule or approval handling. ## What changes - `need-parts.ts`: `mergeWorkaroundParts` builds the marker and the gate verdict, or null when the gate is not met or the decide list routes the pull request to the user. - `server.ts`: `mergeWorkaroundFor` finds the named pull request in the binding's snapshot, reads its gate through the single `assessedGate` site, and attaches the marker to the forwarded question (and the project steward's own `ask`). ## Testing - `npm run typecheck`: pass. - `npx vitest run`: pass (2347 tests; the stewards suite is not in CI's matrix). - New tests in `server.test.ts` cover fix 4: the forwarded item is still delivered to the owner and carries the marker and verdict; no marker when the gate is not met; no marker when the decide list routes it to the user; and the project steward's own `ask` is marked too. - `readability.test.ts` guards the shown `why`/`details`.
Implements BB-386. A steward binding no longer ends while it holds open work: the
ownDoneshortcut inbeginEndingis blocked by an open pull request the binding opened, a running worker, an open escalation, need or typed wait, so the binding takes its wrap-up wake, which names each item and defaultsfollowThrough.steward_report { handOff }and the project steward'ssteward_update { adoptPull }move a pull request to another binding, recorded in a newpull_handoffstable thatpullBelongsToTicketreads first, so the opener stops owning it and the target files the Merge item. Reconcile re-homes an open pull request whose owning binding ended, to an open binding whose ticket the pull request body fixes or closes, else to a project-steward need naming it. The ticket playbook templates state the rule in one paragraph.Sibling PR: fix 4 (the project steward cannot invent an owner gate for a gate-met pull request) follows in its own owner-reviewed PR after this one is merged or at least opened.
Classification
owner-reviewed: the change is the stewards plugin outside its authority seams (
plugins/stewards/server.ts,templates.ts,store.ts); it does not touch the gate, approval, roles or ready-gate modules.What changes
store.ts: apull_handoffstable (one row per lowercased pull key) withhandOffPull/pullHandoff, cached in memory; the migration is appended at the end and its hashes are inmigrations.snapshot.json.server.ts:openWorkFor(open own pull requests, running workers, open escalations, needs and a typed wait);beginEndingrefuses theownDoneshortcut while open work exists and defaultsfollowThrough; the wrap-up wake names every open item plus any stacked/held bindings; a wrap-up report withoutfollowThroughkeeps it on while open work remains;followThroughRanOutfiles adecideneed naming the orphans instead of a quiet end;steward_report { handOff }andsteward_update { adoptPull };rehomeOrphanedPullsruns in the sweep.templates.ts: the Linear, local and GitHub ticket playbooks state the rule in one paragraph.Testing
npm run typecheck: pass.npx vitest run: pass (2337 tests; the stewards suite is not in CI's matrix).server.test.tscover acceptance criteria 1–5 and the template paragraph: the second open pull request keeps the bindingendingwithfollowThroughand is named in the wake;ownDonestill ends with no open work;handOffandadoptPullmake the opener foreign and the target not; a wrap-up report that does not settle the pull request keeps follow-through, and the overdue path names it; re-homing to a fixing binding and to a project-steward need.store.test.tsandread-counts.test.tsupdated for the appended migration group and the three extra cached handoff reads.