fix(optimize): scope transcript-derived findings to the selected provider - #1003
Open
AndrewDongminYoo wants to merge 1 commit into
Open
fix(optimize): scope transcript-derived findings to the selected provider#1003AndrewDongminYoo wants to merge 1 commit into
AndrewDongminYoo wants to merge 1 commit into
Conversation
…ider
scanSessions() always ran discoverAllSessions('claude'), so every finding it
feeds was computed from Claude transcripts regardless of --provider, while the
header (sessions, calls, cost) came from the already-filtered projects. Under
--provider codex the two described different providers, and the Claude-derived
numbers read as the selected provider's.
Skip the scan when the filter excludes Claude, and skip the detectors it feeds
rather than handing them an empty scan: emptiness reads as "never invoked", so
an empty scan turned every skill, agent and command into a reported ghost.
Findings derived from projects (MCP tool coverage, capability reliability,
low-worth sessions, context bloat, outliers, model recommendations) already
filter correctly and still run.
The result cache key now carries the provider, since the provider decides
whether the scan runs at all.
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
scanSessions()hardcodeddiscoverAllSessions('claude'), so every finding it feeds was computed from Claude transcripts regardless of--provider, while the header came from the already-filteredprojects.optimize --provider codexprinted a Claude read/edit ratio, Claude ghost skills and Claude MCP findings under a Codex header.projects-derived findings (MCP tool coverage, capability reliability, low-worth sessions, context bloat, outliers, model recommendations) already filter correctly and still run.cacheKeynow carries the provider, since the provider decides whether the scan runs at all.Fixes #1002
Testing
npm testpassesnpm run buildsucceedsnpm test: 199 files, 2,631 passed, 5 skipped, 0 failed. Two new cases intests/optimize-fs.test.tscover the positive (--provider claudestill reportsread-edit-ratio) and negative (--provider codexreports neitherread-edit-rationorunused-skills) paths. I verified the negative case fails without the fix:Against real data (30-day window, Claude + Codex + Copilot + Antigravity + Gemini + Warp on disk):
The four findings that survive under
--provider codexare genuinely Codex-derived; the Claude-only ones are gone. The default and--provider claudepaths are byte-for-byte unchanged in finding count and health grade.