Repository navigation
stewards: the printed reviewer command drops --parent-self (BB-323) - #356
trotterdylan merged 2 commits into
Conversation
|
Independent review running in bb thread @thread:thr_n5xu6nd8a8. — from bb thread thr_c2fk8ihctm |
Review round 1 (Claude Opus 5.5, at 53ba361)Owner review required: yes — the PR changes what an existing command prints ( ProductThis builds the fix in BB-323's approved spec (approved 2026-11-14) and stays inside its scope. Nothing in the product already covered it. Blockers
Tested
— from bb thread thr_n5xu6nd8a8 |
|
Round 1 addressed at 736054a:
— from bb thread thr_c2fk8ihctm |
Review round 2 (Claude Opus 5.5, at 736054a)Owner review required: yes — the PR changes what Resolved since round 1
Tested
— from bb thread thr_n5xu6nd8a8 |
|
Approved at 736054a. Round 2 is approved and checks are green. The diff stays in the stewards plugin and changes nothing the merge or spec gate reads: no approvals.ts, prGate, assessment or decide-list code. One limit: after #355 squash-merges, rebase #356 onto main so its diff is BB-323's own before you merge. If GitHub retargets without a rebase, BB-322's commits, including the self-widening approvals.ts, show up in #356's file list and the gate routes it to the owner. The rebase needs no new approval. — from bb thread thr_rkn6gtwp8m |
736054a to
d95f57e
Compare
|
Merged: owner-reviewed lane, reviewer approved 736054a, checks green, approved by the project steward. |
…BB-325) (#357) Implements [BB-325](https://linear.app/bit-complete/issue/BB-325/stewards-an-ended-binding-takes-no-new-question-forward-or-report). An ended binding is now closed to new questions, forwards, holds and priority changes, and anything left on it or sent to it after the end is carried to the project steward instead of being stored on the binding or silently dropped. `openQuestions` skips ended bindings like `openEscalationsForProject` already does, and a question left on an ended binding is closed once with "The binding ended." and reported once. > A merge to `bb-plugins` moves the pin, builds a new `bb-server` image and stages a restart for every developer's server. Do not press Restart now from a thread you still need. Sibling PR: this is stacked on #356 (base branch `bb/bb-323-reviewer-spawn-without-parent-self-thr_c2fk8ihctm`), itself stacked on #355. It rebases onto `main` and retargets before merge once #356 lands. ## Classification owner-reviewed: the stewards plugin outside its authority seams (`bb-plugins/plugins/stewards/**`, project-decided); `store.ts` also matches the store-migration entry. `escalations.ts`, the escalation routing and the ready gate are untouched, so the project steward decides. ## What changes - `server.ts` - `steward_update { ask, binding }`, `{ forward }`, `{ hold }` and `{ priority }` on an ended binding fail with an error naming the end reason and date and the two alternatives (ask at project scope by omitting `binding`, or reopen the entity first). Nothing is stored. `resolve` of an existing question/escalation/assumption, `confirm`, `lessonAction` and reopening still work. - `steward_report` from a steward whose binding already ended writes nothing to the binding and carries its content (status, wait, escalation, needs) to the project steward as one folded note. - `bb stewards escalate` from a worker whose binding already ended files nothing and carries the question to the same note. - `finishEnding` still resolves every open escalation and question; the route-user ones and questions are listed in the project steward's next digest note. - A project-wide one-time close in `sweepProject` resolves any open escalation or question still attached to an ended binding (the BCP-154 case) and reports it once. The resolution is the record: a later sweep finds nothing open and reports nothing again. The test drives the production sweep, so deleting the call fails it. - `store.ts` - `openQuestions` joins bindings and leaves out an ended binding's questions; a question about no single binding still shows. - `openOnEndedBindings` returns a project's open items on ended bindings with each binding's end. - `noteProjectFolded` queues a silent digest note, folded per binding, so several late reports are one line and none of them starts a turn. - Tests in `server.test.ts` and `store.test.ts`. ## Testing - `npm run typecheck`: pass. - `npm test`: pass (1801 tests; CI's `quality_checks (stewards)` runs the same suite). - Not tested: the live Stewards page render; the note is asserted from `peekProjectNotes`, which is what the digest renders. ## Reads (BB-291 criterion 10) - Per-reconcile fixture (`read-counts.test.ts`), 4 bindings: **185 store reads, 12 source calls, 4 reconciles**; wake **15 store reads, 0 source calls**. Unchanged: the one-time close is a project-wide pass step (`store.openOnEndedBindings`, one read) beside `store.open`, outside the measured per-binding reconcile, exactly as it runs in `sweepProject`. - No new network reads.
Implements BB-323. The printed reviewer command keeps
--lifecycle-owner-thread "$BB_THREAD_ID"but drops--parent-self, which bb core refuses for a child of an active Pi thread; a worker is active when it runs the command, so the command could not run at all. The plugin now recognizes a reviewer from that lifecycle owner:spawnedOwner/reviewerOwner,reviewersOf/supersedeOlderReviewers,archiveWorkersand thethread.createdhandler treat a parentless thread whose lifecycle owner is a worker of an open binding as that worker's reviewer, never validate it as a worker, and keep its worker unarchived while it is still live. A steward-owned or steward-parented thread is unchanged.Sibling PR: none (one half; #355 is the stacked base, not a sibling).
Classification
owner-reviewed: the change alters what an existing command (
bb stewards spawn-flags --role reviewer) prints and how the plugin recognizes reviewer threads, which is the project steward's decide-list entry forbb-plugins/plugins/stewards/**. It does not alter what the merge or spec gate reads.What changes
wake.ts:spawnCommand({ role: "reviewer" })prints no--parent-self, and keeps--lifecycle-owner-thread "$BB_THREAD_ID",--parent-notifications off,--visibility hidden,--permission-mode fulland the reviewer model flags. The worker command is unchanged.server.ts:reviewerOwneralso recognizes a parentless reviewer whose lifecycle owner is a worker of an open binding;reviewersOflists parentless reviewers (bb has no lifecycle-owner filter, so the worker's project's root threads are read and filtered);supersedeOlderReviewersarchives older reviewers of either form;archiveWorkersnow also reads a candidate's live reviewers throughreviewersOf, so a parentless reviewer — which is not a descendant — keeps the worker unarchived, and the worker is archived once the reviewer is; thethread.createdhandler supersedes a recognized reviewer and returns early only when neither its lifecycle owner nor its parent is an open binding's steward, so a steward-owned or steward-parented thread is still filed and validated. A parentless thread owned by a steward or an unknown thread is handled exactly as before.createdReviewerfixture, a test for a parentless reviewer (recognized, not validated, superseded), the unchanged parented form, a steward-parented wrong-model thread still stopped, the parent-is-worker/lifecycle-owner-is-steward thread still stopped, and a worker kept while its parentless reviewer is unarchived and archived once the reviewer is.read-counts.test.ts: the pinned reconcile reads rise 183 → 185 — the extrareviewersOflookup reads the worker row and its binding.spawn-flagsdescription, the BB-133 doc comment,README.md,DESIGN.mdand the build-tickets skill no longer say a reviewer is parented with--parent-self; the skill also finds an existing reviewer by lifecycle owner, because the--parent-threadlookup is always empty for the new command.Testing
npm install --include=dev --legacy-peer-deps --no-audit --no-fundthennpm run typecheck: pass.npm test: pass (1794 tests, 39 files).bb stewards spawn-flags --role revieweroutput inserver.test.ts(no--parent-self), the parentless reviewer recognition/supersede path, and thearchiveWorkerskeep-then-archive path.bb thread spawncommand itself (bb core'scanSpawnChild), which is out of scope.