Skip to content

perf: replace preview-based fixer resolution in pipeline queue #176

@omsherikar

Description

@omsherikar

Summary

RefactronPipeline._find_fixer_name iterates every registered fixer and calls fixer.preview(issue, "x = 1\n") on dummy code to see if preview succeeds. This is O(fixers × issues) and may not reflect real file context, so orchestration work is noisy and slow for large issue lists.

Suggested direction

  • Central registry: map IssueCategory / issue type → candidate fixers (or ask AutoFixEngine for the responsible fixer without dummy preview).
  • Fallback to preview only when ambiguous.
  • Cache per-issue-type resolution.

Acceptance

  • No regression in which issues get a fixer assigned.
  • Measurable reduction in queue time for large queues (benchmark or unit test with counter).

Code

  • refactron/core/pipeline.py_find_fixer_name, queue_issues
  • refactron/autofix/engine.py (if API changes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions