Skip to content

perf(roadmap): intake's embeddings are cached in a password-protected valkey in the cluster, so a settled item costs no embedding request on the service's next round #1655

Closed

Description

@dan-petty

Friction

Evidence

Checked at main 3dd7fa6.

  • k8s/llm/valkey.yaml:40-47 starts valkey-server with no requirepass.
  • LiteLLM points at it (k8s/llm/gateway/deployment.yaml:61), and so does Portkey (k8s/llm/portkey/deployment.yaml:46), whose cache mode is semantic (k8s/llm/portkey/configmap.yaml:26-27).
  • A password-protected pattern already exists: k8s/llm/valkey-runs.yaml:75 writes requirepass from a managed Secret.
  • Intake embeds candidates in _embed (src/devops_cli/roadmap/intake.py:1118), and the embedder already has a Valkey layer that counts hits as devops_cli_embedding_valkey_hits_total (src/devops_cli/ai/rag/embeddings.py:560).
  • ValkeyConfig.url exists (src/devops_cli/config/settings.py:265), and fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113 makes one validated URL the only Valkey endpoint setting.

Remedy

Acceptance criteria

Related

Proposed design

Problem statement

Intake embeds candidates on every round. The embedding result should be cached in a password-protected Valkey so a settled item costs no embedding request on the next round. The refine half was split to #1539. This item carries the embedding cache with authentication, the Kubernetes manifests, and the offline tests.

Acceptance criteria

  • Criterion 1: Two intake runs over the same candidate with a fake Valkey send one embedding request.
    Verification: Run the offline test suite for intake embedding cache and confirm the fake Valkey received one request.
  • Criterion 2: The rendered ConfigMap carries valkey.url and no password.
    Verification: Run the offline manifest test that renders the devops ConfigMap and assert valkey.url is present and no password key is present.
  • Criterion 3: The cache Valkey requires a password, and only namespace devops reaches it on port 6379.
    Verification: Run the offline manifest test for the Valkey deployment and NetworkPolicy and assert requirepass is set and the NetworkPolicy source is namespace devops only.
  • Criterion 4: One intake candidate sends at most one embedding request, and devops_cli_embedding_valkey_hits_total rises.
    Verification: Run the Service with the cache enabled, submit one candidate, and read the metric. Pending chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562.

Key questions

  • Which store holds the embedding cache: a dedicated Valkey in namespace llm, or the shared Valkey with requirepass?: A small dedicated Valkey in namespace llm, following the valkey-runs.yaml pattern with requirepass from a managed Secret. The body marks this as the recommended option. (proposed) [sources: k8s/llm/valkey-runs.yaml:84]
  • Does the shared Valkey already require a password at the current commit?: Yes. k8s/llm/valkey.yaml line 68 writes requirepass from the VALKEY_PASSWORD environment variable into auth.conf. [sources: k8s/llm/valkey.yaml:68]
  • Does the embedder already have a Valkey cache layer with a hits metric?: Yes. src/devops_cli/ai/rag/embeddings.py records devops_cli_embedding_valkey_hits_total at line 617, and the Valkey layer is at line 560. [sources: src/devops_cli/ai/rag/embeddings.py:560, src/devops_cli/ai/rag/embeddings.py:617]
  • Does ValkeyConfig.url already exist as a validated setting?: Yes. ValkeyConfig.url is defined at src/devops_cli/config/settings.py line 265, and fix(valkey): one validated URL names every Valkey endpoint, valkey-py dials an address that one check vetted, and the unused cache layer goes #1113 makes one validated URL the only Valkey endpoint setting. [sources: src/devops_cli/config/settings.py:265]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/feature. The candidate introduces a new caching mechanism for embeddings, which is a feature enhancement.
    • Priority: P2-Medium. It blocks progress on #1539 but does not block any filed item directly.
    • Value: High. Improves performance and reduces embedding costs for roadmap intake.
    • Effort: Medium. Requires changes to Valkey configuration, network policies, and deployment manifests.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at 4da1e34 (see proposed design in issue body).

  4. added
    priority/p2-medium
    status/ready
    effort/medium
    value/high
    on Oct 28, 2026
  5. added a commit that references this issue on Oct 29, 2026
    bfe8a0c
  6. removed
    status/ready
    on Oct 30, 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

    effort/mediumpriority/p2-mediumsource/agenttype/featurevalue/high

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions