Skip to content

[quality] test: pin the poller-to-thrash-breaker wiring end to end on v5 (checkBlockedThrash call in pollTmuxOutputForAgent has no test) #6297

Description

@clubanderson

Summary

On v5 the blocked-action thrash breaker is wired correctly: pollTmuxOutputForAgent calls m.checkBlockedThrash(agent.Name, l) per line (src/pkg/agent/manager_poll.go:244), and the breaker itself lives in manager_thrash.go (60s window, 5 threshold, 10m cooldown, pauses via m.Pause(agent, "thrash-breaker", ...)). Surfaced while confirming #6147 was already resolved on v5.

But nothing pins the WIRING. thrash_coverage_test.go and backend_coverage_test.go exercise checkBlockedThrash / recordBlockedAndCheck directly, so the breaker logic is covered - while the one-line call in the poller that makes it fire in production is not. That is exactly the shape #6147 described on v4: a correct breaker that nothing invoked. A future refactor of the poller could drop that line and every existing test would still pass.

Suggested test

One end-to-end case in src/pkg/agent: drive a burst of blocked-action lines (more than the threshold within the window) through pollTmuxOutputForAgent using the existing hermetic tmux harness, and assert the agent ends up paused with reason thrash-breaker. Assert the pause, not a log line. Keep it small; this is one assertion that the poller-to-breaker link exists.

Refs #6147.

Activity

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

    agent/qualityApproved by a Hive merger/owner for auto-merge on green CIhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions