Repository navigation
Description
Problem
The gateway counted more devops-review requests than the spend ledger holds. Per the review evaluation of 2026-10-02, the gateway answered 420, 203 and 252 requests during the branch reviews 20261002-142541, -163203 and -180320 (S1 to S3). The ledger holds 273, 149 and 174 rows for them, so 279 of 875 gateway requests (32%) have no row. The ledger side is rechecked: the three session windows hold exactly those rows, and each profile.json llm_calls matches. The gateway side is one Prometheus measurement and is not rechecked here, because Grafana was unreachable. The evaluation also counted about 14 gpt-oss requests on ollama-24gib during S3. The ledger has no S3 row served by 24gib, against 6 in S1 and 5 in S2.
Until this is explained, every cost and throughput figure from the ledger is a lower bound. That includes the review profile, devops ai spend and the per-backend cost #477 takes from real traffic.
Three layers send gateway requests that write no ledger row, and the data cannot tell which explains the gap:
- The retry transport. Every
LLMClientHTTP client wraps its transport in a tenacity retry transport (_create_retry_transport,src/devops_cli/ai/client/base.py:59-70, used by_shared_clientat:82-103and_create_http_clientat:73-80). It retries a 5xx, 408 or 429 status, a timeout and any transport error, up tomax_retries + 1= 5 attempts (src/devops_cli/ai/retries/__init__.py:40-100). These retries happen inside onehttp_client.post, so_dispatch_messagessees only the last outcome. Replayed at 38517a8 with a provideropenaiclient whose innermost transport answers 500 once and then a reply: the gateway gets 2 requests and the ledger gets 1 row,("chat_dispatch", "stop"). A read timeout and then a reply gives the same. - Client attempts that fail.
_dispatch_messagesrecords spend only after the provider returns (src/devops_cli/ai/client/unified.py:421-427). An attempt that raises writes nothing._retry_chat_dispatchthen tries again, up tomax_retriesmore times (unified.py:645-668;DEFAULT_AI_MAX_RETRIES = 4,src/devops_cli/config/defaults.py:84). Stacked on the transport, onechat()call against a gateway that always answers 500 sent 25 requests and wrote no row in the same replay. A stream that fails before its first chunk records nothing either (unified.py:860-873,tests/test_ai_spend_dispatch.py:357-377). A review client's read timeout is 1,200 s (DEFAULT_REVIEW_TIMEOUT_SECONDS,defaults.py:296), and the gateway's is 1,500 s (k8s/llm/gateway/configmap.yaml:202). So after a client timeout the gateway can keep generating while the transport sends the same request again. - Retries inside the gateway. The router retries a failed backend call up to 5 times within the model group (
num_retries,k8s/llm/gateway/configmap.yaml:198).devops-reviewhas no fallback group (:207-213). The client sees one request. The gateway's per-deployment counter (litellm_deployment_total_requests_total, read bysrc/devops_cli/ai/pool_load.py:124) may count each attempt.
No existing test sees the first layer. route_client (tests/llm_stream_fakes.py:85-102) replaces the whole HTTP client with a plain MockTransport, so every spend test runs without the retry transport.
A reply that fails validation is not part of the gap. Its spend is recorded inside _dispatch_messages, before _validate_response_text rejects it (unified.py:647-657), so validation retries already write rows. The evaluation's "a ledger row is written only after a successful dispatch" is correct only in that sense: a dispatch that raises writes nothing, and neither does an attempt the transport retried.
The rule that a failed call writes no row came from #599 (8b1e8d4). It holds for a connection that never opens, since no request reached the gateway. It does not hold for an error status or a timeout, where the gateway did receive the request.
Acceptance criteria
- (person-run) Measure before changing code. Run one branch review while no other client uses
devops-review. Post a table on this issue for the session window with: ledger rows; for the alias, the gateway's proxy-level request delta by status code (litellm_proxy_total_requests_metric_total); its deployment-level delta (litellm_deployment_total_requests_total); andlitellm_deployment_failure_responses_total. The table says how much of the gap is client attempts (proxy-level requests without a row) and how much is gateway retries (deployment-level minus proxy-level). - Each HTTP attempt that reaches the gateway and fails writes one ledger row, whichever layer retries it: the retry transport or
_retry_chat_dispatch. That covers an HTTP error status and a read timeout. The row has finish reasonerror, the attempt's wall time, its stage and its serving backend when known, and 0 prompt and 0 completion tokens unless the provider reported usage. A connection that never opens (ConnectError,ConnectTimeout) writes no row. A successful attempt still writes exactly one row, as today. - Streams follow the same rule. A stream the gateway answers with an error status writes one
errorrow per attempt that reached it. Thehttp-500case oftest_a_stream_failing_before_its_first_chunk_records_nothing(tests/test_ai_spend_dispatch.py:357-377) is inverted, renamed and moved onto the real retry transport, as below. Theconnectcase stays. - Tests in
tests/test_ai_spend_dispatch.pykeep the client's real retry transport. Only the innermosthttpx2.HTTPTransportis replaced by aMockTransport(a helper besideroute_client, which bypasses the retry transport), and the retry wait is patched to 0. A handler that answers 500 once and then a reply writes two rows,("chat_dispatch", "error")and("chat_dispatch", "stop"). A read timeout followed by a reply also writes two. A refused connection followed by a reply writes one. A handler that answers 500 five times and then a reply (the transport gives up once,_retry_chat_dispatchtries again) writes fiveerrorrows and onestoprow. The first, second and fourth fail on the current code. - The review profile counts failed attempts with no schema change:
llm_callsincludes them, and each stage'sfinish_reasons["error"]counts them (src/devops_cli/ai/review/profile.py:208-229).devops_cli_ai_requests_totalgets one point per failed attempt, as for every row (src/devops_cli/ai/spend/ledger.py:696). - The new tests reach no real gateway, Prometheus or DNS, and run in under 1 s together.
-
uv run devops cipasses. - (person-run) After the fix, repeat the measurement on one review. Ledger rows equal the gateway's proxy-level delta for the alias within 1%. The PR attributes any remaining difference from the deployment-level delta to gateway retries, with the counts.
Key questions
- Why measure first? (proposed) The data cannot separate the layers. If gateway retries explain most of the gap, client-side rows change little, and the missing requests are the gateway's own cost, which only its counters see. The measurement needs a live gateway and a person, so it is the first acceptance item, and its table is posted before the code is reviewed.
- Where is a failed attempt recorded? (proposed) In a thin transport wrapped inside the retry transport, the only place that sees every attempt.
_dispatch_messagesandchat_messages_streamset a context variable with the provider, model and task for the call, and the wrapper reads it. The wrapper cannot capture them when the client is built, because_shared_clientshares one HTTP client per provider class and backend type across every task'sLLMClient(base.py:98). Successful attempts stay recorded where they are now, with their tokens. - Should the retry layers be collapsed instead? (proposed) Not in this item. The transport (5 attempts),
_retry_chat_dispatch(5) and the persona page loop (DEFAULT_REVIEW_RETRY_ATTEMPTS = 6,src/devops_cli/ai/review/pipeline.py:1357-1400) multiply, but the transport is also what honoursRetry-Afteron a 429, which AGENTS.md requires. Changing how failures are retried is a separate defect. This item makes every attempt visible, which that work then needs to measure. - What does a failed attempt record? (proposed) Wall time, stage, backend and finish reason
error, with 0 tokens unless the provider reported usage. Whether the backend processed the prompt before failing is unknown, so token totals stay honest lower bounds instead of guesses, while request counts and busy time become complete. Cost follows the tokens, so a failed attempt costs 0. - Should the ledger also record the gateway's internal retries? (proposed) No. The ledger records what this client sent. If the measurement shows that gateway retries matter, reading the gateway's counters belongs with feat(ai): llm gateway tuning cost from real traffic and no-load capacity estimates #477, which takes per-backend cost from real traffic.
- Should this fold into fix(ai): response-cache hits are counted as cached requests #816? (proposed) No. fix(ai): response-cache hits are counted as cached requests #816 records requests the response cache answered, which never reached the gateway. This item records requests that reached the gateway and failed. Both write through
track_request_spend, so whichever lands second rebases. - Do direct requests (
src/devops_cli/ai/direct.py) change too? (proposed) No. They also record only on success, but a review never uses them: persona review (PydanticAgent,src/devops_cli/ai/agents/agent.py:887), verification and compose all go throughLLMClient. File them separately if another consumer needs it.
Depends on: none.
Order: after #960 (v0.2.25), which changes LLMClient's timeouts in ai/client/unified.py, the file this item edits. If #816 or #591 is scheduled in the same release, sequence them: all three change how unified.py records a request.
Related: #816 (cache hits in the ledger). #591 (reasoning-token share and provider-reported stream usage). #477 (gateway cost from the ledger's per-backend rows). #599 (set the rule that a failed call records nothing). #960 (client timeouts). #1001 (one model seam; the record path moves with it).
Scope added 2026-10-02 from review session 20261002-214641 (.data/review-evaluation-20261002-s6.md, section 1): one verifier call for ai/mcp/server.py carried 42,490 prompt tokens, was cut, and took 408.9 s on ollama-16gib, 7.6 times the identical call in the previous session (53.8 s). For its last 276 s the run waited on that call alone. Explaining it needs gateway-side timing per attempt, which this item's measurement should record.
Scope added 2026-10-03 from review sessions 20261003-005122 (S7) and 20261003-012555 (S8) (.data/review-evaluation-20261003-s7-s8.md, sections 0, 1 and 3). Lines are at da50329. The gap also shows on the backend side, and the ledger cannot say which model served a call.
-
Backend requests with no row. ollama-16gib-fast's log shows 24 chat requests in S7 and 27 in S8 (the evaluation's count; the log is not saved with the sessions). The ledger holds 11 and 14 rows served by it (rechecked read-only: rows 9950-10008 and 10009-10069, none with finish reason
error). Of the excess, 13 and 9 requests had status 200 and fall in the persona stages. S8's other 4 are the HTTP 500s below. Both runs had a persona-stage stall after two 8,192-token persona cuts on 16gib-fast (rows 9971/9972 in S7, 10029/10033 in S8). In S7, rows 9973-9982 ran 186-393 s, against about 30 s before. In S8, rows 10034-10042 ran 189-278 s, against 4.5-54 s before. Both stalls coincide with unledgered 16 GiB requests of 1.5 to 4.4 minutes each. Retries outside the ledger, another client and a model swap are all possible; the data cannot tell them apart. The 48 GiB and 64 GiB logs were lost when their pods were replaced, so those tiers are unmeasured. -
Failed attempts with no row. S8's 4 HTTP 500s at 01:36:11 came from the old gateway pod during the verification stage, which spanned two gateway redeploys (01:35:21 and 01:39:31). None of them has a ledger row. Whether the client saw them (the retry transport or
_retry_chat_dispatch) or the gateway's router retried them inside one client request (num_retries) is not known. Only the first case gets a row under this item's fix. -
The model is not recorded. All 120 S7/S8 rows have
model=devops-review, the alias, because both record paths passself._config.model(src/devops_cli/ai/client/unified.py:486and:905). The client parses the reply's ownmodelintoLLMResponse.model(src/devops_cli/ai/client/openai.py:149) and uses it only for the trace span'sgen_ai.response.modeland thellm_response_receivedevent (unified.py:145,:129). The response cache also stores the alias (unified.py:556).served_bycomes from thex-litellm-model-api-baseheader (openai.py:176,:206;src/devops_cli/config/constants.py:2143) and names a backend, not a model. A backend does not fix the model either: in S8, 48gib-slow served a gpt-oss reply with a reasoning trace (row 10053) and a qwen3-coder reply (row 10065). The evaluation's per-model figures (gpt-oss cut 9 of 20 verifier calls, qwen3-coder 0 of 33) had to be inferred from tier, the uncommitted gateway config read after the runs, and reasoning traces. feat(review): every reported finding is admitted with its producer's anchor and a location that exists in the reviewed commit, the review writes findings.sarif, and review.md shows findings and suppressions #871 names the same ledger gap but puts the model on findings andStageProfile, not on ledger rows. Both read the reply'smodel, so whichever lands second reuses the other's reading. -
Each attempt's row records the backend that served it and the model the gateway resolved the alias to, in a new column beside
model, which keeps the requested alias. The column is added in place likeserved_by(_ADDED_COLUMNS,src/devops_cli/ai/spend/ledger.py:64-68). A successful attempt takes the model from the reply. A failed attempt records backend and model when the error response names them, and null otherwise. A test whose handler answers with replymodelgpt-oss:20band the served-by header writes both on one row. It fails on the current code, which writes onlydevops-review. -
Streams record the same two fields. A test on the stream path writes both, and fails on the current code.
-
(person-run) The measurement table adds each tier's own request count for the session window, from the ollama logs or metrics, next to the ledger rows by
served_by. S7 and S8 measured the gap there. No gateway or ollama rollout runs during the window, and the table records the gateway configmap and theOLLAMA_MAX_LOADED_MODELSsetting in effect. -
(person-run) After the fix, the measured review's verifier calls can be counted per model from the ledger alone, and the counts match the backend logs per tier.
Key question added: Where does the resolved model come from? (proposed) The reply's own model field, which the client already parses. Whether the gateway returns the deployment's model or the alias there was not checked, because no gateway call was made for this evaluation. If it returns the alias, the PR reads the deployment from a gateway response header instead and says which. The person-run measurement checks it once against the live gateway.
Update 2026-10-08: refinement
The gap stands. The retry transport is now in the factory (http/client.py:160-166), so the recorder sits between egress and retry there. _retry_chat_dispatch re-raises at once (#1069), and review deployments set num_retries: 0 with a fallback (k8s/llm/gateway/configmap.yaml:85-97, :196).
- A handler answering 500 five times writes five
errorrows, and the call raises.
The alias is passed atai/client/unified.py:452,:586,:907.
Proposed design
Problem statement
The spend ledger does not record every attempt a gateway request makes, particularly retries from the client-side transport and the retry dispatch logic. This causes a significant gap between the number of requests recorded in the ledger versus what the gateway actually processes, leading to underreported costs and throughput metrics.
Acceptance criteria
- Criterion 1: Before changing code, measure the gap by running one branch review while no other client uses
devops-review, and post a table with ledger rows, proxy-level request delta by status code, deployment-level delta, and failure responses.
Verification: Run one branch review with a live gateway and Prometheus metrics, then post a table showing the session window data on this issue. - Criterion 2: Each HTTP attempt that reaches the gateway and fails writes one ledger row, whether it's retried by the retry transport or
_retry_chat_dispatch, with finish reasonerrorand relevant metadata.
Verification: Test that a handler answering 500 once and then a reply writes two rows:("chat_dispatch", "error")and("chat_dispatch", "stop"). - Criterion 3: Streams follow the same rule for failed attempts, with one
errorrow per attempt that reached the gateway.
Verification: Test that a stream failing before its first chunk records no row (current behavior) but after the fix, it should record anerrorrow. - Criterion 4: Tests in
test_ai_spend_dispatch.pyuse the real retry transport and verify correct ledger entries for various failure scenarios.
Verification: Run existing tests with updated mock handling to confirm that 500 errors followed by a reply correctly write multiple rows. - Criterion 5: The review profile counts failed attempts without schema changes, including them in
llm_callsand updatingfinish_reasons["error"].
Verification: Verify that the review profile'sllm_callsincludes failed attempts andfinish_reasons["error"]is updated accordingly. - Criterion 6: All new tests run in under 1 second and do not require real gateway, Prometheus or DNS access.
Verification: Run the test suite locally to ensure all tests complete within 1 second. - Criterion 7: A changelog fragment is created for this fix under
### Fixed.
Verification: Check thatchangelog.d/1019.mdexists and contains a correct entry under### Fixed. - Criterion 8: Running
uv run devops cipasses all checks.
Verification: Execute the CI command locally to confirm all checks pass. - Criterion 9: After the fix, ledger rows equal the gateway's proxy-level delta for the alias within 1%.
Verification: Repeat the measurement after the fix and ensure that any remaining difference from deployment-level delta is attributed to gateway retries with correct counts.
Key questions
- Why measure first?: The data cannot separate the layers. If gateway retries explain most of the gap, client-side rows change little, and the missing requests are the gateway's own cost, which only its counters see. The measurement needs a live gateway and a person, so it is the first acceptance item, and its table is posted before the code is reviewed. [sources: src/devops_cli/ai/client/unified.py:421-427]
- Where is a failed attempt recorded?: In a thin transport wrapped inside the retry transport, the only place that sees every attempt.
_dispatch_messagesandchat_messages_streamset a context variable with the provider, model and task for the call, and the wrapper reads it. [sources: src/devops_cli/ai/client/base.py:59-70] - Should the retry layers be collapsed instead?: Not in this item. The transport (5 attempts),
_retry_chat_dispatch(5) and the persona page loop (DEFAULT_REVIEW_RETRY_ATTEMPTS = 6) multiply, but the transport is also what honoursRetry-Afteron a 429, which AGENTS.md requires. Changing how failures are retried is a separate defect. (proposed) [sources: src/devops_cli/ai/retries/init.py:40-100] - What does a failed attempt record?: Wall time, stage, backend and finish reason
error, with 0 tokens unless the provider reported usage. Whether the backend processed the prompt before failing is unknown, so token totals stay honest lower bounds instead of guesses, while request counts and busy time become complete. [sources: src/devops_cli/ai/client/unified.py:421-427] - Should the ledger also record the gateway's internal retries?: No. The ledger records what this client sent. If the measurement shows that gateway retries matter, reading the gateway's counters belongs with feat(ai): llm gateway tuning cost from real traffic and no-load capacity estimates #477, which takes per-backend cost from real traffic. (proposed) [sources: src/devops_cli/ai/spend/ledger.py:696]
- Should this fold into fix(ai): response-cache hits are counted as cached requests #816?: No. fix(ai): response-cache hits are counted as cached requests #816 records requests the response cache answered, which never reached the gateway. This item records requests that reached the gateway and failed. Both write through
track_request_spend, so whichever lands second rebases. (proposed) [sources: src/devops_cli/ai/client/unified.py:421-427] - Do direct requests (
src/devops_cli/ai/direct.py) change too?: No. They also record only on success, but a review never uses them: persona review (PydanticAgent,src/devops_cli/ai/agents/agent.py:887), verification and compose all go throughLLMClient. File them separately if another consumer needs it. [sources: src/devops_cli/ai/direct.py] - Where does the resolved model come from?: The reply's own
modelfield, which the client already parses. Whether the gateway returns the deployment's model or the alias there was not checked, because no gateway call was made for this evaluation. [sources: src/devops_cli/ai/client/openai.py:149]
Open questions
- Backend requests with no row. ollama-16gib-fast's log shows 24 chat requests in S7 and 27 in S8 (the evaluation's count; the log is not saved with the sessions). The ledger holds 11 and 14 rows served by it (rechecked read-only: rows 9950-10008 and 10009-10069, none with finish reason
error). Of the excess, 13 and 9 requests had status 200 and fall in the persona stages. S8's other 4 are the HTTP 500s below. Both runs had a persona-stage stall after two 8,192-token persona cuts on 16gib-fast (rows 9971/9972 in S7, 10029/10033 in S8). In S7, rows 9973-9982 ran 186-393 s, against about 30 s before. In S8, rows 10034-10042 ran 189-278 s, against 4.5-54 s before. Both stalls coincide with unledgered 16 GiB requests of 1.5 to 4.4 minutes each. Retries outside the ledger, another client and a model swap are all possible; the data cannot tell them apart. The 48 GiB and 64 GiB logs were lost when their pods were replaced, so those tiers are unmeasured. - Failed attempts with no row. S8's 4 HTTP 500s at 01:36:11 came from the old gateway pod during the verification stage, which spanned two gateway redeploys (01:35:21 and 01:39:31). None of them has a ledger row. Whether the client saw them (the retry transport or
_retry_chat_dispatch) or the gateway's router retried them inside one client request (num_retries) is not known. Only the first case gets a row under this item's fix. - The model is not recorded. All 120 S7/S8 rows have
model=devops-review, the alias, because both record paths passself._config.model(src/devops_cli/ai/client/unified.py:486and:905). The client parses the reply's ownmodelintoLLMResponse.model(src/devops_cli/ai/client/openai.py:149) and uses it only for the trace span'sgen_ai.response.modeland thellm_response_receivedevent (unified.py:145,:129). The response cache also stores the alias (unified.py:556).served_bycomes from thex-litellm-model-api-baseheader (openai.py:176,:206;src/devops_cli/config/constants.py:2143) and names a backend, not a model. A backend does not fix the model either: in S8, 48gib-slow served a gpt-oss reply with a reasoning trace (row 10053) and a qwen3-coder reply (row 10065). The evaluation's per-model figures (gpt-oss cut 9 of 20 verifier calls, qwen3-coder 0 of 33) had to be inferred from tier, the uncommitted gateway config read after the runs, and reasoning traces. feat(review): every reported finding is admitted with its producer's anchor and a location that exists in the reviewed commit, the review writes findings.sarif, and review.md shows findings and suppressions #871 names the same ledger gap but puts the model on findings andStageProfile, not on ledger rows. Both read the reply'smodel, so whichever lands second reuses the other's reading. - Each attempt's row records the backend that served it and the model the gateway resolved the alias to, in a new column beside
model, which keeps the requested alias. The column is added in place likeserved_by(_ADDED_COLUMNS,src/devops_cli/ai/spend/ledger.py:64-68). A successful attempt takes the model from the reply. A failed attempt records backend and model when the error response names them, and null otherwise. A test whose handler answers with replymodelgpt-oss:20band the served-by header writes both on one row. It fails on the current code, which writes onlydevops-review. - Streams record the same two fields. A test on the stream path writes both, and fails on the current code.
- (person-run) The measurement table adds each tier's own request count for the session window, from the ollama logs or metrics, next to the ledger rows by
served_by. S7 and S8 measured the gap there. No gateway or ollama rollout runs during the window, and the table records the gateway configmap and theOLLAMA_MAX_LOADED_MODELSsetting in effect. - (person-run) After the fix, the measured review's verifier calls can be counted per model from the ledger alone, and the counts match the backend logs per tier.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 3, 2026
What S10 adds (review session
20261003-034353, release/v0.2.25 at d6ebe97;.data/review-evaluation-20261003-s10.md, sections 1 and 3). A measured case of attempts the ledger doesn't hold.Count. The backends served 22 chat requests against 16 ledger rows (ollama pod logs, and in-cluster Loki for 48gib). All 6 extras are attempts behind 3 logical verification calls (pricing,
verification.pyand runner), each served three times.Cost. The discarded attempts used 673.4 backend-seconds:
verification.pyand pricing second attempts on 48gib: 71.9 and 56.6 s.The ledger records durations of 228.7-269.4 s, while the final attempts took 28.4-50.6 s.
Timing.
verification.py, about 03:55:21 for the other two.Gateway.
verification.pyand pricing second attempts finished (03:56:06.6 and 03:56:17.6) with no gateway 200.Runner cut. The runner's cut verdict (2 findings) is an artifact of this.
A possible mechanism [hypothesis]: LiteLLM
router_settingsnum_retries: 5(k8s/llm/gateway/configmap.yaml:205, withallowed_fails: 3andcooldown_time: 30). It hasn't been considered so far. The gateway timeout (1,500 s,:209) and the client read timeout (1,200 s) are ruled out.Limit: attempts missing from the ledger are matched to calls by token counts only.
dan-petty commentedon Oct 3, 2026
A measured case of the gap between the client and gateway timeouts (gemma4:31b, 2026-10-03). Source: the model-choice evaluation's verification pass (
.data/model-choice-20261003.md). Ollama and event logs were read withkubectl, and the ledger read-only.What happened.
cudaMalloc ... out of memory/failed to create MTP contextat-c 512000 -np 4, which fix(k8s): every ollama tier keeps one model loaded and serves one request at a time, so its kv cache holds one context #1061 has since fixed.DEFAULT_REVIEW_TIMEOUT_SECONDS,config/defaults.py:300). So the client had already abandoned those requests and sent them again:_retry_chat_dispatchretries on any exception (ai/client/unified.py:630).timeout: 1500(k8s/llm/gateway/configmap.yaml:209). Each request ran on gemini's slots for 5 minutes after the client gave up on it, and the router'snum_retries: 5could send it once more.What it means for this item.
Related, filed today.
timeout: 1100on the newdevops-backgroundgroup, under the client's 1,200 s, for this reason.dan-petty commentedon Oct 3, 2026
Review redesign (#1137, 2026-10-03): this item is a phase P0 child. Its body stands; its own ordering condition (after #960) is met. P0's "backend chats = ledger attempts" check (#1069) and #1147's call counts depend on it, and the review job queue (phase P3) builds its attempt records on it rather than absorbing it.
dan-petty commentedon Oct 17, 2026
Amendment from the gateway usage investigation of 2026-10-17, at main 3dd7fa6.
New evidence
devops-backgroundon 2026-10-10, sent by roadmap-service. Roadmap-service recorded all 57 of its successes.increase()on devops-cli's own counters, which undercount sparse series (fix(telemetry): devops-cli metrics reach prometheus in one hop, a late sample no longer drops a whole batch, and the collector runs only what its pipelines use #1132).Corrections to the body
src/devops_cli/ai/client/unified.py:660-667re-raises with the comment "The HTTP transport is the single retry layer". The transport is the only client-side retry layer._retry_chat_dispatchthen tries again" and the "500 five times then a reply" test case describe older code. The test case needs the current counts.k8s/README.md:91still says the client retries "in its HTTP transport and again in its dispatch loop". Fix it in this item's PR.Scope notes
request_typefrom the same context variable so embedding attempts are covered once that item lands.Priority stays P2: no P1 waits on it.
dan-petty commentedon Oct 20, 2026
Status set back to New at 2954109: refine found it not ready (see Key questions, Fit and Suspected block in the proposed design in the issue body).
fix(ai): spend ledger records every attempt the gateway failed (#1019) (
chore(main): release 0.4.0 (#1960)