fix(discover): report Windows sessions instead of always zero - #3438
Open
make0uthill wants to merge 1 commit into
Open
fix(discover): report Windows sessions instead of always zero#3438make0uthill wants to merge 1 commit into
make0uthill wants to merge 1 commit into
Conversation
On Windows `rtk discover` and `rtk session` reported 0 commands even for projects with a long transcript history. Two independent causes, both in the Claude transcript provider: 1. `encode_project_path` left the drive-letter colon intact, producing `D:-Code-...` while Claude Code writes `D--Code-...` on disk. `:` is not a legal character in a Windows directory name, so the slug it creates cannot contain one. Every lookup missed. 2. The tool_use scan matched only `"Bash"` blocks. On Windows the agent issues most commands through the `PowerShell` tool, so the bulk of the transcript was skipped even once the directory was found. `test_encode_project_path_windows` asserted the buggy slug, so it is updated to the value that actually appears on disk. Verified against a real transcript directory: after the fix `rtk discover` reports 278 commands across 10 sessions for a project that previously reported 0.
|
|
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.
Summary
On Windows,
rtk discoverandrtk sessionreport 0 commands even for projects with a long transcript history. Two independent causes in the Claude transcript provider, both fixed here:encode_project_pathleft the drive-letter colon intact, producingD:-Code-...while Claude Code writesD--Code-...on disk.:is not a legal character in a Windows directory name, so the slug it creates cannot contain one — every lookup missed.tool_usescan matched only"Bash"blocks. On Windows the agent issues most commands through thePowerShelltool, so the bulk of the transcript was skipped even once the directory was found.test_encode_project_path_windowsasserted the buggy slug (C:-Users-foo-bar), so it is updated to the value that actually appears on disk.Test plan
cargo fmt --all && cargo clippy --all-targets && cargo test— 2554 passed, 0 failedrtk discoverwent from0 sessionsto278 commands across 10 sessions, with the reported rewrites matching what the hook actually does.Targets
developas required.