Skip to content

test: make release publisher fixture portable without jq - #2619

Merged
HAYDEN-OAI merged 1 commit into
openai:mainfrom
huanglianggit:fix/windows-release-publisher-jq-fixture
Sep 5, 2026
Merged

HAYDEN-OAI merged 1 commit into
openai:mainfrom
huanglianggit:fix/windows-release-publisher-jq-fixture

Conversation

@huanglianggit

Copy link
Copy Markdown
Contributor

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:

./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. #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.

@huanglianggit
huanglianggit requested a review from a team as a code owner September 5, 2026 01:23

@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 commit 436fa0c. No substantive findings. The fixture-local jq fallback matches the expressions, flags, inputs, and exit statuses used by the publisher scripts. Static review only; Windows execution was not independently verified.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

32 mixed files remain; 0 existing customizations changed.

Compared ef39397e33c5 → 436fa0c33d69. 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 33938634988 --repo openai/openai-node \
  --name castiron-custom-code-33938634988-1 --dir /tmp/castiron-custom-code-33938634988-1
git apply --stat /tmp/castiron-custom-code-33938634988-1/custom-code.patch
cat /tmp/castiron-custom-code-33938634988-1/custom-code.patch

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

git fetch --no-tags origin ef39397e33c5f39ab35d106d20c7f7fdf7299e16 436fa0c33d6958335965d359d29267141097be30
python3 scripts/castiron/custom_code_report.py report \
  --base ef39397e33c5f39ab35d106d20c7f7fdf7299e16 \
  --head 436fa0c33d6958335965d359d29267141097be30 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-436fa0c33d69
cat /tmp/castiron-custom-code-436fa0c33d69/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 5, 2026
Merged via the queue into openai:main with commit ab58837 Sep 5, 2026
24 checks passed
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.

2 participants