Skip to content

ci: reuse version-only test compilation and parallelize core test builds - #1154

Merged
dpiet-oai merged 6 commits into
mainfrom
codex/java-ci-compilation-cache-shards
Oct 9, 2026
Merged

dpiet-oai merged 6 commits into
mainfrom
codex/java-ci-compilation-cache-shards

Conversation

@dpiet-oai

@dpiet-oai dpiet-oai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Version-only releases invalidate Kotlin test compilation because the compiler fingerprints the versioned main JAR in its friend paths. Point test friend paths at the canonical main class directories so the existing Gradle compilation cache can reuse unchanged tests. Compile the independent beta and admin model tests separately and include their outputs in the existing test source set, preserving normal and Jackson test discovery. Run build-logic tests in parallel and require their success in the existing CI gate.

Prepare all core test classes before the release switches to GraalVM. Derive the optional compilation exclusions from the verified release checkout so retries of older SDKs without the new tasks still work. Release source verification, permissions, cache isolation and signing steps remain unchanged.

Validation:

  • A clean local version-only rebuild went from 5m12s to 51s; all six Kotlin test compilation tasks restored from cache.
  • The longest cold local core test compilation went from 3m45s to 2m24s. The beta and admin tasks took 1m41s and 42s.
  • All 4,993 baseline compiled core test classes were present once, without omissions or duplicates.
  • All 52 local build-logic tests passed. Local Kotlin/Java lint passed after the formatting fix.
  • Reran all 52 build-logic tests, including release/cache trust policies, after the release integration change.
  • Exercised the release task-discovery shell and GraalVM task graph on the PR source and an archived 4.78.1 checkout. Both reach the test task without compiling excluded Kotlin. Verified Dokka suppresses both model-test source sets.
  • GitHub CI on fc4bf8b passed: build, build logic, lint, full tests, Jackson and API compatibility, Java 8/25 runtime checks, version support, and the required gate. This run predates the release integration adjustment; see the PR checks for the final commit.

The local benchmark measures compilation on one toolchain. PR CI does not by itself establish the improvement for future main-branch cache seeds or merge queues. The release checks used Gradle task graphs, not an actual publication or native-image build.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 130684e8b0fb36829a886ca508f2f34ae95dcb2c.

✅ No new custom-code files detected.

102 mixed files remain; 0 existing customizations changed.

Compared 130684e8b0fb → 41be46e364c7. Generated baselines verified.

102 existing customizations unchanged
  • openai-java-core/src/main/kotlin/com/openai/models/audio/AudioResponseFormat.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuth.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthCreateParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthRotateParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInjectEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInjectFailedEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseStreamEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseToolSearchOutputItemParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesServerEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionMessageFunctionToolCall.kt
  • openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionToolMessageParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/conversations/ConversationCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt
  • openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/live/ResponseItemCreateEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseStreamEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseToolSearchOutputItemParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesServerEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/videos/Video.kt
  • openai-java-core/src/main/kotlin/com/openai/models/webhooks/UnwrapWebhookEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/webhooks/WebhookEndpointWithSecret.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/BetaServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/BetaServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/SkillServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/VideoServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/WebhookServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/WebhookServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncImpl.kt

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

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

git fetch --no-tags origin 130684e8b0fb36829a886ca508f2f34ae95dcb2c 41be46e364c7cbd9fcda0aef23d545e4cd90f5dc
python3 scripts/castiron/custom_code_report.py report \
  --base 130684e8b0fb36829a886ca508f2f34ae95dcb2c \
  --head 41be46e364c7cbd9fcda0aef23d545e4cd90f5dc --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-41be46e364c7
cat /tmp/castiron-custom-code-41be46e364c7/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

@dpiet-oai
dpiet-oai marked this pull request as ready for review October 8, 2026 20:01
@dpiet-oai
dpiet-oai requested a review from a team as a code owner October 8, 2026 20:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 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-10-08T22:58:46.983592Z be0c0b6 New commits
🔒 Security Review ✅ Completed 2026-10-08T22:58:51.062246Z be0c0b6 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 Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 16.584s for Java SDK PR #1154.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 317ms
tests/chat-completions-create.test.ts ✅ Passed 936ms
tests/chat-completions-stream.test.ts ✅ Passed 562ms
tests/files-content-binary.test.ts ✅ Passed 228ms
tests/files-create-multipart.test.ts ✅ Passed 342ms
tests/files-list-pagination.test.ts ✅ Passed 288ms
tests/initialize-config.test.ts ✅ Passed 180ms
tests/instance-isolation.test.ts ✅ Passed 177ms
tests/models-list.test.ts ✅ Passed 299ms
tests/responses-background-lifecycle.test.ts ✅ Passed 254ms
tests/responses-body-method-errors.test.ts ✅ Passed 513ms
tests/responses-cancel-timeout.test.ts ✅ Passed 194ms
tests/responses-cancel.test.ts ✅ Passed 294ms
tests/responses-compact-retries.test.ts ✅ Passed 352ms
tests/responses-compact.test.ts ✅ Passed 297ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 365ms
tests/responses-create-advanced.test.ts ✅ Passed 1.154s
tests/responses-create-disconnect.test.ts ✅ Passed 1.095s
tests/responses-create-errors.test.ts ✅ Passed 406ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 311ms
tests/responses-create-retries.test.ts ✅ Passed 229ms
tests/responses-create-stream-failures.test.ts ✅ Passed 1.254s
tests/responses-create-stream-timeout.test.ts ✅ Passed 220ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.15s
tests/responses-create-stream.test.ts ✅ Passed 331ms
tests/responses-create-terminal-states.test.ts ✅ Passed 330ms
tests/responses-create-timeout.test.ts ✅ Passed 189ms
tests/responses-create.test.ts ✅ Passed 218ms
tests/responses-delete.test.ts ✅ Passed 187ms
tests/responses-input-items-errors.test.ts ✅ Passed 267ms
tests/responses-input-items-list.test.ts ✅ Passed 299ms
tests/responses-input-items-options.test.ts ✅ Passed 263ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 323ms
tests/responses-input-tokens-count.test.ts ✅ Passed 258ms
tests/responses-malformed-inputs.test.ts ✅ Passed 5.099s
tests/responses-not-found-errors.test.ts ✅ Passed 362ms
tests/responses-parse.test.ts ✅ Passed 725ms
tests/responses-retrieve-retries.test.ts ✅ Passed 218ms
tests/responses-retrieve.test.ts ✅ Passed 368ms
tests/responses-stored-method-errors.test.ts ✅ Passed 1.159s
tests/retry-behavior.test.ts ✅ Passed 3.509s
tests/sdk-error-shape.test.ts ✅ Passed 470ms

View OkTest run #37859732722

SDK merge (2062a8331c07) · head (41be46e364c7) · base (130684e8b0fb) · OkTest (505ac0e34283)

@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 be0c0b6cb2b717530f743e5cf53a5d86ca05a3bb. One cache-input gap remains in the new GraalVM helper regression test; details are inline. Leaving this review without approval.

The split model-test outputs feed the existing normal and Jackson test paths. The release helper is copied from the pinned workflow revision, then runs against the verified release checkout. The existing release cache isolation and signing boundaries remain in place.

Validation: source review only; I did not run Gradle or publish a release. Current-head build, build-logic tests, lint, SDK tests, Jackson/API compatibility, Java 8/25 runtime checks, version-support checks, and the required CI gate passed. The reported compile-speed improvements and complete class inventory remain author-reported; CI does not establish future cache reuse or a native-image publication.

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

Re-reviewed 41be46e364c7cbd9fcda0aef23d545e4cd90f5dc. The missing cache input is fixed: buildSrc now registers the actual GraalVM helper script as a test input with relative path sensitivity. The rest of the previously reviewed change is unchanged. No further blocking findings.

Validation: source comparison and review of the task input, test, and helper paths. Hosted build, build-logic tests, lint, Jackson/API compatibility, Java 8/25 runtime, version-support, and Castiron checks passed. SDK tests and the required CI gate also passed. I did not run Gradle, verify a runtime cache hit, or publish a release; the compile-time benchmarks remain author-reported.

@dpiet-oai
dpiet-oai added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit e887c46 Oct 9, 2026
15 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.

3 participants