Repository navigation
test: make release publisher fixture portable without jq - #2619
HAYDEN-OAI merged 1 commit into
Conversation
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
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.
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 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.patchOr 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.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
Problem
On a supported Windows contributor checkout without a host
jqbinary, the existing historical release-publisher cases intests/release-publish-workflow.test.tsfail before they exercise the captured publisher:jqis not a documented repository setup prerequisite. The test already supplies controllednpmandpnpmexecutables, but still depends on the host for JSON evaluation.Root cause
The fixture executes the real
bin/publish-npmandbin/check-npm-versionscripts. Those scripts invoke four smalljqexpressions, while the fixture does not providejqwhen it is absent from the contributor environment.Fix
Provide a fixture-local Node executable when
jq --versionis unavailable. It implements only the exact controlled expressions used by the captured publisher and fails on any unexpected expression. Environments with a realjqcontinue using it.Tests
Windows 11, Node 24.19.0, pnpm 11.5.1:
./scripts/test tests/release-publish-workflow.test.ts: 3 failed / 1 passed (jq: command not found)../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:unitrun 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
jqis 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
jqinstallation.