Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
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.
Found by the 0.60.4-0.69.0 port gap audit.
What upstream did
Upstream CodexBar v0.60.5, bullet 4 (steipete#3688, commit 2d93342): preliminary Claude proxy usage rows (null
stop_reason, input > 0, output == 0, no cache fields) are excluded from cost and tokens, but are now counted per day and per model asincompleteRequestCount. A completed record with the same key wins over an incomplete one. A day or period that only has incomplete requests stays unavailable instead of showing $0. "Incomplete" markers then show up in the menu and tray, chart tooltips, Usage & Spend, share/export, CLI text, CLI JSON and the web dashboard.What this ports
rust/src/cost_scanner/claude_incomplete.rs,cost_scanner.rs): the existing preliminary-row filter (already matching upstream) now records each excluded row. Rows are de-duplicated by the existing Claude dedup key, dropped if a completed row with the same key was counted, and bucketed per local day and per model.CostSummarygainsincomplete_request_countandincomplete_by_model;ClaudeChartSnapshotgainsdaily_incomplete; newget_daily_cost_and_incomplete_history.Total:line gets· Incompleteplus aIncomplete: N requests lacked final usage and were excluded from tokens and cost.line; an incomplete-only scan prints "No completed usage data found" plus that note instead of "No usage data found".serve/costJSON:incompleteRequestCountonly when > 0, and per-dayincompleteRequestCounton theservedaily rows.commands/chart.rs): optionalincompleteRequestCountonDailyCostPointandProviderLocalUsageSummary(omitted when zero).IncompleteRequestsLabelandIncompleteRequestsDetail(en-US; other locales fall back).What this leaves out, and why
serveweb dashboard HTML markers: not done in this micro PR to keep the change reviewable. The data is now available in the bridge andserveJSON for a follow-up.incompleteRequestCountinmodelBreakdownsJSON, and the cached-report migration: Windows has nomodelBreakdownspayload or persisted Claude report cache (the scanner rebuilds from transcripts on every scan), so there is nothing to migrate. Per-model counts are kept onCostSummaryonly.Tests run
cargo +1.98.0 fmt --allcargo +1.98.0 clippy --workspace --all-targets -- -D warningson bothrust/Cargo.tomlandapps/desktop-tauri/src-tauri/Cargo.toml: cleancargo test -p codexbar: 2165 passed (new: tracker unit tests, scan reconciliation test, CLI JSON/suffix tests, serve daily JSON test)cargo test -p codexbar-desktop-tauri: 461 passed, 1 failed: the knownbootstrap_payload_exposes_every_provider_variant(fixed by Isolate bootstrap payload test from real settings #684, unrelated)pnpm test(405 passed, includes newincompleteRequestsandMiniBarCharttests),pnpm run lint(only pre-existing warnings),pnpm run build: cleanUI proof
UI-affecting (menu card note, chart tooltips). Draft: CUA proof on a fresh debug build is still to do and is not attached yet.