Context
ImportIntegrityVerifier documents deferred work:
Step 4 (cycle detection) deferred — requires project-wide import graph
(refactron/verification/checks/imports.py)
Impact
Transforms that introduce circular imports can still pass syntax + resolvability checks but break at runtime. Catching this in the verification engine materially increases confidence for autofix and --verify.
Suggested direction
- Build a bounded import graph for the project (or for the package subtree under
project_root).
- On transform, diff new edges and detect simple cycles involving the changed module.
- Guardrails: timeouts, max files, cache graph between runs for performance.
Acceptance sketch
- Unit tests with minimal fake packages showing a cycle is reported with a clear
blocking_reason.
- Document complexity limits in docstrings or config.
References
refactron/verification/checks/imports.py (TODO)
Context
ImportIntegrityVerifierdocuments deferred work:(
refactron/verification/checks/imports.py)Impact
Transforms that introduce circular imports can still pass syntax + resolvability checks but break at runtime. Catching this in the verification engine materially increases confidence for autofix and
--verify.Suggested direction
project_root).Acceptance sketch
blocking_reason.References
refactron/verification/checks/imports.py(TODO)