Repository navigation
windsurf: read the Devin Desktop plan cache, no invented expiry date (VibeTV-shop/vibetv#285) - #18
DreamyTalesPAN wants to merge 4 commits into
Conversation
Devin Desktop writes %APPDATA%\Devin\...\state.vscdb with a flat per-account cachedPlanInfoData:<id> entry. Read it before the legacy Windsurf database; a missing message total stays an error and several cached accounts stay unavailable instead of being guessed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Devin Desktop writes endTimestamp = 0 when the plan has no end date. The fork read it as Unix milliseconds and showed "Expires 1970-01-01". A nonpositive end timestamp now stays unknown, so no expiry text is made up. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
marcus7989
left a comment
There was a problem hiding this comment.
[K-Marcus] W240 own review of 0600ef996fc937137439ad6074cb4bbf16ff193c (Marcus 413a / Paul 409a).
Fixed here, without returning findings to the author:
- Flat
remainingMessages/totalMessagesdo not establish a message or credit unit. The description now sayscached units (unit unverified). - No cadence is present in the flat cache. Its primary label is now
Cached quota, avoiding the legacyDailyfallback; no reset or duration is invented. - Invalid flat counters (negative remaining, remaining above total, extreme negative overflow) stay unavailable instead of being clamped to a fabricated 0/100% or panicking.
The original nonpositive-expiry fix is correct. Reverting its filter makes both expiry tests red (1970-01-01 / 1969-12-31). New counter/unit tests also failed before our fixes; focused native macOS tests now pass 17/17. Format and whitespace checks pass. Full backend tests: 2001 pass, 4 fail, 1 ignored; unchanged .15 baseline: 1995 pass with the identical four macOS path failures. Excluding exactly those four gives 2001 library + 1 binary test passing. Clippy --all-targets -- -D warnings is red on both baseline and candidate with identical diagnostics, none in Windsurf. Tests use Rust 1.98.0; installed Clippy/rustfmt are 1.91.1.
Sources: Devin quota documentation, plan/usage documentation, and the package/cache analysis. The docs distinguish token-priced self-serve quotas, enterprise ACUs and legacy prompt credits; no verified mapping of these flat cache fields to any billing unit or cadence was found. PR #18 supplies an author-reported Windows TEXT/JSON sample, not an independently re-read database here.
No further actionable finding in my current code review. This is not merge approval: native Windows restart tests, full tests/build and the real cache/visible result comparison remain required on the exact final candidate. Unit/cadence semantics remain a decision item for Marcus through the orchestrator. No merge, tag, prerelease, device access or other-chat messages by W240.
|
[K-Marcus] @codex review Please review exact head |
|
[K-Marcus] @codex review Please review exact head W280 changes only the Devin flat-cache unit from Local Rust 1.98.0: focused Windsurf tests 17/17 pass; backend build and desktop unit-test build pass; fmt and whitespace checks pass. Full backend suite: 2001 pass, 4 fail, 1 ignored, with exactly the same four failures freshly reproduced on the unchanged parent. Desktop tests: 429 pass, 1 Windows-path comparison fails on macOS. Backend Clippy reports the same 19 library / 12 library-test errors on parent and candidate, outside Windsurf. No app/device test, merge or release by W280. The fork currently registers no Actions workflows and reports no CI checks/statuses; that is not a green CI result. Native Windows retest will be requested from Paul on vibetv-win. |
|
[K-Marcus] @codex review One retry of the unanswered 2026-10-29 13:13Z request. Please review exact head Paul's native Windows retest on vibetv-win is green: 2,043 backend/CLI tests passed (2,042 library + 1 CLI), 0 failed, 1 pre-existing ignored; static-CRT x64 release CLI builds; live JSON reports W299 is preparing an artifact-only .17 delivery plan containing #18 plus the existing #19/.16 dashboard contract. No merge, release/tag publication or .16 pin change. No automated review result or merge approval is claimed. Please check the current cache validation, message counter/unit semantics, missing cadence and nonpositive expiry handling. |
|
[K-Marcus] @codex review W307 follow-up on the still-unanswered review of exact, unchanged head Paul reports 2,043 native Windows library/CLI tests passing at this head: https://github.com/VibeTV-shop/vibetv/issues/284#issuecomment-6500249561 . We are now preparing an independent cumulative CI source in order #21 → #20 → #19 → #18, with no target-branch merge. The published .16 pin remains unchanged; no .17 release/pin is part of W307. No merge approval is claimed. |
|
[K-Marcus] W307 independent native cumulative-source validation finished GREEN: .15 + #21 → #20 → #19 → unchanged #18 This is a pre-merge cumulative source, not a green PR-head check or a replacement for the pending review requested earlier today. 0 review threads; no Codex bot result/reaction yet. No device/account-display comparison, merge, tag/release or .17 pin action. |
|
[K-Marcus] W307 final independent test evidence for the unchanged four-PR cumulative source The current-head review follow-up has passed its 20-minute observation window with no bot review, inline finding or bot reaction; 0 review threads. Review stays pending. The account-display comparison and W235/Marcus customer-flow gates remain as previously recorded. No merge, tag/release or .16/.17 pin action. |
Goal
Windows customers who use Devin Desktop (the renamed Windsurf) see their message quota in VibeTV, and no plan end date that was never reported (VibeTV-shop/vibetv#285).
What Devin users see today
Devin Desktop no longer writes the old
windsurf.settings.cachedPlanInfoentry under%APPDATA%\Windsurf. The Windsurf provider finds nothing and shows no usage.What changes (two commits)
windsurf: read the Devin Desktop plan cache: reads%APPDATA%\Devin\User\globalStorage\state.vscdb, the flat per-accountcachedPlanInfoData:<id>entry (remainingMessages/totalMessages). The Windsurf folder is read only when no Devin database exists. A missing total stays an error; several cached accounts stay unavailable instead of being guessed.Ignore nonpositive Devin cache expiry timestamps:endTimestamp <= 0means "no end date", not a date. Before, the real cache (endTimestamp: 0) becameExpires 1970-01-01next to the plan name. Now no expiry text is made up. Positive timestamps are read as before. One filter plus tests (flat_cache_with_zero_end_timestamp_has_no_expiry,flat_cache_with_negative_end_timestamp_has_no_expiry; both failed before the fix withExpires 1970-01-01/Expires 1969-12-31).Evidence from a real Devin Desktop 3.11.228 cache
Read-only look at a signed-in Windows machine, values sanitized: exactly one matching entry, SQLite TEXT, flat JSON with 15 fields, no
usageorquotaUsageobjects.remainingMessages = 2500,totalMessages = 2500,endTimestamp = 0. That is a real 0 % used (quota present, nothing used), not an invented zero, and no expiry.Open
messages; the cache alone does not show whether they are messages, credits or scaled credits. Needs a second reading after real use (counter should drop).Stacked
Base is
claude/273-claude-window-wins(#17), which sits on #16 and #15. The diff here is only the two Windsurf commits inrust/src/providers/windsurf/mod.rs. Merge #15, #16, #17 first; GitHub then moves the base.Tests
cargo test providers::windsurf::16 passed (macOS),cargo fmt --all --checkclean.cargo clippy -- -D warningsreports the same 19 errors on the base commit and with this change; none inwindsurf/mod.rs. No CI workflows in this fork. Windows run follows with the VibeTV rehearsals after the pin bump.Ask to Marcus
Merge and tag (next number after the stacked ones); VibeTV then bumps the pin in
scripts/fetch-win-codexbar.ps1.🤖 Generated with Claude Code