fix(deploy): ensure standards-sync label exists + document the deploy standard#481
Conversation
…cument deploy standard The PR-based deploy (#480) passed `gh pr create --label standards-sync`, which fails outright on any target repo lacking that label — and none of the consumer repos carry it (only .github-private does). Live verification on a ruleset- protected repo confirmed branch+PUT+PR creation works (no 409) but PR creation failed on the missing label. - sd_deploy_via_pr now creates the label if missing (create-if-missing, no --force so an existing curated label is never clobbered) before opening the PR. - Add a regression test asserting the label is ensured before `gh pr create`. - Document the deploy/sync standard in ci-standards.md ("Deploying & syncing stubs"): PR-based via deploy-standard-workflows.sh, standards-sync label, never direct-push / never --admin, with the ruleset-protected-repo rationale. Refs #478, #480. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 4 minutes and 14 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 updates the standard deployment script to ensure that the PR label exists on the target repository before creating a pull request, preventing failures when the label is absent. It also adds a regression test to verify this behavior and documents the stub deployment and syncing process in the CI standards documentation. There are no review comments, so I have no additional feedback to provide.
Dev-Lead — fix-reviews (no-changes)Agent reasoning |



Summary
Two follow-ups to #480 (PR-based stub deploy):
sd_deploy_via_prpassedgh pr create --label standards-sync, which fails outright on any target repo lacking that label. None of the 7 consumer repos carry it (only.github-privatedoes), so feat: implement issue #478 — deploy standard workflows via PRs, not direct pushes #480 as merged would fail PR creation on every real target. The lib now creates the label if missing (create-if-missing, no--forceso an existing curated label is never clobbered) before opening the PR. Regression test added.standards/ci-standards.md: stubs are deployed via PRs (deploy-standard-workflows.sh,standards-synclabel, never direct-push / never--admin), with the ruleset-protected-repo rationale.How it was found
Caught by the controlled live verification requested for #480: running the real script on a ruleset-protected repo (
ContentTwin) showed branch + Contents-API PUT + PR all work (no 409 — the original bug is fixed), butgh pr createfailed on the missing label. After this fix, a live re-run opened a correctly-labeled PR (label auto-created) onContentTwinwith no 409; the throwaway PR was closed.Validation
bats— 14/14 pass (added: "ensures the label exists before opening the PR", assertinggh label createprecedesgh pr create).shellcheck --severity=warning -x— clean.standards-syncPR on the protected repoContentTwinend-to-end (closed afterward).Related (separate, not in this PR)
The verification also surfaced a three-way pin inconsistency between the deploy templates, the compliance audit's expected pins (
check_centralized_workflow_stubs), and the fleet (e.g.dependency-audit/dependabot-automerge: template+audit@v1but repos run@v2;agent-shield/dependabot-rebasetemplates SHA-pinned vs audit@v1). Filed separately — a blind re-sync would push downgrades/pin-flips, so it needs its own remediation.Refs #478, #480.
🤖 Generated with Claude Code