chore(ci): skip stale release-as guard on the release-please PR#535
Conversation
The stale-release-as guard flags any release-as pin that equals its manifest version. On release-please's own PR that equality is EXPECTED, not stale: the PR bumps each package's manifest version up to its release-as target as the in-flight release, so the guard false-failed every release PR (e.g. apps/api release-as=0.42.0 == manifest=0.42.0 on PR #528, while on main release-as is strictly ahead of the manifest and the guard passes). Gate the live check with if: !startsWith(github.head_ref, 'release-please--') so it skips release-please PRs but still runs on every other PR — a genuinely stale pin (already shipped, not removed) still surfaces on the next feature PR. The state-independent unit suite is split into its own always-on step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Entire-Checkpoint: 9c2f65da077e
|
Warning Review limit reached
More reviews will be available in 43 minutes and 28 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
Release PreviewNo version bumps detected. All changes are in unversioned paths or use exempt commit types. |
Greptile SummaryThis PR fixes a false-positive CI failure on the release-please PR by splitting the stale-
Confidence Score: 5/5Safe to merge — the change is a single-step gate on the live guard, and the unit-test step continues to run unconditionally on every PR. The fix is minimal and correct: github.head_ref is always populated in pull_request events, startsWith is a built-in GitHub Actions expression function, and the release-please-- prefix is the standard release-please branch naming convention. The fallback if head_ref were ever empty is to run the check (safe side). Unit tests for the guard's pure logic remain unconditional, so no regression coverage is lost. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR opened against main] --> B[Test stale release-as guard\nnode --test check-stale-release-as.test.js\nALWAYS RUNS]
B --> C{head_ref starts with\n'release-please--'?}
C -- Yes --> D[Skip live check\nrelease-as == manifest\nis expected here]
C -- No --> E[Run live check\nnode check-stale-release-as.js]
E --> F{Any stale pins?}
F -- Yes --> G[Fail CI\nprint STALE lines]
F -- No --> H[Pass CI]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[PR opened against main] --> B[Test stale release-as guard\nnode --test check-stale-release-as.test.js\nALWAYS RUNS]
B --> C{head_ref starts with\n'release-please--'?}
C -- Yes --> D[Skip live check\nrelease-as == manifest\nis expected here]
C -- No --> E[Run live check\nnode check-stale-release-as.js]
E --> F{Any stale pins?}
F -- Yes --> G[Fail CI\nprint STALE lines]
F -- No --> H[Pass CI]
Reviews (1): Last reviewed commit: "chore(ci): skip stale release-as guard o..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #535 +/- ##
==========================================
+ Coverage 64.83% 67.99% +3.15%
==========================================
Files 143 159 +16
Lines 11147 18955 +7808
Branches 1258 1258
==========================================
+ Hits 7227 12888 +5661
- Misses 3675 5822 +2147
Partials 245 245
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Problem
The stale-
release-asguard (added in phase 53, T-53-05) fails on the release-please PR (#528), blocking it.Failing job: https://github.com/FSM1/cipher-box/actions/runs/27887285517/job/82524637074?pr=528
Root cause
The guard fails whenever a
release-aspin equals its manifest version. That is the correct signal everywhere except the release-please PR:main, everyrelease-asis strictly ahead of the manifest (e.g.apps/api0.42.0>0.41.0) → guard passes; these are real pending release targets.release-astarget — that's the in-flight release it's preparing — sorelease-as == manifestthere is expected, not stale.The guard can't distinguish "about to ship" (release PR) from "already shipped and forgotten" (everywhere else) by value alone — both look equal. The branch is the discriminator.
Fix
Split the step so the state-independent unit suite always runs, and gate only the live check off release-please PRs:
startsWith(… 'release-please--')covers the current combined PR (release-please--branches--main) and any future per-component branches. A genuinely stale pin (already shipped, never removed) is not masked — it still surfaces on the next non-release feature PR, since CI runs on everypull_requesttomain.Verification
actionlint(theif:expression validates) andzizmor --config .github/zizmor.ymlboth clean forci.yml.release-asahead of manifest onmain(guard passes), equal on#528(guard false-failed).🤖 Generated with Claude Code