Skip to content

fix(testing): test-judge Stop hook floods task end with every deferred test name and relays all-pass verdicts #6226

Closed

Description

@kyle-sexton

Problem

The testing plugin's test-judge Stop hook (plugins/testing/hooks/test-judge.sh) floods the session at task end:

  • Deferred tests are listed by name, all of them. Lines 279-280 append labels "${over[@]}" / labels "${late[@]}" to the Stop message, so past the 10-test cap every remaining test's <file>: <test name> label is printed. One task end on a 4-suite change printed roughly 65 labels in a single wall of text that the user reads and acts on nothing in.
  • A clean result still forces a relay. Line 273's reason tells Claude to "show the user each verdict and proposed diff from that file" even when the run is 0 FLAG / 0 UNKNOWN, so an all-pass review turns into a long quoted transcript the user did not ask for.

Observed 2026-10-04 on claude-code-plugins#6205's branch: reviewed 10 tests (0 FLAG, 10 PASS, 0 UNKNOWN) followed by the full deferred list.

Fix

  • Lines 279-280: report counts and a pointer, not labels: test judge: N more tests queued for a background judge; verdicts at the next task end. The labels already live in the findings file and the background job's record.
  • Line 273: block and ask for a relay only when the run has a FLAG or an UNKNOWN; for an all-PASS run, emit the one-line summary and no block reason.
  • Add a stay-quiet test per the hook-precision convention (docs/conventions/hook-precision/README.md#the-discipline): an all-PASS run with more than 10 changed tests produces at most two short lines and no block.

Verification

  • plugins/testing hook tests cover: over-cap run prints a count, no labels; all-PASS run does not block; a FLAG run still blocks with the relay reason.

Related

  • plugins/testing/hooks/test-judge.sh:271-280

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 4, 2026
  2. github-actions commented on Oct 4, 2026

    @github-actions
    Contributor

    Thanks for the detailed report. I checked plugins/testing/hooks/test-judge.sh against main: the deferred-test-name flood you describe (lines 279-280 printing every over/late label past the 10-test cap) is confirmed as written — a large changeset will dump dozens of labels.

    The second part is less clear on current main: relay_needs_decision (line 73) already gates the block/relay message on a FLAG or a non-environmental UNKNOWN, and the top-of-file comment documents that an all-PASS run should not block. Your "Observed" example only shows the counts-plus-deferred-list text, not an actual block on an all-pass run, so it'd help to confirm whether you saw the relay reason fire with 0 FLAG/0 UNKNOWN, or whether that part was inferred from reading the code.

    No duplicates found; related but distinct: #6037 (closed, prior relay-blocking fix), #6206 (separate UNKNOWN cause).

    Automated triage. A maintainer reviews it.

  3. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    status: needs-infoMissing reproduction or details from the reporter.
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNot yet classified. Floor until a type and one priority tier are set.priority: mediumReal value, no hard deadline; normal backlog flow.status: needs-infoMissing reproduction or details from the reporter.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions