Skip to content

ADR-053: graph tools tell the truth (per-language data-flow rules) - #95

Merged
ethanblauw-hub merged 8 commits into
masterfrom
feature/adr-053-graph-tool-accuracy
Nov 2, 2026
Merged

ethanblauw-hub merged 8 commits into
masterfrom
feature/adr-053-graph-tool-accuracy

Conversation

@ethanblauw-hub

Copy link
Copy Markdown
Collaborator

trace_data_flow gets its per-language definition and producer rules from the adapters, with sweeps over the whole index for the hits the ranked search misses. See docs/adr/ADR-053-graph-tools-tell-the-truth.md.

Open questions answered (@EDB, 2026-11-02, "all recommended"):

  1. No layer rules. The Next.js path labels ([UTILITY], [CORE LOGIC / LIB] and so on) are now printed only for TS/JS files, through a new _layer_tag. A Python or C# entry shows only its bucket. A test is added, and the pinned Firestore output is unchanged.
  2. Moot: ADR-052 merged .gs scanning.
  3. Not in this ADR. Filed as B-069 in Backlog: B-066..B-068 from the usage survey; statuses for merged ADRs #93 (user-defined rules in indexer.toml; Gantt's recordAudit → audit_events is the example).
  4. Heritage binding stays at read time, deferred.

Status set to accepted. Master (b0619f4) is merged in with no conflicts. It also merges cleanly with ADR-050's branch.

Checks, run locally on CPU (Windows, Python 3.14):

  • The CI flake8, pytest --co, the conformance, resolution and L5X baseline checks all pass.
  • pytest: 944 passed, 2 skipped.
  • MCP Inspector: trace_data_flow with no index returns isError: true.

🤖 Generated with Claude Code

claude and others added 8 commits October 20, 2026 20:24
…uage rules

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-053]
get_graph_edges() returned an unresolved edge's raw target, so append, bool,
ArgumentParser, os and Protocol became community members and betweenness hubs.
It now returns an edge only when its target is a symbol FQN or an indexed file,
and binds EXTENDS/IMPLEMENTS bare names to the in-repo type of that name (same
file first, else the only one). Resolved import links survive (ADR-044).

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-053 src/db.py]
trace_data_flow knew only Firestore and Next.js: on this repo it found no
definition for chunk_summaries and listed its writer, cache_summaries, as a
consumer. Each adapter now supplies data_flow_rules(): Python (SQL CREATE/
INSERT/UPDATE/DELETE, classes, attribute and collection writes), Apps Script
on the JS/TS adapter (setValue(s), appendRow, setProperty, gated on an Apps
Script service in the file) and C# (types, SQL, EF Core DbSet writes). Rule
hits are swept across the whole doc store, not only the ranked top-80.

The Firestore/Next.js path is untouched; a golden captured from 871b55c pins
its output. Both graph tools now raise when no index has been built, so the
client sees isError instead of a successful refusal or a search of an empty
index.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-053 src/CLAUDE.md src/MCPServer.py src/adapters/base.py src/adapters/csharp_adapter.py src/adapters/python_adapter.py src/adapters/ts_adapter.py]
Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-053]
A rule-matched entry dropped the client-side-write tag the legacy entry
carries, and an empty target_symbol made every rule match every file.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-053 src/MCPServer.py]
Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-053]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

[ADR-053 src/CLAUDE.md src/MCPServer.py src/adapters/__init__.py src/blas_threads.py src/call_resolver.py src/core.py src/db.py src/hybrid_retriever.py src/incremental_indexer.py src/iterative_retriever.py src/model_host.py src/redact.py src/scan_policy.py src/source.py src/summarizer.py src/tui/app.py]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

[ADR-053 src/MCPServer.py]
@ethanblauw-hub
ethanblauw-hub merged commit f52af12 into master Nov 2, 2026
6 checks passed
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.

2 participants