Skip to content

Plan 3: Error Detection & Phase Transitions #6

@iamladi

Description

@iamladi

Overview

Port error detection logic (hash-based stuck detection) and phase transition management with 80%+ test coverage.

Research Source

  • research/research-workflows-tdd-migration-deep.md
  • Migration Roadmap Phase 2 (Tasks 6-8)
  • Section 4: Complete Migration Example

Tasks

  • Create src/core/error-detector.ts with hashError and detectStuck functions
  • Create tests/unit/core/error-detector.test.ts
  • Create src/core/phase-manager.ts with Phase type and transitions
  • Create tests/unit/core/phase-manager.test.ts
  • Update vitest.config.ts with 80% coverage thresholds

Complexity

5/10

Acceptance Criteria

  • detectStuck returns isStuck: true after 3 identical errors
  • detectStuck resets counter when error changes
  • Phase transitions follow valid state machine
  • Coverage at 80%+ for core/ directory

Dependencies

Plan File

plans/workflow-3-error-detection-phases.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