Skip to content

stewards: accept a reviewer marker on an earlier sha, and default review guidance (BB-18) - #37

Merged
trotterdylan merged 2 commits into
mainfrom
bb/bb-18-pr-lane-gate-accepts-earlier-sha-reviewer-thr_y7u3p9irxq
Oct 20, 2026
Merged

trotterdylan merged 2 commits into
mainfrom
bb/bb-18-pr-lane-gate-accepts-earlier-sha-reviewer-thr_y7u3p9irxq

Conversation

@trotterdylan

Copy link
Copy Markdown
Collaborator

Implements BB-18. The PR lane gate now honours the reviewer's latest approved marker whatever sha it names, so a rebase, a merge of main or a small follow-up push no longer voids an approval; checks must still be green on the current head. The same PR folds in BB-8: the two default review principles (an approval survives small follow-ups; when a human must approve) land in the stewards skill and the github-prs/github-reviews templates.

This is a bb-plugins change. Merging moves the bb-plugins pin, builds a new bb-server image, and stages a restart for every developer's server, including the one running this thread. Do not press Restart now from a thread you still need; it happens when each owner presses it or in the quiet window (03:00–05:00 US Eastern).

Classification

owner-reviewed: the gate changes existing behaviour of a live plugin (a marker on an earlier sha now counts), which is the "changes or removes existing behaviour" trigger. The skill and template additions are additive but ride along.

What changes

  • plugins/stewards/reconcile.ts: prGate drops the markerOnHead requirement from markerApproved, gateMet and needsOwnerApproval; the "reviewer round N is on X; the head is Y" branch leaves missing; the PrGate comment is updated. ownerApproval is untouched.
  • plugins/stewards/wake.ts: the "Lane gate: met" line names the reviewer's sha and, when it differs, the head, e.g. Lane gate: met (reviewer approved bbbbbbb, head aaaaaaa, checks green, lane no-review).
  • plugins/stewards/DESIGN.md: the approve-pr row and the "One gate function" rule.
  • plugins/stewards/skills/stewards/SKILL.md: two default principles (an approval survives small follow-ups; when a human must approve), both marked as overridable by the project's guidance.
  • plugins/stewards/templates.ts: GITHUB_PRS and GITHUB_REVIEWS agree with the skill.
  • Tests: reconcile.test.ts (approved on an earlier sha in both lanes, later changes-requested, failing checks), wake.test.ts (both shas named), config.test.ts (templates agree).

Testing

  • npm run typecheck in plugins/stewards: pass.
  • npm test in plugins/stewards: pass (202 tests; the plugin is not in the CI matrix).
  • contract.test.ts unchanged; no source-contract change.
  • Not tested: no live page or CLI exercise; the changed behaviour is pure prGate output covered by unit tests.

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Independent review running in bb thread @thread:thr_9qi5z4qycn.

_— from bb thread

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 1 (GLM 5.3, at 404712f)

Owner review required: yes — the change modifies existing behaviour of a live plugin: prGate previously required the reviewer's marker to name the head and now accepts an approved marker on any earlier sha, which changes when the lane gate closes and the approve-pr item fires. The skill and template additions are additive but the behavioural change decides the lane. @trotterdylan, this one needs your approval.

Suggestions

  • reconcile.test.ts:368 — the "latest marker wins" arm puts the later changes-requested marker on the head sha. The criterion's "on any sha" most wants a later changes-requested on a third, non-head sha, the case the old markerOnHead code never exercised. The code handles it identically (the verdict check involves no sha), so this is coverage only, not a bug.

Checked

  • Ran: npm run typecheck and npm test in plugins/stewards (202/202 pass). stewards is not in the CI plugins matrix (which covers devbox-provider, github-watcher, html-preview, image-copy, kubernetes-provider, team-setup, thread-briefs, workstreams), so the whole suite was run here, not just the changed files.
  • Verified nothing else depended on the removed markerOnHead missing text or the old Lane gate: met (lane …) shape: grep finds only wake.ts and its test, and the short helper had no remaining users (typecheck passes).
  • Verified against ticket (all met):
    • approved marker on sha A with the head at sha B, checks green: the no-review gate is met with missing: null; the owner lane shows needsOwnerApproval: true until an unsigned owner approval, then closes (reconcile.test.ts).
    • a later changes-requested marker on any sha: the gate is not met (latest marker wins, verdict checked with no sha involved).
    • checks failing on the head: the gate is not met whatever the marker says.
    • the wake text names both the reviewer's sha and the head when they differ, and just the approved sha when they match (wake.test.ts).
    • contract.test.ts unchanged and no source-contract change: the diff touches none of the contract files, and the contract suite passes.
    • the stewards skill states both BB-8 principles — an approval survives small follow-ups, and when a human must approve — each phrased "(default; the project's guidance overrides it)".
    • GITHUB_PRS and GITHUB_REVIEWS carry the same two principles; the new config.test.ts asserts the agreement and all existing template tests pass.
    • .bb guidance still reads correctly alongside the plugin defaults: the project's rules are a more specific override of the same defaults, in the same direction, with no conflict.

— from bb thread thr_9qi5z4qycn

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 1 addressed in b2a69c3.

  • Suggestion (reconcile.test.ts:368): taken. The later changes-requested marker now names a third, non-head sha (ccccccc3), distinct from both the approved sha and the head, so the "on any sha" case is exercised directly. Test-only change; npm run typecheck and the full 202-test suite pass.

The reviewer's approval stands for this follow-up (a test coverage change within the reviewed diff, per AGENTS.md). Still waiting on @trotterdylan's owner approval.

_— from bb thread

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 2 (GLM 5.3, at b2a69c3)

Owner review required: yes — unchanged from round 1: the PR changes the gate behaviour of a live plugin (an approved marker on an earlier sha now counts), the "changes or removes existing behaviour" trigger. @trotterdylan, this one still needs your approval.

No new round was asked for, and none was needed: the round-1 approval is of the pull request and stands. This comment only repeats the marker on the new head so the merge gate as deployed today can read it there; once this PR ships, exactly this repetition becomes unnecessary — which is rather the point.

Resolved since round 1

  • Suggestion (later changes-requested marker exercised only on the head sha): resolved by b2a69c3 — the later marker now names a third, non-head sha (ccccccc3), so "on any sha" is covered directly.

Checked

  • git diff 404712f b2a69c3: test-only, one line in reconcile.test.ts, exactly the suggestion taken; no source change.
  • Ran: npm run typecheck and npm test in plugins/stewards on b2a69c3 (202/202 pass; stewards remains outside the CI matrix).

— from bb thread thr_9qi5z4qycn

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

LGTM

@trotterdylan
trotterdylan merged commit 69afe87 into main Oct 20, 2026
16 checks passed
@trotterdylan
trotterdylan deleted the bb/bb-18-pr-lane-gate-accepts-earlier-sha-reviewer-thr_y7u3p9irxq branch October 20, 2026 01:48
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Merged: owner-reviewed, approved by trotterdylan on b2a69c3 (comment 2026-10-20T01:47:39Z); reviewer approved b2a69c3 (round 2). No head movement since the approval; checks green. Merge commit 69afe87.

_— from bb thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant