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
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,7 @@ Extractor strategy by language surface:
| HTML | Uses a dedicated character-level state machine instead of the regex pattern loop. It walks tag openers, quoted/unquoted attribute values including multi-line values, and masks `<script>` / `<style>` / `<textarea>` / `<title>` bodies plus `<!-- ... -->` comments so attribute-lookalike strings inside those regions do not leak phantom symbols. |
| JSON / JSON Lines | JSON emits `object`, `array`, `property`, and bounded primitive-array `value` symbols with indexed paths. Array indexes attach directly to the parent path (`command_cases[0]`, not `command_cases.command_cases[0]`), and object/array parent kinds preserve the hierarchy used by outline depth. Root arrays start at paths such as `[0]`. `.jsonl` and `.ndjson` parse each non-empty physical line independently, prefix symbols with a stable zero-based record path such as `[0].result.path`, and emit repository-local path references from each valid record without flattening malformed neighbors. |
| TOML / repository metadata | TOML tables and keys, EditorConfig sections and keys, Git/Docker ignore rules, Git attribute rules/attributes, and `.rules` blocks/keys are emitted as bounded structural symbols. References are limited to repository-local paths or globs; remote URLs, absolute filesystem paths, and parent traversal are suppressed. |
| CODEOWNERS | Path-aware detection recognizes only the case-sensitive paths `.github/CODEOWNERS`, repository-root `CODEOWNERS`, and `docs/CODEOWNERS`, relative to the enclosing Git worktree root or to the scan root for non-Git input. A dedicated bounded line parser handles full-line and inline comments and emits ordered ownership `rule` symbols and child owner `property` symbols, including ownerless rules, with limits of 4,096 characters per line, 128 owners per rule, and 256 characters per owner. Invalid input, including unsupported escaped leading `#` patterns and malformed mentions, produces category-deduplicated, persistable extraction-diagnostic annotations. No reference extractor is registered because owner authorization and pattern-to-path resolution are outside the syntax-only contract. |
| Windows application manifests | Manifest element paths, assembly identities, execution levels, and supported-OS values remain structural symbols. Dependent assembly identities emit `dependency` references, while local `file`, `codeBase`, and probing paths emit `project_reference` edges. |
| XML / NuGet.config | Generic XML emits bounded element and attribute paths. NuGet.config additionally promotes package sources, source mappings, signature validation mode, trusted signer names, certificate fingerprints, and `allowUntrustedRoot` values to semantic `property` symbols with `nuget.*` subkinds. |

Expand Down Expand Up @@ -6298,6 +6299,7 @@ LIMIT 20;
| HTML | 汎用の正規表現 loop を使わず、専用の文字単位 state machine で tag opener、引用符付き/なし attribute value(複数行値を含む)、`<script>` / `<style>` / `<textarea>` / `<title>` body、`<!-- ... -->` comment を扱い、attribute 名に似た body 内文字列から phantom symbol が漏れないようにします。 |
| JSON / JSON Lines | JSON は `object`、`array`、`property` と、上限付きの primitive-array `value` symbol を index 付き path で出力します。配列 index は親 path に直接連結し(`command_cases.command_cases[0]` ではなく `command_cases[0]`)、object / array の親 kind を保持して outline の depth に階層を反映します。root array は `[0]` のような path から始まります。`.jsonl` と `.ndjson` は空でない物理行を個別に parse し、`[0].result.path` のような安定した 0 始まり record path を付けます。各有効 record から repository-local path reference を出し、不正な隣接 record の内容は平坦化しません。 |
| TOML / repository metadata | TOML の table / key、EditorConfig の section / key、Git / Docker ignore rule、Git attribute の rule / attribute、`.rules` の block / key を上限付き structural symbol として出力します。reference は repository-local な path / glob に限定し、remote URL、絶対 filesystem path、親 directory traversal は抑止します。 |
| CODEOWNERS | path-aware detection は enclosing Git worktree root(非 Git input では scan root)からの相対位置が case-sensitive な `.github/CODEOWNERS`、repository root の `CODEOWNERS`、`docs/CODEOWNERS` である場合だけ認識します。専用の上限付き line parser が full-line / inline comment を処理し、順序付き ownership `rule` symbol と child owner `property` symbol を出力して ownerless rule も保持します。上限は1行4,096文字、1 rule 128 owner、1 owner 256文字です。GitHub が対応しない先頭 `#` の escaped pattern や malformed mention を含む不正 input は、category ごとに重複を除いた永続化可能な extraction-diagnostic annotation にします。owner authorization と pattern から path への解決は syntax-only contract の範囲外なので、reference extractor は登録しません。 |
| Windows application manifest | manifest element path、assembly identity、execution level、supported OS value を structural symbol として維持します。依存 assembly identity は `dependency` reference、local な `file` / `codeBase` / probing path は `project_reference` edge を出力します。 |
| XML / NuGet.config | 汎用 XML は上限付きの element / attribute path を出力します。NuGet.config ではさらに package source、source mapping、署名検証モード、trusted signer 名、証明書 fingerprint、`allowUntrustedRoot` の値を `nuget.*` subkind 付きの semantic `property` symbol にします。 |

Expand Down
2 changes: 2 additions & 0 deletions TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Use the full suite by default. Use targeted filters only while iterating locally

## Test Stack

- Issue #5198 CODEOWNERS coverage belongs in `FileIndexerTests.cs`, `SymbolExtractorRepositoryMetadataTests.cs`, `QueryCommandRunnerFilesTests.cs`, `IndexCommandRunnerUpdateTests.cs`, `QueryCommandRunnerTests.cs`, and `McpServerToolsCallTests.cs`. Preserve the three case-sensitive Git-worktree-relative locations and the arbitrary-nested/case-variant/POSIX-literal-backslash negative cases, including scans rooted below the enclosing worktree; parser cases for full-line and inline comments, blank lines, whitespace, CRLF, rejection of unsupported escaped leading `#`, ownerless rules, user/team/email owners, malformed mentions, duplicate and overlapping patterns, invalid input, and persistable bounded diagnostics; ordered rule and owner child symbols; symbol-only capability guidance; full/scoped/delete indexing; branch-switch reconciliation; and removal from unknown-extension status diagnostics.
- Issue #5194 shell-completion inventory coverage belongs in `CliFlagSchemaTests.cs` and `ConsoleUiTests.cs`. Keep exact contextual inventories for lsp, every workspace verb, config show, diff, import, archive export, and ctags export synchronized with authoritative help and safe parser probes. Preserve positive and negative nested cases, value-taking versus boolean metadata, context-specific short aliases, mutually exclusive diff modes, exact schema-to-renderer sets for Bash/zsh/fish/PowerShell, and the available-shell generated-script execution contract.
- Issue #5187 exact graph-selector coverage belongs in `QueryCommandRunnerIssue5187Tests.cs` and `McpServerIssue5187Tests.cs`. Keep one fixture with unrelated same-name methods, distinct callees, and multiple callers. Round-trip selectors emitted by `inspect` through CLI and MCP references/callers/callees/impact; preserve explicit bare-name ambiguity metadata, exact selected zero behavior after filters, stable invalid/stale/cross-database diagnostics, selector-bound cursor mismatch, structured-field discovery, command help, and all four shell completions.
- Issue #5157 C# primary-constructor property coverage belongs in `SymbolExtractorCSharpTests.cs` and `QueryCommandRunnerSymbolTests.cs`. Keep ordinary class/struct and nested/private attributed multiline parameters absent from property symbols while preserving positional `record`, `record class`, and `record struct` properties, including nullable and generic components. Exercise `symbols`, `definition`, `outline`, public-visibility filtering, and full/incremental indexing parity. When this extractor gate changes, keep `CSharpContractVersion` and the stale-index refresh assertions in `IndexCommandRunnerFullScanTests.cs` synchronized.
Expand Down Expand Up @@ -1161,6 +1162,7 @@ dotnet test --filter "FullyQualifiedName~GitHelperTests"

## テストスタック

- Issue #5198 の CODEOWNERS coverage は `FileIndexerTests.cs`、`SymbolExtractorRepositoryMetadataTests.cs`、`QueryCommandRunnerFilesTests.cs`、`IndexCommandRunnerUpdateTests.cs`、`QueryCommandRunnerTests.cs`、`McpServerToolsCallTests.cs` が担当します。case-sensitive な3つの Git worktree-relative location と、enclosing worktree より下を scan root にした場合を含む任意の nested file・大小文字違い file・POSIX の literal backslash file の negative case、full-line / inline comment・blank line・whitespace・CRLF・未対応である先頭 `#` の escape の拒否・ownerless rule・user/team/email owner・malformed mention・duplicate / overlapping pattern・不正 input・永続化可能な上限付き diagnostic の parser case、順序付き rule と owner child symbol、symbol-only capability guidance、full / scoped / delete indexing、branch-switch reconciliation、unknown-extension status diagnostic からの除外を維持してください。
- Issue #5194 の shell completion inventory coverage は `CliFlagSchemaTests.cs` と `ConsoleUiTests.cs` が担当します。lsp、workspace の全 verb、config show、diff、import、archive export、ctags export の正確な context 別 inventory を、authoritative help と安全な parser probe に同期してください。nested context の positive / negative case、value-taking と boolean の metadata、context 固有の short alias、diff の排他的 mode、Bash / zsh / fish / PowerShell における schema-to-renderer の完全一致、および利用可能な shell で生成 script を実行する契約を維持します。
- Issue #5187 の exact graph-selector coverage は `QueryCommandRunnerIssue5187Tests.cs` と `McpServerIssue5187Tests.cs` が担当します。無関係な同名 method、異なる callee、複数 caller を持つ 1 つの fixture を維持してください。`inspect` が出力した selector を CLI / MCP の references、callers、callees、impact へ round-trip し、bare-name ambiguity metadata の明示、filter 適用後も正確な selected zero behavior、安定した invalid / stale / cross-database diagnostic、selector に束縛された cursor mismatch、structured-field discovery、command help、4 種類すべての shell completion を保ちます。
- Issue #5157 の C# primary-constructor property coverage は `SymbolExtractorCSharpTests.cs` と `QueryCommandRunnerSymbolTests.cs` が担当します。通常の class / struct および attribute 付き multiline parameter を持つ nested / private type では property symbol を生成せず、nullable / generic component を含む位置 `record`、`record class`、`record struct` の property は維持してください。`symbols`、`definition`、`outline`、public visibility filter、full / incremental indexing の parity を検証します。この extractor gate を変更するときは、`CSharpContractVersion` と `IndexCommandRunnerFullScanTests.cs` の stale-index refresh assertion も同期してください。
Expand Down
Loading
Loading