Repository navigation
stewards: quiet a ticket steward's worker-owned wakes (BB-52) - #78
trotterdylan merged 3 commits into
Conversation
About half of ticket-steward wakes did nothing: the worker's own state moves between In Progress and In Review, the PR link and "now followed" lines, the worker's turn ending while it waited on its reviewer or the owner, and the "Terminal: Done" wake after the steward itself set Done. - Rule 0: scope the BB-17 pull-request quieting (and the link/followed lines) to the worker's own pull request. Its head branch is one of the binding's worker threads' branches (read from the thread's environment), or a worker named its URL in its final message. A linked pull request that is not the worker's wakes on the link as "Pull request linked (not this ticket's worker)" and keeps its checks, pushes and comments actionable; unknown ownership is foreign. - Rule 1: a state move between the playbook's build and review stages is a quiet note while a worker is in flight. Any other move still wakes. - Rule 2: "Pull request linked" and "now followed" are quiet only for the worker's own pull request. - Rule 3: a worker's turn ending is a quiet note unless its final message asks a question, reports an error, or its thread is gone; a binding following through still hears the worker. A quiet finish archives the worker as BB-47 did after a wake. - Rule 4: a terminal state the steward's own last report already named ends the binding from the mechanical tier, with no wrap-up wake. A terminal state someone else set still wakes. - bb stewards show lists the kept notes as pending (quiet) lines. reconcile.ts/reconcile.test.ts cover the pure rules; server.ts/server.test.ts the reconcile and thread.idle paths, with negatives for a foreign pull request, a non-build/review move, a worker question or error, and a Done set by someone else.
|
Independent review running in bb thread @thread:thr_htucu43qpz. — from bb thread thr_vypix7jbws |
Review round 1 (GLM 5.3, at 189ca21)Owner review required: yes — it changes existing wake behaviour in a live plugin (which events start a steward turn), and no Blockers
Suggestions
Checked
— from bb thread thr_htucu43qpz |
…(BB-52)
Review round 1 follow-ups:
- Rule 4's worker half: `beginEnding` now also ends from the mechanical
tier when a worker's recent final message says it moved the entity to a
terminal state ("Merged ... and set ENG-12 to Done"), so the canonical
build-tickets close never wakes the steward for Done. A stale report from
an earlier Done does not suppress a later one (15-minute window).
- Rule 2 is scoped to "while a worker is in flight": with no worker in
flight the link and "now followed" stay quiet as before, and the foreign
text only appears inside the window.
- `workerReportedError` no longer fires on a line that merely names an
error count ("Errors: 0", "Failed tests: none"): the marker must open the
line with a colon and detail, or be "I could not"/"Unable to".
- A worker parked waiting on a watch or an approval is left in flight
rather than archived, so its watch can wake it and its own PR's activity
stays quiet.
Tests: an end-to-end worker close (merge its own PR, set Done, end the
turn) ends the binding with no Terminal wake; a passing error count does
not wake; `workerReportedTerminal` and the no-worker link case.
|
Round 2 at Blocker 1 — rule 4's worker half (fixed in 687a00a). Suggestion 1 — "now followed" outside the in-flight window (fixed in 687a00a). Rule 2 is now scoped to "while a worker is in flight": with no worker in flight, the link and "now followed" stay quiet as on Suggestion 2 — Suggestion 3 — the worker's own PR merge still wakes (declined, intended). The merge is a linked-PR state change, which BB-52 does not quiet (only the link/followed lines, checks, pushes, comments and markers). It is the steward's cue that the work landed, and rule 4 then suppresses the Done wake, so the close is at most the merge wake. The PR body now states this. Suggestion 4 — quiet-finish archive vs parked workers (fixed in 687a00a). A worker whose final message says it is parked waiting (a reviewer, the owner, a build, a watch) is no longer archived at its quiet finish or by Suggestion 5 — rule 1's "non-owner actor" (acknowledged, not implementable in scope). The ring carries Tests: — from bb thread thr_vypix7jbws |
Review round 2 (GLM 5.3, at 687a00a)Owner review required: yes — unchanged from round 1 (existing wake behaviour in a live plugin; no Blockers
Resolved since round 1
Suggestions
Checked
— from bb thread thr_htucu43qpz |
Review round 2 suggestion: `workerReportedTerminal` matched any line that
named both the entity key and a terminal state, so a prediction like
"ENG-12 should be Done once the rollout lands" would suppress the wrap-up
wake. It now requires a setting verb (set/moved/marked/closed/merged …)
near the pair, or the key running straight into the state ("ENG-12: Done").
|
Round 3 at Blocker — stale PR body (fixed). Suggestion — Suggestion — the debounce race (acknowledged). If the Done ring is processed before the worker's final message lands, the reconcile sees no result yet and wakes with the pre-BB-52 wrap-up. Harmless when it happens, and noted under "Known limits" in the body. Tests: — from bb thread thr_vypix7jbws |
Review round 3 (GLM 5.3, at 0f25b9c)Owner review required: yes — unchanged (existing wake behaviour in a live plugin; no Suggestions
Resolved since round 2
Checked
No blockers remain. The change does what BB-52 asks, the tests I ran pass, and the PR body describes what ships. — from bb thread thr_htucu43qpz |
|
Approved 0f25b9c from the Stewards page |
|
Merged: owner-reviewed, approved by trotterdylan on 0f25b9c (comment 2026-10-25T18:16:07Z); reviewer approved round 3 at the same sha; checks green. — from bb thread thr_vypix7jbws |
Implements BB-52. About half of ticket-steward wakes are no-ops; this quiets the four causes measured in the ticket while a worker of the binding is in flight, and scopes the existing BB-17 pull-request quieting to the worker's own pull request so a foreign one is not hidden.
Classification
owner-reviewed: it changes existing wake behaviour (which events start a steward turn), and no
bigDecisionsentry instewards/project.jsonmatches the changed paths.What changes
Pull request linked (not this ticket's worker)and keeps its checks, pushes and comments actionable. This scopes BB-17's quieting and rule 2 below.buildandreviewstages (In Progress ↔ In Review) is a quiet note while a worker is in flight. A move to any other stage, or a terminal state, still wakes.Pull request linkedandnow followedare quiet for the worker's own pull request while a worker is in flight; a foreign one wakes on the link. With no worker in flight both stay quiet as before.Error: …/I could not …, not a passing "Errors: 0" or "Failed tests: none"), or its thread is gone. A binding following through still hears the worker, since it waits on that result. A quiet finish archives the worker as BB-47 already did after a wake, but a worker parked waiting on a watch or an approval is left in flight so its watch can wake it and its own PR's activity stays quiet.Merged … and set ENG-12 to Done; the key and state must be near each other and a setting verb — set/moved/marked/closed/merged … — must introduce the move, so a prediction is not one). A terminal state set by anyone else leaves neither signal and still wakes.{source, id}and the re-snapshot has no state-change actor, so rule 1's "by someone other than the server's owner" cannot be read without asource-contract.tschange (out of scope); the build/review pair plus worker-in-flight is the attribution the plugin has, and any other move still wakes. The worker-set Done also rides the debounce: if the Done ring is processed before the worker's final message lands, the reconcile sees no result yet and wakes with the pre-BB-52 wrap-up.bb stewards shownow lists the kept notes asPending (quiet): …lines, so a suppressed change is visible with the next wake.Testing
npm testinplugins/stewards: pass (463 tests; in the CI matrix).npm run typecheckinplugins/stewards: pass.reconcile.test.ts: new cases for the worker's own vs foreign PR, the link/followed lines (including quiet when no worker is in flight), the build/review move (plusisOwnStageMove), andworkerReportedTerminal(including the prediction negative), each with a negative.server.test.ts: a teammate's PR linked while a worker is in flight wakes with the foreign text and keeps its checks/comments actionable; a URL a worker named marks its PR own; a waiting finish is a quiet note listed bybb stewards show; a question and an error report wake while a passing error count does not; the wrap-up wake is skipped when the steward's last report already said Done, and the end-to-end worker close (worker merges its own PR, sets Done, ends its turn) ends the binding with noTerminal: Donewake; Done set by someone else still wakes.threads.getenvironment.