Treat Vertex usage fetch failures as errors, not 0% - #406
Conversation
Resource Manager metadata, HTTP errors, and sibling Auto probe fallbacks no longer invent a healthy 0% reading (SBS-1061). Co-authored-by: Tyler <tyler@southboundsoftware.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | 0b5908b | Commit Preview URL Branch Preview URL |
Aug 23 2026, 10:30 PM |
|
Warning Review limit reachedNext included review available in 45 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Tyler <tyler@southboundsoftware.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_94180784-177d-4da4-830a-9da6f2afb00b) |
Summary
Vertex AI always looked empty/healthy because Resource Manager metadata and HTTP failures collapsed into
RateWindow::new(0.0). Fetch, decode, and metadata-without-usage paths now return an error instead of inventing 0%. Overview, Activity, and MCP/statusline skip that dummy 0% as well.Sibling Auto
probe_cli/ missing-field fail-open-to-zero paths in Amp, MiniMax, and Kiro are fail-closed the same way. Tests panic if those paths reportOk(0%)again.Related issue
Fixes SBS-1061
Affected areas
get_statusValidation
Hosted CI (required gate) — green on
0b5908bahttps://github.com/tsouth89/ceiling/actions/runs/32670749822
fmt --check,cargo test rust/Cargo.toml,clippy -D warnings)cargo test+clippy -D warningson the Tauri crate)Local gate (Linux agent)
Windows
scripts\local-check.ps1is not available on this host. HostedRust / desktopcovers that crate.Tests prove failure is not 0%; they fail without the fix
Restoring the old fail-open (
Ok(RateWindow::new(0.0))) on the Resource Manager HTTP/metadata mappers panics:Those two were reverted after the proof. The same helper is used for Amp/MiniMax/Kiro sibling paths.
New tests that stay green:
providers::vertexai::tests::http_failure_is_not_reported_as_zero_percentproviders::vertexai::tests::http_decode_failure_is_not_reported_as_zero_percentproviders::vertexai::tests::resource_manager_metadata_is_not_reported_as_zero_percentproviders::vertexai::tests::decode_failure_is_not_reported_as_zero_percentproviders::vertexai::tests::cli_presence_is_not_reported_as_zero_percentAmp/MiniMax configured-probe + missing-field tests
Kiro CLI-without-metrics test
capacityPresentationVertex error snapshot does not invent 0%widget_snapshot_omits_an_errored_vertex_zero_percent(passed on hosted Rust / desktop)powershell.exe -ExecutionPolicy Bypass -NoProfile -File scripts\local-check.ps1(Windows-only; not available here)Other: hosted CI + matching local commands above
UI / tray proof
Notes for reviewers
_ => Ok(0%)arm is gone.usage_from_resource_manager_http/usage_from_resource_manager_metadata/usage_from_cli_presenceare the fail-closed mapping.projects.getis still not a quota API. A 200 with project metadata is now a Parse error, not a healthy 0%.from_errorstill stores a dummy 0% primary (existing contract). Glance meters,allMeasuredWindows, and widget/MCP entry writing now refuse to publish it.Note
Treat Vertex, Amp, Kiro, and MiniMax usage fetch failures as errors, not 0%
vertexai,amp,kiro, andminimaxnow returnProviderError(Parse, AuthRequired, Other, or NotInstalled) when metrics are missing, HTTP fails, or only CLI presence/config is detectedusage_from_amp_payload,usage_from_resource_manager_http,MiniMaxProvider.parse_usage_response) so missingused/limitor non-positive quotas produce parse errors rather than defaultsglanceMeters,allMeasuredWindows,widget_entry_from_usage_snapshot) now early-returns null/empty whenprovider.erroris set, preventing 0% readings in glance meters, Activity timelines, and widget entriesNoneor an error; check consumers ofUsageSnapshotandWidgetProviderEntryin providers.rs and capacityPresentation.tsMacroscope summarized 0b5908b.