Repository navigation
Conversation
…x 'period' field **Bug 1 — discover finds 0 sessions on Windows** Claude Code converts `:` in Windows drive paths to `-` when generating project slugs (e.g. `f:\AMPLIA_APP 1` → `f--AMPLIA-APP-1`), but `encode_project_path` was not sanitizing `:`, producing `f:-AMPLIA-APP-1` and failing the substring match. Fix: add `:` to SANITIZED_CHARS. Updates the existing Windows test and adds a regression test for paths with spaces. **Bug 2 — cc-economics shows $0 with ccusage 20.x** ccusage 20.x changed the monthly JSON field from `"month"` to `"period"` in the all-agents response. `MonthlyEntry` deserialization was silently returning Ok(None), zeroing out the economics report. Fix: add `#[serde(alias = "period")]` so both old and new field names are accepted. Adds a regression test covering the new field name. Reported-by: mickel.baptista@andrademaia.com
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
Thanks for chasing both of these down on a real Windows box. The drive-letter colon in the project slug was fixed by #2952, merged on 2026-08-13, which added ':' to SANITIZED_CHARS in src/discover/provider.rs and corrected the Windows test to expect C--Users-foo-bar. The ccusage field rename was fixed by #2732, merged on 2026-07-07, which added the "period" serde alias to the daily, weekly and monthly entries with a test for each, so the monthly alias here is already present. The only thing left is the combined f:\AMPLIA_APP 1 test input, and both halves of what it asserts are covered by the existing colon and space tests. Closing as covered, but please comment or reopen if you think a case was missed. |
Two independent bugs found running
rtkon Windows (Win10) with ccusage 20.9.Bug 1 —
rtk discoverscans 0 sessions on WindowsAffected: all Windows paths with a drive letter (e.g.
f:\AMPLIA_APP 1)Root cause:
encode_project_pathinsrc/discover/provider.rsdid not include:inSANITIZED_CHARS. Claude Code replaces both backslash and colon with-when generating project slugs:The substring match in
discover_sessions_in_projects_diralways missed every project directory on Windows.Fix: Add
:toSANITIZED_CHARS.test_encode_project_path_windowsassertion (was asserting the wrong slug)test_encode_project_path_windows_with_spaceas a regression testBug 2 —
rtk cc-economicsshows $0 with ccusage ≥ 20.xRoot cause: ccusage 20.x changed the monthly JSON field from
"month"to"period"in the all-agents response. Serde deserialization silently returnedOk(None), zeroing out the economics report.Fix: Add
#[serde(alias = "period")]toMonthlyEntry.monthinsrc/analytics/ccusage.rs— backwards-compatible, accepts both old and new field names.test_parse_monthly_period_fieldas a regression test