Skip to content

merge queue fast path - #4198

Open
sxlijin wants to merge 1 commit into
canaryfrom
sam/mq-fast-path
Open

merge queue fast path#4198
sxlijin wants to merge 1 commit into
canaryfrom
sam/mq-fast-path

Conversation

@sxlijin

@sxlijin sxlijin commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • CI Improvements
    • Added a merge-queue fast path that can reuse a successful CI run when the queued changes are unchanged.
    • Skips redundant validation checks when the fast path applies, reducing unnecessary CI execution time.
    • Updated CI status handling and messaging to accurately reflect successful fast-path runs.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jul 25, 2026 1:32am
promptfiddle Ready Ready Preview, Comment Jul 25, 2026 1:32am
promptfiddle2 Ready Ready Preview, Comment Jul 25, 2026 1:32am

Request Review

@sxlijin
sxlijin force-pushed the sam/mq-fast-path branch from e31e627 to c0e1c7d Compare July 25, 2026 01:10
@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CI workflow adds a merge-queue fast path that validates merge-group equivalence with a prior successful pull-request run, then skips redundant checkout, merge-base, and change-detection steps.

Changes

Merge-queue CI

Layer / File(s) Summary
Merge-queue fast-path evaluation
.github/workflows/ci.yaml
Adds read permissions and checks merge-group ancestry, tree equality, and prior successful workflow runs before setting the skip output.
Conditional change detection
.github/workflows/ci.yaml
Skips checkout, merge-base, and change-detection steps on the fast path and updates CI failure-alert comments accordingly.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MergeQueue
  participant GitHubScript
  participant GitHubAPI
  participant CIJobs
  MergeQueue->>GitHubScript: provide merge-group context
  GitHubScript->>GitHubAPI: query PR and prior successful CI run
  GitHubAPI-->>GitHubScript: return commit, tree, and run data
  GitHubScript-->>CIJobs: set skip output
  CIJobs-->>MergeQueue: skip redundant checks and report success
Loading

Suggested reviewers: rossirpaulo, aaronvg, hellovai

Poem

A rabbit hops through merge queues bright,
Reusing checks already right.
Old runs guide the speedy way,
Redundant steps now sit and stay.
CI thumps success—hip-hop hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a merge-queue fast path to CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sam/mq-fast-path

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e31e627861

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yaml
# already guarantees): the WHOLE run must be green, informational
# jobs included.
#
# When skip=true, every later step in this job is skipped, so every

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the bridge change check on the fast path

When the fast path sets skip=true, check_bridge_cffi_release is the one later change-detection step without the new guard. Checkout and merge-base calculation are skipped, so its git diff "${MERGE_BASE}...HEAD" runs in an uninitialized workspace with an empty merge base; the failure enters the else branch and writes changed=true. This causes the expensive bridge-cffi-release workflow to run on every purported fast-path merge group instead of skipping all jobs.

Useful? React with 👍 / 👎.

@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://boundaryml.com/bamlcode</loc><lastmod>2026-07-24T22:17:21.557Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop tracking the timestamped sitemap output

When anyone runs the website's pnpm build, its postbuild script regenerates this sitemap with the current build time in every lastmod. The app's .gitignore explicitly identifies public/sitemap-0.xml as generated on every build, but adding it to Git makes the ignore rule ineffective, so normal builds now leave a large timestamp-only dirty diff and make it easy to commit stale or noisy sitemap output. Keep the generated sitemap files untracked.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

Binary size checks passed

7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
baml-cli Linux 🔒 27.2 MB 11.6 MB file 27.1 MB +151.0 KB (+0.6%) OK
packed-program Linux 🔒 17.6 MB 7.3 MB file 17.6 MB +7.2 KB (+0.0%) OK
baml-cli macOS 🔒 21.2 MB 10.1 MB file 21.0 MB +149.1 KB (+0.7%) OK
packed-program macOS 🔒 13.8 MB 6.4 MB file 13.8 MB +33.1 KB (+0.2%) OK
baml-cli Windows 🔒 22.8 MB 10.3 MB file 22.7 MB +126.0 KB (+0.6%) OK
packed-program Windows 🔒 14.7 MB 6.5 MB file 14.7 MB +4.6 KB (+0.0%) OK
bridge_wasm WASM 16.5 MB 🔒 4.5 MB gzip 4.5 MB +18.7 KB (+0.4%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yaml (1)

189-445: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

check_bridge_cffi_release is missing the fast-path skip condition applied to every sibling check_* step.

All other change-detection steps (check_code, check_lexer, check_parser, check_hir, check_thir, check_codegen, check_docs, check_webview, check_grammar, check_unsafe, check_proto, check_prof, check_perf) got if: steps.mq_fast_path.outputs.skip != 'true', but check_bridge_cffi_release (lines 414-434) did not. On the fast path, checkout and merge_base are skipped, so this step's git diff --quiet "${MERGE_BASE}...HEAD" ... runs against an empty MERGE_BASE with no repo checked out. The git invocation fails, but since it's the condition of a shell if, that failure is swallowed and the else branch fires unconditionally, emitting changed=true. This contradicts the job's stated design ("every later step in this job is skipped, so every output stays empty") and needlessly runs the bridge-cffi-release job on every merge-queue fast-path event, defeating part of the optimization this PR introduces.

🛠️ Proposed fix
       - name: Check if bridge_cffi release inputs changed
         id: check_bridge_cffi_release
+        if: steps.mq_fast_path.outputs.skip != 'true'
         env:
           MERGE_BASE: ${{ steps.merge_base.outputs.sha }}
🤖 Prompt for 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.

In @.github/workflows/ci.yaml around lines 189 - 445, Add the same fast-path
guard to the check_bridge_cffi_release step that all sibling change-detection
steps use: if: steps.mq_fast_path.outputs.skip != 'true'. Keep its existing
environment and git diff logic unchanged so the step is skipped when checkout
and merge_base are unavailable.
🤖 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.

Outside diff comments:
In @.github/workflows/ci.yaml:
- Around line 189-445: Add the same fast-path guard to the
check_bridge_cffi_release step that all sibling change-detection steps use: if:
steps.mq_fast_path.outputs.skip != 'true'. Keep its existing environment and git
diff logic unchanged so the step is skipped when checkout and merge_base are
unavailable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 11b9a4ec-1e84-4a81-9c58-4c7c85ac41f7

📥 Commits

Reviewing files that changed from the base of the PR and between c966408 and c0e1c7d.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml

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