Skip to content

Commit 2b9ea8c

Browse files
fix(impl-generate): remove stale labels one per call in the failure handler
Review feedback: a comma-separated --remove-label fails as a whole when one name cannot be resolved, which could leave a pair marked pending. Applies to the new infrastructure-pause branch and the existing cap branch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
1 parent 78fb0aa commit 2b9ea8c

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/impl-generate.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,11 @@ jobs:
11531153
# capability verdict either; the next backfill dispatch picks it
11541154
# up with a clean budget once the markers age out.
11551155
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"
1156-
gh issue edit "$ISSUE" \
1157-
--remove-label "generate:${LIBRARY},impl:${LIBRARY}:pending" 2>/dev/null || true
1156+
# One label per call: a name `gh` cannot resolve fails a whole
1157+
# comma-separated edit and would leave both labels in place.
1158+
for stale in "generate:${LIBRARY}" "impl:${LIBRARY}:pending"; do
1159+
gh issue edit "$ISSUE" --remove-label "$stale" 2>/dev/null || true
1160+
done
11581161
gh issue comment "$ISSUE" --body "${MARKER}
11591162
${INFRA_TAG}
11601163
## :pause_button: ${LIBRARY} Paused (infrastructure failures)
@@ -1212,10 +1215,13 @@ jobs:
12121215
gh label create "impl:${LIBRARY}:failed" --color "d73a4a" \
12131216
--description "${LIBRARY} implementation failed" 2>/dev/null || true
12141217
1215-
# Remove stale labels and add failed
1216-
gh issue edit "$ISSUE" \
1217-
--remove-label "generate:${LIBRARY},impl:${LIBRARY}:pending" \
1218-
--add-label "impl:${LIBRARY}:failed" 2>/dev/null || true
1218+
# Add failed first, then drop the stale labels one per call: a
1219+
# name `gh` cannot resolve fails a whole comma-separated edit, and
1220+
# the old single call could leave the pair marked pending forever.
1221+
gh issue edit "$ISSUE" --add-label "impl:${LIBRARY}:failed" 2>/dev/null || true
1222+
for stale in "generate:${LIBRARY}" "impl:${LIBRARY}:pending"; do
1223+
gh issue edit "$ISSUE" --remove-label "$stale" 2>/dev/null || true
1224+
done
12191225
12201226
# Post final failure comment with marker
12211227
gh issue comment "$ISSUE" --body "${MARKER}

0 commit comments

Comments
 (0)