You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(impl-generate): keep infrastructure failures out of the 3-attempt cap
The cap exists to stop re-running a pair the model cannot solve. It counted
every failed run alike, so the Claude outage of 2026-09-02 (03:15-03:45 UTC,
every run ending in `is_error:true` with an "Internal error") burned all
three attempts of 27 pairs in twenty minutes, and for the rest of the
12-hour window each re-dispatch ran without any auto-retry.
The failure handler now classifies the run from step outcomes: both Claude
runs dying with a provider-side signature in the execution log, a Google
Cloud auth/SDK/upload failure, or a GitHub API failure at PR creation or
review dispatch is an infrastructure failure. Those markers carry an extra
`<!-- impl-fail-cause:infra -->` tag, are excluded from the genuine count,
and are retried on a separate cap of 5 per window, after which the pair is
paused without `impl:<lib>:failed`. "Implementation file not found" and a
missing theme render keep counting as before.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
| awk '{ g += $1; i += $2 } END { print (g + 0) " " (i + 0) }'); then
1116
+
FAILURE_COUNT=${COUNTS% *}
1117
+
INFRA_COUNT=${COUNTS#* }
1118
+
echo "::notice::Previous failures for ${LIBRARY}/${SPEC_ID} since ${CAMPAIGN_CUTOFF}: $FAILURE_COUNT (plus $INFRA_COUNT infrastructure failures, not counted)"
1062
1119
else
1063
1120
echo "::warning::Failure-count API call failed — failing closed (treating retry cap as reached, no auto-retry)"
1064
1121
FAILURE_COUNT=999
1122
+
INFRA_COUNT=999
1123
+
fi
1124
+
1125
+
# Retry dispatch, shared by both branches below. Forwards
1126
+
# `change_request` so cross-library divergence hints from daily-regen
1127
+
# pre-flight survive the retry — otherwise the first attempt has the
1128
+
# hint but the retry doesn't, defeating the audit. CHANGE_REQUEST is
1129
+
# read from env to keep raw quotes/$/backticks inside the hint from
1130
+
# breaking shell parsing.
1131
+
dispatch_retry() {
1132
+
gh workflow run impl-generate.yml \
1133
+
-f specification_id="${SPEC_ID}" \
1134
+
-f library="${LIBRARY}" \
1135
+
-f issue_number="${ISSUE}" \
1136
+
-f model="${MODEL}" \
1137
+
-f change_request="${CHANGE_REQUEST}"
1138
+
if [ -n "${CHANGE_REQUEST}" ]; then
1139
+
echo "::notice::Triggered automatic retry for ${LIBRARY}/${SPEC_ID} ($1, model=${MODEL}, change_request=present)"
1140
+
else
1141
+
echo "::notice::Triggered automatic retry for ${LIBRARY}/${SPEC_ID} ($1, model=${MODEL}, change_request=none)"
1142
+
fi
1143
+
}
1144
+
1145
+
if [ -n "${INFRA_CAUSE}" ]; then
1146
+
INFRA_ATTEMPT=$((INFRA_COUNT + 1))
1147
+
if [ "${INFRA_COUNT}" -ge $((INFRA_WINDOW_CAP - 1)) ]; then
1148
+
# Parked, not failed: nothing here says the pair is impossible.
1149
+
# No `impl:<lib>:failed`, so the watchdog does not treat it as a
1150
+
# capability verdict either; the next backfill dispatch picks it
1151
+
# up with a clean budget once the markers age out.
1152
+
echo "::warning::Parking $LIBRARY/$SPEC_ID after ${INFRA_ATTEMPT} infrastructure failures in the last ${CAMPAIGN_WINDOW_H}h (cap: ${INFRA_WINDOW_CAP}) — not marked failed, no auto-retry"
The **${LIBRARY}** implementation for \`${SPEC_ID}\` hit ${INFRA_ATTEMPT} infrastructure failures in the last ${CAMPAIGN_WINDOW_H}h (cap: ${INFRA_WINDOW_CAP}) and is paused. This is **not** a capability verdict — the pair keeps its 3-attempt budget.
Copy file name to clipboardExpand all lines: agentic/docs/project-guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -789,7 +789,7 @@ uv run python -m automation.scripts.label_manager list
789
789
-**`generate:all`** - Trigger all 15 libraries via bulk-generate
790
790
-**`impl:{library}:pending`** - Generation in progress
791
791
-**`impl:{library}:done`** - Implementation merged to main
792
-
-**`impl:{library}:failed`** - Max retries exhausted (4 repair attempts)
792
+
-**`impl:{library}:failed`** - Three failed generation attempts for the pair within a 12-hour window; infrastructure failures (provider incident, cloud auth, GitHub API) are retried on their own cap of 5 and never set it
|`impl:{library}:failed`|Three failed generation attempts for the pair within a 12-hour window. Infrastructure failures (provider incident, cloud auth, GitHub API) are retried on a separate cap of 5 and never set this label; a pair paused that way carries no label.| Workflow |
0 commit comments