Skip to content

feat: Ralph Loop — CI self-healing as default behavior #9

Description

@marcmantei

Summary

When a Ralph Loop is active on a repo, CI failures on Ralph Loop PRs should be automatically diagnosed and fixed by the agent — without requiring manual intervention from Marc.

Current behavior

check_suite.completed events are globally skipped. CI failures on Ralph Loop PRs require Marc to manually notice and request a fix.

Desired behavior

When check_suite.completed fires with a failure on a branch belonging to an active Ralph Loop:

  1. Check if ralph-loop is active on that repo (open issue with ralph-loop label)
  2. If active: Diagnose the failure:
    • Run the project's CI commands locally (see CI Commands table in agent config)
    • If local build passes → CI is an infrastructure problem (quota, flaky runner). Mark PR as "CI-clean locally, merge ready" and notify Marc briefly.
    • If local build fails → Spawn a fix worker to resolve the actual code errors, push fix, re-trigger CI.
  3. If not active: Skip as before (no change to existing behavior)

Implementation notes

  • This should be added to the Ralph Loop section in the agent's system prompt / skill
  • The check_suite.completed handler needs a conditional branch:
    if ralph-loop active on repo:
      → diagnose + auto-fix
    else:
      → skip (existing behavior)
    
  • The software-architect skill should document this as a default capability when activating a Ralph Loop
  • Applies to ALL projects when Ralph Loop is active (spacebot, mycelium, mitbeziehung.de, etc.)

Acceptance Criteria

  • check_suite.completed handler checks for active ralph-loop before skipping
  • Local build diagnosis runs before spawning a fix worker (avoids fix workers for quota/infra issues)
  • Fix workers push and re-trigger CI automatically
  • Infrastructure-only failures result in a brief Telegram notification, not a fix worker
  • Ralph Loop skill documentation updated to mention CI self-healing as default

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions