Skip to content

ci: stacked-PR pushes no longer leave a blocked required check - #479

Merged
Jacksondr5 merged 3 commits into
j5/mainfrom
j5/ci-stack-duplicate-runs
Oct 8, 2026
Merged

Jacksondr5 merged 3 commits into
j5/mainfrom
j5/ci-stack-duplicate-runs

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Problem

Pushing a PR stack started three J5 CI runs per commit, and the PRs ended up blocked on the required check "Format, lint, typecheck, and unit tests" until someone re-ran runs by hand. Closes #478.

The run history for the peering stack (#400–#408) shows what happens:

  • The push run duplicates the PR run, because stack branches are named j5/….
  • GitHub sends each stacked PR two pull_request events about a second apart: one because its head moved, one because its base moved. They are identical (same head commit, same merge commit; feat(a2a): peer servers negotiate a peer protocol version #401's two runs both checked out 93d2f953). The first is cancelled by the second, and its gate job reports the required check as failed.
  • Left alone, the second run finishes and the check turns green: on 5 October every untouched pair ended cancelled + success. The block came from re-running the cancelled run. A re-run joins the same concurrency group and cancels the in-flight run that replaced it. On feat(a2a): peer servers negotiate a peer protocol version #401, re-running 37706093846 at 00:22:14 cancelled 37706095001 at 00:23:44.

What changed

.github/workflows/j5-ci.yml:

  • push runs only where there is no PR: j5/main, j5/release-<version>, and j5/preview-<x.y.z>-<n>. The packaging runbook publishes from release and preview branches after CI passes and before any PR exists, so they keep their push run. j5/evidence no longer matches.
  • Only a first attempt cancels. A new push to a PR still cancels that PR's older run. A re-run waits its turn in the group, so it can't cancel the run that replaced it.
  • Push runs are grouped per commit and never cancelled, as in upstream's ci.yml. Merging two PRs in a row used to cancel the first commit's j5/main run.

The issue proposed adding the head commit to the concurrency group. That doesn't separate the two PR events, since they carry the same commits, and it would stop a new push from cancelling the older run. So the pair still happens: the first of the two is cancelled within a second, before it takes a runner, and shows as cancelled in the run list. I found no way to hide it without a window in which the required check reads as passed before the tests finish.

J5 Mobile CI has the same triggers. It is advisory and each job runs only when its inputs change, so I left it alone.

FORK.md and the packaging runbook each had one sentence saying J5 CI runs on every j5/** push; both now say where it runs.

How it was checked

  • This PR's branch is j5/ci-stack-duplicate-runs. Pushing it started a pull_request run and no push run.
  • Pushing a second commit while the first run was in flight cancelled the first run.
  • Not checked: a real stack push, and re-running a cancelled run next to an in-flight one. Both need a multi-PR stack; the next stack push will show them.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests) — workflow configuration; checked on this PR's own runs, as above
  • UI changes: before/after screenshots above, and a video for motion or interaction — no UI
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR — none touched
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md — none
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md) — none apply
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them — FORK.md and the packaging runbook

Claude Opus 5.5 (1M context), Claude Code in J5 Code

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • CI checks now run on pull requests targeting j5/** and pushes to the main, release, and preview branches. Pull request runs are grouped by PR, while push runs are grouped by commit; eligible first-attempt PR runs can be cancelled when superseded.
  • Documentation
    • Updated the CI gate descriptions to reflect the branches and events that trigger checks.

Closes #478

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 8, 2026 1:29am UTC

Request Review

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Jacksondr5/j5code/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f1a41d5f-214b-4e54-8d30-20d077533e5b
📥 Commits

Reviewing files that changed from the base of the PR and between 6a0bbbe and 10f01c4.

📒 Files selected for processing (3)
  • .github/workflows/j5-ci.yml
  • FORK.md
  • docs/j5/runbooks/macos-packaging.md

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

J5 CI push triggers now cover j5/main, release branches, and preview branches. Concurrency groups use pull-request numbers or commit SHAs, and cancellation applies only to first-attempt pull-request runs. The repository and runbook descriptions reflect the updated push coverage.

Changes

J5 CI workflow

Layer / File(s) Summary
Trigger and concurrency settings
.github/workflows/j5-ci.yml, FORK.md, docs/j5/runbooks/macos-packaging.md
Push triggers are limited to j5/main, j5/release-[0-9]*, and j5/preview-[0-9]*; pull-request filters remain unchanged. Concurrency groups use PR numbers or commit SHAs. Cancellation is enabled only for first-attempt pull-request runs. Both documentation entries describe the updated push coverage.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 10f01

The updated workflow and documentation describe the narrowed J5 CI coverage, and no concrete merge-blocking failure was established. The precise queuing behavior for rerunning a cancelled workflow remains unverified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: preventing blocked required checks caused by duplicate stacked-PR push runs.
Description check ✅ Passed The description includes the required problem, change summary, validation notes, checklist, and generated-by information. It clearly identifies the untested multi-PR stack scenarios, so the remaining …
Linked Issues check ✅ Passed Issue #478 requires exclusion of PR branches and j5/evidence from push, retention of j5/main push runs, cancellation of an older in-flight PR run after a new commit, and preservation of the requ…
Out of Scope Changes check ✅ Passed The workflow changes directly implement issue #478. The FORK.md and docs/j5/runbooks/macos-packaging.md changes document the new J5 CI trigger scope. These documentation changes support the workfl…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 effective changed lines (test files excluded in mixed PRs). labels Oct 8, 2026
@Jacksondr5
Jacksondr5 merged commit ff92a11 into j5/main Oct 8, 2026
32 checks passed
@Jacksondr5
Jacksondr5 deleted the j5/ci-stack-duplicate-runs branch October 8, 2026 02:07

This branch was successfully deployed

1 active deployment
Preview — 10f01c43 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: stacked-PR pushes leave cancelled duplicate J5 CI runs that block the required check

1 participant