Repository navigation
stewards: typed needs-you items with links and one-click actions (BB-15) - #36
Conversation
|
Independent review running in bb thread @thread:thr_2xwmmhsydt. — from bb thread thr_sb4r9vfamd |
Review round 1 (GLM 5.3, at ac1e7cf)Owner review required: yes — a store migration (the new BlockersNone. Suggestions
Checked
— from bb thread thr_2xwmmhsydt |
|
Round 1 response (head
— from bb thread thr_sb4r9vfamd |
Review round 2 (GLM 5.3, at ff2ed1b)Owner review required: yes — unchanged from round 1: a store migration (the BlockersNone. Resolved since round 1
Checked
— from bb thread thr_2xwmmhsydt |
|
Review gate met: reviewer approved — from bb thread thr_sb4r9vfamd |
|
LGTM |
|
Merged: owner-reviewed lane, approved by trotterdylan on — from bb thread thr_sb4r9vfamd |
Implements BB-15. Stewards gain typed "needs you" items: a structured thing the user must do, filed by the plugin from the snapshot or by a steward through
steward_report { needs }, listed on the Stewards page with a link and a one-click button, in the digest, and bybb stewards needs. The GitHub buttons (approve a pull request, merge it) run on the server as the connected user and unsigned, so they count as human actions.Classification
owner-reviewed: a store migration (the
needstable), a change tosteward_report's contract (a newneedsfield and ablockedOnvalidation),approval: menow filing an item instead of an escalation routed to the user, and server-side GitHub write actions (Approve posts a comment; Merge squash-merges as the connected user).What changes
store.ts): aneedstable, appended migration, deduplicated by (binding, kind, url) while open with a partial unique index;fileNeed/closeNeed/needs/openNeeds.approve/declineclose the gate's item in the same transaction.reconcile.ts):prGate, the build-tickets lane gate in one function — the reviewer's latest marker names the current head withapproved, every check has passed, and, in the owner-reviewed lane, the owner has approved (an unsigned approving comment or an APPROVED review by the connected user). Used by the merge button, the item the plugin files, and the wake's "Lane gate" line. PlusownerApprovalandnamesUserAsBlocker.server.ts):syncNeedsfilesapprove-spec(whenapproval: meand the gate waits),approve-pr(owner lane, marker approved on the head, checks green, no owner approval) andmerge(gate met, no worker running) on every look, and closes them when the condition no longer holds.steward_report: aneedsfield (configure,provide-secret,decide,merge) and a refusal for ablockedOnnaming the user, the owner or a human with no open item.app.tsx): "Waiting on you" lists the items with links and buttons (Approve/Decline, Approve, Merge, Provide, Done), disabled with a reason when the server cannot verify the preconditions.bb stewards needs [--all],bb stewards done <id>, and needs inlist/show.github.ts): an unsigned comment and a squash merge through the server'sghlogin via the REST API.Testing
npm testin plugins/stewards: pass (158 tests; not in the CI matrix).npm run typecheckin plugins/stewards: clean.approve-spec,configure×3,provide-secret,approve-prandmerge; the second spec approval (the user's own amendment) auto-approves and is never shown.ghlogin in tests); the REST payloads are the documented ones.