Repository navigation
fix(ai): guard urlsplit in cost report for unparseable backend - #4226
Merged
Merged
Conversation
Issue #2462 reports that `devops ai cost report` stops with `ValueError: Invalid IPv6 URL` when the spend ledger holds a served_by value such as `http://[::1`. `_is_single_server_local` in `src/devops_cli/ai/spend/pricing.py` calls `urlsplit(clean)` on the stored value with no guard. `extract_served_by` refuses such a value in a new row, but a ledger row from before that change can hold one. The report must show the row and show its serving backend as `unknown`. Closes #2462 Change: `openspec/changes/archive/2026-11-09-2462-devops-ai-cost-report-shows-a/`
dan-petty
force-pushed
the
fix/2462-devops-ai-cost-report-shows-a
branch
from
November 9, 2026 13:27
9e2025a to
40c2e8c
Compare
dan-petty
marked this pull request as ready for review
November 9, 2026 13:38
Owner
Author
Check resultsHead commit:
Fail-to-pass run: https://github.com/dan-petty/devops-cli/actions/runs/42625717147/job/129188837254 Skipped check: Plan Check |
dan-petty
pushed a commit
that referenced
this pull request
Nov 9, 2026
🤖 I have created a release *beep* *boop* --- ## [0.100.2](v0.100.1...v0.100.2) (2026-11-09) ### Bug Fixes * **ai:** guard urlsplit in cost report for unparseable backend ([#4226](#4226)) ([961f406](961f406)) * **k8s:** list helm repo and upgrade in deploy-stack dry-run ([#4227](#4227)) ([09bde83](09bde83)) * **roadmap:** cap the output of a Claude group and name a length stop ([#4224](#4224)) ([7e84a13](7e84a13)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #2462 reports that
devops ai cost reportstops withValueError: Invalid IPv6 URLwhen the spend ledger holds a served_by value such ashttp://[::1._is_single_server_localinsrc/devops_cli/ai/spend/pricing.pycallsurlsplit(clean)on the stored value with no guard.extract_served_byrefuses such a value in a new row, but a ledger row from before that change can hold one. The report must show the row and show its serving backend asunknown.Closes #2462
Change:
openspec/changes/archive/2026-11-09-2462-devops-ai-cost-report-shows-a/