Skip to content

[P0] Implement bounded verify→repair self-healing loop #9

@pro-utkarshM

Description

@pro-utkarshM

Problem

The proposal's core innovation is an iterative verification loop that repairs failing tests until pass. Reality: core/generator.py:285-322 runs tests once, records tc.diagnosis, and never applies a fix or re-runs. 'Self-healing' is currently a no-op during generation.

Tasks

  • Add bounded loop in generator phase 3 (e.g. max_repair_iters, default 3).
  • On TEST_WRONG diagnosis: apply diagnosis.suggested_fix, regenerate test file, re-run.
  • On CODE_BUG: flag, stop repairing (do not mutate test to force pass).
  • On INTENT_WRONG: surface for intent revision (interactive) or skip (auto).
  • Track iteration count + final status in VerificationResult.

Acceptance

A deliberately-wrong generated test gets diagnosed, auto-fixed, and passes on re-run within max iters; loop terminates and is unit-tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Blocker / must fix to run

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions