Repository navigation
review_log.t27: a queue read is only the fixture's exact text, not any count (the tool's regex) #7407
Description
What
specs/queen/review_log.t27 decides that a line is a queue read only when it is exactly the fixture's text:
if (text == "3 to review, 1 approved but unlabelled") {
return QUEUE_READ;
}
The rule it was taken from is a regex in the reviewer's health-card tool (QUEUE_READ_RE, commit 6ada36543, scripts/tri_loop/review_log.py on the bee branch for #6086):
QUEUE_READ_RE = re.compile(r"^\d+ to review, \d+ approved but unlabelled")
That is any count on either side, as a prefix. The spec classifies these lines as OTHER:
5 to review, 0 approved but unlabelled0 to review, 0 approved but unlabelled12 to review, 3 approved but unlabelled (2 held)
Why it matters
review_window_exit counts the listing errors since the last queue read. A real log, whose counts differ from the fixture's 3 and 1, holds no queue read at all as far as the spec can tell. So every listing error in the window counts, and two of them anywhere make the window read as "the reviewer is not reading the queue" (exit 1), even when the reviewer read the queue a minute ago.
The tests cannot see this. Every queue-read line in them is the one fixture string, so the exact match and the regex give the same answers on all 14 tests.
Also
The tool counts a traceback when the raw line starts with Traceback (most recent call last):. The spec uses ==. This is a smaller gap of the same kind.
Fix
- A queue read is one or more digits, then
to review,, then one or more digits, thenapproved but unlabelled, read as a prefix. - A traceback is a prefix match, as in the tool.
- Tests whose answer depends on the difference:
- other counts on both sides (
0,12); - a trailing suffix after
unlabelled; - no digits (
to review, 1 approved but unlabelledisOTHER); - a non-digit count (
x to review, ...isOTHER); - the text embedded after a prefix (
#1: 3 to review, ...isOTHER).
- other counts on both sides (
- A whole-file
tri mutate specpass over the result, with every survivor killed or named as equivalent.
Ordering
PR #7405 (#7396) is open on the same file. Land this after it, from its merge, so the two do not conflict.
Acceptance
zig teston thegenoutput passes.t27c test-reportcounts 0 vacuous passes.- Negative control: with the old exact-match body put back, at least one new test fails.
tri mutate spec --file specs/queen/review_log.t27leaves no survivor except named equivalents.
🤖 Generated with Claude Code
Boundary
specs/queen/review_log.t27scripts/tri_loop/review_log.py
User Scenarios
- Given a review log line
5 to review, 0 approved but unlabelled, when the spec classifies it, then it is recognized as aQUEUE_READ(notOTHER). - Given a review log line
Traceback (most recent call last): File "x.py", line 1, when the spec classifies it, then it is recognized as aTRACEBACK(notOTHER). - Given a review log line
12 to review, 3 approved but unlabelled (2 held), when the spec classifies it, then it is recognized as aQUEUE_READbecause the prefix matches the pattern.
Requirements
- FR-001: The spec MUST classify a line as
QUEUE_READwhen it starts with one or more digits, followed byto review,, followed by one or more digits, followed byapproved but unlabelled. - FR-002: The spec MUST classify a line as
OTHERwhen the queue-read pattern has no digits on either side (e.g.,to review, 1 approved but unlabelled). - FR-003: The spec MUST classify a line as
OTHERwhen the queue-read pattern has non-digit counts (e.g.,x to review, 1 approved but unlabelled). - FR-004: The spec MUST classify a line as
OTHERwhen the queue-read text appears after a prefix (e.g.,#1: 3 to review, 1 approved but unlabelled). - FR-005: The spec MUST classify a line as
TRACEBACKwhen it starts withTraceback (most recent call last):. - FR-006: The spec MUST include tests covering the five difference cases: other counts on both sides, trailing suffix after
unlabelled, no digits, non-digit count, and embedded after a prefix. - FR-007: The spec MUST pass
tri mutate spec --file specs/queen/review_log.t27with no survivors except named equivalents.
Activity
gHashTag commentedon Oct 7, 2026
Fix ready as a local commit (670c3f66c), stacked on #7405's head 379b384. It will become a PR from #7405's merge, as the Ordering section says.
is_queue_read: digits,to review,, digits,approved but unlabelled, read as a prefix. The traceback rule is a prefix match.test-report22 of 22 pass, 0 vacuous.tri mutate specover the whole file: 32 mutants, 29 killed, 0 survived, 3 hung. All 3 hung mutants drop a scan loop'sk = k + 1.classify_queue_read_any_count, and the old exact traceback failsclassify_traceback.gHashTag commentedon Oct 7, 2026
Taken: the work for this issue is done and pushed as branch claude/review-log-queue-read-7407 (5783031) (lab-verified; see the branch's docs/now entry). It lands as a PR after #7475 merges (one PR at a time while the Actions queue is long). A bee need not start this issue; a bee branch for it would duplicate that commit.
gHashTag commentedon Oct 7, 2026
Reopened 2026-10-07: the bulk close of issues without a
## Boundarysection was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.review_log.t27: a queue read is any count, as the tool's regex (Closes …