Skip to content

fix(cache): one circuit breaker with open, cooldown and half-open states guards the valkey cache tier and the rag lookup pause #2073

Closed

Description

@dan-petty

Friction

One Valkey error turns the L2 cache off for the rest of the run: self._valkey = None in src/devops_cli/ai/rag/embeddings.py (two places) and src/devops_cli/security/vulnerability_lookup.py (three places). cache/tiered.py does the opposite and retries and reconnects on every call during an outage. Neither has a cooldown or a half-open state, and the RAG lookup pause has its own hand-written breaker.

Evidence

Checked on main on 2026-10-24: the five self._valkey = None lines are present, and no circuit breaker library is a dependency. This is PR2 of tracking issue #596.

Proposed remedy

  • Adopt one maintained circuit breaker library (for example pybreaker; check its maintenance first) behind one seam at the Valkey L2 boundary, with open, cooldown, half-open and closed states.
  • Route the embeddings engine, the threat-intel client and TieredCache through it, and delete every self._valkey = None.
  • Rewrite the test that pins the nulling so that it covers all four states.

Source: #596

Activity

  1. added
    source/agent
    type/bug
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions