Skip to content

docs(spike): SCIP overlay go/no-go for call graph (TAP-4096)#198

Merged
wtthornton merged 1 commit into
masterfrom
tap-4096-scip-overlay-spike
Jul 2, 2026
Merged

docs(spike): SCIP overlay go/no-go for call graph (TAP-4096)#198
wtthornton merged 1 commit into
masterfrom
tap-4096-scip-overlay-spike

Conversation

@wtthornton

Copy link
Copy Markdown
Owner

What

Decision-support spike (not an ADR) for TAP-4096: evaluate an optional compiler-grade SCIP overlay that ingests an existing index.scip when present to upgrade ambiguous CALLS edges, with the deterministic AST/tree-sitter index remaining source of truth + fallback. Doc only — no overlay implementation.

Verdict: NO-GO for now (hold ADR-0017 rejection / ADR-0026 deferral)

Measured live on the tapps_mcp package via build_call_graph_index (6,470 edges, 6,403 in-repo gaps, 0.99 in-repo gap rate). Honest bucketing of the 10,241 unresolved_static_call gaps:

Bucket Count Share SCIP upgradeable?
builtin-rooted 3,505 34% No (external)
method call x.y() 5,972 58% Only if receiver type resolves
bare name = repo symbol 16 0.2% Yes
other bare name 748 7% Mixed

The headline 0.99 rate overstates the win ~3×: the classifier's expr_root heuristic counts builtins/local-method calls as in-repo. Genuine SCIP-addressable ceiling ≈58%, realistic in-repo gain ≈20-35% after typed-receiver externals drop out.

Why NO-GO: (1) win is real but modest; (2) no consumer emits index.scip today, so the "near-zero marginal cost" premise has no live input; (3) a stale .scip can draw a wrong edge — the ADR-0004 fabricate-an-edge failure mode; (4) cheaper deterministic in-repo receiver typing (ADR-0026 receiver_untyped / TAP-4540 lineage) captures a chunk of the same edges with no external toolchain. Includes a concrete GO trip-wire + thin S1-S4 follow-up outline if a consumer starts shipping index.scip.

Where it would plug in (verified anchors)

  • call_graph.py:306-311 (full-build _finalize_index) + call_graph.py:322-366 (incremental update_call_graph_index, byte-equivalence invariant)
  • call_graph_fingerprint.py:149-159 compute_index_fingerprint (fold .scip hash for staleness)
  • INDEX_VERSION 5 → 6 bump; call_graph_cache.py:351-386 migration path

Test

Docs-only, no Python touched. Markdown well-formed, all internal file/ADR refs verified to exist; ADR-0017/0026 line anchors confirmed. No docs index lists spikes (repo convention), so no index change.

🤖 Generated with Claude Code

Decision-support spike (not an ADR) evaluating an optional compiler-grade
SCIP overlay that ingests an existing index.scip to upgrade ambiguous CALLS
edges, with the deterministic AST/tree-sitter index as source of truth +
fallback. Measured on the live tapps_mcp package (6,470 edges, 6,403 in-repo
gaps): the 0.99 in-repo gap rate collapses to a ~58% SCIP-addressable ceiling
(method calls) once builtins are excluded, and lower still after typed-receiver
externals drop out. Verdict: NO-GO for now (no consumer emits index.scip; the
staleness window is a new fabricate-an-edge liability; cheaper in-repo receiver
typing is unspent) with a concrete GO trip-wire and a thin follow-up story
outline. Holds ADR-0017 rejection / ADR-0026 deferral. Doc only, no code change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wtthornton wtthornton merged commit 2c4a996 into master Jul 2, 2026
1 check passed
@wtthornton wtthornton deleted the tap-4096-scip-overlay-spike branch July 2, 2026 18:47
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