Repository navigation
docs(openspec): plan #2462 Guard urlsplit in pricing local check - #2990
Merged
Merged
Conversation
dan-petty
marked this pull request as ready for review
November 1, 2026 10:21
This was referenced Nov 1, 2026
Closed
dan-petty
added a commit
that referenced
this pull request
Nov 1, 2026
This pull request corrects the OpenSpec plan for issue #2462 in place. An evaluation of the staging pull request #2990 found defects in the plan. The plan named wrong test paths. It had no failing-first test cases. It did not put the evidence for the premise in the Feasibility section. Its spec deltas did not cover each changed capability. The corrected plan names the real test files. It adds the failing-first cases. It records the premise evidence. It carries the spec deltas in ai-spend-pricing and ai-reply-server. This change touches only the change folder of #2462. It changes no code and no test. Plans #2462
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.
Plans #2462
Guard the urlsplit call in _is_single_server_local against ValueError. When a spend ledger row holds a served_by value that urlsplit cannot parse, such as http://[::1, the devops ai cost report command crashes with an unhandled ValueError. New rows cannot hold such a value because extract_served_by refuses it, but legacy rows from before that change can. This change wraps the urlsplit call in a try-except ValueError. When urlsplit raises, the function returns False, treating the server as not local. The report then shows the row and the backend as unknown, instead of exiting with a traceback. The pattern of catching ValueError around a parse call is already established in _is_local_host in the same file. No new dependency is added.
Change:
openspec/changes/2462-devops-ai-cost-report-shows-a/