Skip to content

tech debt: use explicit __init__ signatures in FlyBeadsWorkflow and RefuelSpeckitWorkflow #62

@pofallon

Description

@pofallon

Problem

FlyBeadsWorkflow still uses an opaque **kwargs constructor that hides its actual parameter contract from IDEs, mypy, and callers:

# src/maverick/workflows/fly_beads/workflow.py
def __init__(self, **kwargs: Any) -> None:
    self._checkpoint_store = kwargs.pop("checkpoint_store", None)
    workflow_name = kwargs.pop("workflow_name", WORKFLOW_NAME)
    super().__init__(workflow_name=workflow_name, **kwargs)

This pattern loses IDE autocompletion, prevents mypy from catching wrong argument types at call sites, and makes the constructor API opaque to new contributors.

(RefuelSpeckitWorkflow — originally co-mentioned in this issue — was removed during the speckit/refuel consolidation. RefuelMaverickWorkflow already has explicit kwargs.)

Suggested fix

Declare explicit keyword-only parameters matching PythonWorkflow.__init__. Example shape:

def __init__(
    self,
    *,
    config: MaverickConfig,
    registry: ComponentRegistry,
    checkpoint_store: CheckpointStore | None = None,
    workflow_name: str = WORKFLOW_NAME,
) -> None:
    self._checkpoint_store = checkpoint_store
    super().__init__(
        config=config,
        registry=registry,
        workflow_name=workflow_name,
    )

Impact

No behaviour change. All existing tests should pass unchanged.

Origin

Originally filed during code review of branch 035-python-workflow (review item L2). Updated 2026-05-26 to reflect substrate after the Burr migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt to address

    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