Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DEVELOPER_GUIDE.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ Use `docs/test-doc-maintenance-plan.md` before moving oversized suites or adding
Deps JSON and json-graph byte-limit failures share one SQL graph fixture.
Deps JSON summary output and json-graph summary rejection share one SQL graph fixture.
Dependency-cycle coverage must prove that the graph budget is independent of the display limit, SCC ranking remains stable when the page size grows, opaque cursors return the next ranked component, mismatched cursor filters fail closed, and graph-budget exhaustion marks totals as non-authoritative.
Impact-cycle coverage must distinguish consecutive same-display-name symbols by canonical source/target IDs, verify their structured shortest-path identities, keep unresolved upstream callers and non-unique resolved overload groups out of only the canonical cycle graph, avoid guessed IDs for ambiguous path roots, aggregate mixed target identities without undercounting, and retain controls for direct singleton recursion and multi-node cycles.
Exact-symbol dependency coverage reuses the C# source-candidate fixture to prove that a `--limit 1` query can select a symbol beyond the unfiltered candidate window. The repository-scale guard builds 10,001 candidate symbols, runs on non-Windows .NET 8, and keeps query-only work within 2 seconds and 32 MiB of current-thread allocation; fixture construction stays outside the measured interval. Windows retains the lightweight functional pushdown coverage but omits this scale fixture because its bounded full-suite session already runs close to the one-hour timeout.
References stale-SQL-contract count and result envelopes share one downgraded graph fixture.
Callers and callees stale-SQL-contract result envelopes share one downgraded graph fixture.
Expand Down Expand Up @@ -1200,6 +1201,7 @@ dotnet test --filter "FullyQualifiedName~GitHelperTests"
generic switch-arm のguardとrelational predecessorも同様に1つのproduction-runtime fixtureを共有し、production `net8.0` targetだけで実行してください。
search language-alias coverage は、各filterが期待結果を1件に分離できる場合、異なる言語fileを1 databaseに置いてalias filterを反復してください。
option風literalのnamed-query escapingは、definition、graph、symbols、files、inspect、impact command全体で1つのindexed Probe fixtureを再利用してください。
impact cycle の回帰 coverage では、同じ表示名が連続する別 symbol を正規 source/target ID で区別し、構造化 shortest-path identity を検証し、未解決の上流 caller と一意でない resolved overload group を正規 cycle graph からだけ除外し、曖昧な path root に推測 ID を付けず、複数 target identity を過少計上せず集約するとともに、直接 singleton 再帰と複数 node cycle の control を維持してください。
複数 named-query の output coverage は、compact projection、rich JSON 互換性、query ごとの limit / truncation、UTF-8 byte cap に1つの indexed fixture を再利用し、serializer mode を直接比較できるようにしてください。
共通 bounded-response coverage は、definition、find、status、hotspots、references、callers / callees、impact、map 全体で1つの graph-ready databaseを再利用してください。cursor と UTF-8 byte-budget の境界 case は別の最小 multi-row fixture にまとめ、family parity のために indexing setup を重複させないでください。regression coverage では alias と read-only batch dispatch、明示的な definition body projection、inactive な impact collection、authoritative な総件数を持つ map section の row 単位 pagination も確認してください。
adversarial な bounded-response coverage では、parser failure の byte cap、impact definition page の offset、既存 map compact section、map shape control の競合、compact と明示 body の組み合わせ、profile / verbose control record の抽出も固定してください。
Expand Down
19 changes: 19 additions & 0 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,16 @@ annotations, and type-position references are excluded from the symbol-level BFS
so metadata cycles do not inflate caller counts; single-type queries may still
return heuristic file-level dependency hints.

On a current index, cycle detection follows the resolved source/target symbol IDs
on real directed edges. Two distinct methods with the same display name are not a
cycle, while direct recursion is reported as a singleton cycle. JSON caller rows
include `caller_symbol_id` and, when the callee is uniquely resolved,
`callee_symbol_id`; uniquely resolved `path_details` nodes include `symbol_id`;
and each cycle can include `member_identities` alongside the compatibility
`members` display-name list. Unresolved or ambiguous caller edges, including
non-unique overload resolution groups, remain visible in traversal results but do
not contribute canonical cycle edges.

## Performance tuning for large repositories

Start by measuring before changing knobs:
Expand Down Expand Up @@ -3849,6 +3859,15 @@ metadata-only edges は symbol-level BFS から除外されるため、metadata
count が膨らむことはありません。ただし single-type query では heuristic file-level
dependency hints が返る場合があります。

current index では、cycle 判定は実在する有向辺の解決済み source/target symbol ID を
辿ります。表示名が同じ別 method は cycle にせず、直接再帰は singleton cycle として
報告します。JSON の caller row は `caller_symbol_id` と、callee を一意に解決できる場合は
`callee_symbol_id` を含み、`path_details` node は node を一意に解決できる場合に
`symbol_id` を含み、
各 cycle は互換用の表示名 `members` に加えて `member_identities` を含む場合があります。
一意でない overload の resolution group を含む未解決または曖昧な caller edge は
traversal 結果には残りますが、正規 cycle edge には使用しません。

## 大規模リポジトリの performance tuning

knob を変える前に、まず測定してください。
Expand Down
21 changes: 21 additions & 0 deletions changelog.d/unreleased/4847.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
category: fixed
issues:
- 4847
affected:
- src/CodeIndex/Database/DbReader.GraphQueries.cs
- src/CodeIndex/Models/QueryResults.cs
- tests/CodeIndex.Tests/DbReaderImpactTests.cs
- tests/CodeIndex.Tests/QueryCommandRunnerImpactTests.cs
- DEVELOPER_GUIDE.md
- USER_GUIDE.md
- TESTING_GUIDE.md
---

## English

- **Impact cycle detection now requires a real canonical graph edge (#4847)** — `impact` carries resolved symbol IDs through every traversal hop, so consecutive methods with the same display name no longer create false singleton cycles while direct recursion and real multi-node cycles remain visible. Unresolved callers and non-unique overload resolution groups remain in conservative traversal output without entering the canonical cycle graph, mixed target identities retain their aggregate counts, and structured caller, path, and cycle output includes only identities that can be resolved without guessing.

## 日本語

- **impact の cycle 判定で実在する正規 graph edge を必須にしました (#4847)** — `impact` が解決済み symbol ID を全 traversal hop へ引き継ぐため、表示名が同じ method が連続しても誤った singleton cycle にならず、直接再帰と実在する複数 node cycle は引き続き検出されます。未解決 caller と一意でない overload resolution group は保守的な traversal 出力に残したまま正規 cycle graph から除外し、複数 target identity の集約 count を維持し、構造化 caller、path、cycle 出力には推測せず解決できた identity だけを追加しました。
Loading
Loading