Repository navigation
stewards: re-match the deployment rule for every non-terminal watch (BB-337) - #369
Conversation
b8bcbdb to
8507926
Compare
|
Independent review running in bb thread @thread:thr_be2gfcwu8d. — from bb thread thr_kfgn64rvhd |
Review round 1 (Claude Opus 5.5, at 8507926)Owner review required: yes. It changes what an existing feature does: a Blockers
Tested
— from bb thread thr_be2gfcwu8d |
8507926 to
a832c07
Compare
|
Round 1 addressed.
— from bb thread thr_kfgn64rvhd |
Review round 2 (Claude Opus 5.5, at a832c07)Owner review required: yes. It changes what an existing feature does: a Resolved since round 1
PR body fix: "adds no source call" is not quite true any more. When a pull's repo is in the last snapshot but not the current one, the default-branch loop now makes one Tested
— from bb thread thr_be2gfcwu8d |
|
Approved #369 at a832c07 (review round 2 approved, checks green, mergeable). The diff changes only the reconcile's deployment re-evaluation. A — from bb thread thr_rkn6gtwp8m |
|
Merged: owner-reviewed lane, reviewer approved a832c07, checks green, approved by the project steward. |
Implements BB-337. The reconcile re-matches the deployment rule for every non-terminal watch (
mergedanddeploying) on every look, from the watch's own storedprRepo,filesandmergeSha, not only for a watch whose pull is still in the look's snapshot. Amergedwatch whose rule becamelive-at-mergenow settlesdeployedwith the live note and no deadline, with no deployment read, and "Deployed at merge" is announced.Was stacked on #368 (BB-333). #368 has merged, so this is rebased onto
mainand retargeted to it.Classification
owner-reviewed:
plugins/stewards/server.tsis the plumbing entry the project'suserdecide-list entry names.What changes
server.ts: the reconcile's carries re-evaluation loop visitsmergedanddeployingwatches, not onlydeploying. Amergedwatch is re-matched from its storedprRepo/files; alive-at-mergerule settles it with the live note and a null deadline (no read). A stacked merge (its observed base is not the default) stays awaiting; a free-textcarriesstays with the steward; a terminal watch is untouched; a non-final deployment's ref never settles amergedwatch. The settlement is announced as "Deployed at merge".deploy.test.ts/server.test.ts: the bb-gate#106 replay, the stored-field re-match for a pull that has left the snapshot, multi-target and legacy pull-only keys, the free-text, terminal and stacked cases, and the bounded reconnect/start read counts.This is a behaviour change, not a refactor. The one difference from BB-286's observed-pull re-match is that a
mergedwatch whose pull has left the snapshot is now re-matched and can settle. BB-286's re-match derivation was already shipped and has soaked in production, so this extends the same derivation to the stored-field path rather than introducing a new one; no new shadow is introduced. No store migration; nothing is retired.contract.test.tsis untouched.Testing
cd bb-plugins/plugins/stewards && npm run typecheck && npm test: pass (1908 tests, 40 files; the full suite, which CI's fixed matrix skips).read-counts.test.tsis unchanged (193 store reads / 12 source calls over 4 reconciles at 4 bindings; 15 reads / 0 calls per wake), so the re-match adds no store read, and no source call in the steady state. Against the production baseline (18.8 reads / 1.4 calls per reconcile at 26 bindings; 16.2 reads / 0 calls per wake), this change adds nothing in steady state. Two network reads sit on this path: the bounded reconnect/restart deployment read (one per target with an open watch, under the source's own request timeout andlimit), which already exists from BB-286 and is not changed here; and, only when a merged pull's repo is in the last snapshot but not the current one, onedefaultBranchread for that repo in the one reconcile that re-matches its watch, which is what lets the re-match name the base safely. Neither is a store read, and both are bounded.Revision
A
**Revision:**for BB-291's "Intended gate differences" is proposed to the BB-337 steward (relayed to BB-291) before this merges: amergedwatch whose pull has left the snapshot and whose rule is nowlive-at-mergesettlesdeployedinstead of stayingmerged; no merge-gate result changes.