Skip to content

[scanner] repeat-failure: command normalization and sliding-window detector (monitor-only) #14557

Closed

Description

@hivecommons-hive

Part of #14550 — detection over command records. Depends on #14553 (record type and config). Target: v6 (open the PR with --base v6).

Scope (requirements C6, C7, C9, C10):

  • Normalizer: strip backend wrapper text (Claude Code source <snapshot> && eval '<cmd>', Gemini CLI wrapper), collapse whitespace, replace paths under /tmp, /var/tmp, $TMPDIR and ISO-8601 / 10- or 13-digit Unix timestamps with placeholders; keep everything else (do NOT reuse fleetreport.NormalizeMessage).
  • Exclusion list: prefix match on the normalized form; defaults gh pr checks, gh run watch (C9).
  • Detector with its own state, modelled on recordBlockedAndCheck (src/pkg/agent/manager_thrash.go): same command + same result ≥ N times within window (defaults 5 / 10 min) → one note per distinct command; clears on success or when last failure is older than the window; can re-raise. Logged once when raised.
  • Monitor only: never pauses/kicks; the existing policy-blocked loop breaker stays byte-for-byte unchanged (C10).

Files (likely): new src/pkg/agent/repeat_failure_detect.go, repeat_failure_normalize.go + tests.

Acceptance: C-AC2, C-AC3, C-AC4, C-AC6, C-AC7, C-AC8. Use an injected clock; no time.Sleep( in tests.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  2. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @thatguywob (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @thatguywob released (lease revoked).

  4. 4 remaining items

  5. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    PR #14566 covers this issue: #14566

    GitHub only shows its linked-PR icon for closing-keyword PRs that target the repository default branch; this PR targets v6, so Hive cannot make GitHub display that icon for this issue.

  6. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    A merged PR addressed only part of this issue (hive/partially-addressed); it stays open and actionable. Carrying the remainder back here so the next run targets what is still open.

    Not yet touched: src/pkg/agent/manager_thrash.go

    Remainder from the PR body:

    detector core only; command normalization and integration with the record/config foundation remain, so this does not close the sub-issue.

    Remainder from the PR body:

    (partial: normalizer + exclusions (C7, C9); the detector core lands in #14562 and wiring detector→records/config follows once #14553 and #14562 merge)

    This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.

  7. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    ContributorAuthor

    Verified resolved on v6: the scope of this issue (C6 normalizer, C9 exclusion list, C7/C10 sliding-window detector) has landed —

    The loop breaker in manager_thrash.go is untouched. Wiring the detector to the record file / config switch and the dashboard surface is tracked by #14558 (blocked on #14554 → #14574). Closing this child.


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

    — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

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/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/partially-addressedA merged PR addressed only part of this issue; remainder still actionable

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions