Skip to content

fix(ci): prevent cancelled signoff evaluations publishing failures - #509

Open
cameronapak wants to merge 2 commits into
mainfrom
fix/signoff-cancellation
Open

cameronapak wants to merge 2 commits into
mainfrom
fix/signoff-cancellation

Conversation

@cameronapak

@cameronapak cameronapak commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Jira: YPE-6839

New here? Start here

What's this? This fixes an automated check on pull requests in the React SDK repository. The check decides whether a proposed release includes breaking changes and, if so, requires another collaborator to acknowledge them before merging. Today, a routine PR edit can replace a running check, and the cancelled check can incorrectly report a failure even though it never finished evaluating the change.

Why does it matter? A red check should mean there is a problem to address, not that another check took its place. We confirmed cases where rerunning only the failed job repeated the same failure, and one retry even replaced an existing passing result with a failure. This PR stops those cancelled evaluations from publishing results while keeping genuine problems blocking.

Who does it affect? Contributors, reviewers, and maintainers working on PRs in this repository, especially when people or bots edit a PR while checks are running. It changes the development and release checks, not the SDK's runtime behavior or the apps using it.

What happens if we leave it unfixed? PRs can continue to show misleading failures or become blocked by a cancelled evaluation, costing time investigating and rerunning checks and making real failures harder to distinguish from noise. This PR addresses that unnecessary friction without removing the requirement for breaking-change signoff.

Summary

Prevent superseded Major Release Signoff evaluations from publishing failures, including partial retries that reuse cancelled dependencies. Before preview or verification starts, publish a blocking pending status so cancelling reevaluation after signoff revocation does not retain an earlier success.

  • Make gate scheduling and terminal fallback steps cancellation-aware while retaining genuine failure and expected skipped-dependency handling.
  • Publish pending as the final required context step. Context runs only trusted inline tooling; preview remains read-only and never receives status-write permission.
  • If pending publication fails, fail the resolved current head rather than a stale head from the original event payload. Retain payload/git fallback when resolution itself failed.
  • Add regression checks in the existing workflow-script suite and an empty changeset. Event coverage and concurrency groups remain unchanged.

Incident evidence and independent review

Verification

  • pnpm test:ci-scripts: 12 locale-gate assertions, 53 signoff assertions and 10 token cases passed. New cancellation/publication regressions were red before implementation.
  • Local scratch validation with GitHub's @actions/expressions: 19 checks passed, including active cancellation, inherited cancelled dependencies, genuine failures, expected skips, signoff-search failure versus cancellation, pending-step ordering and read-only preview permissions. The original conditions failed six cancellation checks. This supplies status-function inputs explicitly; it is not a hosted scheduler test.
  • YVP_APP_KEY=ci-unit-test-key pnpm test: 1,180 unit tests passed; two opt-in tests skipped. An inherited non-ASCII app-key setting failed the initial baseline before any workflow changes; a synthetic mock key avoids that unrelated environment problem.
  • Actionlint, shell syntax, Prettier and git diff --check passed. Actions runner source evaluates job outputs at finalization without requiring job success, supporting use of resolved outputs after pending-step failure.

Scope and remaining validation

This does not eliminate visibly cancelled Actions checks, filter metadata edits, change release policy, or fix #499's locale-delivery work. A cancellation after context succeeds now leaves pending until a replacement completes; genuine preview or verification failure still publishes failure.

Cancellation before context finishes, already accepted in-flight status writes and universal last-writer freshness are not claimed solved. No isolated hosted cancellation/retry fixture was manually triggered; that scheduling scenario should be verified before merge. Opening this PR starts the normal repository checks; pull_request_target edited events still use the base workflow until this change lands.

Confidence Score: 5/5 · The PR appears safe to merge, with no actionable new defects found.RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no actionable new defects found.

Summary

The PR stops cancelled signoff evaluations from publishing terminal results.

  • Signoff checks mark a pull request pending before they evaluate it.
  • Cancelled signoff runs leave the final status alone.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Resolve current PR head] --> B[Publish pending]
  B --> C[Preview or verify release]
  B -- Fails --> D[Post failure on resolved head]
  C -- Cancelled --> E[Gate does not publish]
  C -- Completed or failed --> F[Evaluate release and signoff]
  F --> G[Publish success or failure]
Loading

Reviews (2) · Last reviewed commit: "Merge branch 'main' into fix/signoff-can..." · Reviewed by Greptile

Invalidate prior signoff with pending before preview work, then skip publication for cancelled workflows and inherited cancelled dependencies. Keep real failures fail-closed and target recovery at the resolved head.

Amp-Thread-ID: https://ampcode.com/threads/T-01a22d7b-280a-7609-b5bb-4f731b2f086d
@changeset-bot

changeset-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6fffc03

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

3 participants