GeezerVison is showing github.com — fix(server): canonicalize usage transcript sources by yashranaway · Pull Request #10317 · pingdotgg/t3code
Conversation
yashranaway
commented
Sep 6, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
What Changed
Resolve existing Claude, Codex, and Grok transcript directories to their real paths before scanning and building source fingerprints. Missing or inaccessible directories keep their configured paths and existing handling.
Why
Two environments configured through different paths to the same transcript directory produce different fingerprints. A symlinked provider home makes the usage page count the same tokens and sessions twice even though the filesystem identity matches.
Testing
UsageService.test.ts passes, 7/7.
- A real directory alias scanned through two service instances reproduces 10 output tokens instead of 5 before the fix; afterward the transcript and session count once.
- Server typecheck, targeted lint, and formatting pass.
Checklist
- One focused change
- Explained what changed and why
- Added regression coverage for the changed behavior
- No UI layout or animation changes
Model: GPT-6 Astra
Harness: T3 code
Note
Canonicalize transcript directory paths via real-path resolution in UsageService.collectDirs
UsageService.collectDirs now resolves each configured transcript directory through fs.realpath before scanning, so a direct path and a directory alias (e.g. a junction) yield the same source fingerprint for usage merging. When real-path resolution fails, it falls back to the original configured path. A live test confirms that merging summaries from direct and aliased Claude transcript homes produces no duplicate token or session counts.
Macroscope summarized 6f17728.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 6f17728
Macroscope's review found this PR approvable — This is a narrowly scoped usage-accounting bug fix that canonicalizes existing transcript directories so aliases are merged instead of double-counted. The behavior is covered by a regression test, preserves fallback handling for unavailable paths, and introduces no schema, configuration, deployment, or sensitive-area changes.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Closing because #8470 already canonicalizes transcript directories before building usage fingerprints, covering this fix.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.