Skip to content

Loop lacks safety guardrails for autonomous operation #5

Description

@benthomasson

Problem

The SDLC loop has no safeguards to prevent runaway failures when operating autonomously. This was demonstrated on April 10-11 when the loop generated 10 consecutive bad PRs (PR-85 through PR-94), each carrying stale GH-75 error-handling changes regardless of the target issue.

Four independent gaps contribute to this:

1. No circuit breaker

There is no consecutive-failure limit. The loop will keep generating PRs indefinitely without pausing, escalating, or requiring human confirmation -- even when every iteration is failing.

2. Preflight validation not implemented

Pre-invocation checks (clean working tree, correct branch, remote sync) have been designed but not implemented. The dirty-tree condition that caused the PR-85-94 incident remains unguarded.

3. No inter-iteration cleanup

There is no cleanup step (git clean, git checkout, git stash) between iterations. The loop operates on a single working tree without worktree isolation, so one iteration's leftover state contaminates the next.

4. No worktree isolation

Each iteration mutates the same working directory. A failed iteration leaves behind uncommitted changes, untracked files, or a dirty index that the next iteration inherits silently.

Impact

Without these guardrails, the loop cannot be safely run without human supervision. The PR-85-94 incident is empirical proof: 10 PRs were created, reviewed, and closed before a human noticed the pattern.

Suggested fixes

  • Circuit breaker: stop after N consecutive failures (e.g., 3), require human confirmation to continue
  • Preflight checks: verify clean working tree, correct branch, and remote sync before each iteration
  • Inter-iteration cleanup: git checkout + git clean between iterations, or use git worktree isolation
  • Failure detection: check whether the previous PR was closed without merge before starting the next iteration

Source

Identified via belief-network analysis in ftl2-project-expert. Supporting exploration entries:

  • explore-sdlc-loop-reliability-2108.md
  • explore-ai-contributor-validation-0236.md
  • explore-mid-run-contamination-vectors-0407.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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