Repository navigation
Description
Split from #4370.
The item asks for a post-merge check of the gateway image, the rollout status and an ask-jev call. A pull request cannot run this check: it needs the merged manifest, the live cluster and the tunnel. This part is deferred so the image bump can merge. Acceptance criteria: 1. kubectl -n llm get deploy llm-gateway -o jsonpath='{.spec.template.spec.containers[0].image}' prints ghcr.io/berriai/litellm:v1.103.10. 2. kubectl -n llm rollout status deploy/llm-gateway ends with successfully rolled out. 3. `uv run devops ai ask-jev noul
Proposed design
Problem statement
The gateway image bumps to v1.103.10 in #4370, and that pin is merged in k8s/llm/gateway/deployment.yaml:33. No repeatable check confirms that the live cluster runs that image, that the rollout finishes, and that the gateway answers a TypeSafe Jev call through the tunnel. A pull request cannot run these checks, so the project needs one command that a person runs after the merge and at each gateway bump, and that a test can check offline. The command compares the image that Deployment llm/llm-gateway reports with the merged manifest pin, waits for the rollout, and makes one Jev call through the gateway.
Acceptance criteria
Requirement: Live image check
The command SHALL compare the image that Deployment llm/llm-gateway reports with the image pinned in k8s/llm/gateway/deployment.yaml and MUST exit 1 when they differ.
Scenario: Image tag differs
- WHEN the process fake answers
kubectl get deployment llm-gateway -n llmwith an image tag other thanghcr.io/berriai/litellm:v1.103.10 - THEN the command exits 1 and the report prints the manifest image and the image the Deployment reports
Requirement: Rollout check
The command SHALL run kubectl rollout status deployment/llm-gateway -n llm --timeout=<seconds> and MUST exit 1 when kubectl exits non-zero.
Scenario: Rollout stays pending
- WHEN the process fake answers the rollout command with exit code 1 and the line
Waiting for deployment "llm-gateway" rollout to finish - THEN the command exits 1 and prints that rollout line
Requirement: Gateway answer check
The command SHALL send one noul question to TypeSafe Jev through the gateway, with the observed image and rollout line as its context, and MUST exit 1 when the call raises an error.
Scenario: Gateway gives no answer
- WHEN the HTTP fake answers the System One request with status 500
- THEN the command exits 1 and prints the gateway error text
Requirement: Pass report
The command SHALL print the live image, the rollout line and the Jev answer with its probability, and MUST exit 0 when the three checks pass.
Scenario: All checks pass
- WHEN the Deployment reports
ghcr.io/berriai/litellm:v1.103.10, the rollout exits 0 and the System One request answers anoulreply - THEN the command exits 0 and prints the image, the rollout line and the answer with its probability
Requirement: Dry run
The command SHALL print both kubectl commands and the Jev question with --dry-run and MUST start no process and send no request.
Scenario: Dry run lists the calls
- WHEN a person runs
devops k8s gateway-check --dry-runwith the process fake and the HTTP fake installed - THEN the output lists the two kubectl commands and the Jev question, and both fakes record no call
Existing Tool Considered
No alternatives check has run on this item. The need is to compare the image of Deployment llm/llm-gateway with the merged manifest, wait for its rollout, and make one Jev call through the gateway. kubectl (Apache-2.0, maintained by the Kubernetes SIG CLI) covers the image read and the rollout wait (src/devops_cli/k8s/manifest_plans.py:250). The in-repo client ask_jev in src/devops_cli/ai/jev_ask.py:215 covers the Jev call through the gateway, and the existing test test_gateway_deployment_pins_litellm_and_reads_master_key_from_secret (tests/ai/benchmark/test_k8s_llm_gateway.py:830) covers the pin offline. Neither gives one command with one exit code that a person runs after a merge. The change adds devops k8s gateway-check: a module in src/devops_cli/k8s/gateway_check.py (the manifest pin, the kubectl commands, the Jev question, the verdicts), a thin command in src/devops_cli/commands/k8s/gateway_check.py, two test files and a README bullet, in the shape of devops k8s crawl4ai-check. Written cost to build, keep and fix that code: about 45,000 tokens and half a day of elapsed time.
Key questions
- Which commands check the gateway image and the rollout status?: The image read is
kubectl get deployment llm-gateway -n llm -o jsonpath='{.spec.template.spec.containers[0].image}', with--contextwhen the caller names one. The rollout check iskubectl rollout status deployment/llm-gateway -n llm --timeout=<seconds>; it exits non-zero when the rollout does not finish, and a Deployment withreplicas: 1and the defaultRollingUpdatestrategy is a workload that it accepts. [sources: src/devops_cli/ai/gateway_tune.py:324, src/devops_cli/ai/gateway_tune.py:341, src/devops_cli/k8s/manifest_plans.py:250, openspec/changes/archive/2026-11-10-4370-bump-the-litellm-gateway-to-v1/tasks.md:17, openspec/changes/archive/2026-10-24-2186-volume-move/design.md:42, k8s/llm/gateway/deployment.yaml:12] - What does the truncated third acceptance criterion require, which stops after
uv run devops ai ask-jev noul?: The body truncates the criterion after the kindnoul, and the command needs a question argument, so no recoverable text names the prompt. The command sends a fixed closednoulquestion with the evidence of the first two steps as its context:Does this gateway rollout show the pinned image and a finished rollout?, with--context "<image>\n<rollout line>". It passes whenask_jevreturns a typed answer, and fails only when the call raises. The report prints the answer and its probability, and the command does not gate on the probability, because a Jev answer is evidence and not a verdict. (best practice) [sources: docs/adr/0019-a-decision-step-asks-jev-short-closed-questions-about-evidence-that-tools-extract.md:17, .agents/skills/ask-jev/SKILL.md:14, .agents/skills/ask-jev/SKILL.md:43, k8s/README.md:130, src/devops_cli/ai/jev_ask.py:215]- Chosen: Fixed closed noul question about the extracted evidence. ADR 0019 records that Jev works on short, closed questions about evidence that tools extract, and the image and rollout line are that evidence. One answered request proves the gateway pass-through route works.
- Rejected: The bare
uv run devops ai ask-jev noulthat the body leaves. The command takes the question as a required argument, so this call fails validation and proves nothing about the gateway. - Rejected: A direct curl to
POST /v1/systemone. It duplicates the client path thatask_jevandtests/ai/test_jev_gateway_route.pyalready cover, and the issue asks for theask-jevcall.
- Which image tag must the check expect?:
ghcr.io/berriai/litellm:v1.103.10, the pin in the merged manifest, which the benchmark constantGATEWAY_IMAGEalso holds and the benchmark test compares with the manifest. [sources: k8s/llm/gateway/deployment.yaml:33, tests/ai/benchmark/test_k8s_llm_gateway.py:78, tests/ai/benchmark/test_k8s_llm_gateway.py:843] - Where does the verification live, and how do offline tests check it?: It is the command
devops k8s gateway-check:src/devops_cli/k8s/gateway_check.pyholds the manifest pin, the kubectl commands, the Jev question and the verdicts,src/devops_cli/commands/k8s/gateway_check.pyis the thin adapter with--contextand--dry-run, and the tests live intests/k8s/test_gateway_check.pyandtests/commands/k8s/test_k8s_gateway_check.py. The offline tests installProcessFakefor the two kubectl calls andWebFakefor the System One request, the seams that ADR 0007 names for a process and a network edge. (best practice) [sources: openspec/specs/k8s-crawl4ai-check/spec.md:4, openspec/specs/k8s-crawl4ai-check/spec.md:8, src/devops_cli/commands/k8s/crawl4ai_check.py:115, docs/adr/0007-tests-double-only-process-edges.md:3, docs/adr/0007-tests-double-only-process-edges.md:31, k8s/README.md:851]- Chosen: A
devops k8s gateway-checkcommand with--dry-runand the process and HTTP fakes. The project records this shape for a live check that a person runs:devops k8s crawl4ai-checkand its capability spec give the module, the thin command, therequest-plandry run and the offline tests. A test ofsrc/doubles the process and network edges and starts no program (ADR 0007). - Rejected: A shell script in a
scripts/directory with stub executables onPATH. The commit has noscripts/directory, and a stub-based test would start a program from a test ofsrc/, which the 2026-10-24 amendment of ADR 0007 forbids. The command shape already covers the same calls with a testable seam. - Rejected: A row of
devops ci. ADR 0007 sends a real tool to adevops cirow for checks of committed files; this check reads the live cluster and the tunnel, so it cannot run on a runner. The offline part is already the benchmark test of the pin.
- Chosen: A
- Where does the expected image come from?: From the committed manifest: the check reads the image of container
litellmink8s/llm/gateway/deployment.yamland compares it with the image the Deployment reports. No new constant is added, so the check runs unchanged at each gateway bump. (best practice) [sources: k8s/llm/gateway/deployment.yaml:32, k8s/llm/gateway/deployment.yaml:33, k8s/llm/gateway/kustomization.yaml:14, src/devops_cli/k8s/image_pins.py:144, src/devops_cli/k8s/image_pins.py:162, tests/gate/k8s_checks/devops_runtime.py:64]- Chosen: Read the pin from
k8s/llm/gateway/deployment.yaml. One source of truth: the file that Argo CD andkubectl apply -k k8s/llm/gatewayapply, with noimages:override in the kustomization.image_valuesinsrc/devops_cli/k8s/image_pins.pyalready reads image values from manifests, so the parser exists. - Rejected: A
GATEWAY_CHECK_IMAGEconstant plus a gate row. It duplicates the pin and needs a test to keep the constant in step, as the Crawl4AI check does. The benchmark test already ties the manifest toGATEWAY_IMAGE, so a second copy adds a failure mode without a check. - Rejected: Accept whatever image the rollout runs. The check would then pass on the stale pod that this issue exists to catch.
- Chosen: Read the pin from
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 10, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(k8s)scope of the title gives the scope.The check confirms that the security image bump is live, but it blocks no merge.The check shows that the gateway runs the fixed image and answers a call.The work is three commands that run on the cluster.Both items concern the LiteLLM v1.103.10 bump, but #4370 changes the manifest and this item verifies the live rollout.devops-cli-service commentedon Nov 10, 2026
Refine cannot set this item to Ready at 04db2fc. A bot opened the item, so a review of the issue and of the proposal must approve it first. The review found the defects below. A person edits the body to answer them. The next refine round looks at the item again only after a body edit.
false_premiseat problem_statement: The plan states that the v1.103.10 pin is already merged. The issue defers this work until the image bump merges. Evidence: "that pin is merged ink8s/llm/gateway/deployment.yaml:33"missing_pathat existing_tool: The plan adds the modulesrc/devops_cli/k8s/gateway_check.py. No task group creates it. Evidence: "a module insrc/devops_cli/k8s/gateway_check.py"false_premiseat existing_tool: The plan states thatask_jevis insrc/devops_cli/ai/jev_ask.py.filesholds no entry for that path. Evidence: "The in-repo clientask_jevinsrc/devops_cli/ai/jev_ask.py:215covers the Jev call through the gateway"dan-petty commentedon Nov 26, 2026
Closed: the version to verify is gone.
The gateway manifest moved to dan-petty/homelab and now names LiteLLM
1.111.0(k8s/llm/gateway/deployment.yaml), so a check for v1.103.10 cannot pass. A repeatable gateway check (devops k8s gateway-check) is designed in #4885. Add the image and rollout read there if you want it.