Skip to content

Release SDK updates - #12

Merged
vasanth-rb merged 9 commits into
mainfrom
stainless/release
Aug 7, 2026
Merged

Release SDK updates#12
vasanth-rb merged 9 commits into
mainfrom
stainless/release

Conversation

@autorender-bot

@autorender-bot autorender-bot commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

26e21db chore: rename autorenderhq -> autorender references (GitHub org rename) (#1)
a27e207 chore: sync openapi.json from northstar-server
d33ab7c reseal java custom-code
0f1ece4 Build SDK
2a609b9 fix: restore staging workflows in back-sync to prevent pipeline deletion

Summary by CodeRabbit

  • New Features
    • Added automatic and manual pagination for synchronous and asynchronous file listings.
    • Added configurable executors for asynchronous stream callbacks.
    • Upload-from-URL tags now support either a single string or a list of strings.
  • Improvements
    • File listing responses now provide page metadata and direct file records.
    • Updated documentation with pagination guidance, revised examples, and current project links.
  • Documentation
    • Added release notes for versions 0.1.0–0.1.2.
  • Maintenance
    • Updated publishing and release configuration for the current repository location.

vasanth-rb and others added 5 commits June 12, 2026 21:33
Stainless-Generated-From: 645840fdf56a1ada4215d45db46d8dda05db6d01
Stainless-Generated-From: ab3e58c4baead53d7e9649f14807c0f0cec6e162
Stainless-Generated-From: f5b4eaa887d14336ee8da2f5bc83fa3fbe418b06
…e) (#1)

Mechanical cleanup after the org rename autorenderhq -> autorender. Updates GitHub
org/repo references (URLs, workflow repo guards, uses:, package metadata, docs).
Intentionally left unchanged: SDK mount paths (autorenderhq-<lang>), Linear workspace
URL, Sentry org slug. No logic changed (string references only).

Co-authored-by: Geetha Karthick <geetha.karthick@seaant.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@autorender-bot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dc3be9f9-efaf-41a9-b7d5-5e15b32a353c

📥 Commits

Reviewing files that changed from the base of the PR and between 4229441 and 43e265f.

📒 Files selected for processing (47)
  • .github/workflows/publish-sonatype.yml
  • .github/workflows/release-doctor.yml
  • .github/workflows/release-please.yml
  • .github/workflows/stlc-promote.yml
  • .github/workflows/stlc-sync-from-production.yml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • autorender-java-client-okhttp/src/main/kotlin/io/autorender/client/okhttp/AutorenderOkHttpClient.kt
  • autorender-java-client-okhttp/src/main/kotlin/io/autorender/client/okhttp/AutorenderOkHttpClientAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/AutoPager.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/AutoPagerAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/Check.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/Page.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/PageAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageResponse.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListResponse.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParams.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/async/FileServiceAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/async/FileServiceAsyncImpl.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/blocking/FileService.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/blocking/FileServiceImpl.kt
  • autorender-java-core/src/test/kotlin/io/autorender/core/AutoPagerAsyncTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/core/AutoPagerTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileListPageResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileListResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileRenameResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileRetrieveResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/folders/FolderCreateResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/folders/FolderListResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/folders/FolderRenameResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/multipartuploads/MultipartUploadCompleteResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/multipartuploads/MultipartUploadStartResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParamsTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/ServiceParamsTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/async/FileServiceAsyncTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/async/UploadServiceAsyncTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/blocking/UploadServiceTest.kt
  • autorender-java-proguard-test/src/test/kotlin/io/autorender/proguard/ProGuardCompatibilityTest.kt
  • buildSrc/src/main/kotlin/autorender.publish.gradle.kts
  • scripts/mock
📝 Walkthrough

Walkthrough

The Java client adds synchronous and asynchronous pagination for file listings, configurable stream-handler executors, and a typed upload-tag union. File services, generated models, tests, documentation, workflows, publishing metadata, and mock specification data were updated.

Changes

Pagination and repository alignment

Layer / File(s) Summary
Pagination contracts and models
autorender-java-core/src/main/kotlin/io/autorender/core/*, autorender-java-core/src/main/kotlin/io/autorender/models/files/*
Added synchronous and asynchronous page contracts, page wrappers, paginated response models, and automatic traversal. FileListResponse now represents one file record.
File service pagination wiring
autorender-java-core/src/main/kotlin/io/autorender/services/...
Blocking and asynchronous file-listing APIs now return FileListPage or FileListPageAsync and parse FileListPageResponse.
Stream-handler executor configuration
autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt, autorender-java-client-okhttp/src/main/kotlin/io/autorender/client/okhttp/*
Added executor configuration, default executor creation, lifecycle management, and builder forwarding for asynchronous stream callbacks.
Upload tag union
autorender-java-core/src/main/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParams.kt
Changed upload tags to support string and string-list variants with typed builders, JSON handling, validation, and unknown-value preservation.
Pagination and model validation
autorender-java-core/src/test/*, autorender-java-proguard-test/src/test/*
Added pagination tests and updated model, service, upload-tag, fixture, and ProGuard compatibility tests.
Repository metadata and documentation
.github/workflows/*, README.md, CHANGELOG.md, CONTRIBUTING.md, buildSrc/*, scripts/mock
Updated repository links, release metadata, pagination examples, published SCM metadata, and the embedded OpenAPI specification. Deleted staging synchronization and promotion workflows.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • autorender/autorender-java#10: Removes the same staging synchronization and promotion workflows and overlaps with the generated model, test, and mock specification updates.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant FileServiceAsync
  participant FileListPageAsync
  participant AutoPagerAsync
  participant StreamHandlerExecutor
  Caller->>FileServiceAsync: list()
  FileServiceAsync-->>Caller: CompletableFuture<FileListPageAsync>
  Caller->>FileListPageAsync: autoPager()
  FileListPageAsync->>AutoPagerAsync: create pager
  AutoPagerAsync->>StreamHandlerExecutor: schedule page traversal
  StreamHandlerExecutor-->>AutoPagerAsync: deliver page items
  AutoPagerAsync->>FileListPageAsync: request next page
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.10% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is related to the SDK release but is too broad to identify the main changes, such as pagination updates and repository renaming. Use a specific title that identifies the primary SDK release changes, such as pagination support and the autorender repository rename.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch stainless/release
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stainless/release

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

stlc-bot and others added 2 commits August 7, 2026 03:56

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

Actionable comments posted: 6

🧹 Nitpick comments (2)
autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt (1)

37-39: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Keep parameterized file-list coverage.

The no-argument tests cannot detect dropped filters, sort options, or pagination values. Add a request assertion with non-default FileListParams. Verify that a subsequent page preserves every filter and changes only the page number.

  • autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt#L37-L39: add a parameterized list request test.
  • autorender-java-core/src/test/kotlin/io/autorender/services/async/FileServiceAsyncTest.kt#L38-L41: add the equivalent asynchronous request test.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt`
around lines 37 - 39, The blocking test at
autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt#L37-L39
and asynchronous test at
autorender-java-core/src/test/kotlin/io/autorender/services/async/FileServiceAsyncTest.kt#L38-L41
should add parameterized list-request coverage using non-default FileListParams.
Verify the initial request preserves every filter, sort option, and pagination
value, then verify a subsequent page preserves all parameters except the page
number.
autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParamsTest.kt (1)

19-19: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add coverage for the scalar tag variant.

The changed test covers only the list variant at Line [19], Line [34], and Line [46]. The upload-tag union also supports a scalar string variant. Add a separate body case for the scalar-string builder and assert the corresponding scalar Tags variant.

Also applies to: 34-34, 46-46

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParamsTest.kt`
at line 19, Add a separate test body case in the upload parameter test alongside
the existing tagsOfStrings cases, using the scalar-string tag builder and
asserting that serialization produces the corresponding scalar Tags variant.
Cover each affected request-body test path while preserving the existing
list-tag assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt`:
- Line 187: Update Builder.from and the streamHandlerExecutor handling in
ClientOptions so copied options do not share shutdown ownership with the source
options. Create an independent executor for copied options, or implement
reference-counted ownership that keeps the executor alive until the final
ClientOptions.close() call.
- Around line 50-57: Update AutoPagerAsync so the nextPage().thenCompose {
it.handle() } traversal and whenComplete completion callback are both dispatched
through ClientOptions.streamHandlerExecutor, ensuring handler.onNext and
handler.onComplete execute on the configured executor rather than HTTP or
completion threads. Preserve the existing paging and completion behavior while
using executor-backed asynchronous continuations for all stream-event work.

In
`@autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt`:
- Line 39: Configure Stainless pagination with the has_next_page property so
generated wrappers use FileListPageResponse.Meta.hasNext instead of inferring
continuation from item counts. Regenerate both affected files:
autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt:39-39
and
autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageAsync.kt:42-42;
do not hand-edit either generated wrapper.

In `@README.md`:
- Line 14: Update the Javadocs URL in the README to reference the current 0.1.2
release, or generate that version from the project’s release metadata instead of
hardcoding 0.0.1.
- Line 343: Update all three README examples where page-consuming lambdas call
page.autoPager().subscribe(...) to use CompletableFuture.thenAccept instead of
thenRun, preserving the existing callback bodies.

In `@scripts/mock`:
- Line 14: The embedded EMBEDDED_SPEC payload in scripts/mock is stale or
unsynchronized; regenerate it directly from the repository’s current
openapi.json and replace the existing payload, preserving the fallback behavior
when STAINLESS_OPENAPI_SPEC_URL is unset.

---

Nitpick comments:
In
`@autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParamsTest.kt`:
- Line 19: Add a separate test body case in the upload parameter test alongside
the existing tagsOfStrings cases, using the scalar-string tag builder and
asserting that serialization produces the corresponding scalar Tags variant.
Cover each affected request-body test path while preserving the existing
list-tag assertions.

In
`@autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt`:
- Around line 37-39: The blocking test at
autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt#L37-L39
and asynchronous test at
autorender-java-core/src/test/kotlin/io/autorender/services/async/FileServiceAsyncTest.kt#L38-L41
should add parameterized list-request coverage using non-default FileListParams.
Verify the initial request preserves every filter, sort option, and pagination
value, then verify a subsequent page preserves all parameters except the page
number.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d2074ee-a713-44b9-8847-b67b9e2b06fa

📥 Commits

Reviewing files that changed from the base of the PR and between 4229441 and 43e265f.

📒 Files selected for processing (47)
  • .github/workflows/publish-sonatype.yml
  • .github/workflows/release-doctor.yml
  • .github/workflows/release-please.yml
  • .github/workflows/stlc-promote.yml
  • .github/workflows/stlc-sync-from-production.yml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • autorender-java-client-okhttp/src/main/kotlin/io/autorender/client/okhttp/AutorenderOkHttpClient.kt
  • autorender-java-client-okhttp/src/main/kotlin/io/autorender/client/okhttp/AutorenderOkHttpClientAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/AutoPager.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/AutoPagerAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/Check.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/Page.kt
  • autorender-java-core/src/main/kotlin/io/autorender/core/PageAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageResponse.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListResponse.kt
  • autorender-java-core/src/main/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParams.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/async/FileServiceAsync.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/async/FileServiceAsyncImpl.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/blocking/FileService.kt
  • autorender-java-core/src/main/kotlin/io/autorender/services/blocking/FileServiceImpl.kt
  • autorender-java-core/src/test/kotlin/io/autorender/core/AutoPagerAsyncTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/core/AutoPagerTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileListPageResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileListResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileRenameResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/files/FileRetrieveResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/folders/FolderCreateResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/folders/FolderListResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/folders/FolderRenameResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/multipartuploads/MultipartUploadCompleteResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/multipartuploads/MultipartUploadStartResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlParamsTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateFromUrlResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/models/uploads/UploadCreateResponseTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/ServiceParamsTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/async/FileServiceAsyncTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/async/UploadServiceAsyncTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/blocking/FileServiceTest.kt
  • autorender-java-core/src/test/kotlin/io/autorender/services/blocking/UploadServiceTest.kt
  • autorender-java-proguard-test/src/test/kotlin/io/autorender/proguard/ProGuardCompatibilityTest.kt
  • buildSrc/src/main/kotlin/autorender.publish.gradle.kts
  • scripts/mock
💤 Files with no reviewable changes (3)
  • .github/workflows/stlc-promote.yml
  • autorender-java-core/src/test/kotlin/io/autorender/services/ServiceParamsTest.kt
  • .github/workflows/stlc-sync-from-production.yml

httpClient = clientOptions.originalHttpClient
checkJacksonVersionCompatibility = clientOptions.checkJacksonVersionCompatibility
jsonMapper = clientOptions.jsonMapper
streamHandlerExecutor = clientOptions.streamHandlerExecutor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

ast-grep outline autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt --items all
rg -n -C 5 'from\(clientOptions: ClientOptions\)|streamHandlerExecutor|fun close\(|toBuilder' \
  autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt
rg -n -C 5 'ClientOptions.*builder|toBuilder\(|streamHandlerExecutor|close\(' \
  autorender-java-core/src/test/kotlin

Repository: autorender/autorender-java

Length of output: 45084


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the relevant ClientOptions implementation sections and track copied executor references.
sed -n '24,145p' autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt
sed -n '182,190p' autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt
sed -n '458,543p' autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt

# Locate AsyncStreamResponse/Client subclasses that call close() and subscribe() on streamHandlerExecutor.
rg -n -C 4 'streamHandlerExecutor|executor|close\(\)|Cannot subscribe after|execute\(' autorender-java-core/src/main/kotlin -g '*.kt'

# Behavioral probe: simulate Builder.from copying an ExecutorService and ClientOptions.close calling shutdown,
# then a later asynchronous subscribe/task attempting execution the way AsyncStreamResponse does.
python3 - <<'PY'
import threading, time
from concurrent.futures import Future
print("No runtime source is executed; this probe only documents ExecutorService shutdown semantics from Java ExecutorService.shutdown().")
print("Relevant observed code shape:")
print("- build default: streamHandlerExecutor wraps Executors.newCachedThreadPool and ClientOptions close calls ExecutorService.shutdown().")
print("- Builder.from copies clientOptions.streamHandlerExecutor value without creating a new executor.")
print("- AsyncStreamResponse close may call shutdown() on the same streamHandlerExecutor in other code paths if that executor is shared.")
print("Observed code also uses a PhantomReachableExecutorService wrapper whose shutdown likely delegates to the wrapped executable.")
PY

Repository: autorender/autorender-java

Length of output: 50385


Do not share streamHandlerExecutor ownership between copied ClientOptions.

Builder.from copies the same default ExecutorService, and ClientOptions.close() shuts it down. When toBuilder().build() replaces a reachable original client, copying also closes the original executor. Use an independent executor for copied options, or use shared reference-counted ownership that only shuts down after the last owner closes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@autorender-java-core/src/main/kotlin/io/autorender/core/ClientOptions.kt` at
line 187, Update Builder.from and the streamHandlerExecutor handling in
ClientOptions so copied options do not share shutdown ownership with the source
options. Create an independent executor for copied options, or implement
reference-counted ownership that keeps the executor alive until the final
ClientOptions.close() call.


override fun items(): List<FileListResponse> = files()

override fun hasNextPage(): Boolean = items().isNotEmpty()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

Both page wrappers ignore meta.hasNext. The response model exposes FileListPageResponse.Meta.hasNext, but both generated wrappers infer continuation from the item count. The shared root cause is the Stainless pagination configuration, which does not declare a has_next_page property. Each full traversal therefore costs one extra request when the last page is full.

  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt#L39-L39: make hasNextPage() read meta.hasNext by declaring has_next_page in the Stainless pagination configuration and regenerating.
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageAsync.kt#L42-L42: the same regeneration fixes the asynchronous wrapper; do not hand-edit this generated file.
📍 Affects 2 files
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt#L39-L39 (this comment)
  • autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageAsync.kt#L42-L42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt`
at line 39, Configure Stainless pagination with the has_next_page property so
generated wrappers use FileListPageResponse.Meta.hasNext instead of inferring
continuation from item counts. Regenerate both affected files:
autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPage.kt:39-39
and
autorender-java-core/src/main/kotlin/io/autorender/models/files/FileListPageAsync.kt:42-42;
do not hand-edit either generated wrapper.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread scripts/mock Outdated
@vasanth-rb
vasanth-rb merged commit 79f266d into main Aug 7, 2026
11 checks passed
@vasanth-rb
vasanth-rb deleted the stainless/release branch August 7, 2026 05:05
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