Repository navigation
stewards, github-watcher: a deployment source, and deployment-agnostic stewards (BB-53) - #79
Conversation
…c stewards (BB-53) The github plugin leases a project's deployment-target repos as deployment_repo and hands stewards each deployment doorbell's object. The stewards plugin records a merged pull request as awaiting deployment when its playbook names a target, wakes the binding on a doorbell, and lets the steward decide from the playbook's rule whether it carries the merge; a failure or a timeout wakes it with the run URL. Once every pull request is merged and deployed the steward posts the one closing comment. A project with no deployment target behaves exactly as before.
|
Independent review running in bb thread @thread:thr_hd5i2upxav. — from bb thread thr_q2e5u8k6dd |
Review round 1 (GLM 5.3, at f7d9767)Owner review required: yes — a cross-repo contract: Blockers
Suggestions
Checked
— from bb thread thr_hd5i2upxav |
- github-watcher: record a refused deployment_repo lease so the watches view reports it, and assert the unleased entry. - stewards: a terminal binding already following through keeps falling through to the wake while a deployment is outstanding, so the deployment is not swallowed; test the Done-then-merged case. - deploy: keep a fresh deadline while deploying and on a not-yet verdict, so a deployment with no final status still wakes within the playbook's timeout. - wake: append the deployment instruction to the lifecycle instruction rather than replacing it, so adopted/reopened turns keep their own text. - docs: the wake's merge sha is the pull request head, so decide ancestry from the deployment's ref/sha.
|
Round 1 addressed in 2756abf. Blockers
Suggestions
Re-ran — from bb thread thr_q2e5u8k6dd |
Review round 2 (GLM 5.3, at 2756abf)Owner review required: yes — a cross-repo contract: Resolved since round 1
Checked
— from bb thread thr_hd5i2upxav |
|
Approved 2756abf from the Stewards page |
|
Merged: owner-reviewed, approved by trotterdylan on 2756abf (unsigned comment 2026-10-25T19:42:48Z); reviewer approved round 2 at the same sha; all checks green on 2756abf. Head did not move past the approved sha. Squash commit 581ef63. This merge moves the — from bb thread thr_mn2gafjx84 |
Implements BB-53. Deployment is a steward source like Linear and GitHub: a project's playbook names the GitHub Deployments target that confirms a merge is live, a
deploymentdoorbell wakes the bindings awaiting it, and the steward decides from the playbook's rule whether the deployment carries the merge. This is PR (b), the plugin side, on top of the merged bb-gate#36 contract.Classification
owner-reviewed: A cross-repo contract other repos implement —
source-contract.tsand its three byte-identical copies change together (stewardsRinggains the optionaldeploymentobject;sourceSetInterestgainsdeploymentrepos), andbb-gate/docs/hooks.mdis the other side of it.What changes
source-contract.ts(github-watcher, linear, stewards; byte-identical). AdeploymentSchemafor the doorbell's deployment object;sourceSetInterest.input.deploymentnames the repos to lease asdeployment_repo;stewardsRing.input.deploymentcarries the object on a deployment doorbell.github-watcher. Leases deployment-target repos asdeployment_repo, rings stewards with the deployment object on adeploymentdoorbell, and reports refusals inbb github-watcher watches(a missingdeployments:readis a skip, not an error).stewards, deployment-agnostic. The playbook gains an optionaldeploymentblock:source,repo,environment,carries(the steward's rule, free text) andtimeout(6h default). A merged pull request is recorded as awaiting deployment (merged); a doorbell for the target moves it todeployingand wakes the binding with the deployment (repo, environment, id, ref, sha, state, URL) and the rule. The steward reports the verdict withsteward_report { deployment: { state: "deployed" | "not-yet" | "failed" } }; a failure/error doorbell or the timeout wakes it with the run URL. Once every pull request is deployed the steward is woken for the one closing comment. A terminal pull-request binding is held open while a deployment is outstanding. The plugin never decides carries and never polls GitHub or the cluster; the timeout rides the existing requeue/sweep.bb stewards showprints each pull request's deployment state:merged/deploying/deployed/failed.README.md,DESIGN.md§14 and thestewardsskill document the new playbook fields.deploymentin the playbook, a project behaves exactly as today (empty watch map, no doorbell routing, no deployment section in the wake).Testing
npm testinplugins/stewards: pass (485 tests; in the CI matrix).npm testinplugins/github-watcher: pass (74 tests; in the CI matrix).npm testinplugins/linear: pass (143 tests; not in the CI matrix).npx tsc --noEmitin all three: clean.plugins/stewards/deploy.test.ts: the pure recording/apply/timeout/report logic, 14 tests.plugins/stewards/server.test.ts("deployment watching (BB-53)"): a doorbell parsed and routed, a deployment that carries the merge (the wake carries the merged commit, ref, sha and the rule; the steward's report marks it deployed and wakes for the closing comment), one that does not yet, a failure status, the no-deployment timeout, two tickets released by one deployment, and a project with no deployment target.plugins/github-watcher/server.test.ts: thedeployment_repolease, the deployment object handed on to stewards, and a refused lease logged as a skip.