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
52 changes: 39 additions & 13 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1706,15 +1706,29 @@ index paths to replace older physical-path target keys before identity-aware rea
C# common member names are never discarded during extraction. The writer persists their
receiver/type evidence in `target_qualifier`, and reference finalization records
`resolution_state`. Bare-name `references` and unqualified graph discovery remain broad and
retain the stored resolution labels. On a current reference-identity contract, however, exact
qualified C# `callers` queries and confirmed `impact` traversal require a `resolved` or
`resolved_group` candidate that matches one of the selected definition IDs or its resolved
polymorphic-dispatch family; unresolved or ambiguous same-leaf evidence remains inspectable but
cannot become a confirmed caller edge.
retain the stored resolution labels. On a current C# reference-identity contract, however,
exact C# `callers` queries and confirmed C# `impact` traversal require a `resolved` or
`resolved_group` candidate that matches one of the selected definition IDs, including the
resolved polymorphic-dispatch family. Multiple C#
same-name definitions contribute their resolved ID union; unresolved or ambiguous same-leaf
evidence remains inspectable but cannot become a confirmed caller edge or transitive hop. When
no matching definition ID exists, exact callers and impact return zero confirmed rows instead
of traversing the name fallback. CLI/MCP payloads expose `identity_root_available`,
`identity_root_unavailable_reason`, `graph_evidence_confidence`, and
`identity_root_resolution_truncated`; missing roots and capped identity sets set
`authoritative_count: false`, while impact marks a missing root heuristic and strict mode fails
through the stable `no_identity_backed_root` failure code. Legacy or stale identity contracts
may keep the name-based compatibility path, but must label it `name_fallback`, degraded, and
non-authoritative.
Other graph languages retain their existing language-specific exact matching until they expose
the same persisted target-identity contract. When `--lang` is omitted, impact partitions the
same traversal step: C# rows must match resolved candidate IDs, while non-C# rows retain their
language-specific exact-name graph. A root inferred only from non-C# definitions reports
`language_graph`; persisted reference-graph incompleteness makes every impact count
non-authoritative even when the local traversal and identity resolution are otherwise complete.
C# callable hotspots likewise count logical target identities instead of leaf-name aggregates.
Candidate groups contribute only when they collapse to one logical target, name, and kind, and
unresolved rows do not inflate the confirmed count. Legacy or stale identity contracts keep the
name-based compatibility path. The CLI `--include-qualified-common-calls` flag and MCP
unresolved rows do not inflate the confirmed count. The CLI `--include-qualified-common-calls` flag and MCP
`includeQualifiedCommonCalls` argument still bypass the query-time common-member noise filter.
Keep dependency edges identity-scoped: completeness options may expose unresolved evidence but
must not convert it into a same-name file dependency.
Expand Down Expand Up @@ -5761,14 +5775,26 @@ identity-aware read を ready にする前に、full、scoped、no-op、削除
C# の一般的な member 名は extraction 時に破棄しません。writer は receiver / 型の evidence を
`target_qualifier` に永続化し、reference finalization は `resolution_state` を記録します。bare-name の
`references` と無修飾 graph discovery は広い検索結果と保存済み resolution label を維持します。一方、
現行の reference-identity contract では、exact qualified C# `callers` query と confirmed `impact`
traversal は、選択した definition ID のいずれかに一致する `resolved` または `resolved_group` candidate
か、その解決済み polymorphic-dispatch family を必須とします。未解決または曖昧な same-leaf evidence
は引き続き確認できますが、confirmed caller edge にはなりません。C# callable hotspot も
現行の C# reference-identity contract では、exact C# `callers` query と confirmed C#
`impact` traversal は、選択した definition ID または解決済み polymorphic-dispatch family の
いずれかに一致する `resolved` または `resolved_group` candidate を必須とします。C# の同名 definition
が複数ある場合は解決済み ID の和集合を対象にしますが、未解決または
曖昧な same-leaf evidence は引き続き確認できても confirmed caller edge や推移 hop にはなりません。
一致する definition ID が無い場合、exact callers と impact は name fallback を走査せず confirmed 0 件を
返します。CLI/MCP payload は `identity_root_available`、`identity_root_unavailable_reason`、
`graph_evidence_confidence`、`identity_root_resolution_truncated` を公開し、root 不在または identity 集合の
cap 到達では `authoritative_count: false` を設定します。impact は root 不在を heuristic とし、strict mode は
安定した `no_identity_backed_root` failure code で失敗します。legacy または stale な identity contract が
名前ベースの互換経路を維持する場合も、`name_fallback`、degraded、non-authoritative と明示しなければなりません。
他の graph 言語は、同等の永続 target-identity contract を公開するまで既存の言語固有 exact matching を維持します。
`--lang` を省略した場合、impact は同じ traversal step を分割し、C# row には解決済み candidate ID の
一致を必須とする一方、非 C# row では言語固有の exact-name graph を維持します。非 C# definition だけから
推論した root は `language_graph` と明示し、永続 reference graph が incomplete なら、局所 traversal と
identity resolution が完了していてもすべての impact count を non-authoritative とします。
C# callable hotspot も
leaf-name aggregate ではなく logical target identity を
集計し、candidate group は logical target、name、kind が 1 つに収束するときだけ加算し、unresolved
row は confirmed count を増やしません。legacy または stale な identity contract は名前ベースの
互換経路を維持します。CLI の `--include-qualified-common-calls` と MCP の
row は confirmed count を増やしません。CLI の `--include-qualified-common-calls` と MCP の
`includeQualifiedCommonCalls` は、引き続き query-time common-member noise filter を無効化します。
dependency edge は identity scope のままにし、completeness option で未解決 evidence を公開しても、
同名の file dependency へ変換してはいけません。
Expand Down
2 changes: 2 additions & 0 deletions TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ Candidate-ordered parallel-index recovery tests must prove that the fatal result
Reusable-stat snapshot semantics keep one valid row beside two rows from the same stale extractor language plus NULL, text, integer, and invalid-timestamp stat storage, so malformed-row filtering and cached stale-language rejection remain one contract.
Graph-kind regressions keep default canonical `call` / `instantiate` / `subscribe` output, raw-kind output, and explicit non-default kind access in the same seeded fixture so filtering and projection cannot drift apart.
Caller-ranking coverage keeps the large count-over-path-category case, primary-recipe ties, multi-path filtering, test exclusion, and offset page reconstruction in one seeded `DbReaderTests` fixture. CLI human/JSON and MCP pagination assertions reuse compact two- or three-caller fixtures and require the structured ranking recipe to match the ordering applied before pagination (#4881).
Exact C# caller-root coverage is coordinated across `DbReaderIssue5183Tests`, `QueryCommandRunnerIssue5183Tests`, and `McpServerIssue5183Tests`. Keep one isolated fixture with an unresolved external call whose definition file is omitted, a resolved local target sharing its leaf name, two unrelated resolved same-name methods, an unresolved transitive chain, mixed C#/Python callers, a non-C#-only root colliding with an unresolved C# call, and complete, capped, plus persisted-incomplete traversal states. Assert that broad references/callers retain `name_discovery` evidence while exact callers, inspect summaries, impact, hotspots, CLI JSON/compact, and MCP confirmed counts accept only resolved C# target IDs without dropping non-C# language-graph edges; missing roots and incomplete graphs must expose stable degraded/non-authoritative metadata and strict impact failure (#5183, regression boundary from #5084).
Query-only regression fixtures run representative `status`, `search`, and `files` commands against a checkpointed WAL database copied without sidecars and assert that the database, `-wal`, and `-shm` artifact set plus persistent pragmas remain unchanged. Separate fixtures prove that committed hot-WAL content, empty-to-hot transitions, checkpoint resets, cross-database dependency targets, and long-lived LSP refreshes use cleaned-up generation-validated private snapshots without touching source sidecars. Cross-database coverage also pins disposal ordering and snapshot-directory cleanup, while injected persistent copy failures pin the non-retrying `query_only_snapshot_copy_failed` taxonomy; interrupted-batch readiness demotion is covered separately through explicit `Repair` intent.
`DatabasePermissionPolicyTests.cs` injects a file-mode provider so unsupported and access-denied Unix mode operations remain deterministic and cross-platform while proving both best-effort diagnostics and strict remediation failures.
`DbSchemaConstraintTests.cs` also locks schema constraints to `SymbolKindCatalog` and required file foreign keys so DB readiness checks fail when code enums and SQLite CHECK clauses drift.
Expand Down Expand Up @@ -1349,6 +1350,7 @@ dotnet test --filter "FullyQualifiedName~GitHelperTests"
再利用 stat snapshot の意味論は、有効な1行、同じ stale extractor 言語の2行、NULL / text / integer / 不正 timestamp の stat storage を同居させ、malformed row の除外と stale-language 判定の false cache を1つの契約として固定します。
graph kind の回帰では、既定 canonical `call` / `instantiate` / `subscribe` 出力、raw-kind 出力、明示的な非既定 kind access を同じ seed 済み fixture にまとめ、filtering と projection のずれを検出します。
caller ranking の coverage では、count と path category に大差がある場合、primary recipe の同順位、複数 path filter、test 除外、offset page の再構成を1つの seed 済み `DbReaderTests` fixture にまとめます。CLI の human / JSON と MCP pagination の assertion は2~3 caller の小さな fixture を再利用し、structured ranking recipe が pagination 前に適用した順序と一致することを必須とします (#4881)。
exact C# caller root の coverage は `DbReaderIssue5183Tests`、`QueryCommandRunnerIssue5183Tests`、`McpServerIssue5183Tests` で連携します。definition file を省略した未解決 external call、同じ leaf 名を持つ解決済み local target、互いに無関係な同名 method 2 件、未解決 root の背後にある推移 chain、C# / Python 混合 caller、未解決 C# call と衝突する非 C# 専用 root、complete / capped / 永続 incomplete の traversal 状態を1つの隔離 fixture に維持してください。broad references/callers は `name_discovery` evidence を保つ一方、exact callers、inspect summary、impact、hotspots、CLI JSON / compact、MCP の confirmed count は解決済み C# target ID だけを受理し、非 C# の language-graph edge を落とさないことを確認します。root 不在と incomplete graph では安定した degraded / non-authoritative metadata と strict impact failure を返すことを assertion にします(#5183、#5084 からの回帰境界)。
query-only の回帰 fixture では sidecar なしで copy した checkpoint 済み WAL database に対して代表的な `status`、`search`、`files` command を実行し、database、`-wal`、`-shm` の artifact set と永続 pragma が変化しないことを検証します。別の fixture では committed hot-WAL content、empty-to-hot transition、checkpoint reset、cross-database dependency target、長時間 LSP refresh が、source sidecar に触れず cleanup される generation 検証済み private snapshot を使うことを固定します。cross-database coverage は dispose 順序と snapshot directory cleanup も固定し、注入した永続的 copy failure は retry されない `query_only_snapshot_copy_failed` taxonomy を固定します。interrupted batch の readiness demotion は明示的な `Repair` intent の別テストで固定します。
`DatabasePermissionPolicyTests.cs` は file-mode provider を注入し、unsupported / access-denied な Unix mode 操作を deterministic かつ cross-platform に保ちながら、best-effort diagnostic と strict remediation failure の両方を検証します。
`DbSchemaConstraintTests.cs` は DB readiness check が code enum と SQLite CHECK 句の drift を検出できるよう、schema constraint と `SymbolKindCatalog`、必須 file foreign key の同期も固定します。
Expand Down
Loading
Loading