Skip to content

fix: improve affected, callers, and context precision#358

Open
bohe76 wants to merge 5 commits into
colbymchenry:mainfrom
bohe76:verify-combined-codegraph-improvements
Open

fix: improve affected, callers, and context precision#358
bohe76 wants to merge 5 commits into
colbymchenry:mainfrom
bohe76:verify-combined-codegraph-improvements

Conversation

@bohe76
Copy link
Copy Markdown

@bohe76 bohe76 commented May 23, 2026

Summary

This PR combines three small CodeGraph precision improvements that were tested together:

  • include semantic file dependents for affected by considering symbol-level edges and normalizing Windows-style paths
  • include instantiates edges in caller lookup so class construction is reported as usage
  • reduce noisy generic context entry points and keep output focused with fewer default code blocks plus compact same-file focus snippets

These changes are also available as split PRs for easier review:

Local evaluation

I ran the same 14-case local smoke suite against origin/main before these changes and against this combined branch.

Source Accuracy CodeGraph approx tokens Savings vs manual
baseline f366222 6/14 (42.9%) 17,661 51.8%
this branch 14/14 (100.0%) 8,976 76.5%

Compared with baseline, the combined branch reduces CodeGraph output tokens by 8,685 tokens, or 49.2%, while passing 8 additional cases.

Token estimate method: ceil(character_count / 4) over prompt-visible command output. The smoke accuracy checks are string-presence checks for expected files/symbols, not a claim of semantic completeness.

Testing

  • npm run build
  • npx vitest run __tests__/graph.test.ts __tests__/context.test.ts --minWorkers=1 --maxWorkers=1 --testTimeout=30000 --hookTimeout=30000 --no-file-parallelism
    • 2 test files passed
    • 43 tests passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant