Skip to content

Resolve Python receiver calls and audit impact coverage - #343

Merged
forhappy merged 1 commit into
mainfrom
codex/call-and-impact-correctness
Oct 1, 2026
Merged

forhappy merged 1 commit into
mainfrom
codex/call-and-impact-correctness

Conversation

@forhappy

@forhappy forhappy commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Python service callee queries could report zero despite attribute-chain calls, while impact summaries counted only the capped presentation results. This change preserves source invocations, resolves supported nominal receivers, and independently audits direct impact.

  • Resolve annotated and injected Python receivers, unit-of-work member chains and source-backed factory returns. Unknown receivers retain source inventories and optional inferred edges; ambiguous or mutated receivers remain unresolved.
  • Aggregate class-owned methods and initializers while retaining actual call endpoints. Report resolved and unresolved source-call counts instead of a false zero. Producers without inventories retain their existing relationship summaries.
  • Expand reverse impact defaults and add CLI --relation / MCP relations filters. Count and group direct/transitive dependents independently of the presentation cap, and fail a complete audit if selected direct dependents were omitted. Every known direct contact is accounted for as a dependent, outgoing context or exclusion; outgoing references are not claimed affected code.
  • Preserve qualified external Rust factory receivers under existing inference rules, with negative coverage for absent source-local methods.

Compatibility: optional graph callSites and query callSummary / impactSummary fields; disposable AST cache version 14. Rebuild Python graphs to obtain inventories. Historical graphs remain readable and immutable. Command, contract and migration documentation is included.

Public-repository qualification used a read-only pinned Dify checkout. A source-first seeded sample captured 2,550/2,550 source calls across 10 production services: 698 sites had all-exact target evidence and 1,537 had inferred edge evidence. These are capture measurements, not a claim of exact runtime dispatch. All five widely used symbol audits accounted for their complete published direct adjacency. The graph retained its partial-source warning for 15 quarantined edges. Reproduction steps and reviewed source links are in docs/implementation/python-call-impact-qualification.md.

The fixture graph adds 17 explicitly inferred receiver nodes. Five density/exact-isolation baselines are adjusted for that addition; the absolute exact-edge, exact cross-file-edge and typed endpoint floors, relationship-specific gates and semantic assertions are retained. Exact edges increase from 956 to 962 and exact cross-file edges remain 56.

Validation:

  • cargo fmt --all -- --check
  • Workspace Clippy (--lib --bins --locked -- -D warnings) and workspace library/binary tests
  • Full CLI integration suite, targeted query/output/model/MCP/core contracts, and 220 resolver integration tests
  • Native qualification-helper Clippy; deterministic query-relevance gate
  • ./scripts/qualify_code_graph_v1.sh --fixtures-only
  • Product boundary gate and public Dify qualification

JavaScript, packaging and other platform matrices are left to CI; no JavaScript sources changed. Rust builds and qualification artifacts were kept in this checkout's external target directory.

@forhappy
forhappy merged commit 453d5d7 into main Oct 1, 2026
14 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.

1 participant