Skip to content

feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github - #1050

Merged
don-petry merged 4 commits into
mainfrom
dev-lead/issue-1049-20260703-1342
Jul 3, 2026
Merged

don-petry merged 4 commits into
mainfrom
dev-lead/issue-1049-20260703-1342

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #1049

Implemented by dev-lead agent. Please review.

… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github
@don-petry
don-petry requested a review from a team as a code owner July 3, 2026 13:53
Copilot AI review requested due to automatic review settings July 3, 2026 13:53
@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 3, 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: 10 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: f98354cd-3e61-47f9-a391-f8f856710d2e

📥 Commits

Reviewing files that changed from the base of the PR and between d85a373 and 5a9968e.

📒 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-1049-20260703-1342

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.

@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 3, 2026 13:53
@don-petry
don-petry disabled auto-merge July 3, 2026 13:54
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- No issues identified (quality gate passing)
Files changed: None
Skipped: 0
```
The PR is in good shape. All security, code quality, and CI checks are passing. No action required from this bot comment.

@don-petry
don-petry enabled auto-merge (squash) July 3, 2026 13:54

@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 introduces support for cross-repo agents in the canary rollout script by resolving channel and release tags via the GitHub API instead of local git commands when the agent is hosted on a different repository. It also adds a test case to verify this behavior. The review feedback suggests improving the robustness of the jq queries in the shell script by using optional chaining and default fallbacks to handle missing or null JSON properties safely, as well as updating the date command syntax in the tests to ensure portability across GNU and BSD environments.

Comment thread scripts/canary-rollout.sh Resolved
Comment thread scripts/canary-rollout.sh Resolved
Comment thread tests/canary_rollout.bats Resolved
@don-petry
don-petry disabled auto-merge July 3, 2026 13:55

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 canary-rollout’s evaluate logic for cross-repo agents so it resolves <agent>/<channel> and <agent>/vX.Y.Z tags from the agent’s host repository (e.g., petry-projects/.github) via gh api, rather than incorrectly reading local tags from this checkout (.github-private).

Changes:

  • Add cross-repo tag resolution helpers in scripts/canary-rollout.sh (_gh_tag_commit, _gh_candidate_cut_date) and route channel_commit / candidate_cut_date through the host repo when host != THIS_REPO.
  • Introduce a Bats regression test that stubs gh api (host tags present) + git (no local tags) to ensure cross-repo agents no longer report “fully rolled out” when ring1 differs from stable.

Reviewed changes

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

File Description
scripts/canary-rollout.sh Resolve channel + release tags via GitHub API on the agent’s host repo for cross-repo agents to prevent empty-local-tag misclassification.
tests/canary_rollout.bats Add a regression test covering cross-repo tag resolution and ensuring the correct pending transition is reported.

Comment thread scripts/canary-rollout.sh Resolved
Comment thread scripts/canary-rollout.sh Resolved
Comment thread tests/canary_rollout.bats Resolved
Comment thread tests/canary_rollout.bats Resolved
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 3, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 3, 2026
@don-petry
don-petry disabled auto-merge July 3, 2026 14:00
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry disabled auto-merge July 3, 2026 14:03
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: fix-reviews)

PR: #1050
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-03T14:34:23Z

@don-petry
don-petry enabled auto-merge (squash) July 3, 2026 14:04
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@don-petry
don-petry disabled auto-merge July 3, 2026 14:28
@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 3, 2026 14:30

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

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

Summary

Fixes the P1 bug where canary-rollout.sh evaluate mis-reported all 6 cross-repo (#482) reusables as 'fully rolled out'. Root cause: channel/release tags for cross-repo agents (host = petry-projects/.github) were resolved from the local checkout, resolving empty. The fix adds _gh_tag_commit and _gh_candidate_cut_date helpers that resolve tags via gh api on the agent's host repo (dereferencing annotated tags), routes channel_commit / candidate_cut_date through them when host != THIS_REPO, and keeps the local-git path for agents hosted in this repo. A bats regression test covers the exact failure mode. Confirms the triage assessment — nothing was missed.

Linked issue analysis

Closes #1049. The implementation matches the fix prescribed in the issue exactly: cross-repo agents resolve <name>/<channel> and <name>/vX.Y.Z tags against their host via the GitHub API (mirroring cut-release.sh's cross-repo precedent), local-hosted agents (dev-lead, pr-review) keep the local path, and the required bats case (cross-repo agent with ring1=candidate, stable=old must report frontier=ring1, not 'fully rolled out') is present and asserts the ring1->stable PROMOTE transition. Substantively addressed.

Findings

No blocking findings.

  • Correctness: _gh_tag_commit correctly dereferences annotated tag objects via a second git/tags/<sha> call and falls back to the lightweight-tag SHA otherwise; jq filters use optional chaining with // "" fallbacks so malformed API payloads degrade to empty rather than erroring under set -e. candidate_cut_date cross-repo path mirrors the local for-each-ref semantics (match dereferenced commit, emit Zulu tagger date).
  • Security: gh api calls are read-only GETs; $host/$agent interpolated into API paths come from the repo-controlled canary-rings.json config, not untrusted input. No secrets, no injection surface. Gitleaks and Agent Security Scan both green.
  • Tests: the regression test stubs gh (host tags present, annotated release tag) and git (no local refs), so a regression to local-ref reading fails the test — exactly the #1049 failure mode. Date stubs use a GNU/BSD portable fallback.
  • Review threads: all 7 bot review threads (gemini x3, copilot x4) are resolved; the jq-safety and date-portability suggestions were applied in follow-up commits. CodeRabbit approved at the current SHA. No unanswered human-reviewer questions.
  • Secret scan (MCP): run_secret_scanning tool not available in this environment — relying on the passing gitleaks CI check; diff contains no credential-like content.

CI status

All checks green at 5a9968e2f5feff8edc73161ae5148e4f4328b3ba: shellcheck, ShellCheck (CI), bats, unit-tests, Lint, CodeQL (actions + python), Agent Security Scan, Secret scan (gitleaks), SonarCloud (Quality Gate passed, 0 new issues, 0 hotspots), AgentShield, holdout-guard, Test-Deletion Guard, template-drift, validate-agent-profiles, gh-aw-compile, CodeRabbit. Dependency-audit jobs skipped (no matching ecosystems). Merge state BLOCKED only on the required review.


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

@don-petry
don-petry merged commit 0a2fc43 into main Jul 3, 2026
30 checks passed
@don-petry
don-petry deleted the dev-lead/issue-1049-20260703-1342 branch July 3, 2026 14:37
don-petry added a commit that referenced this pull request Aug 2, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 3, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 3, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 3, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 7, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 8, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Aug 18, 2026
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050)

* feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

* fix(reviews): address review comments [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
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.

canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github

3 participants