Skip to content

Get rid of SplitRunner class and restrcuture CLI handlers and APIs #48

Closed
@erbesharat

Description

@erbesharat

Detailed Description

The SplitRunner class currently complicates the architecture of the codebase, causing duplicated logic between CLI handlers and various API endpoints. We want to eliminate the SplitRunner class entirely and restructure both the CLI and API handlers to follow the same interface-based approach used by our LanguagePlugin system. By moving to a more unified interface, we can streamline the code, reduce duplication, and ensure that all split and scan functionalities are implemented in a single, consistent manner. This will result in a cleaner, more maintainable codebase that is easier to extend and debug.

Context

The current architecture is prone to fragmentation and repeated logic, making it challenging to track down bugs and maintain a consistent behavior across different parts of the system. By removing the SplitRunner class and aligning the CLI handlers and API implementations with an interface-driven approach, we can provide a cohesive and predictable structure. This will benefit both developers and operators, allowing for clearer reasoning about the code, fewer points of failure, and an easier onboarding process for new contributors.

Possible Implementation

  1. Remove the SplitRunner class and refactor all of its functionality into a common interface or module similar to how we handle LanguagePlugin implementations.
  2. Update CLI handlers and API endpoints to use these new interfaces, ensuring that split and scan logic is defined once and used everywhere.
  3. Provide a consistent interface layer that the CLI tools and the APIs can both leverage, reducing code duplication and consolidating error handling and logging routines.
  4. Add comprehensive tests to verify that both CLI and API functionalities remain intact and that the new interface structure works as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions