Skip to content

Add canonical member-read references - #5003

Merged
Widthdom merged 7 commits into
mainfrom
fix-issue4894
Jul 31, 2026
Merged

Add canonical member-read references#5003
Widthdom merged 7 commits into
mainfrom
fix-issue4894

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Add canonical member_read edges for non-invoking C# enum constants, constants, static readonly fields, static properties, and constant-pattern reads.
  • Keep true invocations as call, suppress callable-name collision duplicates, and resolve same-file and cross-file member-read targets.
  • Exclude modern member reads from callers, callees, and impact by default while preserving explicit CLI --include-member-reads and MCP includeMemberReads compatibility controls.
  • Preserve legacy indexes and their historical call rows without requiring migration.
  • Keep full, scoped --files, commit-based, watch-style, and MCP indexing correct when consumers or member-read targets are added, changed, removed, or reused.

Root cause

Qualified C# value/member access was historically classified through the callable-name path, so enum constants and other static value reads could be persisted as call. The initial fix also needed workspace-wide target knowledge during incremental indexing: consumer-only scoped updates could omit cross-file member_read edges, while target-set changes could leave reusable consumers stale.

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --no-build --framework net8.0 — 10,971 passed, 0 failed, 7 skipped
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --no-build --framework net9.0 — 10,497 passed, 0 failed, 420 skipped
  • After merging the latest origin/main, repeated the Release build and focused Issue Add a member-read reference kind without breaking legacy call graphs #4894 / MCP contract / language-pagination tests: net8 25 passed; net9 24 passed, 1 expected skip
  • dotnet format CodeIndex.sln --no-restore --verify-no-changes --verbosity minimal
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check
  • Refreshed the repository index and verified index_matches_workspace: true, graph complete/current, and zero cap hits
  • Completed both workflow-permitted Codex adversarial-review rounds and fixed all reported actionable findings, including cross-file collisions, writes, and scoped/watch incremental refresh behavior

Documentation and changelog

  • Updated USER_GUIDE.md, DEVELOPER_GUIDE.md, and TESTING_GUIDE.md in their English and Japanese sections.
  • Added bilingual fragment changelog.d/unreleased/4894.added.md.

Follow-ups

None.

Fixes #4894

@Widthdom
Widthdom marked this pull request as ready for review July 31, 2026 01:16
@Widthdom
Widthdom merged commit c71d55e into main Jul 31, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4894 branch August 2, 2026 12:49
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.

Add a member-read reference kind without breaking legacy call graphs

1 participant