Skip to content

feat: implement issue #1081 — canary-rollout sync-issues aborts every scheduled run — unguarded _gh_issue_create under set -e (+ App missing Issues:write) → no blocker issues, no fleet dashboard - #1085

Closed
don-petry wants to merge 1 commit into
mainfrom
dev-lead/issue-1081-20260704-1443
Closed

don-petry wants to merge 1 commit into
mainfrom
dev-lead/issue-1081-20260704-1443

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #1081

Implemented by dev-lead agent. Please review.

… scheduled run — unguarded _gh_issue_create under set -e (+ App missing Issues:write) → no blocker issues, no fleet dashboard
Copilot AI review requested due to automatic review settings July 4, 2026 14:49
@don-petry
don-petry requested a review from a team as a code owner July 4, 2026 14:49
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ebf7873c-b336-471d-a88b-313548eb9911

📥 Commits

Reviewing files that changed from the base of the PR and between 2b8b902 and a151dc1.

📒 Files selected for processing (2)
  • scripts/canary-rollout.sh
  • tests/canary_rollout.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-1081-20260704-1443

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 14:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request modifies scripts/canary-rollout.sh to gracefully handle failures when creating a GitHub blocker issue (e.g., if Issues:write permissions are denied) by appending || true to the assignment. This prevents the script from aborting due to set -e, ensuring that warnings are logged and the fleet-status dashboard is still rendered. A new test case has been added to tests/canary_rollout.bats to verify this graceful degradation. There are no review comments, so I have no feedback to provide.

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.

Pull request overview

Fixes the canary-rollout sync-issues orchestrator so it never aborts under set -euo pipefail when blocker-issue creation is denied/fails (e.g., GitHub App missing Issues:write). This restores the intended “best-effort” behavior: warn when issue filing fails, but still render the fleet-status dashboard and exit 0.

Changes:

  • Guard _gh_issue_create usage with || true so a failed create cannot trip set -e and abort before warnings/dashboard rendering.
  • Extend the Bats gh stub to simulate gh issue create failure via GH_CREATE_FAIL.
  • Add a regression test asserting graceful degradation: warning emitted, fleet-status table rendered to GITHUB_STEP_SUMMARY, and status 0.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/canary-rollout.sh Prevents sync-issues from aborting when gh issue create fails under pipefail, ensuring warnings + dashboard still happen.
tests/canary_rollout.bats Adds a denial/failure scenario to prove sync-issues stays green and still renders the fleet-status summary.

@don-petry
don-petry disabled auto-merge July 4, 2026 14:51
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads:
(no open threads)
Test verification: pass — no code changes made; all CI checks green per Phase 0 assessment
Files changed: none
```
The PR is fully clean: no open review threads, no CI failures, and no CHANGES_REQUESTED reviews. Nothing to fix.

@don-petry
don-petry enabled auto-merge (squash) July 4, 2026 14:51
@donpetry-bot

Copy link
Copy Markdown
Contributor

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: a151dc1a8aba981edbcc89a1c76b9a9f441a9e7d
Review mode: triage-approved (single reviewer)

Summary

This PR duplicates a fix that has already merged to main. It guards the single unguarded _gh_issue_create call in cmd_sync_issues with || true (scripts/canary-rollout.sh:759) and adds a Bats regression test — but the identical guard (plus an additional _blocker_evidence guard) and an equivalent regression test already landed on main via PR #1084 (commit 4f098af), which closed issue #1081. As a result this PR is now CONFLICTING/DIRTY against main in both changed files and cannot merge. Recommended action: close PR #1085 as a duplicate of #1084 (rebasing would leave an empty or redundant change).

Linked issue analysis

Linked issue #1081 (canary-rollout sync-issues aborts every scheduled run — unguarded _gh_issue_create under set -e) is CLOSED. Its code fix (step 1) was substantively addressed — but by PR #1084, already on main. The sibling audit the issue requested checks out on main: _issue_find ends in || echo "" and all gh issue edit/reopen/close calls carry || true guards. The config half (granting the release-manager App Issues:write) requires an org admin and is out of scope for any PR.

Findings

  1. [BLOCKING] Duplicate of merged PR fix(canary-rollout): sync-issues must not abort under set -e when issue-create fails (#1081) #1084 — main (4f098af) already contains the same || true guard on _gh_issue_create and an equivalent canary-rollout sync-issues aborts every scheduled run — unguarded _gh_issue_create under set -e (+ App missing Issues:write) → no blocker issues, no fleet dashboard #1081 regression test. Merging this PR adds nothing; it should be closed.
  2. [BLOCKING] Merge conflict — mergeable: CONFLICTING / mergeStateStatus: DIRTY; both scripts/canary-rollout.sh and tests/canary_rollout.bats conflict with the fix(canary-rollout): sync-issues must not abort under set -e when issue-create fails (#1081) #1084 changes on main (2 conflict hunks via merge-tree).
  3. [INFO] On its own merits the change is correct: the || true guard prevents set -e from aborting the step, the empty-num branch emits the intended Issues:write on the App? warning, and the dashboard still renders. The GH_CREATE_FAIL stub + regression test are well-constructed.
  4. [INFO] Secret scan: the run_secret_scanning MCP tool was unavailable in this environment; the gitleaks CI check passed.

CI status

All checks green at a151dc1a8aba981edbcc89a1c76b9a9f441a9e7d: ShellCheck, shellcheck, bats, unit-tests, CodeQL (actions/python), SonarCloud quality gate, gitleaks secret scan, AgentShield, Agent Security Scan, holdout-guard, template-drift, gh-aw-compile — all SUCCESS; remaining checks SKIPPED (not applicable). CodeRabbit and Codex were rate-limited (no review produced). No unresolved review threads; Gemini and Copilot reviews were comment-only with no findings.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Closing as superseded. Issue #1081 was fixed and merged via #1084 (sync-issues must not abort under set -e, commit 4f098af). #1081 is CLOSED COMPLETED and this PR now conflicts against that landed fix. No unique content remains.

@don-petry don-petry closed this Jul 4, 2026
auto-merge was automatically disabled July 4, 2026 17:40

Pull request was closed

@don-petry don-petry added the dev-lead:hands-off Exclude from dev-lead agent automation label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-lead:hands-off Exclude from dev-lead agent automation

Projects

None yet

3 participants