Skip to content

chore(ci): skip stale release-as guard on the release-please PR#535

Merged
FSM1 merged 1 commit into
mainfrom
chore/ci-gate-stale-release-as-on-release-pr
Jun 21, 2026
Merged

chore(ci): skip stale release-as guard on the release-please PR#535
FSM1 merged 1 commit into
mainfrom
chore/ci-gate-stale-release-as-on-release-pr

Conversation

@FSM1

@FSM1 FSM1 commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Problem

The stale-release-as guard (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

STALE: apps/api release-as=0.42.0 == manifest=0.42.0
STALE: apps/desktop release-as=0.43.0 == manifest=0.43.0
STALE: packages/api-client release-as=0.42.0 == manifest=0.42.0
STALE: packages/sdk release-as=0.37.1 == manifest=0.37.1
STALE: crates/fuse release-as=0.7.0 == manifest=0.7.0

Root cause

The guard fails whenever a release-as pin equals its manifest version. That is the correct signal everywhere except the release-please PR:

  • On main, every release-as is strictly ahead of the manifest (e.g. apps/api 0.42.0 > 0.41.0) → guard passes; these are real pending release targets.
  • On the release-please PR, release-please bumps each manifest version up to its release-as target — that's the in-flight release it's preparing — so release-as == manifest there 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:

      - name: Check for stale release-as pins
        if: ${{ !startsWith(github.head_ref, 'release-please--') }}
        run: node .github/scripts/check-stale-release-as.js

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 every pull_request to main.

Verification

  • actionlint (the if: expression validates) and zizmor --config .github/zizmor.yml both clean for ci.yml.
  • Confirmed against live state: release-as ahead of manifest on main (guard passes), equal on #528 (guard false-failed).

🤖 Generated with Claude Code

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
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@FSM1, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9f02a2d3-3122-45a6-b0c7-fc2e4201c2c9

📥 Commits

Reviewing files that changed from the base of the PR and between b3511af and c2b5789.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ci-gate-stale-release-as-on-release-pr

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

Release Preview

No version bumps detected. All changes are in unversioned paths or use exempt commit types.

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a false-positive CI failure on the release-please PR by splitting the stale-release-as guard into two steps: an always-running unit-test step and a live-check step that is skipped when the head branch starts with release-please--.

  • The unit-test step (check-stale-release-as.test.js) is now unconditional, preserving coverage of the pure logic on every PR.
  • The live check (check-stale-release-as.js) is gated with if: ${{ !startsWith(github.head_ref, 'release-please--') }}, which correctly identifies release-please's own PRs (branch naming convention: release-please--branches--main) while still surfacing genuinely stale pins on all other feature PRs.

Confidence Score: 5/5

Safe 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

Filename Overview
.github/workflows/ci.yml Splits the combined stale-release-as step into a state-independent unit-test step (always runs) and a live-check step gated with !startsWith(github.head_ref, 'release-please--'), correctly skipping the live guard only on release-please PRs.

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]
Loading
%%{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]
Loading

Reviews (1): Last reviewed commit: "chore(ci): skip stale release-as guard o..." | Re-trigger Greptile

@FSM1 FSM1 enabled auto-merge (squash) June 20, 2026 23:55
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.99%. Comparing base (b3511af) to head (c2b5789).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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              
Flag Coverage Δ
api 85.33% <ø> (ø)
api-client 85.33% <ø> (ø)
core 85.33% <ø> (ø)
crypto 85.33% <ø> (ø)
desktop 17.95% <ø> (-13.38%) ⬇️
rust 64.63% <ø> (?)
sdk 85.33% <ø> (ø)
sdk-core 85.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 73 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FSM1 FSM1 merged commit 623eca0 into main Jun 21, 2026
28 checks passed
@FSM1 FSM1 deleted the chore/ci-gate-stale-release-as-on-release-pr branch June 21, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant