-
Notifications
You must be signed in to change notification settings - Fork 1
Extraction pipeline
Arun Soman edited this page Aug 31, 2026
·
1 revision
Two-pass code-graph extraction, plus the TESTS pass — migrated from the README on 2026-08-31 and verified against the code at tag v0.1.4; if code and wiki ever disagree, the code wins and this page gets a PR.
- Pass 1 (
extract.py): tree-sitter parse of every supported file into file/class/function/methodNodes withsignature,line_start/line_end,docstring, plus the raw inputs for pass 2 —importsandcall_sites. Pure: no DB/FS side effects. - Pass 2 (
callgraph.py): resolves call sites into confidence-taggedcallsedges — EXTRACTED (same-file def or import-map resolved), INFERRED (receiver-type heuristic), or AMBIGUOUS (exactly one same-named symbol project-wide). Also resolvesinheritance/extendsedges and synthesizesexternal::stub nodes for unresolved base classes. -
testlink.py: a third pass that emitsTESTSedges from test symbols to the implementation symbols they test, via three heuristics — naming convention (test_foo→foo), confidence upgrade when a naming match is backed by a realcallsedge, and@patch(...)/@mock.patch(...)decorator resolution. - Loaders:
cie load <dirs> --project <name>(Neo4j, full replace of one project's nodes) andcie index <path>(embedded SQLite, zero-config).reindex/reindex_filefor incremental single-file refresh after a patch;watchfor file-system-driven auto-reindex (watchdog).
-
Naming convention (
test_foo→foo; test-class shapes) — INFERRED. - Upgrade: naming match backed by a resolved calls edge → EXTRACTED.
-
@patch/@mock.patchdotted paths — EXTRACTED. -
Direct calls (added 2026-08-31): a resolved calls edge from a test
symbol to a FUNC/METHOD/CLASS in production code mints the edge,
EXTRACTED — behavioral test names and
monkeypatchhad starved heuristics 1–3 (dogfooding measured 1 TESTS edge in cie's own 308-test suite; after: 562). Test-glob files andconftest.pyare never targets. Still not exhaustive: a test reaching its target only via a helper gets no edge —test_map's hint says so.
If code and this wiki disagree, the code wins — then this wiki gets a PR. Evidence lives in the repo, not here.
Start
How-tos
- Install & serve to your MCP client
- Choose your storage backend
- Run the Neo4j team mode
- Index & keep it fresh
- Ask impact questions
- Task & QA layer
- Semantic search
- Snapshot or serve HTTP
- Policies & the write boundary
- Troubleshoot
Reference
- Extraction pipeline
- Data model
- Tool reference
- Benchmarks
- Security & determinism
- Two tiers · Project layout · Docs index
Contribute