Skip to content

windsurf, ollama, antigravity: no quota is informational, not a measured 0 % (VibeTV-shop/vibetv#714) - #27

Open
DreamyTalesPAN wants to merge 2 commits into
vibetv-on-nesszer-main-0311from
claude/714-no-invented-zero
Open

DreamyTalesPAN wants to merge 2 commits into
vibetv-on-nesszer-main-0311from
claude/714-no-invented-zero

Conversation

@DreamyTalesPAN

Copy link
Copy Markdown
Collaborator

Goal

A provider without a quota never shows a measured 0 % (VibeTV-shop/vibetv#714, "never invent percentages"). RateWindow::new(0.0) serializes without usageKnown and with is_informational: false, so a consumer reads it as measured.

What changes (two commits on top of v0.70.0-vibetv.5)

  1. Windsurf: cherry-pick of windsurf: read the Devin Desktop plan cache, no invented expiry date (port of #18 to the pinned nesszer-main line) #24 (7057468, unchanged). Besides reading the Devin Desktop plan cache, it turns a plan row without quota into an error and uses RateWindow::informational for a missing primary next to a present secondary. That is the Windsurf part of Port upstream 0.57.0: re-land stranded Codex scanner, OpenCodex numeric and reserve pricing (#488-#490) nesszer/Win-CodexBar#714 (windsurf/mod.rs:165 on vibetv.5). windsurf: read the Devin Desktop plan cache, no invented expiry date (port of #18 to the pinned nesszer-main line) #24 itself stays untouched and becomes redundant once this one merges.
  2. Ollama and Antigravity legacy (new, one file each):
    • ollama/mod.rs: a settings page with a weekly block but no monthly/session block (and no wallet) built RateWindow::new(0.0) as the primary. The match now has one None arm: RateWindow::informational("No quota reported").hidden_on_card(), the same value the wallet-only page and the API path already use. rate_window_from_usage_block takes the block directly because its None case is gone.
    • antigravity/legacy_status.rs: GetUserStatus without any model that has quota_info built RateWindow::new(0.0). It now uses RateWindow::informational(LIMITS_NOT_AVAILABLE), the same text the remote path (remote.rs) already uses; the constant became pub(super).

Tests

Red first, then green:

cargo test --lib providers::ollama 48 passed, providers::windsurf 17 passed, providers::antigravity 199 passed, 1 failed: remote::tests::quota_requests_carry_bearer_and_hub_user_agent expects the Windows user agent and fails on macOS (antigravity/hub/2.9.1 darwin/arm64), not touched by this change. cargo fmt --check and clippy -D warnings report only findings that exist on the base (files not touched here / macOS dead-code).

Not checked

  • No Windows run and no VibeTV run yet; that follows with the VibeTV pin change.
  • No real Ollama or Antigravity account looked at: the cases are reproduced with the parser inputs of the tests.

Merge and release

Not merged, no tag, no release. VibeTV bumps scripts/fetch-win-codexbar.ps1 once a fork release (v0.70.0-vibetv.6) exists, together with VibeTV-shop/vibetv#700.

🤖 Generated with Claude Code

DreamyTalesPAN and others added 2 commits November 14, 2026 03:33
…(port of #18 to v0.70.0-vibetv.2)

Ports #18 (four commits, base `vibetv`) onto the
line that VibeTV actually pins (nesszer main + fork patches,
v0.70.0-vibetv.2). Only rust/src/providers/windsurf/mod.rs changes.

- Reads %APPDATA%\Devin\User\globalStorage\state.vscdb, the flat per-account
  cachedPlanInfoData:<id> entry (remainingMessages / totalMessages). The
  Windsurf folder is read only when no Devin database exists. Invalid
  counters and several cached accounts stay unavailable.
- endTimestamp <= 0 means "no end date": no "Expires" text is made up.
- A plan cache without any quota is an error, not 0 % (the behaviour of
  fork PR #15, which this line does not have for Windsurf). This line's
  infallible snapshot_from_plan became a Result for that.
- This line has no ProviderMetadata / Provider::metadata / supports_cli, so
  those parts of #18 are dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ured 0 % (VibeTV-shop/vibetv#714)

Ollama's settings page with a weekly block but no monthly/session block, and
Antigravity's GetUserStatus without any model that has quota_info, built
RateWindow::new(0.0): a measured 0 % window that serializes with usageKnown
true. Both now use RateWindow::informational like the Ollama API path and
the Antigravity remote path already do. Ollama's rate_window_from_usage_block
takes the block directly, since the None case is gone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@DreamyTalesPAN

Copy link
Copy Markdown
Collaborator Author

Windows check of this head (57db1dff), 2026-11-18. Nothing merged, nothing released; the CLI is the artifact of fork workflow run 44283667324 (VibeTV CLI test build, success), zip SHA-256 a9ac4209d895002d5adca16ab2ce5687d4fec52056e65f3e464dda2e3af40d3a (equals the run's .sha256), Defender: found no threats.

Machine: Windows 11 bench laptop, no real Windsurf/Ollama/Antigravity account. Throwaway APPDATA (copy of settings.json only); Windsurf fed through WINDSURF_STATE_DB with three synthetic SQLite plan caches. Same three files run against the pinned v0.70.0-vibetv.5 CLI and against this head:

plan cache vibetv.5 this head
plan without quota primary used_percent 0.0, is_informational false (invented 0 %) error row: Windsurf plan cache has no quota details
weekly quota only primary used_percent 0.0, is_informational false + secondary 75 % primary is_informational true + secondary 75 %
daily 100 % remaining (a real 0 % used) primary 0.0, not informational same: a real zero stays a quota

Ollama and Antigravity legacy: no account/server available, so the three red-first tests of this PR plus the Windsurf ones ran natively on Windows (cargo test --lib, stable 1.99.1, PR source tarball): 7 passed, 0 failed, including antigravity::remote::tests::quota_requests_carry_bearer_and_hub_user_agent, which fails on macOS because of the user agent and passes here.

Not checked: a live Ollama or Antigravity provider, and a VibeTV frame/Control Center run with this CLI (needs the pin change, not made).

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