Skip to content

ci: gate npm publication on release-sha CI - #2543

Merged
HAYDEN-OAI merged 2 commits into
openai:mainfrom
sylvesterkaczmarek:ci/2509-gate-release-on-ci
Sep 4, 2026
Merged

HAYDEN-OAI merged 2 commits into
openai:mainfrom
sylvesterkaczmarek:ci/2509-gate-release-on-ci

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Adds an explicit CI gate to npm publication for the immutable release commit, addressing the remaining release-safety gap in #2509.

Change

  • add a release-ci job after publication state is resolved;
  • locate the CI push workflow for the exact release_sha on main;
  • fail closed if no matching CI run exists or if the run points at a different commit;
  • wait for that CI run and require a successful conclusion with gh run watch --exit-status;
  • make the final publish job depend on the release CI gate;
  • leave package build and browser compatibility checks running in parallel.

Why

The release workflow currently verifies the release tag and package commit, then gates publication on its own browser/package checks, but it does not require the repository's normal CI workflow to have passed for that exact release SHA. This means a failing release-relevant main-branch check can race with npm publication.

The new gate binds publication to the immutable commit being released rather than merely to the latest main state.

Scope

Workflow-only change. Normal PR/main CI is unchanged, and non-release pushes do not run the gate.

Addresses #2509

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team as a code owner August 31, 2026 16:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-31T16:53:22.315883Z 2e9d3df PR opened
🔒 Security Review ✅ Completed 2026-08-31T16:53:49.584097Z 2e9d3df PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 2e9d3df654

ℹ️ 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/create-releases.yml Resolved

@HAYDEN-OAI HAYDEN-OAI 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.

Reviewed release-SHA provenance, CI run selection, permissions, failure handling, and publication dependencies. The earlier checks:read finding is addressed. No substantive findings in the current revision.

Static review; no tests executed.

@HAYDEN-OAI
HAYDEN-OAI enabled auto-merge September 3, 2026 23:56
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

32 mixed files remain; 0 existing customizations changed.

Compared eea2292a4a52 → 22f219be6c31. Generated baselines verified.

32 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/client.ts
  • src/resources/audio/transcriptions.ts
  • src/resources/audio/translations.ts
  • src/resources/beta/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.ts
  • src/resources/beta/responses/responses.ts
  • src/resources/beta/threads/index.ts
  • src/resources/beta/threads/runs/index.ts
  • src/resources/beta/threads/runs/runs.ts
  • src/resources/beta/threads/threads.ts
  • src/resources/chat/completions/completions.ts
  • src/resources/chat/completions/index.ts
  • src/resources/conversations/index.ts
  • src/resources/embeddings.ts
  • src/resources/files.ts
  • src/resources/fine-tuning/checkpoints/permissions.ts
  • src/resources/images.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts
  • src/resources/vector-stores/files.ts
  • src/resources/webhooks/index.ts
  • src/resources/webhooks/webhooks.ts
  • tests/lib/data-residency.test.ts

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 33819838958 --repo openai/openai-node \
  --name castiron-custom-code-33819838958-1 --dir /tmp/castiron-custom-code-33819838958-1
git apply --stat /tmp/castiron-custom-code-33819838958-1/custom-code.patch
cat /tmp/castiron-custom-code-33819838958-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin eea2292a4a523da9405161dde0a79ac5dc2ecb2a 22f219be6c3148300b72bcf5357bce283aa8a11c
python3 scripts/castiron/custom_code_report.py report \
  --base eea2292a4a523da9405161dde0a79ac5dc2ecb2a \
  --head 22f219be6c3148300b72bcf5357bce283aa8a11c --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-22f219be6c31
cat /tmp/castiron-custom-code-22f219be6c31/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@HAYDEN-OAI
HAYDEN-OAI added this pull request to the merge queue Sep 4, 2026
Merged via the queue into openai:main with commit b557a3e Sep 4, 2026
24 checks passed
gh-actions-shared Bot pushed a commit to xf-qubit/openai-node that referenced this pull request Sep 16, 2026
The release-SHA CI gate added in openai#2543 has no focused regression
coverage, and maintainers lack a single table showing which checks run
before merge and block npm publication.

Document the PR, merge-queue, main, release-PR, and publication
coverage, including skipped live checks and advisory checks. Extend the
existing release workflow tests to execute the actual gate Bash against
synthetic GitHub responses, covering successful, failed, cancelled,
missing, mismatched-SHA, and API-error results. The tests also protect
the publication dependency and ensure selection excludes other commits,
events, and branches.

Validation on Node 24:

- `./scripts/test tests/release-publish-workflow.test.ts` — 11 passed.
- `./scripts/test tests/ecosystem-cli.test.ts
tests/node-matrix-workflow.test.ts` — 26 passed.
- `./scripts/lint` and `node node_modules/typescript/bin/tsc --noEmit` —
passed.
- Mutation checks failed as expected when removing the publication
dependency, release-SHA filter, or `--exit-status`; the workflow was
restored afterward.

A fresh frozen installation was blocked by missing publication-time
metadata for `[email protected]` in the configured registry. Checks used an
existing installation with matching test/lint tooling and relevant type
dependency graphs. No dependency policy or lockfile changes were made,
and no live examples or publication were executed.

Closes openai#2509.
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