Repository navigation
stewards, github-watcher: a deployment is re-read after a non-final status; a merged watch is re-matched (BB-286) - #315
Conversation
|
Independent review running in bb thread @thread:thr_h87vqnkazd. — from bb thread thr_igfqusktzu |
57a6daf to
65cbc75
Compare
Review round 1 (Claude Opus 5.5, at 08cf33f)Owner review required: yes. ProductThe PR adds three catch-ups for a dropped deployment doorbell (a re-read after a non-final status, a ring on reconnect, and a debounce keyed by state). It also re-matches a stored watch against the current playbook. Today the only cover for a missed doorbell is BB-59's read on the half-hourly sweep, which is the 19-minute gap the ticket describes. The scope matches the ticket: no replay in hooks, no change to the sweep interval, and Blockers
Suggestions
Tested
— from bb thread thr_h87vqnkazd |
|
Round 1 addressed in 35c9392.
Tests: — from bb thread thr_igfqusktzu |
Review round 2 (Claude Opus 5.5, at 35c9392)Owner review required: yes. Resolved since round 1
Tested
— from bb thread thr_h87vqnkazd |
|
Approved 35c9392 from the Stewards page |
…tatus; a merged watch is re-matched (BB-286)
…e deadline (BB-286 review round 1)
35c9392 to
548f3d7
Compare
343a297
into
bb/bb-285-open-pr-is-not-a-wake-source-gate-met-pr-thr_2dt2h2aap5
|
Merged: owner-reviewed, approved by trotterdylan on 35c9392 (comment 2026-11-10T11:22:00Z), reviewer approved 35c9392, checks green, escalated by the reviewer to the owner. merge commit 343a297 This is a stacked merge into — from bb thread thr_2856hqrvtd |
…tatus; a merged watch is re-matched (BB-286) (#315) * stewards, github-watcher: a deployment is re-read after a non-final status; a merged watch is re-matched (BB-286) * stewards: poll a non-final deployment until it settles, bounded by the deadline (BB-286 review round 1)
…BB-285) (#314) * stewards: an open PR is not a wake source; gate-met stalls escalate (BB-285) * stewards: address review round 1 (BB-285) * stewards, github-watcher: a deployment is re-read after a non-final status; a merged watch is re-matched (BB-286) (#315) * stewards, github-watcher: a deployment is re-read after a non-final status; a merged watch is re-matched (BB-286) * stewards: poll a non-final deployment until it settles, bounded by the deadline (BB-286 review round 1)
…287) (#316) Implements [BB-287](https://linear.app/bit-complete/issue/BB-287/stewards-stacked-pull-requests-are-visible-for-their-whole-life-not). Stacked pull requests are visible for their whole life, not only once the stacked pull request's gate is met. > **Merge note:** this PR is stacked on the BB-286 branch (#315), not `main`, so it is not a `bb-plugins` `main` merge yet. When the stack lands on `main` (with #312) the merge moves the `bb-server` pin, builds a new image and stages a restart for every developer's server. Base PR: #315. ## Classification owner-reviewed: `plugins/stewards/server.ts` and `wake.ts` are the plumbing entry the project's `user` decide-list entry names. ## What changes - `syncNeeds` reads `pullBaseDisposition` for every open own pull request, not only under `if (g.gateMet)`, so the "Retarget" wake fires on a base merge for a stacked pull request that is not yet gate-met (acceptance criterion 1). - A binding whose own pull request is the base of an open pull request is told in its wake (a `BASE OF:` change and a standing line) and in `bb stewards show` (a new `stacked_pulls` binding field) (criterion 2). - A stacked pull request GitHub closed unmerged because its base branch is gone wakes its steward with "restore the branch at `<sha>`, reopen or replace, approvals carry" (criterion 3, a new `stacked_recovered` field, once per pull request). - `plugins/stewards/skills/build-tickets/SKILL.md`: never delete a branch that is the base of an open pull request, and the `gh pr list --base <branch> --state open` check. This complements BB-282's `.bb` edit without reintroducing `--delete-branch`. - `github.ts`: `openPullsByBase`, `branchExists`, and `pullByHead` now returns the base branch's last `headSha` for the recovery text. Criterion 4 (the by-hand `delete_branch_on_merge` check and the `.bb/AGENTS.md` line) is out of scope for this PR: it is a separate `bb-gate` PR, opened only after bb-gate#110 merges. ## Testing - `cd plugins/stewards && npm test`: pass (1507 tests; 3 new BB-287 tests, not in the CI matrix). - `cd plugins/stewards && npm run typecheck`: pass. - Not tested: the by-hand `delete_branch_on_merge` behaviour (criterion 4), which is a separate bb-gate PR.
Implements BB-286. No deployment doorbell is load-bearing, and a merged watch follows the current playbook. The doorbell and read paths schedule a re-read after a non-final status; github-watcher's reconnect sweep rings stewards per deployment repo; the deploy debounce keys on deployment id plus state; and
recordMergedre-matches an existingmerged/deployingwatch against the current rule, settling a now-live-at-mergewatch with no deployment read.Stacked on #314 (BB-285): branch cut from its head, PR base is its branch. Do not merge before it.
Classification
owner-reviewed:
plugins/stewards/server.tsis the plumbing entry (bigDecisionsowner trigger).What changes
plugins/stewards/server.tsscheduleReconcile, so a dropped final doorbell is caught within the existing debounce rather than the half-hourly sweep.deploy:debounce key includes the deployment's state, so anin_progressfollowed by asuccessinside the window runs both closures and the newer one wins.onRingtreats a GitHub repository ring (no#) as a reconnect re-check: every open binding whose playbook names a deployment target for that repo is reconciled, which runs the BB-59 deployment read.recordMergedre-matches to a live rule is announced asDeployed at merge.plugins/github-watcher/server.ts: theconnectedsweep rings stewards once per repo with a deployment interest, after the watch sweep.plugins/stewards/deploy.ts:recordMergedre-matches an existing watch against the playbook's current rule using its storedprRepoandfiles. When the matching rule is nowlive-at-mergeand the merge is on the default branch, it settlesdeployedwith the live note and a null deadline; no deployment read happens. A stacked merge stays awaiting.source-contract.ts; no hooks-service replay.Testing
plugins/stewards:npm run typecheckpass;npm testpass (1504 tests; in the CI matrix).plugins/github-watcher:npm run typecheckpass;npm testpass (100 tests; in the CI matrix).mergedwatch settles when the playbook's rule becomeslive-at-merge, indeploy.test.tsandserver.test.ts; a repository ring re-reads that repo's deployments; github-watcher rings each deployment repo on the connected sweep and hands stewards the newest of two statuses inside its debounce.