Skip to content

fix(ci): release gate skips past runs where desktop tests didn't execute#401

Merged
FSM1 merged 5 commits into
mainfrom
fix/release-gate-desktop-skip
Mar 30, 2026
Merged

fix(ci): release gate skips past runs where desktop tests didn't execute#401
FSM1 merged 5 commits into
mainfrom
fix/release-gate-desktop-skip

Conversation

@FSM1

@FSM1 FSM1 commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • The release gate's desktop E2E verification searched only ci-e2e.yml orchestrator runs and inspected nested job conclusions. But desktop tests often run as standalone desktop-e2e.yml workflows, so the gate never found them.
  • Simplified approach: search desktop-e2e.yml runs directly by workflow name. The workflow name is the same regardless of trigger (standalone push, orchestrator workflow_call, or workflow_dispatch). No job introspection needed.
  • Removed the run_executed_tests helper and dual-source search logic in favor of a single gh run list --workflow=desktop-e2e.yml query.
  • For HEAD: poll until complete, pass/fail based on conclusion.
  • For range search: find the most recent completed run in PREV_TAG..HEAD, fail if it didn't succeed.

Test plan

  • Verified gh run list --workflow=desktop-e2e.yml --branch=main returns the successful runs (23697467425, 23720651610) that the old logic missed
  • Re-run release-please PR gate to confirm it picks up the successful desktop E2E run

🤖 Generated with Claude Code

…'t execute

The desktop E2E verification loop stopped at the first failed CI run in
the release range without checking if desktop tests actually ran. When a
non-desktop failure (e.g., TEE worker) occurred at a newer commit, it
blocked the gate even though desktop tests passed at an older commit.

Fix: always check run_executed_tests before using a run's conclusion.
Skip runs where desktop jobs were skipped regardless of overall result.
Also update the helper to detect any non-skipped desktop job (not just
successful ones) so failed desktop runs are still caught.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 2c7ec5f4ecf0
@coderabbitai

coderabbitai Bot commented Mar 29, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@FSM1 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 52 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d5dcb04-a20d-47e0-a356-56565d045e51

📥 Commits

Reviewing files that changed from the base of the PR and between a2bc6d5 and 8acf44c.

📒 Files selected for processing (1)
  • .github/workflows/release-gate.yml

Walkthrough

Updated the Desktop E2E release gate verification logic to query desktop-e2e.yml workflow runs directly instead of checking job-level execution. Removed the run_executed_tests() helper and fallback search logic, simplified HEAD verification to check run conclusion status, and narrowed query limits while changing the orchestrator workflow source.

Changes

Cohort / File(s) Summary
Release Gate E2E Verification
.github/workflows/release-gate.yml
Refactored Desktop E2E verification from job-level to workflow-run-level checks. Removed run_executed_tests() helper and fallback run-search logic that validated job execution. Updated HEAD check to poll gh run view for desktop-e2e.yml run at MAIN_SHA, treating only conclusion == success as pass. When no HEAD run exists, searches completed desktop-e2e.yml runs in release range without job execution validation. Reduced HEAD query limit from 50 to 10 and changed orchestrator workflow source from ci-e2e.yml to desktop-e2e.yml.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: the release gate now skips past runs where desktop tests didn't execute, which is the core fix implemented in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-gate-desktop-skip

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.

@codecov

codecov Bot commented Mar 29, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #401   +/-   ##
=======================================
  Coverage   61.25%   61.25%           
=======================================
  Files         133      133           
  Lines        9790     9790           
  Branches      986      986           
=======================================
  Hits         5997     5997           
  Misses       3577     3577           
  Partials      216      216           
Flag Coverage Δ
api 84.31% <ø> (ø)
api-client 84.31% <ø> (ø)
core 84.31% <ø> (ø)
crypto 84.31% <ø> (ø)
sdk 84.31% <ø> (ø)
sdk-core 84.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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 and others added 2 commits March 30, 2026 01:47
The release gate only searched ci-e2e.yml orchestrator runs for desktop
E2E results. But desktop tests often run as standalone desktop-e2e.yml
workflows (triggered independently), not as nested jobs in the
orchestrator. Added fallback: if no ci-e2e run has desktop tests
executed, search standalone desktop-e2e.yml runs in the release range.
Also check desktop-e2e.yml first for HEAD run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: cf50ea29fc5f
…ectly

Instead of searching ci-e2e.yml orchestrator runs and inspecting nested
jobs, just query desktop-e2e.yml runs directly. The workflow name is the
same regardless of how it was triggered (standalone or via orchestrator).
Removes the run_executed_tests helper and dual-source search logic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: e61fa4db07ef

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release PR “gate” workflow to determine Desktop E2E verification status by querying desktop-e2e.yml workflow runs directly, instead of inferring Desktop E2E execution from ci-e2e.yml orchestrator runs.

Changes:

  • Switch Desktop E2E verification to gh run list --workflow=desktop-e2e.yml for HEAD and for commits since the previous tag.
  • Simplify the polling/selection logic to use the workflow run conclusion rather than job-level checks.

Comment thread .github/workflows/release-gate.yml
Comment thread .github/workflows/release-gate.yml
Comment thread .github/workflows/release-gate.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release-gate.yml:
- Around line 214-221: The current lookup sets HEAD_RUN to the first run
returned by gh run list that matches MAIN_SHA which can pick an older standalone
run; instead iterate RANGE_COMMITS from newest to oldest and for each commit SHA
call gh run list (workflow=desktop-e2e.yml, branch=main) to find a run with
headSha equal to that SHA, set HEAD_RUN to the first found run and break; apply
the same change to the later block around the HEAD_RUN logic at the 271-286
section so both places resolve runs by commit recency (use the RANGE_COMMITS
variable and MAIN_SHA/each SHA in the loop when querying gh run list).
- Around line 271-299: The current logic only lists completed runs
(select(.status == "completed")) so it can skip a newer in-flight Desktop E2E
run and fall back to an older green run; change the RUNS query to include
non-completed runs (remove the select by status, optionally sort by
databaseId/headSha so newest runs come first), then in the loop pick the first
matching run (using FOUND_SHA/FOUND_RUN_ID/FOUND_CONCLUSION as before) and if
its status is not "completed" poll that specific run (gh run view --repo ${{
github.repository }} --job  --json status,conclusion --jq or similar) until it
reaches a terminal state or a timeout, then only accept if the final conclusion
== "success" (otherwise error/exit); keep the rest of the failure messages but
base them on the polled run (FOUND_RUN_ID/FOUND_CONCLUSION).
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3d1a8423-05a3-49ed-990e-07d8dfe8f22a

📥 Commits

Reviewing files that changed from the base of the PR and between 0517397 and a2bc6d5.

📒 Files selected for processing (1)
  • .github/workflows/release-gate.yml

Comment thread .github/workflows/release-gate.yml
Comment thread .github/workflows/release-gate.yml
FSM1 and others added 2 commits March 30, 2026 02:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 2fa157f99119
Two fixes to the range search:
1. Iterate RANGE_COMMITS newest-first instead of trusting gh run list
   order, so a re-triggered run for an older commit can't shadow a
   newer commit's run.
2. Include in-progress runs and poll them if found, instead of only
   considering completed runs (which could skip a newer in-flight run
   and accept a stale green).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 5343c745fc97

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/release-gate.yml
@FSM1 FSM1 merged commit afa288f into main Mar 30, 2026
29 checks passed
@FSM1 FSM1 deleted the fix/release-gate-desktop-skip branch March 30, 2026 00:13
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.

2 participants