Repository navigation
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
Conversation
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 10 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 routechannel_commit/candidate_cut_datethrough the host repo whenhost != 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” whenring1differs fromstable.
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. |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
Dev-Lead — waiting on PR blockers (intent: fix-reviews)PR: #1050 |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
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_commitcorrectly dereferences annotated tag objects via a secondgit/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 underset -e.candidate_cut_datecross-repo path mirrors the local for-each-ref semantics (match dereferenced commit, emit Zulu tagger date). - Security:
gh apicalls are read-only GETs;$host/$agentinterpolated 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) andgit(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_scanningtool 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.
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>
… 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>



Closes #1049
Implemented by dev-lead agent. Please review.