bus: review.request reports whether a reviewer holds the role (#1599)

Row 105. Built by a Haiku subagent under Researcher (decision 129),
packet agents/researcher/work/queue-105/r1/, candidate manifest
cd6d5eb3e4093ac157f63d05cb639d243d76c6bde1a03e78efb8f29e191b6b44.
Filbert approved on #1599, comment 28247.

The review.request reply and the review.requested event carry held,
the run id holding the reviewer role or null. The request_review tool
description says what null means. The broker change is live only at
a bus restart.

Sage's gate rerun on 79e126be0 with rows 101 and 105 applied, Docker
up: node suites bus 128, business 67, cli 146, control-board 124,
conversation 182, discord 178, harness 70, ledger 78, mosaic 69,
queue 155, runs 43, seat 109, tasks 92, webui 108; scripts auth 15,
conductor 17, config 24, discord 66, extension-package 18,
foundation 44, queue 28, release 14, task 98. All pass, 0 fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-13 16:26:12 -05:00
co-authored by Claude Opus 5.5
parent 056a20397d
commit 3a1e11b83e
5 changed files with 37 additions and 5 deletions
+6 -2
View File
@@ -997,10 +997,14 @@ export class Broker {
fail(older ? 'stale-commit' : 'unknown-commit');
}
const mid = randomUUID();
// Row 105 (#1599): the run holding the reviewer role, or null when nobody holds it and the
// request waits for a claim. #reviewMessage routes on the same holder.
const h = this.#holder(s.business, a.to);
const held = h?.op === 'claim' ? h.holder_run : null;
const eid = this.#event(
s,
'review.requested',
{ task_ref: a.task_ref, project: push.project, ref: push.ref, commit: a.commit, to: a.to, message: mid },
{ task_ref: a.task_ref, project: push.project, ref: push.ref, commit: a.commit, to: a.to, message: mid, held },
a.task_ref,
);
this.#reviewMessage(s, mid, {
@@ -1009,7 +1013,7 @@ export class Broker {
decision: withinRole ? null : (a.decision ?? null),
body: `Review request ${eid} for ${a.task_ref}: commit ${a.commit} on ${push.ref} in project ${push.project}. Fetch it with fetch_review, then answer with review_verdict citing this request.${a.note ? '\n\n' + a.note : ''}`,
});
return { request: eid, message: mid, commit: a.commit, ref: push.ref };
return { request: eid, message: mid, commit: a.commit, ref: push.ref, held };
}
// Row 93: the reviewer's answer to one review.request, sent back to the role that asked.
case 'review.verdict': {