Skip to content

P0 epic: AST and static-analysis accuracy roadmap #285

Description

@shaggitza

Priority

P0 — top engineering priority. This epic tracks the complete five-part AST/static-analysis accuracy audit.

Why this is first priority

The checked-in verification artifact reports mypy normalized TP=3, FP=0, FN=68 (4.23% recall), with most false negatives attributed to discovery before propagation. The artifact may predate current source, but the audit reproduced concrete false negatives, false positives, established-empty inventories, and benchmark-integrity risks.

The objective is not to claim complete Python runtime reachability. It is to maximize accuracy within declared static subsets while making ambiguity, unsupported behavior, and incompleteness explicit.

Workstreams

Correctness and inventory foundations

Semantic propagation and framework execution

Isolation, effects, and extensibility

Architecture decision

Retain CPython AST for framework registration/source ranges and mypy for typed calls. Add dual snapshots, bounded CFG/callable/receiver analysis, and a versioned evidence graph. SCIP, Pyright, tree-sitter, LibCST, CodeQL, and runtime traces are complementary providers or differential oracles, not wholesale replacements.

Program-level gates

  • Supported generated typed DAG subset reaches 100% precision and recall.
  • Unrelated/dead-code controls produce zero HIGH/MEDIUM candidates.
  • Unsupported dynamic registration produces conditional/unavailable, never established-empty inventory.
  • First real-world milestone: normalized recall >=20%, precision >=90%, no new negative-control false positive.
  • Propagation milestone: recall >=50%, precision >=90%, every repository non-zero recall.
  • Fresh prediction-blind release corpus: recall >=80%, precision >=90%, per-repository recall >=70%, resolved coverage >=95%.
  • HIGH direct evidence precision remains 100%; LOW remains report-only.
  • Incremental p95 <=30 seconds for the documented medium-project class, with cold build and peak RSS reported separately.

Validation policy

  • Controlled/property-based call-graph and FastAPI program generation.
  • Baseline/target delete-add, rename, and move metamorphic tests.
  • Secure AST versus sandboxed runtime route-census differential tests.
  • mypy versus optional SCIP/Pyright definition/call-target disagreements stored as review fixtures.
  • Raw exact and normalized real-world metrics, confidence tiers, discovery/propagation attribution, unresolved coverage, and negative-control specificity.
  • Missing and not_evaluable labels must never be treated as negatives.

Explicit limits

Dynamic imports, reflection, plugins, monkeypatching, descriptors, native extensions, runtime configuration, and unobserved production behavior remain fundamental static-analysis limits. Runtime observations may confirm edges; their absence cannot prove non-reachability.

Related roadmap/issues: #20, #97, #99, #100, #101, #104, #107, #109, #110, #144, #148.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture and extensibilitybenchmarkBenchmark and corpus workpriority: P0Highest priority: correctness or release-blocking workresearchResearch or experiment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions