Skip to content

feat(mcp): optional edge_types allow-list for graph traversal, document edge types - #9

Merged
sinkog merged 1 commit into
mainfrom
fix/edge-types-docs-and-filter
Oct 17, 2026
Merged

sinkog merged 1 commit into
mainfrom
fix/edge-types-docs-and-filter

Conversation

@sinkog

@sinkog sinkog commented Oct 17, 2026

Copy link
Copy Markdown
Member

Refs #8.

What

  • `focus_pack`, `impact_analysis` and `guided_path` take an optional `edge_types` allow-list. Default `None` keeps the current behaviour and result shape; with a list the result echoes the types; an empty list follows no edge; types compare case-insensitively.
  • `kb_data/edge_types.md` was stale (2 of the 4 types the graph builder emits). `generate_edge_types_doc` now states what each type means (`refers-to` chunk order, `related-to` embedding similarity, `references` explicit, `calls` call graph). Counts are left out on purpose: the file is tracked.
  • `server.yaml` / `make_source.yaml` descriptions of the touched objects and `MANIFEST.sha256` updated.

What this does not do

No traversal default is changed. The experiments in #8 found no quality effect of untyped traversal (precision identical across variants with a working judge), so only the verified, behaviour-neutral items are fixed.

Verified locally

  • pytest 161 passed (18 new); `ruff`, `mypy`, `yamllint` clean; `sha256sum -c MANIFEST.sha256` ok.
  • New tests fail when the filter is disabled (10 of 13 fail), so they can fail.

Known, not touched

The companion YAMLs `server.yaml` / `make_source.yaml` had already drifted from the code (e.g. `load_kb`, `process_py_yaml`); a full `py.meta.gen --merge` would pull that into this PR, so it is left for a separate change.

🤖 Generated with Claude Code

…nt edge types

focus_pack, impact_analysis and guided_path followed every outgoing edge
regardless of its type; guided_path only printed the type. They now accept
an optional edge_types allow-list. The default (None) keeps the current
behaviour and the result shape; with a list the result echoes the types.
An empty list follows no edge.

kb_data/edge_types.md was stale (2 of the 4 types the graph builder emits).
generate_edge_types_doc now states what each type means, so readers do
not treat embedding similarity, chunk order, explicit references and the
call graph as equivalent. Per-build counts are left out on purpose: the
file is tracked.

Refs #8

---
[signing-metadata]
key = cic-my-sign-key
signature = vault:v1:MEQCIFv6Tl9vbrUa36oH7C5+g8vMkEi3qkG1zicMfG//zVvVAiB0Zf3lngLgqEyfNIcwYKtHhITEsdhckwcvjKUPh3qoPw==
hash-algorithm = sha256
digest = /jHKTVOJ3X0tZBpYsvCUjWgkahs2etF+ULnDgE3+Lv4=

[certificate]
-----BEGIN CERTIFICATE-----
MIICBjCCAaygAwIBAgIUSnRMR6RPnEbg296XWPOqq/u5PCwwCgYIKoZIzj0EAwIw
QzELMAkGA1UEBhMCSFUxGTAXBgNVBAoMEENlbnRyYWxJbmZyYUNvcmUxGTAXBgNV
BAMMEENJQyBEZXZlbG9wZXIgQ0EwHhcNMjYwMzIwMTMyMjU5WhcNMjYxMjMxMTMy
MjU5WjBFMQswCQYDVQQGEwJIVTEZMBcGA1UECgwQQ2VudHJhbEluZnJhQ29yZTEb
MBkGA1UEAwwSR2Fib3IgWm9sdGFuIFNpbmtvMFkwEwYHKoZIzj0CAQYIKoZIzj0D
AQcDQgAEIG2CVmTfmLB9pLLclj7YmP2eedAjklpy4LGrU2ijoiy6Xqpuybv7OgJe
i+ez31s65NEV8+X/ByeX1cstR988z6N8MHowCQYDVR0TBAIwADAdBgNVHQ4EFgQU
yZN6AIX/TNnIJ9GwAa/NRN3ujHAwHwYDVR0jBBgwFoAUXn6CHYzPUqU4JVP8g+OS
WeDYjhcwDgYDVR0PAQH/BAQDAgeAMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEF
BQcDBDAKBggqhkjOPQQDAgNIADBFAiEA+bFzXRoJ4PCQbhAAtpkcMjt0vNj5rEW0
lOMBGDNyaWkCIB1vmM7PcZzv/c9bIrxF5kqv6QXomouhByUfeNUTbpKW
-----END CERTIFICATE-----
@sinkog
sinkog merged commit b845d70 into main Oct 17, 2026
2 checks passed
@sinkog
sinkog deleted the fix/edge-types-docs-and-filter branch October 17, 2026 19:11
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