Skip to content

Implementation Plan: Fix Infinite CI Loop — flake_suspected Routing Escape for is_fixable=false#4116

Merged
Trecek merged 3 commits into
developfrom
infinite-ci-loop-flake-suspected-routing-has-no-escape-for-i/4113
Jun 26, 2026
Merged

Implementation Plan: Fix Infinite CI Loop — flake_suspected Routing Escape for is_fixable=false#4116
Trecek merged 3 commits into
developfrom
infinite-ci-loop-flake-suspected-routing-has-no-escape-for-i/4113

Conversation

@Trecek

@Trecek Trecek commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

When diagnose_ci returns is_fixable=false for env-type CI failures, the resolve-failures skill maps them to flake_suspected, causing an infinite re-push loop. This plan fixes the root cause in the skill's decision table and adds a loop guard in all three pipeline recipes (implementation.yaml, implementation-groups.yaml, remediation.yaml).

Two complementary fixes:

  1. Skill fix: resolve-failures/SKILL.md — extract is_fixable from the diagnosis file and route unfixable env/unknown failures to ci_only_failure instead of flake_suspected
  2. Recipe fix: Add check_flake_loop guard step (following the existing check_ci_rebase_loop pattern) to bound the flake_suspected → re_push path to 3 iterations, and capture is_fixable from diagnose_ci output
  3. Test fix: Update tests/skills/test_resolve_failures_ci_aware.py — the _find_table_row_verdict parser and verdict assertions must handle the new 4-column table with is_fixable

Closes #4113

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260626-100257-768257/.autoskillit/temp/make-plan/fix_flake_suspected_infinite_ci_loop_plan_2026-06-26_103000.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 2 5.7k 21.6k 1.4M 110.3k 54 106.7k 23m 32s
review_approach* sonnet 1 6.6k 6.2k 222.7k 54.9k 16 40.4k 8m 55s
verify* opus[1m] 1 66 15.7k 2.2M 100.2k 55 81.5k 10m 33s
implement* MiniMax-M3 1 107.7k 22.4k 5.3M 0 144 0 8m 32s
fix* sonnet 1 438 25.9k 4.6M 112.1k 122 93.7k 11m 16s
audit_impl* sonnet 1 70 20.0k 354.6k 72.5k 23 55.8k 9m 48s
prepare_pr* MiniMax-M3 1 47.1k 2.5k 161.2k 0 13 0 39s
compose_pr* MiniMax-M3 1 36.4k 1.4k 140.8k 0 11 0 30s
Total 204.1k 115.7k 14.4M 112.1k 378.2k 1h 13m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
review_approach 0
verify 0
implement 389 13601.9 0.0 57.5
fix 35 131817.6 2676.3 740.9
audit_impl 0
prepare_pr 0
compose_pr 0
Total 424 33897.5 891.9 272.9

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 2 5.7k 37.3k 3.6M 188.2k 34m 6s
sonnet 3 7.1k 52.1k 5.2M 189.9k 29m 59s
MiniMax-M3 3 191.2k 26.3k 5.6M 0 9m 42s

Trecek and others added 3 commits June 26, 2026 11:38
When the diagnosis file emits is_fixable=false for env/unknown failure
subtypes, the verdict must route to human escalation instead of
flake_suspected, preventing infinite re-push loops on unfixable failures.
…g test

Remove is_fixable from diagnose_ci.capture in all 3 pipeline recipes.
The dead-output semantic rule fires because resolve-failures reads is_fixable
from the diagnosis FILE (via diagnosis_path), not from recipe context —
context.is_fixable is never referenced downstream.

Restrict test_resolve_ci_routes_flake_suspected_to_check_flake_loop to only
check resolve-failures-invoking steps. The resolve_review step uses
resolve-review skill which legitimately routes flake_suspected to
pre_review_rebase, not through check_flake_loop.

Update diagram hashes for all 3 recipes after YAML changes.
…lake_loop_step_exists

If a run_python step has no with: block, step.with_args is None and
subscripting it raises TypeError instead of a clear AssertionError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Trecek Trecek force-pushed the infinite-ci-loop-flake-suspected-routing-has-no-escape-for-i/4113 branch from 722b918 to 669c984 Compare June 26, 2026 18:38
@Trecek Trecek added this pull request to the merge queue Jun 26, 2026
Merged via the queue into develop with commit 87ad2ff Jun 26, 2026
3 checks passed
@Trecek Trecek deleted the infinite-ci-loop-flake-suspected-routing-has-no-escape-for-i/4113 branch June 26, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant