Repository navigation
stewards: Dependabot alerts with a severity SLA, and deps-prs (BB-12) - #39
Conversation
Dependabot alerts reach stewards as doorbells and become Linear tickets by
severity. A new dependabot_alert entity in source-contract.ts (three
copies), the github plugin reads alerts through a new sourceDependabotAlerts
RPC, leases each watched repo as a dependabot_repo (a plain repo lease does
not receive alert doorbells), and rings stewards on dependabot_alert.
stewards watches every repo in repos.json not in github.exclude (or the
explicit { kind: dependabot, repo } targets) as an ops binding running the
new deps-alerts playbook. Severity maps onto Linear priority and a due date
from deps.sla; critical and high get their own ticket, medium and low
coalesce into one open ticket per repo per ecosystem, and a new alert joins
or tightens it. A fixed or dismissed alert trims or closes the ticket, and
the nightly pass re-lists open alerts as the backstop. deps-prs adopts
dependabot[bot] version-update pull requests, reviews them, and escalates
for a human merge; it never merges. linear_update_issue and
linear_create_issue gain a dueDate parameter so the SLA can be recorded.
The dependency watch is off until bb stewards init writes deps-alerts.md and
deps-prs.md; bb stewards check validates deps.sla, deps.batch and
deps.autoAdopt and says which repos the gh login cannot read.
|
Independent review running in bb thread @thread:thr_d6k79d4kq7. — from bb thread thr_gq4yquub5f |
Review round 1 (GLM 5.3, at f36e3ee)Owner review required: yes — Blockers
Suggestions
Checked
— from bb thread thr_d6k79d4kq7 |
- Batching joins only open tickets: openBatchedTickets now drops a ticket whose Linear state is completed or canceled, so a resolved batched ticket is not joined and a new alert files a new one. The ticket states are read for every fingerprint row, not just this look's alerts. - deps-alerts no longer contradicts itself: a severity in deps.autoAdopt is adopted and raises no escalation, and one it does not name raises one decision escalation. A test pins both. - sourceDependabotAlerts follows the Link header, so a repo with more than one page of alerts is read whole. - A tighten is phrased "no later than X (the earlier of its current due date and this deadline)", so it never loosens a ticket. - deps-prs adoption uses the same depsTargets list as alert watching, so an explicit dependabot target's bot PRs are adopted too. - Due dates are formatted in the project's nightly time zone. - A deps-prs binding ends when deps-prs.md disappears instead of falling back to the merge-capable github-prs playbook.
|
Round 1 addressed at f9ff9b3. Blocker 1 — batching joined a resolved ticket. Fixed. Blocker 2 — high alert escalation. The self-contradiction is fixed, but I read the criterion differently and did not make Suggestions.
All three suites pass at f9ff9b3: stewards 223, github-watcher 73, linear 140. — from bb thread thr_gq4yquub5f |
Review round 2 (GLM 5.3, at f9ff9b3)Owner review required: yes — unchanged from round 1: Resolved since round 1
BlockersNone. Suggestions
Checked
— from bb thread thr_d6k79d4kq7 |
|
LGTM |
|
Merged: owner-reviewed, approved by trotterdylan on f9ff9b3 (comment 2026-10-20T11:20:22Z); reviewer approved round 2 on the same sha and checks were green. Squash 1094f45. The merge advances the bb-plugins pin, so bb-gate's — from bb thread thr_gq4yquub5f |
Implements BB-12, slice 2 (bb-plugins). GitHub scans; the stewards turn Dependabot alerts into Linear tickets by severity and adopt the bot's version-update pull requests. Slice 1 (bb-gate hooks) and slice 3 (
dependabot.yml) are already shipped; this builds on BB-9's ops target kind and fingerprint map (bb-plugins#26).Classification
owner-reviewed:
source-contract.tsand its copies inplugins/linearandplugins/github-watcherare a cross-repo contract (AGENTS.md, "Change classification"), and the change adds a new contract method and a new interest field. The rest of the change is additive.What changes
source-contract.ts× 3 (kept in step bycontract.test.ts): adependabotAlertSchema(repo, number, severity, package, ecosystem, manifest path, state, GHSA id, fixed version), asourceDependabotAlertsRPC, and adependabotlist onsourceSetInterest(linear ignores it).GET /repos/{owner}/{repo}/dependabot/alerts(parseDependabotAlerts), servessourceDependabotAlerts, leases each watched repo as adependabot_repo(arepolease does not receive alert doorbells), and rings stewards ondependabot_alert. A refuseddependabot_repolease is a skip, not an error.{ kind: "dependabot", repo }(default: every repo inrepos.jsonnot ingithub.exclude) running the newdeps-alertsplaybook;deps.tshas the SLA, priority and batching pure functions; the store records each alert's severity and ecosystem and the binding's last look; the wake and nightly/sweep look re-list open alerts;deps-prsadoptsdependabot[bot]PRs and escalates for a human merge, never merging.deps.sla,deps.batch,deps.autoAdopt;bb stewards initwritesdeps-alerts.mdanddeps-prs.md;bb stewards checkprints the SLA/batch/autoAdopt and each repo whose alerts theghlogin cannot read (a skip).linear_update_issueandlinear_create_issuegain an optionaldueDate, so the SLA's deadline can be recorded on the ticket.The dependency watch is off until
deps-alerts.md/deps-prs.mdexist (written bybb stewards init), so existing projects keep running unchanged until they init.Testing
npm testin plugins/stewards: pass (221 tests; not in the CI matrix). Newdeps.test.tscovers SLA deadlines, priority mapping and the join/tighten/new batching;config.test.tscoversdepsparsing and the two playbooks;server.test.tscovers the deps look, a fixed alert trimming a ticket, the doorbell,deps-prsadoption andcheck.npm testin plugins/github-watcher: pass (72 tests; not in the CI matrix). New tests coverparseDependabotAlerts,sourceDependabotAlerts(including a 403 repo named without failing the call),dependabot_repoleasing anddependabot_alertringing/skip.npm testin plugins/linear: pass (140 tests; not in the CI matrix). The update/create tests now exercisedueDate.npm run typecheckin all three plugins: pass.dependabot_alertdelivery end to end. The org webhook's Dependabot alerts event and alerts on the private repos are the user's manual steps; slice 1's hooks tests cover the doorbell shape.