Skip to content

Plan 2: Testing Infrastructure & Core Logic #5

@iamladi

Description

@iamladi

Overview

Implement mock adapters for testing and port workflow state management as pure functions (Functional Core).

Research Source

  • research/research-workflows-tdd-migration-deep.md
  • Migration Roadmap Phase 2 (Tasks 3-5)

Tasks

  • Create src/adapters/mocks/mock-github.ts implementing IGitHubClient
  • Create src/adapters/mocks/mock-claude.ts implementing IClaudeClient
  • Create src/adapters/mocks/mock-process.ts implementing IProcessRunner
  • Create src/core/workflow-state.ts with WorkflowState type
  • Create tests/unit/core/workflow-state.test.ts

Complexity

5/10

Acceptance Criteria

  • Mock adapters implement all port interfaces
  • WorkflowState type covers: setup, planning, implementing, completed, failed
  • State transitions are pure functions (no side effects)
  • Unit tests pass without vi.mock

Dependencies

Plan File

plans/workflow-2-testing-infrastructure.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions