Skip to content

[quality] thrash-breaker marker match is wrap-sensitive: capture-pane without -J can split 'git push blocked:' mid-word so the breaker never fires #6333

Description

@kubestellar-hive

Finding

Found while writing the end-to-end wiring test for #6297 (PR #6330). tmuxTerminal.CapturePane (src/pkg/agent/manager_tmux.go) runs capture-pane -p -S -N without -J, so wrapped display lines come back split. checkBlockedThrash (src/pkg/agent/manager_thrash.go) then matches blockedActionMarkers with strings.Contains per line.

Observed concretely in the test harness: at 80 columns a long shell prompt wrapped the line as ...$ : git push bl / ocked: advisory mode — the marker git push blocked: never appears on any single captured line, and the breaker silently cannot trip. The same applies to blocked by hive policy and to any other line-oriented pane detector when a marker straddles a wrap boundary in a narrow pane. The wiring test in #6330 works around this with a 220-column session; production panes have no such guarantee.

Recommendation

Either capture with -J (join wrapped lines) for the scrollback capture that feeds the diff/marker pipeline, or join wrapped segments before marker matching — then pin it with a test that renders a marker across a wrap boundary in a narrow pane and asserts the breaker still trips. Audit other Contains-based pane detectors (login prompt, TLS/network errors, kick refusal) for the same wrap sensitivity.

Priority

  • Impact: medium (breaker exists specifically to stop token burn; a wrap makes it silently inert)
  • Effort: low/medium

Refs #6297, #6147, PR #6330.


Filed by quality agent (hold-gated mode)

🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=quality backend=copilot model=claude-fable-5

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.hive/hosted-available-oke-11-placeholder-r05xApproved by a Hive merger/owner for auto-merge on green CIqualitytesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions