Skip to content

Detect stagnation in repeated repair attempts #110

@iKwesi

Description

@iKwesi

Problem

SpecForge currently halts after bounded attempts, but it does not yet detect repeated non-progressing retries explicitly.

Why it matters

A strong orchestration engine should be able to recognize when it is effectively trying the same fix over and over again and stop with a clear reason instead of merely exhausting a counter.

Proposed solution

Implement stagnation detection for bounded execution loops.

Detection should be driven by evidence such as:

  • near-identical code diffs across attempts
  • unchanged failing test sets
  • repeated critic findings with no material progress
  • repeated error signatures or command failures

Acceptance criteria

  • The loop can classify a run as stagnating before the maximum attempt budget is exhausted.
  • Stagnation detection is evidence-backed and deterministic.
  • Halted results distinguish stagnation from ordinary max_attempts_exhausted behavior.
  • Tests cover repeated-diff and repeated-failure scenarios.

Related phase

Future / Research

Related subsystem/component

critic and Ralph loop controller

Related artifacts or commands

criticRalphLoop; task execution results; critic results

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProduct improvement or enhancementexecutionTask execution, run orchestration, and loopsfuturePost-v1 roadmap backlogobservabilityLogging, explainability, and inspection visibilityresearchResearch spike or investigative work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions