Skip to content

fix(#2797): create ready-for-triage label before use in post-retro.sh - #2800

Merged
rh-hemartin merged 1 commit into
mainfrom
agent/2797-retro-label-guard
Jul 1, 2026
Merged

fix(#2797): create ready-for-triage label before use in post-retro.sh#2800
rh-hemartin merged 1 commit into
mainfrom
agent/2797-retro-label-guard

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

post-retro.sh passed --label "ready-for-triage" to gh issue create without ensuring the label existed in the target repo. This caused the retro workflow to fail with exit code 1 on repos that predate PR #2679 (which introduced the label in the scaffold template).

Add a gh label create --force call before gh issue create, following the same idempotent pattern used in post-review.sh for the ready-for-merge and requires-manual-review labels. The --force flag makes the call a no-op when the label already exists.

Also adds a mock handler for gh label create in the test harness and a test case verifying the label is created before the issue.

Note: pre-commit could not run (shellcheck-py failed to install in sandbox due to network restrictions). Post-script runs an authoritative pre-commit check.


Closes #2797

Post-script verification

  • Branch is not main/master (agent/2797-retro-label-guard)
  • Secret scan passed (gitleaks — dc93e9aed9efa125ba4fe35b381738729821dfa0..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

post-retro.sh passed --label "ready-for-triage" to gh issue create
without ensuring the label existed in the target repo. This caused
the retro workflow to fail with exit code 1 on repos that predate
PR #2679 (which introduced the label in the scaffold template).

Add a gh label create --force call before gh issue create, following
the same idempotent pattern used in post-review.sh for the
ready-for-merge and requires-manual-review labels. The --force flag
makes the call a no-op when the label already exists.

Also adds a mock handler for gh label create in the test harness
and a test case verifying the label is created before the issue.

Note: pre-commit could not run (shellcheck-py failed to install
in sandbox due to network restrictions). Post-script runs an
authoritative pre-commit check.

Closes #2797
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner June 30, 2026 19:45
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Jun 30, 2026
@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://b41f8a79-site.fullsend-ai.workers.dev

Commit: 6eda2da3aabbbc0072af2acc268244beae4189ee

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rh-hemartin
rh-hemartin added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit 18f78a9 Jul 1, 2026
15 of 19 checks passed
@rh-hemartin
rh-hemartin deleted the agent/2797-retro-label-guard branch July 1, 2026 08:06
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 1, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 8:10 AM UTC · Completed 8:23 AM UTC
Commit: 6eda2da · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #2800 — fix(#2797): create ready-for-triage label before use in post-retro.sh

Workflow quality: Good. The code agent resolved this in a single iteration with clean code that follows existing patterns.

Timeline

  1. 19:31 UTC — Triage agent processed issue post-retro.sh fails when ready-for-triage label doesn't exist in target repo #2797 (success)
  2. 19:38 UTC — Code agent started, produced a single-commit fix in ~7 minutes
  3. 19:45 UTC — PR fix(#2797): create ready-for-triage label before use in post-retro.sh #2800 opened with 19 additions across 2 files, CI passed
  4. No review agent dispatched — bot-authored PR did not match dispatch rules
  5. 07:58 UTC (+1d) — Human reviewer (rh-hemartin) approved with no comments
  6. 08:06 UTC — Merged via merge queue

What went well

  • Zero rework: Code agent got it right first try with a minimal, well-targeted fix
  • Pattern adherence: The fix mirrors the existing idempotent label-creation pattern in post-review.sh
  • Test coverage included: Added both a mock handler and an ordering test

Gaps (already tracked)

  • No automated review ran — the authorization gate blocks review dispatch for coder-bot PRs. This is already tracked by #2674. The 12-hour wait for human review is a direct consequence.
  • Retro dispatch on clean workflows — this retro run itself may be unnecessary for single-iteration bot PRs with no review findings. Already tracked by #2739.

Proposals

No new proposals. All identified improvement opportunities are covered by existing open issues (#2674, #2739).

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

Labels

ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

post-retro.sh fails when ready-for-triage label doesn't exist in target repo

1 participant