Repository navigation
ci: gate npm publication on release-sha CI - #2543
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
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.
Castiron custom code✅ No new custom-code files detected. 32 mixed files remain; 0 existing customizations changed. Compared 32 existing customizations unchanged
A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload 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.patchOr 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.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
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.
Summary
Adds an explicit CI gate to npm publication for the immutable release commit, addressing the remaining release-safety gap in #2509.
Change
release-cijob after publication state is resolved;CIpush workflow for the exactrelease_shaonmain;gh run watch --exit-status;publishjob depend on the release CI gate;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
CIworkflow 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
mainstate.Scope
Workflow-only change. Normal PR/main CI is unchanged, and non-release pushes do not run the gate.
Addresses #2509