Skip to content

docs(openspec): plan #2462 Guard urlsplit in pricing local check - #2990

Merged
dan-petty merged 1 commit into
mainfrom
fix/2462-devops-ai-cost-report-shows-a
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2462-devops-ai-cost-report-shows-a

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

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/

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 10:21
@dan-petty
dan-petty self-requested a review as a code owner November 1, 2026 10:21
@dan-petty
dan-petty merged commit 80da9bb into main Nov 1, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2462-devops-ai-cost-report-shows-a branch November 1, 2026 10:21
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant