Skip to content

fix(impl-merge): clear stale failed labels on merge - #11197

Merged
MarkusNeusinger merged 4 commits into
mainfrom
fix/impl-merge-clean-failed-labels
Sep 2, 2026
Merged

fix(impl-merge): clear stale failed labels on merge#11197
MarkusNeusinger merged 4 commits into
mainfrom
fix/impl-merge-clean-failed-labels

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

  • impl-merge.yml removed generate:<lib>, impl:<lib>:pending and impl:<lib>:failed in one comma-separated gh issue edit; gh resolves each name against the repository's label list first and rejects the whole call when one is unknown (impl:<lib>:pending is created on demand), so the fallback only added impl:<lib>:done.
  • Issues [network-hierarchical] Hierarchical Network Graph with Tree Layout #3343 and [mosaic-categorical] Mosaic Plot for Categorical Association Analysis #3650 therefore carry impl:<lib>:failed next to impl:<lib>:done since the 2026-09-02 outage rescue, and every watchdog scan reports those pairs as "already retried — needs manual attention".
  • The labels are now removed one at a time, each call tolerated, and the watchdog's watchdog:retried-<lib> marker is cleared with them.

Plan

N/A

Test plan

  • Workflow change has no local verification loop (CLAUDE.md known gap): the run script parses as YAML and passes bash -n.
  • After merge, the next impl-merge run on an issue that carries impl:<lib>:failed (e.g. a rescue of [choropleth-basic] Choropleth Map with Regional Coloring #3069's muix) leaves only impl:<lib>:done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu

…really clears them

`gh issue edit --remove-label a,b,c` resolves every name against the
repository's labels before it edits and fails the whole call when one is
unknown; `impl:<lib>:pending` only exists on demand, so the comma-separated
cleanup failed and its fallback added `impl:<lib>:done` while leaving
`impl:<lib>:failed` in place (issues #3343 and #3650 after the 2026-09-02
rescue). Remove the labels individually, each call tolerated, and take the
watchdog's `watchdog:retried-<lib>` marker with them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu
Copilot AI lite review requested due to automatic review settings September 2, 2026 16:16
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new stale-label removal loop suppresses all gh failures, which can silently leave the exact :failed/watchdog-marker labels behind on transient API errors.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the impl-merge GitHub Actions workflow to reliably clear stale “failure/retry” labels from spec issues when an implementation successfully merges, preventing watchdog scans from incorrectly flagging issues as needing manual attention. It also records the behavior change in the project changelog.

Changes:

  • Update impl-merge.yml to add impl:<lib>:done and then remove stale labels (generate:<lib>, impl:<lib>:pending, impl:<lib>:failed, and watchdog:retried-<lib>) via individual tolerated calls.
  • Add a [Unreleased] changelog entry describing the label-cleanup fix and the outage-rescue fallout it addresses.
File summaries
File Description
CHANGELOG.md Documents the fix so releases capture the operational impact and motivation.
.github/workflows/impl-merge.yml Adjusts issue label updates to avoid gh issue edit failing the entire removal when any label name is unknown.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/impl-merge.yml
Copilot AI review requested due to automatic review settings September 2, 2026 16:20
…rt failures

Review feedback: silently tolerating every removal would hide a transient
API failure and leave the stale label in place, which is the state this
step exists to clear. Read the issue's labels once, remove only the stale
ones that are present, and emit a warning when a removal fails.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrKzcwZBnref1sWYtdXynu

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It modifies a production GitHub Actions workflow where mistakes can silently break automation and there is no local verification loop to fully validate behavior.

Review details

Suppressed comments (1)

.github/workflows/impl-merge.yml:393

  • The label-removal loop suppresses all errors (2>/dev/null || true), so if gh issue edit fails for a real reason (token permissions, API outage/rate limit), the workflow will silently leave stale labels behind and you won’t have any signal in the run logs. Consider emitting at least a ::debug:: line on failure so troubleshooting doesn’t require reproducing locally.
          # (2026-09-02). A removal that fails anyway is reported, not hidden:
          # the stale label is exactly the state this step exists to clear.
          PRESENT=$(gh issue view "$ISSUE" --json labels -q '.labels[].name' 2>/dev/null || echo "")
          for stale in "generate:${LIBRARY}" "impl:${LIBRARY}:pending" \
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 2, 2026 16:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new label-cleanup step still suppresses/ignores failures when fetching current issue labels, which can silently skip the very cleanup this workflow change is meant to guarantee.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/impl-merge.yml
Copilot AI review requested due to automatic review settings September 2, 2026 16:26
@MarkusNeusinger
MarkusNeusinger merged commit 825a834 into main Sep 2, 2026
8 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the fix/impl-merge-clean-failed-labels branch September 2, 2026 16:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated workflow still suppresses gh issue view errors and can silently skip stale-label cleanup on transient failures, undermining the PR’s intent to reliably clear stale labels.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

.github/workflows/impl-merge.yml:392

  • gh issue view errors are currently suppressed and replaced with an empty label list; if that call fails (rate limit/transient API error), this step silently skips stale-label cleanup, leaving impl:<lib>:failed / watchdog:retried-<lib> behind. Since the goal here is to clear stale state, it’s better to emit a warning when the label read fails.
          PRESENT=$(gh issue view "$ISSUE" --json labels -q '.labels[].name' 2>/dev/null || echo "")
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite


# Then clear every label that says this library is still pending or
# broken: the generate trigger, the pending marker, the :failed label
# impl-generate.yml sets at its retry cap, and the watchdog's
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.

2 participants