Problem
RefactronPipeline carries a correct project_root, but AutoFixEngine.fix_file() always constructs VerificationEngine(project_root=file_path.parent) (refactron/autofix/engine.py). That breaks monorepos and any layout where tests or config live above the edited file.
Impact
TestSuiteGate._find_relevant_tests searches from the wrong root when callers do not pass an explicit root.
- Behavior diverges from
refactron verify --project-root, which already accepts a root.
Suggested direction
- Add an optional
project_root: Optional[Path] to fix_file() (default: derive from file, or walk to VCS root).
- Have
RefactronPipeline.apply() pass self.project_root into fix_file.
- Add/adjust tests so verification uses the pipeline root, not only
file_path.parent.
References
refactron/autofix/engine.py (verification block)
refactron/core/pipeline.py (apply → fix_file)
Problem
RefactronPipelinecarries a correctproject_root, butAutoFixEngine.fix_file()always constructsVerificationEngine(project_root=file_path.parent)(refactron/autofix/engine.py). That breaks monorepos and any layout where tests or config live above the edited file.Impact
TestSuiteGate._find_relevant_testssearches from the wrong root when callers do not pass an explicit root.refactron verify --project-root, which already accepts a root.Suggested direction
project_root: Optional[Path]tofix_file()(default: derive from file, or walk to VCS root).RefactronPipeline.apply()passself.project_rootintofix_file.file_path.parent.References
refactron/autofix/engine.py(verification block)refactron/core/pipeline.py(apply→fix_file)