Skip to content

feat: analysis manager - #8

Merged
SizzleUnrlsd merged 4 commits into
mainfrom
feat/analysis-manager
Sep 3, 2026
Merged

SizzleUnrlsd merged 4 commits into
mainfrom
feat/analysis-manager

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Implements the Analysis Manager of docs/architecture.md (§8 Analysis Manager, §9 Analysis DAG, §10 Lazy Evaluation, §11 Cache, §12 Invalidation).

  • Acceptance tests first (test: define analysis manager behavior), implementation follows in this PR.
  • coretrace_python.analysis: Analysis[R] and FunctionAnalysis[R] base classes with name, version and declarative requires; AnalysisManager with a registry, cycle detection, lazy evaluation at module and function granularity, an in-memory cache and TransformationPass invalidation driven by preserves.
  • Undeclared dependencies are rejected at request time, so the DAG stays honest.
  • The Phase 2 results are exposed as the first analyses: ScopeAnalysis, ImportAnalysis, SymbolAnalysis (results renamed to ScopeTable, ImportTable, SymbolTable).
  • PyIRAnalysis lowers one function on demand; ModuleIRAnalysis assembles the module. The CLI runs through the manager.

Not in this PR: the persistent cache keyed by IR fingerprint and plugin/API version (§11), which belongs to Phase 10.

Closes #7

🤖 Generated with Claude Code

SizzleUnrlsd and others added 3 commits September 3, 2026 06:16
ScopeTable, ImportTable and SymbolTable are the results; the ScopeAnalysis,
ImportAnalysis and SymbolAnalysis names are reserved for the analyses the
manager will expose, as in the architecture document.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Acceptance tests for the Analysis Manager: registry with declarative
dependencies, lazy module and function granularity, shared cached results,
transformation invalidation, and the semantic tables and PyIR as first analyses.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Analyses are classes with a name, a version and declarative requires, computed
lazily at module or function granularity by an AnalysisManager that caches and
shares results, rejects undeclared dependencies and cycles, and invalidates
what a TransformationPass does not preserve. The semantic tables and PyIR are
the first registered analyses; lower_module runs through the manager.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@SizzleUnrlsd SizzleUnrlsd mentioned this pull request Sep 3, 2026
7 tasks done
Declare coretrace_python as first-party for ruff's isort so import order no
longer depends on whether a package already exists on disk when tests are
written before their implementation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@SizzleUnrlsd
SizzleUnrlsd merged commit f3ce9a1 into main Sep 3, 2026
6 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/analysis-manager branch September 3, 2026 04:25
SizzleUnrlsd added a commit that referenced this pull request Sep 3, 2026
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.

Implement the lazy Analysis Manager DAG

1 participant