feat: implement issue #870 — [#850] standards-deploy driver deploys BROKEN dev-lead pins (@dev-lead/v14-* has no tag — uses release major, not channel major) - #871
Conversation
…ROKEN dev-lead pins (@dev-lead/v14-* has no tag — uses release major, not channel major)
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🤖 CodeAnt AI — Review Status
Updated in place by CodeAnt AI · last 5 reviews |
|
Warning Review limit reached
Next review available in: 26 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 (4)
📝 WalkthroughWalkthroughRing-managed workflow deployment now derives pins from channel-major tags rather than release majors, verifies computed tags exist, and skips unresolved refs. Tests update mocked GitHub responses and cover channel-major selection, compliance, re-pinning, and missing-tag handling. ChangesChannel-major pinning
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
PR Summary by QodoFix standards-deploy pinning to use channel major, not release major
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #871 |
Code Review by Qodo
Context used✅ Compliance rules (platform):
87 rules 1.
|
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/deploy-standard-workflows.sh`:
- Around line 466-477: Update the channel-ref validation around ring_tag_exists
to cache each (emit_host, emit) lookup and reuse the cached result across
workflows and repositories. Ensure both computed and bare-tier refs use the
cache, while preserving the existing refusal and error behavior for missing
tags.
In `@scripts/lib/ring-pins.sh`:
- Around line 182-199: Extract the duplicated gh API and sed matching-refs
pipeline from ring_host_current_major and ring_host_current_channel_major into
one shared parameterized helper. Have each function reuse that helper and apply
its respective highest-major matcher, while preserving the existing warning,
empty-result, and return behavior.
- Around line 201-208: Update ring_tag_exists to distinguish a genuinely missing
tag from unexpected gh api failures: preserve the successful result for
resolving refs and the expected not-found result for absent tags, but emit a
Warning including the gh failure details for authentication, rate-limit,
network, or other API errors. Ensure deploy_repo can still skip absent tags
while outages and authorization failures are surfaced instead of being reported
as missing tags.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 79a81a30-18a0-4c7a-8b94-cdc559919220
📒 Files selected for processing (6)
scripts/deploy-standard-workflows.shscripts/lib/ring-pins.shtest/scripts/deploy-standard-workflows/emit-vform.batstest/scripts/deploy-standard-workflows/feature-ideation-seed-repin.batstest/scripts/deploy-standard-workflows/pr-auto-review-skip-override.batstest/scripts/lib/ring-pins.bats
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
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: a8ced63dc0cbb9014c3a4b68967d0d0c4c8dd835
Review mode: triage-approved (single reviewer)
Summary
Fixes #870: the standards-deploy driver now derives workflow-stub pins from the highest existing CHANNEL tag major (ring_host_current_channel_major) instead of the release major, so dev-lead (release v14, channel v1) pins the resolving @dev-lead/v1- rather than the tagless @dev-lead/v14-. Adds an assert-exists guard (ring_tag_exists) that refuses to open a PR carrying a non-resolving pin and propagates failures to a non-zero exit. Comprehensive bats regression coverage, including the exact live dev-lead/bmad scenario.
Linked issue analysis
Issue #870 requires: (1) driver emits @dev-lead/v1- matching an existing channel tag, never a tagless release-major channel — implemented via ring_highest_channel_major which only matches - tokens and ignores release semver; (2) emitted refs validated to exist before opening a PR — implemented via ring_tag_exists assert-exists guard in deploy_repo with _OVERALL_FAILED exit propagation. Both code-side acceptance criteria are substantively addressed with regression tests (v14 release + v1 channel → v1-ring1; missing tier tag → refused, non-zero exit). The remaining acceptance items (correcting bmad-bgreat-suite's live pin, re-sweeping the 5 closed repos) are operational follow-ups outside this PR's scope.
Findings
No blocking findings. Prior bot-review findings were all addressed at the head commit: exit-code now propagates via _OVERALL_FAILED (deploy exits 1 on refused pins); ring_tag_exists distinguishes 404 from auth/rate-limit/network errors and warns on the latter while conservatively refusing the pin; channel-major probe fails closed (returns 1) so an API outage cannot silently downgrade to bare-tier pins. All 6 review threads resolved; CodeRabbit's changes-requested review was superseded by an APPROVED review of the head SHA. The run_secret_scanning MCP tool was not available in this environment; gitleaks CI passed (no secrets in the diff — shell logic and test fixtures only).
CI status
All checks green at head SHA a8ced63: ShellCheck, Lint, Lint and bats (x3), CodeQL, Analyze (actions), SonarCloud (quality gate passed), Secret scan (gitleaks), Agent Security Scan, AgentShield, npm audit, CodeRabbit — all SUCCESS. Two CANCELLED dev-lead dispatch/ci-relay entries are superseded agent-dispatch runs (later runs of the same checks succeeded); ecosystem audits (pip/cargo/go/pnpm) skipped as not applicable.
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: a8ced63dc0cbb9014c3a4b68967d0d0c4c8dd835
Review mode: triage-approved (single reviewer)
Summary
Fixes #870: the standards-deploy driver now derives workflow-stub pins from the highest existing CHANNEL tag major (e.g. dev-lead/v1-) instead of the release major (v14, which has no channel tag), and adds an assert-exists guard (ring_tag_exists) that refuses to open a PR carrying a non-resolving pin. Channel-major probe failures now fail closed (exit 1) instead of silently falling back to bare-tier pins. Comprehensive bats regression coverage including the exact dev-lead v14-release/v1-channel case.
Linked issue analysis
Issue #870 (broken @dev-lead/v14-* pins) is substantively addressed. Acceptance items 1 and 2 (channel-major derivation via new ring_highest_channel_major/ring_host_current_channel_major, and tag-existence validation before deploy) are implemented with regression tests: a dev-lead consumer with release v14 + channel v1 tags emits @dev-lead/v1-ring1, and a computed ref with no tag is refused with exit 1. Acceptance items 3 and 4 (correcting bmad-bgreat-suite's live pin, re-sweeping the 5 closed repos) are operational follow-ups outside this PR's code scope.
Findings
No blocking findings.
- Fail-closed semantics are correct: ring_host_current_channel_major returns 1 on gh probe error (vs. the legacy fail-open ring_host_current_major, retained for its existing callers), and deploy_repo aggregates failures into _OVERALL_FAILED → exit 1.
- ring_tag_exists distinguishes 404 from transient errors (warns on non-404) and caches per-process; a transient error is cached as failure for the run — acceptable fail-closed behavior, non-blocking.
- All 6 prior review threads (CodeAnt, CodeRabbit) are resolved; CodeRabbit's initial CHANGES_REQUESTED was dismissed after fixes and superseded by its APPROVED review. reviewDecision is APPROVED.
- Secret scan: run_secret_scanning MCP tool unavailable in this environment; gitleaks CI check passed, and the diff introduces no credentials, tokens, or auth changes.
CI status
All quality gates green on head commit: Lint, ShellCheck, bats, CodeQL (actions), SonarCloud quality gate, Secret scan (gitleaks), Agent Security Scan, agent-shield, npm audit. Ecosystem-inapplicable audits skipped (pip/cargo/govulncheck/pnpm). The lone CANCELLED dev-lead dispatch/ci-relay entries are superseded duplicates of the same checks that completed SUCCESS.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



User description
Closes #870
Implemented by dev-lead agent. Please review.
CodeAnt-AI Description
Use channel tags for workflow pinning and block broken refs
What Changed
v14must still pin to the validv1channel tag.Impact
✅ Fewer broken workflow pins✅ No PRs with non-resolving reusable refs✅ Correct pins for release/version mismatches💡 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.
Summary by CodeRabbit
Bug Fixes
Tests