Repository navigation
feat: implement issue #1065 — canary-rollout ring promotion can skip the v-scoped channel tag, breaking every stub deployed to that tier - #1097
Conversation
…the v-scoped channel tag, breaking every stub deployed to that tier
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reachedNext included review available in 35 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
There was a problem hiding this comment.
Code Review
This pull request updates the canary rollout script to ensure that v-scoped tier tags are bootstrapped correctly and do not fall back to bare tiers when an agent has an established channel major. It also introduces a drift audit mechanism to detect and report missing v-scoped counterparts for bare tier tags, accompanied by comprehensive BATS tests. The review feedback recommends optimizing Bash performance by replacing here-strings inside loops with native parameter expansion, and improving test robustness by asserting explicit exit statuses instead of using generic negations like ! grep.
CodeAnt Nitpicks2 code suggestions1.
|
Dev-Lead — review-changes (partial)A commit was pushed, but not every requested change was applied. Per requested item:
The unaddressed items above still need work. |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 6512b32a804b834d76bf47b2c8804d10f13da6d1
Review mode: triage-approved (single reviewer)
Summary
Implements #1065: when an agent has an ESTABLISHED channel major (its v<M>-next anchor exists), _resolved_channel now treats the v-scoped line as authoritative — promotions bootstrap-create the missing v<M>-<tier> tag instead of silently falling back to the bare tier (AC1′). Legacy bare-only agents are byte-identical to before (AC4′). A new read-only drift sweep (_channel_tag_major_gaps + cmd_drift section) reports bare tier tags lacking their v-scoped counterpart (AC3), with warnings and a job summary. 157 lines of new bats coverage exercise the bootstrap, legacy inverse, gap detection, and drift reporting paths. All CI checks green, including the dedicated canary-rollout bats suite, ShellCheck, CodeQL, SonarCloud (0 issues), gitleaks, and AgentShield.
Linked issue analysis
Issue #1065 has three ACs. AC1 (promotion must move both tag forms or neither): addressed — the authoritative-v-line resolution makes the frontier see an absent v<M>-<tier> as not-yet-reached, so promotion creates it (test proves PATCH-422→POST create at the candidate, and that the bare tier is never touched). AC3 (drift check): addressed — new sweep flags every bare tier tag missing its v-scoped counterpart, verified against a persona-mention-shaped fixture. AC2 (backfill persona-mention/v1-ring0/v1-ring1) is a manual maintainer tag-creation action, intentionally out of code scope — the new drift sweep will surface it on every run until backfilled. Note for the maintainer: AC2 remains to be performed operationally even though this PR closes the issue.
Findings
No blocking findings.
- Dev-lead status comment inaccurate (informational). The
review-changes (partial)comment claims the here-string fix atscripts/canary-rollout.sh:2532was not applied. I verified the file at head6512b32a:_channel_tag_major_gapsuses exactly the suggested in-process parameter expansion (for tier in ${channels//,/ }) — the fix IS applied, as are the other three (drift-loopfor ct_tier in $ct_gapsand both batsrun grep -q+[ "$status" -eq 1 ]assertions). The status comment appears stale/incorrect; no action needed. - CodeAnt 'Major' — release major vs channel major (non-blocking limitation, pre-existing).
_agent_current_majorderives the major from the highest host release. For a hypothetical release-v14/channel-v1 agent,_agent_has_channel_majorchecksv14-next, finds it absent, and takes the legacy bare path — which is byte-identical to pre-PR behavior (the old code probedv14-<tier>and fell back). No regression; autocut seedsv<M>-nexton major bumps, keeping the two in lock-step. A lagging channel line escaping the new drift class is a detection gap worth a follow-up, not a blocker. - CodeAnt nitpick — API failures read as missing tags (pre-existing).
_channel_tag_commitreturning empty on API errors predates this PR; the drift sweep is report-only, and the promotion path's behavior on read failure is unchanged in kind from the prior fallback logic. - Secret scan: the
run_secret_scanningMCP tool is not available in this environment; the gitleaks CI check passed (no secrets in the diff — it touches only shell logic and tests).
CI status
All required checks green at 6512b32a: CI (Lint, ShellCheck, Agent Security Scan, gitleaks), Canary-rollout Tests (lint + bats), CodeQL, SonarCloud (quality gate passed, 0 new issues, 0 hotspots), AgentShield, duplicate-decl-gate, dependency-audit, CodeRabbit status. Skipped jobs are conditional (dependabot, ecosystem-specific audits). mergeStateStatus: BLOCKED reflects only the pending review requirement.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 6512b32a804b834d76bf47b2c8804d10f13da6d1
Review mode: triage-approved (single reviewer)
Summary
Implements #1065: when an agent has an ESTABLISHED channel major (its v<M>-next anchor exists), _resolved_channel treats the v-scoped line as authoritative — an absent v<M>-<tier> resolves to an empty commit, so the frontier sees the tier as not-yet-reached and promotion CREATES the tag instead of silently moving only the bare tier (AC1′). Legacy bare-only agents (no v<M>-next) keep bare-tag behavior, byte-identical to pre-F4 (AC4′). A new read-only drift sweep (_channel_tag_major_gaps + cmd_drift section) reports every bare tier tag lacking its v-scoped counterpart, with ::warning:: annotations and a job summary (AC3). 157 lines of new bats coverage prove the bootstrap (PATCH-422→POST create at the candidate, bare tier never touched), the legacy inverse, gap detection, and drift reporting. This re-review independently confirms the prior approval of the same commit.
Linked issue analysis
Issue #1065 has three ACs. AC1 (promotion moves both tag forms or neither): addressed — authoritative v-line resolution makes promotion bootstrap-create the missing v<M>-<tier>; tests prove the bare tier tag is never written when a channel major is established, so the pair can no longer diverge. AC3 (drift check): addressed — the new sweep flags bare tier tags missing their v-scoped counterpart, verified against a persona-mention-shaped fixture (reports exactly v1-ring0/v1-ring1). AC2 (backfill persona-mention/v1-ring0/v1-ring1): an operational maintainer tag-creation action, intentionally out of code scope — the new drift sweep will surface it on every run until backfilled. Maintainer note: perform the AC2 backfill even though merging closes the issue.
Findings
No blocking findings. Verification of open items:
- Dev-lead "review-changes (partial)" status comment is stale. It claims the here-string fix at
scripts/canary-rollout.sh:2532was not applied. Verified at head6512b32a:_channel_tag_major_gapsuses the suggested in-process expansion (for tier in ${channels//,/ }), the drift loop usesfor ct_tier in $ct_gaps, and both bats absence assertions userun grep -q+[ "$status" -eq 1 ]. All four requested items ARE applied; all four gemini threads are resolved. - CodeAnt unresolved "Major" — release major vs channel major (non-blocking, pre-existing).
_agent_current_majorderives the major from the highest host release. For a hypothetical release-v14/channel-v1 agent,_agent_has_channel_majorfindsv14-nextabsent and takes the legacy bare path — the same outcome as the pre-PR fallback (which probedv14-<tier>and fell back). No regression; autocut seedsv<M>-nexton major bumps (#657 F4), keeping the two in lock-step. The residual gap — a stranded older channel line escaping the new drift class if that invariant ever breaks — is a worthwhile follow-up issue, not a blocker for this fix. - Secret scan: the
run_secret_scanningMCP tool is not available in this environment; the gitleaks CI check passed and the diff touches only shell logic and test fixtures (fake 40-char oidscccc…/bbbb…are not credentials). - No unanswered human-reviewer questions; the don-petry inline replies are the dev-lead's own "Done" acknowledgements on now-resolved threads.
CI status
All checks green at 6512b32a: Lint, ShellCheck, Lint and bats (canary-rollout suite), CodeQL, Analyze (actions), SonarCloud (quality gate passed, 0 new issues), gitleaks, Agent Security Scan, AgentShield, duplicate-decl-gate, dependency-audit (npm audit green; ecosystem-specific audits skipped), CodeRabbit. mergeStateStatus: BLOCKED reflects only the pending review requirement.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
Superseded by automated re-review at 6512b32.
Superseded by automated re-review at
|
Superseded by automated re-review at 6512b32.
Superseded by automated re-review at
|
Superseded by automated re-review at
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
Automated review — human attention neededThis PR has been through 3 automated review cycles since the last approval or escalation (cap: 3) without converging. Further automated review has been paused to avoid infinite loops. Please take a look manually, or close this PR if it's no longer needed. To re-engage the automated cascade with a fresh cycle budget, either remove the Posted by the donpetry-bot PR-review cascade. |
Maintainer disposition — non-convergence hold released, with a corrected instructionThis PR was escalated on 2026-09-08T14:28 with The instruction I gave was not actionable. My acceptance on the Status of the finding at I have posted a mechanical replacement instruction in the thread. The substance:
Removing |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. Requested items addressed:
|
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 8c3b631b5a77b8fd06ba56e5b8f27af7ac4db48e
Review mode: triage-approved (single reviewer)
Summary
Re-review after the maintainer released the non-convergence hold with a corrected, mechanical instruction (comment of 2026-09-13T03:37Z). The head commit 8c3b631b implements that instruction completely: (1) _agent_current_channel_major is added, derived from _host_release_versions (v<M>-next anchor lines) with a per-agent cache — no new file, no new source line; (2) all three release-major call sites are switched to the channel major: _resolved_channel (now line 350), _channel_tag_major_gaps (line 2550), and the cmd_drift channel-tag sweep (line 2708) — verified by grep of the head blob that no channel-resolution path still keys on _agent_current_major; (3) _agent_current_major is left intact with a docstring line marking it RELEASE-only; (4) the divergent-major fixture test is present exactly as specified: release v14.0.0, channel tags only v1-*, asserting ring0 resolves to dev-lead/v1-ring0 — neither v14-ring0 nor bare ring0 — and that the resolved commit is the v1-ring0 tag's, not the bare tag's. The prior partially-addressed finding (divergent release/channel major falling to the bare tier tag, the #1103 cmd_rollback failure mode) is now fully resolved. No conflict with #1065 AC1′: the authoritative/no-fallback semantics of an established v-line are preserved; only the major that keys the line changed.
Linked issue analysis
Linked issue: #1065 ("Part of", auto-close intentionally severed by maintainer note in the PR body). The PR implements AC1′ (promotion bootstraps the missing v<M>-<tier> tag instead of moving the bare tier tag), AC3 (drift audit reports bare tier tags lacking their v-scoped counterpart), and AC4′ (legacy bare-only agents keep byte-identical pre-F4 behavior). AC2 is explicitly maintainer-only (hand-cutting persona-mention/v1-ring0/v1-ring1 tags — an agent must not create release channel tags), so #1065 correctly remains open. This scoping was confirmed by the maintainer in the disposition comment.
Findings
No blocking findings.
- Resolved (prior cycle carry-forward): channel resolution keyed on the RELEASE major, stranding divergent release-v14/channel-v1 agents on the bare tier tag. Fixed via
_agent_current_channel_majorat all three call sites, with the divergent fixture test provingv1-ring0wins over bothv14-ring0and barering0. - Informational:
_agent_current_majornow has no callers inscripts/canary-rollout.shorscripts/lib/canary-rollout.sh. Kept per the maintainer's explicit instruction ("Leave _agent_current_major itself alone") and marked RELEASE-only in its docstring; possible future cleanup only. - Informational:
_channel_tag_major_gapsuses[ -n ... ]/[ -z ... ]on_channel_tag_commitoutput rather than_looks_like_oidas_agent_has_channel_majordoes — behaviorally equivalent with the current API responses; consistency nit only. - Secret scan: the
run_secret_scanningMCP tool is not available in this environment; the gitleaks CI check passed at head. Diff contains no credentials, tokens, or.envcontent (all SHAs in tests are synthetic fixtures). - All 5 review threads (gemini-code-assist ×4, codeant-ai ×1) are resolved and outdated. No unanswered human-reviewer questions: the maintainer's replacement instruction was the last human ask and is fully implemented; the conditional "stop if it conflicts with AC1′" branch does not trigger.
CI status
All code-validation checks green at 8c3b631b: ShellCheck ✓, Lint ✓, Lint and bats ✓, CodeQL ✓, Analyze (actions) ✓, SonarCloud ✓ (quality gate passed), Secret scan (gitleaks) ✓, AgentShield ✓, Agent Security Scan ✓, duplicate-decl-gate ✓, AGENTS.md Self-Check ✓, dependency-audit ✓/skipped (no matching ecosystems), CodeRabbit ✓. The three CANCELLED entries (dev-lead / dispatch, ci-relay, resume) are the dev-lead agent's own orchestration jobs, cancelled per the [skip ci-relay] head commit — not code-validation checks and not failures.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 8c3b631b5a77b8fd06ba56e5b8f27af7ac4db48e
Review mode: triage-approved (single reviewer)
Summary
Implements #1065 AC1'/AC3/AC4' in scripts/canary-rollout.sh (+bats coverage). Once an agent has an established channel major (its v-next anchor exists), the v-scoped channel line is authoritative: promotion bootstrap-creates the missing v- tag instead of falling back to the bare tier, and a new read-only drift sweep reports bare tier tags lacking their v-scoped counterpart. This head (8c3b631) implements the maintainer's corrected 2026-09-13 instruction exactly: (1) _agent_current_channel_major added (line 327), derived from the v-next anchors that _host_release_versions already emits — no new file or source line; (2) all three release-major call sites switched to the channel major: _resolved_channel:350, _channel_tag_major_gaps:2550, and the drift sweep at 2708 — zero remaining channel-resolution uses of _agent_current_major; (3) _agent_current_major left intact with the requested RELEASE-only docstring; (4) the divergent-major fixture test added (release v14.0.0, channel tags only v1-*), asserting ring0 resolves to v1-ring0 and is neither v14-ring0 nor bare ring0. The prior non-convergence was traced by the maintainer to an unactionable instruction, not agent error; the corrected instruction converged in one pass.
Linked issue analysis
Linked issue #1065 (referenced as 'Part of', auto-close deliberately severed by maintainer note in the PR body). AC1' (bootstrap-create the v-scoped tier tag on promotion), AC3 (drift reporting of bare-tier/v-scoped gaps), and AC4' (legacy bare-only agents byte-identical to pre-F4) are substantively implemented and each has explicit bats coverage, including the release-major≠channel-major divergent case. AC2 (backfilling persona-mention/v1-ring0 and v1-ring1 tags) is explicitly maintainer-only — an agent must not create release channel tags — so #1065 correctly stays open. The interim safety is documented: a persona-mention stub deploy to ring0/ring1 computes a ref that fails the assert-exists check from #1088.
Findings
No blocking findings.
- Maintainer's corrected instruction (2026-09-13, canary-rollout.sh:325 thread): RESOLVED at this head — all four mechanical items verified against the file at 8c3b631 (see summary).
- CodeAnt nitpick 1 (_channel_tag_major_gaps keyed on release major): RESOLVED — now uses _agent_current_channel_major (line 2550); thread marked resolved.
- CodeAnt nitpick 2 (API failures indistinguishable from missing tags in _channel_tag_commit): NON-BLOCKING observation, pre-existing pattern outside the maintainer's scoped instruction. In drift it is report-only (exit 0); in promotion the PATCH-422-then-POST create path degrades safely if a tag actually exists.
- All 5 review threads resolved (4 gemini-code-assist perf/test-robustness suggestions, 1 CodeAnt) — none outstanding.
- No unanswered human-reviewer questions: the maintainer's disposition asked for either the fix or an explicit conflict report; the fix was applied and verified.
- Secret scan: run_secret_scanning MCP tool not available in this environment; gitleaks CI check passed (SUCCESS). No secrets, credentials, or workflow changes in the diff.
- Scope fence respected: 2 files (scripts/canary-rollout.sh, tests/canary_rollout.bats), no workflow or thin-caller changes.
CI status
All validation checks green at 8c3b631: ShellCheck, Lint, Lint and bats, CodeQL, Analyze (actions), Secret scan (gitleaks), agent-shield/AgentShield, Agent Security Scan, SonarCloud (quality gate passed, 0 new issues, 0 hotspots), duplicate-decl-gate, dependency-audit (detect + npm audit SUCCESS, others SKIPPED as inapplicable), AGENTS.md Self-Check. The CANCELLED dev-lead dispatch/ci-relay/resume entries are superseded duplicate agent-orchestration runs, each with a successful or skipped counterpart — not CI validation failures.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 8c3b631b5a77b8fd06ba56e5b8f27af7ac4db48e
Review mode: triage-approved (single reviewer)
Summary
Confirmation review after triage clearance and a prior non-convergence escalation that the maintainer released on 2026-09-13 with a corrected, mechanical instruction. Verified at head 8c3b631 that the instruction was implemented exactly: (1) _agent_current_channel_major added, derived from _host_release_versions v-next anchors with per-agent caching; (2) all three release-major call sites switched to it — _resolved_channel (line 350), _channel_tag_major_gaps (line 2550), and the cmd_drift sweep (line 2708) — leaving _agent_current_major with zero channel-resolution callers; (3) _agent_current_major body untouched, docstring now marks it RELEASE-only; (4) the divergent-major fixture test exists (release v14.0.0, channel tags only v1-*) asserting ring0 resolves to v1-ring0 — neither v14-ring0 nor bare ring0 — and to the v1-ring0 commit, not the bare tag's. No new issues found; all CI green including the bats suite.
Linked issue analysis
Issue #1065 (canary-rollout ring promotion can skip the v-scoped channel tag): AC1′ is addressed — once a channel major is established (v-next anchor exists), the v-scoped line is authoritative and promotion CREATEs a missing v- tag (PATCH-422→POST path covered by the bootstrap test); the legacy bare-only fleet stays byte-identical to pre-F4 (inverse test). AC3 is addressed — _channel_tag_major_gaps plus a read-only cmd_drift sweep reports bare tier tags lacking their v-scoped counterpart, with a fixture mirroring the persona-mention evidence in the issue (flags v1-ring0/v1-ring1, summary count 2). AC4′ is addressed via the release-major≠channel-major resolution fix and divergent-fixture test. AC2 (backfilling persona-mention/v1-ring0 and v1-ring1) is explicitly maintainer-only — an agent must not create release channel tags — so the auto-close was deliberately severed (Closes → Part of) and #1065 correctly remains open. This scope split is stated in the PR body and acknowledged by the maintainer's disposition.
Findings
No blocking findings.
- Maintainer instruction compliance (2026-09-13 disposition): all four steps implemented as specified; the potential AC1′ conflict the maintainer asked to be flagged did not arise. Review threads: 0 unresolved.
- Correctness:
_agent_current_channel_majorpicks the highest M fromv<M>-nextanchors (numeric sort);_agent_has_channel_majorindependently probes the anchor via the ref endpoint, so a listing/ref mismatch degrades safely to bare-tier behavior._resolved_channelintentionally emits an empty commit for an established-but-unseeded tier so the frontier treats it as not-yet-reached and promotion bootstraps the tag — the exact #1065 fix, test-covered. - Dead code (accepted):
_agent_current_majornow has no callers; the maintainer explicitly instructed leaving it in place with a RELEASE-only docstring. - Security: no secrets in the diff (fixture oids are placeholders); no injection surface added — new drift output interpolates registry-derived values into echo/step-summary only, matching existing patterns. The
run_secret_scanningMCP tool is not available in this environment; noting per protocol — gitleaks CI check passed.
CI status
All code checks green at 8c3b631: ShellCheck, Lint, Lint and bats (new tests included), CodeQL, Analyze (actions), Agent Security Scan, agent-shield, Secret scan (gitleaks), SonarCloud quality gate, duplicate-decl-gate, dependency-audit. The CANCELLED/SKIPPED entries are dev-lead orchestration relays (dispatch/ci-relay/resume) superseded by later successful runs of the same jobs — not code checks.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



User description
Part of #1065
Implemented by dev-lead agent. Please review.
Maintainer note: auto-close severed —
Closes→Part of.This PR implements AC1′, AC3 and AC4′. AC2 remains open and is maintainer-only:
persona-mention/v1-ring0andpersona-mention/v1-ring1must be cut by hand at the commits their bare tags point to. An agent must not create release channel tags, so #1065 stays open until that backfill happens.Until then, any
persona-mentionstub deploy to a ring0 or ring1 repo computes a ref that does not resolve and is refused by the assert-exists check added in #1088.CodeAnt-AI Description
Ensure established canary channels promote and resolve through their version-scoped tier tags
What Changed
Impact
✅ Fewer stub deployment startup failures✅ Correct canary ring promotion targets✅ Earlier detection of missing channel tags💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.