Skip to content

ci(release): detach non-blocking E2E - #11031

Merged
nwparker merged 2 commits into
mainfrom
nwparker/detach-release-e2e
Jul 28, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/detach-release-e2e

Conversation

@nwparker

@nwparker nwparker commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Remove full E2E from the Cut Release workflow's in-line job graph.
  • Dispatch the same tag-scoped E2E asynchronously after publish-release succeeds.
  • Run the detached workflow definition and tests from the exact release tag.
  • Retry dispatch failures three times, then warn without turning an already-published release red.
  • Give detached E2E runs a ref-specific name and protect ordering, permission, tag, retry, and input contracts with tests.

The release-blocking topology is unchanged: publication still requires platform builds, signing, asset verification, and terminal-rendering golden checks. This removes roughly 145 runner-minutes from each Cut Release run and prevents flaky diagnostic E2E failures from making successfully published releases appear failed.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test — focused workflow suites passed locally; full sharded suite runs in PR CI
  • pnpm build — PR CI's package job builds and smoke-tests the packaged app
  • Added a release E2E dispatch contract suite; 26 focused release-contract tests pass
  • Parsed both changed YAML workflows and ran git diff --check

AI Review Report

Reviewed the release authority graph, publish ordering, failure behavior, retries, concurrency, tag reproducibility, and GitHub token scope. Review flagged that retry behavior should be explicitly contractual; added assertions for the three-attempt loop and retry delay. It also flagged a possible draft-creation race, but verified this is prevented transitively: both build and build-mac need create-release, while publish-release needs both build jobs.

Cross-platform review confirmed the dispatcher intentionally runs on Ubuntu and changes no application shortcuts, labels, filesystem paths, native packaging, SSH behavior, or Electron platform logic. Existing macOS, Linux, Windows, SSH, signing, and terminal golden release jobs are unchanged.

Security Audit

  • The dispatcher receives only actions: write; unspecified permissions remain disabled.
  • The validated release tag is passed through an environment variable and quoted in every shell argument.
  • The workflow definition is selected from the exact immutable release tag, avoiding a race with later main changes.
  • Dispatch uses the repository-scoped GITHUB_TOKEN; no new secret or third-party action is introduced.
  • A failed diagnostic dispatch retries, emits an Actions warning, and exits successfully because it occurs after publication and must not rewrite release status.

No security follow-up is required.

Notes

ELI5: the release truck used to carry an optional inspection team, so a flaky inspector could paint the delivery red even after it shipped. Now every required safety check completes and the package publishes first, then the optional team inspects that exact package in a separate lane.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now creates a draft release when necessary, publishes it, and dispatches tag-scoped E2E afterward with retries and failure warnings. Its status messaging reflects that post-publication E2E cannot change the release result. The E2E workflow run name includes the selected ref, and a Vitest suite validates the dispatch and input contracts.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes the main change: detaching non-blocking E2E from the release flow.
Description check ✅ Passed The description covers the required sections and includes summary, testing, AI review, security audit, and notes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@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/release-cut.yml (1)

786-809: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Make publication depend on draft creation.

create-release is not in publish-release.needs, so publication can start before the draft exists and fail its draft-state check. Add create-release as a publish-release dependency.

Proposed fix
   publish-release:
     needs:
       - cut
+      - create-release
       - build
       - build-mac
       - terminal-rendering-golden
🧹 Nitpick comments (1)
config/scripts/release-e2e-dispatch-contract.test.mjs (1)

22-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the three-attempt retry guarantee.

The warning assertion passes even if dispatch is reduced to one attempt. Assert the retry loop so this release behavior remains contractual.

Proposed test addition
     expect(dispatchStep.run).toContain('--raw-field "ref=refs/tags/$TAG"')
+    expect(dispatchStep.run).toContain('for attempt in 1 2 3')
+    expect(dispatchStep.run).toContain('[[ "$attempt" -eq 3 ]] || sleep')
     expect(dispatchStep.run).toContain('::warning::Failed to dispatch post-release E2E')

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 756443f7-b427-4620-a988-ab40943f96ac

📥 Commits

Reviewing files that changed from the base of the PR and between b316174 and c41dce8.

📒 Files selected for processing (3)
  • .github/workflows/e2e.yml
  • .github/workflows/release-cut.yml
  • config/scripts/release-e2e-dispatch-contract.test.mjs

@nwparker

Copy link
Copy Markdown
Contributor Author

Review follow-up:

  • Added explicit contract assertions for the three-attempt dispatch retry and delay in 32d1c02110.
  • Verified the reported draft-creation race is not present: build and build-mac both directly need create-release, and publish-release directly needs both build jobs, so GitHub cannot start publication before draft creation completes.

@nwparker
nwparker merged commit c6076a5 into main Jul 28, 2026
22 checks passed
@nwparker
nwparker deleted the nwparker/detach-release-e2e branch July 28, 2026 01:40
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* ci(release): detach non-blocking E2E

* test(release): pin E2E dispatch retries
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