Skip to content

test(ci): cover release gate and document CI policy - #2589

Merged
HAYDEN-OAI merged 3 commits into
mainfrom
codex/issue-2509-ci-policy
Sep 16, 2026
Merged

HAYDEN-OAI merged 3 commits into
mainfrom
codex/issue-2509-ci-policy

Conversation

@HAYDEN-OAI

@HAYDEN-OAI HAYDEN-OAI commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

The release-SHA CI gate added in #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 #2509.

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

45 mixed files remain; 0 existing customizations changed.

Compared 58fa72a5a241 → bd6b499014ee. Generated baselines verified.

45 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/agents/environments/files.ts
  • src/resources/beta/agents/sessions/sessions.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/responses/ws-base.ts
  • src/resources/beta/responses/ws.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/live/forks/ws-base.ts
  • src/resources/live/forks/ws.ts
  • src/resources/live/sideband/ws-base.ts
  • src/resources/live/sideband/ws.ts
  • src/resources/live/ws-base.ts
  • src/resources/live/ws.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/responses/ws-base.ts
  • src/resources/responses/ws.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts

5 more in the full report.

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 35128161193 --repo openai/openai-node \
  --name castiron-custom-code-35128161193-1 --dir /tmp/castiron-custom-code-35128161193-1
git apply --stat /tmp/castiron-custom-code-35128161193-1/custom-code.patch
cat /tmp/castiron-custom-code-35128161193-1/custom-code.patch

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

git fetch --no-tags origin 58fa72a5a241521412775e691e6a1331f89ee245 bd6b499014eea7f6c2c128a99c6720f10290df25
python3 scripts/castiron/custom_code_report.py report \
  --base 58fa72a5a241521412775e691e6a1331f89ee245 \
  --head bd6b499014eea7f6c2c128a99c6720f10290df25 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-bd6b499014ee
cat /tmp/castiron-custom-code-bd6b499014ee/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 marked this pull request as ready for review September 4, 2026 00:44
@HAYDEN-OAI
HAYDEN-OAI requested a review from a team as a code owner September 4, 2026 00:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 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-09-16T17:28:03.114163Z bd6b499 New commits
🔒 Security Review ✅ Completed 2026-09-16T17:29:12.672642Z bd6b499 New commits
ℹ️ 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.

@openai-sdks

openai-sdks Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 9.963s for Node SDK PR #2589.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 174ms
tests/chat-completions-create.test.ts ✅ Passed 238ms
tests/chat-completions-stream.test.ts ✅ Passed 127ms
tests/files-content-binary.test.ts ✅ Passed 198ms
tests/files-create-multipart.test.ts ✅ Passed 257ms
tests/files-list-pagination.test.ts ✅ Passed 173ms
tests/initialize-config.test.ts ✅ Passed 138ms
tests/instance-isolation.test.ts ✅ Passed 189ms
tests/models-list.test.ts ✅ Passed 193ms
tests/responses-background-lifecycle.test.ts ✅ Passed 235ms
tests/responses-body-method-errors.test.ts ✅ Passed 323ms
tests/responses-cancel-timeout.test.ts ✅ Passed 189ms
tests/responses-cancel.test.ts ✅ Passed 212ms
tests/responses-compact-retries.test.ts ✅ Passed 277ms
tests/responses-compact.test.ts ✅ Passed 229ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 129ms
tests/responses-create-advanced.test.ts ✅ Passed 145ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.004s
tests/responses-create-errors.test.ts ✅ Passed 222ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 124ms
tests/responses-create-retries.test.ts ✅ Passed 262ms
tests/responses-create-stream-failures.test.ts ✅ Passed 124ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 2.149s
tests/responses-create-stream-wire.test.ts ✅ Passed 2.338s
tests/responses-create-stream.test.ts ✅ Passed 86ms
tests/responses-create-terminal-states.test.ts ✅ Passed 219ms
tests/responses-create-timeout.test.ts ✅ Passed 208ms
tests/responses-create.test.ts ✅ Passed 222ms
tests/responses-delete.test.ts ✅ Passed 199ms
tests/responses-input-items-errors.test.ts ✅ Passed 153ms
tests/responses-input-items-list.test.ts ✅ Passed 176ms
tests/responses-input-items-options.test.ts ✅ Passed 197ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 213ms
tests/responses-input-tokens-count.test.ts ✅ Passed 225ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.986s
tests/responses-not-found-errors.test.ts ✅ Passed 243ms
tests/responses-parse.test.ts ✅ Passed 150ms
tests/responses-retrieve-retries.test.ts ✅ Passed 251ms
tests/responses-retrieve.test.ts ✅ Passed 204ms
tests/responses-stored-method-errors.test.ts ✅ Passed 571ms
tests/retry-behavior.test.ts ✅ Passed 2.881s
tests/sdk-error-shape.test.ts ✅ Passed 290ms

View OkTest run #35128126851

SDK merge (a25da580b4c6) · head (bd6b499014ee) · base (58fa72a5a241) · OkTest (c6ef21c7db64)

@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: fd5187c7cf

ℹ️ 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 tests/release-publish-workflow.test.ts Resolved

@jbeckwith-oai jbeckwith-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.

Blocking: the new release-gate test fixture shells out to jq, but jq is not a documented prerequisite or repository-managed dependency. On supported developer setups without jq, the canonical test fails with ENOENT before exercising the gate. Please make the fixture evaluation self-contained in Node; the existing unresolved review thread identifies the same issue.

@HAYDEN-OAI
HAYDEN-OAI force-pushed the codex/issue-2509-ci-policy branch from 85b3823 to 493e3fd Compare September 4, 2026 01:30
@HAYDEN-OAI
HAYDEN-OAI force-pushed the codex/issue-2509-ci-policy branch from 493e3fd to bc8e214 Compare September 4, 2026 01:36
gh-actions-shared Bot pushed a commit to xf-qubit/openai-node that referenced this pull request Sep 4, 2026
- [x] I understand that this repository is auto-generated and my pull
request may not be merged

## Changes being requested

Reduce repeated setup work in handwritten tests that intermittently
exceed the Node 22 CI deadlines:

- Run the real `pnpm lint` → `pnpm format` → `pnpm lint` integration in
a small temporary project containing the repository's actual aliases,
scripts, and configs. Give the fixture its own offline pnpm state and
link the installed tools. This avoids whole-repository scans and writes
into other tests' temporary fixtures while preserving generated-import
assertions and checking handwritten formatting.
- Select ts-node's existing SWC backend in the eight executable-example
subprocess suites. Each child still runs the actual example against SDK
source and synthetic local services, but avoids repeatedly compiling the
SDK import graph with TypeScript. SWC is already a repository
dependency.
- Disable npm's update notifier in the existing offline ecosystem
fixtures. Main already contains their project-local offline
configuration; preserve that configuration and its current smoke and
credential coverage.

The existing 15-second child deadlines, 30-second test deadline,
assertions, and worker modes remain. No production code, dependencies,
lockfile, workflow policy, or generated files change. Main's newer LF
and audio-input regression tests are preserved.

## Validation

- The equivalent test changes passed the full Node 22/24/26 suites:
7,329 handwritten tests and 556 generated tests per runtime, retaining
the existing two generated skips; all 14 ecosystem projects and
packaging/runtime-floor checks passed. Previously timing-out Node 22
WebSocket/audio cases completed in approximately two seconds under the
same 15-second deadline.
- Independent review verified the public port preserves newer
main-branch coverage and carries the same fixture and subprocess
behavior. `git diff --check` passes.
- A fresh local frozen installation on the latest public base is blocked
because the configured registry omits publication metadata for
`[email protected]`, also reported in [PR
2589](openai#2589). A fresh metadata
cache gives the same missing-version result. The lockfile and dependency
policies remain unchanged; this PR's CI will validate the current base.

@sylvesterkaczmarek sylvesterkaczmarek 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.

The fixture is much stronger now that it no longer depends on a host jq: the sentinel binary guarantees the gate only uses the controlled gh response path. Executing the workflow-owned Bash against success, failure, cancellation, missing-run and mismatched-SHA cases makes the release-SHA publication dependency executable rather than merely documented. The earlier portability blocker looks addressed.

gh-actions-shared Bot pushed a commit to xf-qubit/openai-node that referenced this pull request Sep 5, 2026
## Problem

On a supported Windows contributor checkout without a host `jq` binary,
the existing historical release-publisher cases in
`tests/release-publish-workflow.test.ts` fail before they exercise the
captured publisher:

```text
./bin/check-npm-version: line 7: jq: command not found
Test Files  1 failed (1)
Tests  3 failed | 1 passed (4)
```

`jq` is not a documented repository setup prerequisite. The test already
supplies controlled `npm` and `pnpm` executables, but still depends on
the host for JSON evaluation.

## Root cause

The fixture executes the real `bin/publish-npm` and
`bin/check-npm-version` scripts. Those scripts invoke four small `jq`
expressions, while the fixture does not provide `jq` when it is absent
from the contributor environment.

## Fix

Provide a fixture-local Node executable when `jq --version` is
unavailable. It implements only the exact controlled expressions used by
the captured publisher and fails on any unexpected expression.
Environments with a real `jq` continue using it.

## Tests

Windows 11, Node 24.19.0, pnpm 11.5.1:

- Baseline `./scripts/test tests/release-publish-workflow.test.ts`: 3
failed / 1 passed (`jq: command not found`).
- Fixed `./scripts/test tests/release-publish-workflow.test.ts`: 4
passed.
- `pnpm install --frozen-lockfile`: passed, including supply-chain
policy verification.
- `pnpm lint`: passed.
- `pnpm exec tsc --noEmit`: passed.
- `pnpm build`: passed, including CJS/ESM and Bedrock import checks.
- `git diff --check`: passed.

A broader pre-fix `pnpm test:unit` run completed with 7,490 passed and
80 failed. Three failures were the cases fixed here; the remaining
failures are in unrelated Windows-sensitive Cloudflare credential,
child-process, X.509 timing, and mock-cleanup suites. This PR does not
weaken or skip those tests, and does not claim the full Windows unit
suite passes.

## Compatibility / Risk

Test-only change; no SDK runtime, declarations, generated code,
workflow, dependency, lockfile, or release behavior changes. The
fallback is used only when host `jq` is unavailable, accepts synthetic
fixture data only, and rejects unsupported expressions.

Duplicate search found no equivalent open PR. openai#2589 also edits this test
file for separate release-CI gate coverage, but does not make the
existing historical publisher fixture independent of a host `jq`
installation.

@markstuart-oai markstuart-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 both changed files and the underlying CI/release workflows. The coverage table matches the event conditions and publication dependencies. The tests reuse the workflow-owned Bash, isolate GitHub responses and credentials, and resolve the earlier undeclared jq dependency without adding a general-purpose parser. No substantive issues found.

Validation: all 11 release-publication tests passed on Node 24.19.0. Independent mutation checks caught removal of the publication dependency, release-SHA filter, and --exit-status flag. Pinned formatting/lint checks and git diff --check passed. No live release or publication was executed.

gh-actions-shared Bot pushed a commit to xf-qubit/openai-node that referenced this pull request Sep 5, 2026
## Summary

Serialize only the `release` job that updates the shared release-please
branch. Nearby main pushes currently run this job concurrently.

The observed failure is on actual main automation: [run
33946334884](https://github.com/openai/openai-node/actions/runs/33946334884)
failed updating the release branch to
`168584ab68eeed5d7710f3fe4652d3745e175430`, while [an overlapping
run](https://github.com/openai/openai-node/actions/runs/33946334127)
successfully applied that exact commit 89 milliseconds earlier. A
successful sibling subsequently updated the existing release PR with the
same intended contents; no recovery or publication action is needed for
the historical failure.

Add a stable, per-ref concurrency group to `jobs.release`, with
`cancel-in-progress: false` and `queue: max`. This prevents these jobs
from writing the release branch concurrently without cancelling an
active update. Unlike the default single pending slot, `queue: max`
retains up to 100 pending jobs. See [GitHub's concurrency
rules](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency).

PR version validation, downstream release CI/build checks, and the
existing per-release-SHA npm publication lock remain independent. Token
creation stays inside the scheduled release job. No triggers,
permissions, action pins, release content, or publication safeguards
change.

## Verification

**CI update at `71f3c0c`:** all 38 repository checks are terminal (22
successful, 16 skipped), with no failures. [Full
CI](https://github.com/openai/openai-node/actions/runs/33946893551)
passes 7,635 unit tests and 556 generated tests on each Node 22/24/26
run, including the new concurrency regressions. Packed-package checks,
the exact Node 22.0.0 consumer, pinned formatting/linting, and both
14-project ecosystem runs pass. [External
OkTest](https://github.com/openai/ok-test/actions/runs/33946903576)
passes all 237 tests across 42 suites and completes all three jobs
against the exact base/head merge.

The [normal Create releases PR
run](https://github.com/openai/openai-node/actions/runs/33946902724)
accepts this exact changed workflow and skips all seven jobs as
intended, without executing release steps. An automated unsupported-key
finding is [answered with GitHub's May 7, 2026 announcement, immutable
job-level schema, and native-run
evidence](openai#2631 (comment));
it does not require removing the supported `queue` key. Both automated
reviews completed, and a maintainer approved this exact head.

- The new regression fails on unchanged main because the release job has
no concurrency policy; it passes with this change.
- Canonical `./scripts/test tests/release-concurrency-workflow.test.ts
tests/release-publish-workflow.test.ts
tests/node-matrix-workflow.test.ts`: all 9 tests pass on Node 24.19.0.
Local execution used the existing Vitest 4.1.10 installation; repository
CI pins 4.1.11.
- Mutation checks fail as expected for a single pending slot, active-job
cancellation, a per-run group, and workflow-wide locking. The exact
final workflow was restored and the passing suite repeated afterward.
- Parsing the complete workflow as YAML and removing only
`jobs.release.concurrency` produces the same object as main: all other
workflow configuration is unchanged.
- TypeScript 6.0.3 no-emit checking, pinned Oxfmt 0.62.0 on both files,
pinned Oxlint 1.79.0 on the test, and `git diff --check` pass.
- Repeated adversarial review covered cancellation, queue scope, token
lifetime, dependency cycles, PR validation, publication isolation, and
the final regression tests. No further changes were required.

These are configuration/artifact checks, not a simulation or manual
rerun of GitHub's scheduler. No releases, live API calls, or workflow
reruns were initiated for verification.

## Scope and limits

The production change is four YAML lines, plus one small regression
file. Both files are wholly handwritten and absent from the verified
pure-generated snapshot. No SDK code, dependencies, lockfiles,
generation metadata, or custom-code policy changes.

This lock covers this job's future runs, not other branch writers or
already-running workflows using the old definition. GitHub's queue is
bounded at 100 pending jobs and does not guarantee push-SHA order. The
existing `target-branch: main` behavior is unchanged.

Existing PR openai#2589 covers publication CI-gate tests and documentation,
not release-please serialization; this change uses a separate test file
and does not overlap its files.
@HAYDEN-OAI HAYDEN-OAI closed this Sep 9, 2026
@HAYDEN-OAI HAYDEN-OAI reopened this Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

@jbeckwith-oai The fixture now evaluates both queries directly in Node, with a failing jq sentinel guarding against regressions. I re-ran ./scripts/test tests/release-publish-workflow.test.ts on the current head (bc8e2148994ec56b5fba74f05d84c5e369af6cd3): all 11 tests pass on Node 24. The inline thread is resolved. Could you re-review and update your blocking review?

@jbeckwith-oai jbeckwith-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.

Re-reviewed the exact current head. The prior blocker is resolved: the synthetic gh fixture evaluates the two fixed --jq expressions in Node and puts a failing jq sentinel first on PATH, so the focused test cannot silently depend on a host jq. I also checked the release-gate scenarios, immutable-SHA selection/watch behavior, publication dependency assertions, and CI-policy table against the current workflows. Locally, the frozen install, git diff --check, all 11 focused release-workflow tests on Node 24, lint, and TypeScript checking passed. The prior thread is resolved and exact-head CI, CodeQL, and Castiron are green. No blocking findings.

@HAYDEN-OAI
HAYDEN-OAI added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 1cbea9c Sep 16, 2026
38 checks passed
@HAYDEN-OAI
HAYDEN-OAI deleted the codex/issue-2509-ci-policy branch September 16, 2026 17:37
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.

Audit CI coverage: main-only examples failures should block releases

4 participants