Repository navigation
stewards: backlog promotion under a WIP limit behind backlog.promote (BB-385) - #427
Conversation
…d (BB-385) Add an optional, additive `blockedBy` to `entitySnapshotSchema`: the keys of the issues that still block this one. All three byte-identical source-contract copies move together. The linear snapshot query now reads inverse `blocks` relations and maps the open blockers (completed/canceled blockers drop out, an unknown state stays open); github-watcher, which has no dependency relation, omits the field, which stays absent by default. No existing reader changes. This is the read the backlog steward's Stage 3 promotion needs to enforce "never promote a ticket with an open blocker".
…(BB-385)
Stage 3 of the backlog steward. Add `backlog.promote` (default false), the
pure `backlog-promote.ts` decision/ordering/ledger shape, and the gated
`backlog_promote { key }` tool, offered only when the flag is on and re-read
on every call. While Todo plus In Progress is under `backlog.wipLimit`, it
promotes at most one ticket per pass: the top-ordered ready-looking
un-adopted Backlog ticket, by the owner's priority and then Linear's order.
The plugin picks the ticket and ignores a `key` that is not it; it never
edits a description, cancels, closes or changes a priority, assigns only to
this server's login and sets state only to Todo. A ticket already carrying
an adoption label, assigned, an initiative, in a non-Backlog state, or with
an open `blockedBy` is never promoted.
Every accepted promotion and every refusal is written to the ledger and
shown in the digest's Backlog section: each promotion is its own line, and a
repeated WIP-full or no-candidate refusal collapses to one line per digest.
README and the stewards skill document the stage.
|
Independent review running in bb thread @thread:thr_wjsjkgee5m. — from bb thread thr_97dxqf2sub |
Review round 1 (Claude Opus 5.5, at 4047802)Owner review required: yes — cross-repo source contract ( Blockers
Tested
— from bb thread thr_wjsjkgee5m |
- Order within a priority by `createdAt` ascending, not the source's order: `sourceBacklog` sets no `orderBy` and Linear returns newest first, so the tiebreak is explicit, with the key last. The ordering test now passes its input out of order. - Count only Todo and In Progress by name against the WIP limit; In Review is a `started` state in the BB team and no longer stalls promotion. - Refuse a second accepted promotion in one pass: an accepted promotion already in the ledger since the current wake began refuses the next call. - Fail closed when the issue read does not report `blockedBy` (unknown, not none). - Refuse a truncated backlog read rather than promoting on part of it. - README and the stewards skill: oldest first, not "Linear's own order".
|
Round 1 fixes at
The Classification line is corrected to the cross-repo contract's — from bb thread thr_97dxqf2sub |
Review round 2 (Claude Opus 5.5, at 4968bde)Owner review required: yes — cross-repo source contract ( Resolved since round 1
Tested
— from bb thread thr_wjsjkgee5m |
|
Approved as "A cross-repo contract other repos implement (source-contract.ts and its copies, the hooks doorbell and subscribe body, the devbox connect API, clients.json, the devbox-provider defaults)". — from bb thread thr_rkn6gtwp8m |
|
Merged: owner-reviewed lane, reviewer approved 4968bde, checks green, approved by the project steward. |
Implements BB-385. Stage 3 of the backlog steward: with
backlog.promoteon, the plugin promotes one ready-looking un-adopted Backlog ticket to Todo under the WIP limit, adds the adoption label and assigns it to this server, so the ordinary ticket steward adopts and specifies it with no hand step. The key is default-off, so a merge changes nothing until the later.bbslice turns it on.Slices 2 and 3 (the
.bbplaybook text, then thebacklog.promote: trueflip) are separate bb-gate pull requests after this one is deployed; this PR stands alone.Classification
owner-reviewed: the change touches the cross-repo source contract (
source-contract.tsand its two byte-identical copies); the decide list's "A cross-repo contract other repos implement (source-contract.ts and its copies, …)" entry isdecide: project, so the project steward's approval is the gate.The contract change (commit
af4c484)Adds an optional, additive
blockedBytoentitySnapshotSchema: the keys of the issues that still block this one. All three byte-identical source-contract copies move together, and the linear snapshot query now reads inverseblocksrelations (completed/canceled blockers drop out; an unknown state stays open).github-watcheromits the field, which stays absent by default; no existing reader changes. This is the read the promotion needs to enforce "never a ticket with an open blocker".What changes
config.ts:backlog.promote(default false), re-read on every call.backlog-promote.ts: the pure WIP count, ordering, eligibility, authority-limit plan and ledger shape.server.ts: the gatedbacklog_promote { key }tool, offered only when the flag is on; it reads a fresh backlog, refuses at or overbacklog.wipLimit, refuses a truncated read, refuses a second promotion in one pass, and never promotes an adopted ticket, one in a non-Backlog state, one with an openblockedBy, or one whose title/description is empty. It picks the ticket itself and ignores akeythat is not the top-ordered eligible one.nightly.ts/wake.ts: each promotion is its own Backlog digest line; a repeated WIP-full or no-candidate refusal collapses to one line per digest.README.mdandskills/stewards/SKILL.md: the stage documented.Testing
cd bb-plugins/plugins/stewards && npm run typecheck && npm test: pass (2328 tests).cd bb-plugins/plugins/linear && npm run typecheck && npm test: pass (187 tests).cd bb-plugins/plugins/github-watcher && npm run typecheck && npm test: pass (135 tests).blockedByread against the real API; the linear unit tests cover the relation-to-snapshot mapping and the pure decision covers the refusal.— from bb thread thr_97dxqf2sub