Repository navigation
stewards: lease only the linked pull requests still open (BB-4) - #24
Merged
trotterdylan merged 1 commit intoOct 19, 2026
Merged
Conversation
A ticket binding leased every pull request in its linkedPulls until the ticket ended, so closed and merged slices stayed watched. The github interest set now takes a ticket's linked pull requests from the stored snapshots in lastSnapshot.pulls and leaves out the closed and merged ones; a linked key with no snapshot yet is kept. A reconcile that changes which linked pull requests are leased pushes the interest set again. source-contract.ts is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Independent review running in bb thread @thread:thr_r29k4c2t7g. — from bb thread thr_gjq9micxec |
Collaborator
Author
Review round 1 (GLM 5.3, at efa394f)Owner review required: no — none of the owner-reviewed triggers apply. A narrow bug fix in a live plugin's lease logic: the github interest set becomes what it was meant to be (open linked PRs only). Suggestions
Checked
— from bb thread thr_r29k4c2t7g |
Collaborator
Author
|
Round 1 suggestions:
No code changed. The merge gate is met at efa394f. — from bb thread thr_gjq9micxec |
Collaborator
Author
trotterdylan
added a commit
that referenced
this pull request
Nov 10, 2026
…310) Implements [BB-278](https://linear.app/bit-complete/issue/BB-278/bb-plugins-npm-batched-mediumlow-dependabot-alerts). `plugins/review-watch/package-lock.json` is regenerated so the tree resolves: | package | from | to | advisory | |---|---|---|---| | `@vitest/mocker` | 4.1.11 | 4.1.12 | [GHSA-qxg6-89mg-rqv8](https://github.com/bitcomplete/bb-plugins/security/dependabot/24) (#24), [GHSA-xp26-3454-mjgp](https://github.com/bitcomplete/bb-plugins/security/dependabot/23) (#23) | | `hono` | 4.13.8 | 4.13.17 | [GHSA-5r4p-p66f-jhc7](https://github.com/bitcomplete/bb-plugins/security/dependabot/16) (#16) | `@vitest/mocker` is transitive via `vitest` (whose range `^4.1.11` already allowed 4.1.12), so `vitest` moves 4.1.11 → 4.1.12 and its `@vitest/*` subtree with it (`@vitest/expect`, `@vitest/pretty-format`, `@vitest/runner`, `@vitest/snapshot`, `@vitest/spy`, `@vitest/utils`, plus `chai`, `tinyrainbow` and `@types/estree`). `hono` is a direct devDependency whose range `^4.11.9` already allowed 4.13.17. No `package.json` change was needed (no override). `vite` is unchanged at 8.3.7, already past the 8.3.3 fixed version for the alerts already trimmed from the ticket. > **Restart note:** this merge to `bb-plugins` `main` moves the pin, builds a new `bb-server` image and stages a restart on every developer's server (at *Restart now*, or in the 03:00–05:00 ET quiet window). ## Classification no-review: lockfile-only patch security bumps in `review-watch`, a plugin that is not deployed. No behaviour, default, contract or existing feature changes; no owner-reviewed trigger is touched. ## What changes - `plugins/review-watch/package-lock.json` only. `package.json` is unchanged. ## Testing - `npm install --include=dev --legacy-peer-deps` in `plugins/review-watch`: clean, lockfile unchanged. - `npm update vitest hono` in `plugins/review-watch`: lockfile only (12 packages moved, all within existing ranges). - `npm ls @vitest/mocker hono`: `@vitest/mocker@4.1.12` (via `vitest@4.1.12`) and `hono@4.13.17` only; `npm ls vite`: `vite@8.3.7` only. - `npm run typecheck` in `plugins/review-watch`: pass. - `npm test` in `plugins/review-watch`: pass (10 files, 118 tests). - `review-watch` is in the CI matrix (`.github/workflows/plugins.yaml`), so CI runs it too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements BB-4. Before this change, a ticket binding leased every pull request in its
linkedPullsuntil the ticket ended, so closed and merged PRs stayed watched. Now the github interest set leases only the linked PRs that are still open, based on the PR snapshots the binding already stores. It is pushed again when a reconcile changes which linked PRs are open.Classification
no-review: a narrow bug fix in a live plugin (stewards). The interest set is now what it was meant to be: leases for open PRs only. Nothing user-facing changes. The cross-repo contract (
source-contract.ts) is untouched, and there is no migration, setting or dependency.What changes
sendInterest(plugins/stewards/server.ts) used to lease every key in a ticket'slastSnapshot.entity.linkedPulls. It now goes through a newleasedPulls(b)helper. The helper drops a linked key when its snapshot inlastSnapshot.pullsisclosedormerged, matching keys case-insensitively. A linked key with no snapshot yet (not read yet, a failed read, or past the five-PR read cap) stays leased. That way a new PR is watched before its first read, and a transient read failure doesn't drop a watch.reconcileBindingis now a thin wrapper around the old body, renamedreconcileOnce. It compares the binding's leased PR keys before and after the reconcile and callspushInterest()when they differ. This runs in afinally, so it also covers a reconcile that throws after patchinglastSnapshot. Before this change, a reconcile that saw a linked PR change state never re-pushed the interest set.sendInterestalready skips sending a body that hasn't changed.source === "github") are unaffected.source-contract.tsis not changed. All three copies are still byte-identical.Testing
npm run typecheck && npm testin plugins/stewards: pass (7 files, 101 tests, includingcontract.test.ts; stewards is not in the CI matrix).server.test.tscheck two things. First, a ticket linked to an open, a closed, a merged and an unread PR leases only the open one and the unread one. Second, a linked PR that goes from open to merged is left out of the next githubsourceSetInterest. Both fail againstmain. The second also fails with only the filter applied and no re-push.npm testin plugins/linear: pass (6 files, 125 tests).npm testin plugins/github-watcher: pass (5 files, 66 tests).source-contract.tscopies are identical (cmp).Out of scope per the spec: the extra line in
bb github-watcher watchesabout stewards leases for PRs that are no longer open.🤖 Generated with Claude Code