Skip to content

feat: unify pipeline session creation between analyze and run commands #179

@omsherikar

Description

@omsherikar

Summary

refactron run uses RefactronPipeline.analyze (which saves a session) and sets current session. refactron analyze builds a separate PipelineSession inline, queues all issues, saves, and sets current — overlapping responsibilities with different code paths and risk of drift (fields, defaults, future flags).

Suggested direction

  • Extract a single helper e.g. create_session_from_analysis(result, target, ...) used by both CLI and RefactronPipeline.
  • Ensure issues_by_level, fix queue policy, and state transitions stay consistent.

Acceptance

  • One code path for “analysis result → persisted session” for connected commands.
  • Tests updated; behavior unchanged for users.

Code

  • refactron/core/pipeline.py
  • refactron/cli/analysis.py
  • refactron/cli/run.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    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