Repository navigation
Description
Problem Description
The runner Jobs of the roadmap (stage, implement and fix-checks) send no credentials to valkey-devops, so the shared tier of the project brain is off in each of them. Each command fails with an authentication error, the circuit breaker opens, and each read goes to GitHub.
The Service pod reads DEVOPS_CLI_VALKEY_PASSWORD from the Kubernetes object of kind Secret named devops-cli (k8s/devops/roadmap-service/deployment.yaml:113). The Job templates do not: k8s/devops/cronjob-stage.yaml and k8s/devops/cronjob-runner.yaml hold only the App key and the gateway key. CONST_ROADMAP_STAGE_JOB_SECRET_KEYS (src/devops_cli/config/constants.py:4354) and the admission policy roadmap-service-jobs admit those two keys and no other.
Measured on 2026-11-26 in Prometheus, 24 hours:
| Measure | Value |
|---|---|
devops_cli_valkey_cache_errors_total{job="roadmap-stage",error="auth"} |
318 |
devops_cli_valkey_cache_errors_total{job="roadmap-stage",error="open"} |
6,831 |
devops_cli_brain_reads_total{job="roadmap-stage",store="issue",result="fallback"} |
3,507 |
devops_cli_brain_cache_total{job="roadmap-stage",row="stage"}, miss against hit |
3,492 against 0 |
devops_cli_github_requests_total{job="roadmap-stage"} |
11,756 |
The jobs roadmap-implement and roadmap-fix-checks show the same auth and open errors. The Service pod in the same hours: 3,650 hits of the row refine.
The network is not the cause: devops-default-perimeter-egress admits TCP 6379 to namespace llm, and the ingress policy of valkey-devops admits namespace devops.
Reproduction Steps
- Start a stage Job, and read the names of the environment variables of its pod: no variable of the Valkey password.
- Query
sum by (job, error) (increase(devops_cli_valkey_cache_errors_total[24h])).
Expected vs Actual Behavior
- Expected: a runner Job reads the brain caches (issue records, the listing snapshot, tool facts, embeddings) from the shared tier, as the Service pod does.
- Actual: a runner Job has the local tier only, and it counts each read as
fallback.
Proposed Fix
- Add
DEVOPS_CLI_VALKEY_PASSWORDfrom the objectdevops-clionly to the containers that already hold the private key of the App:prepareandpublishofk8s/devops/cronjob-runner.yaml, and the one containerstageofk8s/devops/cronjob-stage.yamluntil refactor(k8s): run the stage Job as three containers #6814 splits it. The containeragentgets no new key, so the rule of fix(k8s): load only the needed Secret keys in runner Jobs #6518 stays: a container in which a model runs commands holds only the keys that it needs. - Add the key to
CONST_ROADMAP_STAGE_JOB_SECRET_KEYS, to its implement and fix-checks equals, and to the admission policyroadmap-service-jobs. - The key exists in the cluster today, so no step of a person comes before the merge.
- These containers send the default user, as the Service does today. feat(k8s): turn off the valkey-devops default user #6600 moves each client to a role user and then turns the default user off.
Owner decision needed (AGENTS.md rule 5): the admission policy admits one more key for the Job pods. #6518 (2026-11-20) removed each key that a Job did not need, and the cache password was one of them, although the Job reads the cache. The containers that get the key already hold the private key of the App, which reads more than the cache does. The fix of the issue cache (#7292) must merge first, so that the cache holds public repositories only.
Acceptance Criteria
- Test first: the Job that the builder makes for a stage item holds the variable of the Valkey password from the object
devops-cli. The test fails on the base. - A test: the container
agentof the runner Job holds no variable of the Valkey password. - A test: the admission policy admits the three keys and refuses a fourth.
- Live proof after the release:
devops_cli_valkey_cache_errors_total{job="roadmap-stage",error="auth"}stays at 0 for 24 hours, anddevops_cli_brain_cache_total{job="roadmap-stage",result="hit"}is above 0. A comment gives the values and the GitHub requests of the stage Job for the same hours.
Environment Diagnostics
devops-cli 0.221.13, namespace devops, valkey-devops (valkey 9.2.0) with the default user and requirepass.
Dependencies
Related: #6013 (the issue cache), #4668 (the shared tiers), #4704 and #6600 (role users), #4624 (tracker).
Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Searches found only generic secret tooling (External Secrets Operator, Sealed Secrets, Kyverno), none of which passes a Valkey password into these Job containers; the fix is edits to this repo's Job manifests, constants and its own admission policy.
Lacks:
- No tool adds the Valkey password variable to the Job pod specs
- No tool maintains the Job secret key allowlist in the constants
- No tool enforces the roadmap-service-jobs admission key list
Proposed design
Problem statement
The stage, implement and fix-checks Job pods have no Valkey password. Each cache read fails authentication, the circuit breaker opens, and the reads fall back to GitHub. The change adds the cache password to the Job containers that already hold the App private key and admits the third key in the constants and the admission policy. The change waits on #7292.
Acceptance criteria
Requirement: Stage Job builder cache password
The Job that build_job makes for a stage item SHALL set DEVOPS_CLI_VALKEY_PASSWORD from Secret devops-cli in container stage.
Scenario: Stage Job builder gate
- WHEN I run
uv run devops ci --check --only k8s. - THEN The command exits 0 and its stage-job check passes with the cache key in the built Job.
Requirement: Runner Job cache password
The runner Job template SHALL set DEVOPS_CLI_VALKEY_PASSWORD in containers prepare and publish and MUST NOT set it in container agent.
Scenario: Runner Job gate
- WHEN I run
uv run devops ci --check --only k8s. - THEN The command exits 0 and its runner check passes with the cache key in
prepareandpublishand no cache key inagent.
Requirement: Job secret key constants
The stage, implement and fix-checks Job secret-key constants SHALL include DEVOPS_CLI_VALKEY_PASSWORD.
Scenario: Constant key list
- WHEN I run
uv run pytest tests/gate/k8s_checks/job_admission_policy.py -q. - THEN The test passes and the constant lists the cache key for each Job kind.
Requirement: Admission policy key list
The admission policy roadmap-service-jobs SHALL admit DEVOPS_CLI_VALKEY_PASSWORD with the two existing Job keys and MUST refuse any other key.
Scenario: Admission policy gate
- WHEN I run
uv run devops ci --check --only k8s. - THEN The command exits 0 and the admission-policy check passes with the three admitted keys.
Requirement: Pending a person after the merge
After the release, the stage Job SHALL show no Valkey authentication errors and MUST show cache hits for 24 hours.
Scenario: Post-release live proof
- WHEN A person queries Prometheus 24 hours after the release.
- THEN
devops_cli_valkey_cache_errors_total{job="roadmap-stage",error="auth"}is 0 anddevops_cli_brain_cache_total{job="roadmap-stage",result="hit"}is above 0, and the comment gives the GitHub request count.
Existing Tool Considered
No alternatives check has run. No open, maintained tool covers this need: the work edits this repository's Job manifests, secret-key constants and admission policy. The written cost is about 6,000 tokens and 45 minutes to build, keep and test the change.
Key questions
- Which containers receive the Valkey cache password?: Only container
stageof the stage Job and containersprepareandpublishof the runner Job receiveDEVOPS_CLI_VALKEY_PASSWORD. Containeragentreceives no cache key. (best practice) [sources: k8s/devops/cronjob-stage.yaml:103, k8s/devops/cronjob-runner.yaml, k8s/devops/roadmap-service/deployment.yaml:113]- Chosen: App-key containers only. They already hold the App private key and need the cache. The agent runs model commands and stays minimal.
- Rejected: All runner containers. It gives the cache secret to
agent, which holds only the model key. - Rejected: No Job container. It keeps the shared cache off and leaves the measured auth errors.
- Should the admission policy admit the cache password for Job pods?: Yes. Add
DEVOPS_CLI_VALKEY_PASSWORDto the stage, implement and fix-checks key lists and toroadmap-service-jobs. The containers that receive it already hold the App private key, which reads more than the cache does. (best practice) [sources: src/devops_cli/config/constants.py:4354, k8s/devops/roadmap-service/admissionpolicy.yaml:172, k8s/devops/roadmap-service/deployment.yaml:113, k8s/README.md:285, docs/CLUSTER.md:99]- Chosen: Admit the third key. The Job reads the cache, and the same containers already hold the App private key.
- Rejected: Keep the two keys. The Job keeps only the local tier and the measured auth errors continue.
- Rejected: Admit the key to every container. Container
agentruns model commands and needs no cache key.
- Which Valkey user do the Job containers use?: Use the default user now, as the Service pod does. Move each client to a role user in feat(k8s): turn off the valkey-devops default user #6600. (best practice) [sources: k8s/devops/roadmap-service/deployment.yaml:113, k8s/README.md:285, docs/ENV_VARS.md:345]
- Chosen: Default user now. The Service already uses it and the change stays small.
- Rejected: Role user now. It needs the ACL work of feat(k8s): turn off the valkey-devops default user #6600 and expands this fix.
- Does the change need a new secret or a person step before the merge?: No. Secret
devops-clialready holds the key, and the Service pod already reads it. [sources: k8s/devops/roadmap-service/deployment.yaml:113, k8s/README.md:285] - Which check proves the manifest and policy change before merge?: Run
uv run devops ci --check --only k8s. It runs the stage-job, runner and admission-policy checks. (best practice) [sources: tests/gate/k8s_checks/stage_job.py, tests/gate/k8s_checks/runner.py, tests/gate/k8s_checks/job_admission_policy.py, AGENTS.md]- Chosen: Use the k8s gate. It already holds the three checks for these files.
- Rejected: Add a new manifest test. It duplicates the gate and reads the file again.
- Rejected: Use only the live proof. The proof comes after release and cannot gate the merge.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 26, 2026
Runner Jobs log 318 auth and 6,831 open errors per 24 h, and every read falls back to GitHub, causing increased error rates and API spend.Both items edit which Secret keys the runner Job pods receive, but #6518 removed excess keys while this candidate adds a missing key.devops-cli-service commentedon Nov 26, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (9)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 26, 2026
Owner decision, 2026-11-26: approved as recommended.
roadmap-service-jobsadmits the keyDEVOPS_CLI_VALKEY_PASSWORDof the objectdevops-clifor the containers that already hold the private key of the App:prepareandpublishof a runner Job, and the one container of a stage Job.agentgets no new key. The rule of fix(k8s): load only the needed Secret keys in runner Jobs #6518 stays for it.This changes one result of #6518: its gate check named the password of the cache as a key that the policy refuses for each container.
devops-cli-service commentedon Nov 26, 2026
Released in v0.221.15: https://github.com/dan-petty/devops-cli/releases/tag/v0.221.15
devops-cli-service commentedon Nov 26, 2026
Live since 2026-11-26 15:18 UTC
dan-petty commentedon Nov 27, 2026
24-hour check, 2026-11-27 15:40 UTC (Prometheus,
increase(...[24h])):devops_cli_valkey_cache_errors_total{job="roadmap-stage"}: no series in the window, so 0autherrors. Before the fix: 318autherrors in 24 hours.devops_cli_brain_cache_total{job="roadmap-stage"}: 923hitand 691miss. Before the fix: 0 hits in 3,492 reads.roadmap-implement: 171hit, 137miss.Both criteria of the live proof pass. The only series of
devops_cli_valkey_cache_errors_totalin the window come from a local devcontainer client with novalkey.url(about 403,000openand 535connection). #7427 holds that defect.