Skip to content

review_log.t27: a queue read is only the fixture's exact text, not any count (the tool's regex) #7407

Closed

Description

@gHashTag

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 unlabelled
  • 0 to review, 0 approved but unlabelled
  • 12 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

  1. A queue read is one or more digits, then to review,, then one or more digits, then approved but unlabelled, read as a prefix.
  2. A traceback is a prefix match, as in the tool.
  3. 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 unlabelled is OTHER);
    • a non-digit count (x to review, ... is OTHER);
    • the text embedded after a prefix (#1: 3 to review, ... is OTHER).
  4. A whole-file tri mutate spec pass 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 test on the gen output passes. t27c test-report counts 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.t27 leaves no survivor except named equivalents.

🤖 Generated with Claude Code

Boundary

  • specs/queen/review_log.t27
  • scripts/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 a QUEUE_READ (not OTHER).
  • 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 a TRACEBACK (not OTHER).
  • Given a review log line 12 to review, 3 approved but unlabelled (2 held), when the spec classifies it, then it is recognized as a QUEUE_READ because the prefix matches the pattern.

Requirements

  • FR-001: The spec MUST classify a line as QUEUE_READ when it starts with one or more digits, followed by to review,, followed by one or more digits, followed by approved but unlabelled.
  • FR-002: The spec MUST classify a line as OTHER when 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 OTHER when 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 OTHER when 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 TRACEBACK when it starts with Traceback (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.t27 with no survivors except named equivalents.

Activity

  1. gHashTag commented on Oct 7, 2026

    @gHashTag
    OwnerAuthor

    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.
    • Lab, release t27c of master 05e633d: test-report 22 of 22 pass, 0 vacuous. tri mutate spec over the whole file: 32 mutants, 29 killed, 0 survived, 3 hung. All 3 hung mutants drop a scan loop's k = k + 1.
    • Negative controls: putting back the old exact queue read fails classify_queue_read_any_count, and the old exact traceback fails classify_traceback.
    • Not opened yet: 360 Actions runs are queued, and test(tri): a lab run through a stand-in railway ssh (Closes #7390) #7392 is already in flight.
  2. gHashTag commented on Oct 7, 2026

    @gHashTag
    OwnerAuthor

    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.

  3. added
    needs-boundaryNo '## Boundary' section, so the Queen can reserve nothing for it and no bee can take it
    and removed
    needs-boundaryNo '## Boundary' section, so the Queen can reserve nothing for it and no bee can take it
    on Oct 7, 2026
  4. gHashTag commented on Oct 7, 2026

    @gHashTag
    OwnerAuthor

    Reopened 2026-10-07: the bulk close of issues without a ## Boundary section was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.

  5. added
    needs-shapeIssue lacks Boundary/Scenarios/Requirements/Success criteria
    on Oct 7, 2026
  6. removed
    needs-shapeIssue lacks Boundary/Scenarios/Requirements/Success criteria
    on Oct 7, 2026
  7. added a commit that references this issue on Oct 9, 2026
    fe275c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions