Skip to content

[release] Await gh availability check before verifying artifacts - #37855

Merged
eps1lon merged 1 commit into
react:mainfrom
irontaek:await-gh-availability
Oct 15, 2026
Merged

eps1lon merged 1 commit into
react:mainfrom
irontaek:await-gh-availability

Conversation

@irontaek

Copy link
Copy Markdown
Contributor

Summary

executableIsAvailable in scripts/release/shared-commands/download-build-artifacts.js is async, but processArtifact calls it without await:

if (executableIsAvailable('gh')) {
  await exec(`gh attestation verify artifacts_combined.zip --repo=${REPO}`, ...);
}

The condition is a Promise, so it is always truthy. On a machine without the gh CLI the script still runs gh attestation verify and fails, instead of skipping verification as the check intends. This adds the missing await.

How did you test this change?

The helper is not exported, so I reproduced it standalone with the same implementation and a command that isn't installed:

$ node repro.js
without await: branch taken
with await:    skipped

The diff is the single await; processArtifact is already async.

https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq

executableIsAvailable is async, so the bare call in the if condition was
a Promise and always truthy. Without the gh CLI installed, the script ran
gh attestation verify anyway and failed instead of skipping verification.

Claude-Session: https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq
@meta-cla meta-cla Bot added the CLA Signed label Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Comparing: 99c106c...2e1141b

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 7.35 kB 7.35 kB -0.05% 1.96 kB 1.96 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 626.10 kB 626.10 kB = 110.63 kB 110.63 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 7.36 kB 7.36 kB -0.05% 1.96 kB 1.96 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 697.31 kB 697.31 kB = 122.07 kB 122.07 kB
facebook-www/ReactDOM-prod.classic.js = 715.35 kB 715.35 kB = 125.14 kB 125.14 kB
facebook-www/ReactDOM-prod.modern.js = 705.66 kB 705.66 kB = 123.57 kB 123.57 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by sizebot against 2e1141b

yoominho91 added a commit to m1kapp/fixearly that referenced this pull request Oct 15, 2026
…55 (#200)

A same-file async function or method called without await in an if,
while, ternary condition or under ! is a Promise: always truthy, and
always false when negated. Corpus prototype: 6 hits, 4 real (vscode
skips its can-install check, REPL early return, gulp file existence;
react's release script runs gh attestation without gh). The two false
positives were bare calls to imported sync functions sharing a name
with an async method; bare names now only match function declarations
and variables, this.x() only methods [FP:async-cond-name-kind].

Diagnostics 24 -> 25 (correctness 10). Registers react/react#37855,
the first PR from this rule.

Claude-Session: https://claude.ai/code/session_01W9Mk18mBNfkPfgg3hYweKq

Co-authored-by: Minho Yoo <[email protected]>

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you

@eps1lon
eps1lon merged commit 098d2e8 into react:main Oct 15, 2026
245 checks passed
eps1lon pushed a commit to vercel/next.js that referenced this pull request Oct 20, 2026
[diff
react/react@99c106c4...ba39b32a](react/react@99c106c...ba39b32)

<details>
<summary>React upstream changes</summary>

- react/react#37853
- react/react#37856
- react/react#37855

</details>

---------

Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants