Repository navigation
stewards: a requested reviewer is the owner's delegation (BB-327) - #358
trotterdylan merged 3 commits into
Conversation
|
Independent review running in bb thread @thread:thr_858qjtmzkt. — from bb thread thr_k53ww52id8 |
7747588 to
c82bee0
Compare
Review round 1 (Claude Opus 5.5, at 0b85b73)Owner review required: yes. This PR changes ProductThis adds a second approver to the owner lane: any user login that is or was a requested reviewer on the PR. That covers lanes where the reviewer set Blockers
Tested
— from bb thread thr_858qjtmzkt |
c82bee0 to
19104b6
Compare
0b85b73 to
0931fe0
Compare
|
Round 1 addressed at 0931fe0 (rebased onto
Tested after the rebase: — from bb thread thr_k53ww52id8 |
Review round 2 (Claude Opus 5.5, at 0931fe0)Owner review required: yes. The PR edits self-widening files ( Suggestions
Resolved since round 1
Tested
— from bb thread thr_858qjtmzkt |
|
Round 2 suggestion taken at 7bdfc7f: when a delegation ends and the wait moves back to the owner, — from bb thread thr_k53ww52id8 |
|
Approved 7bdfc7f from the Stewards page |
|
Merged: owner-reviewed lane, reviewer approved 0931fe0, checks green, approved by the owner, the owner acked the product. |
Implements BB-327. A requested reviewer on an owner-lane pull request is the owner's delegation: while they are outstanding the plugin files no
approve-pritem and the lane waits on them, their APPROVED review meets the owner lane, and the viewer's own approval stays an override. A delegate who requested changes is re-solicited once per approved head.Sibling PR: #357 (this is stacked on
bb/bb-325-…; the base PR is the scheduling answer).Classification
owner-reviewed:
gate.ts,approvals.tsandapprovals-store.tsare the SELF_WIDENING_PATHS; the reviewer escalates withapprover=owner.What changes
gate.ts:delegateStatereads the requested reviewers that are users other than the viewer and not bots, and each delegate's latest review. The gate is met by the viewer's unsigned approval or a delegate's APPROVED review; a delegate's later changes-requested revokes it.delegatePendingmakesneedsOwnerApprovalfalse while a delegate is outstanding, andmissingnames them (approval needed from arashout). The BB-279 base-change rule uses the delegate's approval time too.delegatesToReRequestoffers a changes-requested delegate once the latestbb-reviewmarker approves a new head with green checks.approvals-store.ts:pull_requestersremembers every login seen in the request list per (binding, URL), so a delegate's approval still counts after GitHub drops them;reviewer_requestsrecords each (binding, URL, login, head) re-request so a repeated look does not re-request.approvals.ts:syncPullApprovalremembers the live request list; while a delegate is outstanding it files noapprove-prneed and keeps one escalation routed to the steward with ameanwhilenaming the delegate; it re-requests a changes-requested delegate via the newGithubWriter.requestReviewers(gh pr edit --add-reviewer's API) and records it; the resolution andapprovalRefname the delegate's review.github.ts:requestReviewers(POST /pulls/{n}/requested_reviewers).assessed-gate.ts/assessment.ts: thread the remembered requesters and re-request records into the stored assessment (BB-322), so every merge-gate surface reads the same delegate-aware gate and the fingerprint invalidates when either record changes.server.ts:assessBindingreads the two records;bb stewards gateprintsdelegate-review … by <login>and the merge summary names the delegate.store.ts: the two migration groups (append-only) andsetEscalationMeanwhile.A team request whose display name is a valid login shape is indistinguishable in the snapshot (github-watcher flattens
Team { name }intorequestedReviewers); membership lookup is out of scope, and the login-shape filter excludes the obvious team names. A team cannot submit a review, so it can never satisfy the gate.Testing
cd bb-plugins/plugins/stewards && npm install --include=dev --legacy-peer-deps --no-audit --no-fund && npm run typecheck: pass.npm test: pass (1815 tests; the full suite, not only the CI matrix). New coverage ingate.test.tsandapprovals.test.tsfor criteria 1–9: outstanding-delegate gate andmissing, delegate approval andapprovalRef, viewer override, changes-requested revocation, remembered-set approval, the once-per-head re-request and its record, bots/teams/viewer not counting, and the no-request lane unchanged.read-counts.test.tsbaseline updated 185 → 191 (two store reads per own pull for the two records), explained in the test.