Skip to content

fix(python): deduplicate stream condition properties in discriminated union variants#14874

Merged
jsklan merged 20 commits intomainfrom
jsklan/fix-streaming-parsing
Apr 10, 2026
Merged

fix(python): deduplicate stream condition properties in discriminated union variants#14874
jsklan merged 20 commits intomainfrom
jsklan/fix-streaming-parsing

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Apr 10, 2026

Description

Linear ticket: Closes FER-9556

When x-fern-streaming with stream-condition is used on an endpoint whose request body is a discriminated union (oneOf) with variants that inherit the stream condition field from a shared base schema via allOf, the stream condition property (stream_response) appeared twice in generated Python code — once from the union's base properties (pinned as Literal[True/False]) and once from the variant's extended properties (as boolean). This caused SyntaxError: Duplicate keyword argument "stream_response" in both generated wire tests and pydantic model definitions.

Changes Made

Three independent code paths needed fixes:

  1. generators/python-v2/dynamic-snippets/src/context/DynamicTypeLiteralMapper.ts — In convertDiscriminatedUnionProperties, when building constructor arguments for samePropertiesAsObject variants, filter out objectEntries whose name already appears in baseFields. This fixes duplicate kwargs in generated wire tests and dynamic snippets.

  2. generators/python/src/.../simple_discriminated_union_generator.py — When iterating variant properties for samePropertiesAsObject variants, skip properties whose wire_value matches any union base property. Follows the existing pattern of skipping the discriminant field.

  3. generators/python-v2/sdk/src/wire-tests/WireTestGenerator.ts — When wrapping streaming endpoint API calls in for _ in ...: loops, the AST was converted to string via toString(), which discarded import references (e.g. discriminated union variant types). Now the references from the original apiCallAst are explicitly transferred to the wrapping codeBlock node. This applies to both normal streaming loops and pytest.raises error-response streaming loops.

  4. generators/python/sdk/versions.yml — Added v5.3.10 changelog entry.

  5. packages/cli/fern-definition/ir-to-jsonschema/ — Updated snapshots for new types introduced by the augmented server-sent-events-openapi test fixture (13 new snapshot files).

  6. seed/python-sdk/server-sent-events-openapi/ — Updated seed snapshots reflecting the new union endpoints and their generated code.

  7. seed/go-sdk/seed.yml — Added server-sent-events-openapi:with-wire-tests to allowed failures (go-sdk doesn't handle the augmented fixture yet).

Additional fixes (validated against Vectara customer fixture):

  1. generators/python/src/.../docstring.pyescape_docstring() now also escapes triple quotes (""") in addition to backslashes. OpenAPI descriptions containing Python code examples with triple-quoted strings (e.g., Vectara's code field) caused premature docstring termination and ruff SyntaxError in generated code.

  2. generators/python/src/.../sdk_generator.py — When generating the exported client wrapper class (used when exported_filename differs from the raw client filename), the super().__init__() call now includes # type: ignore[call-overload, misc] when the base class has overloaded __init__ signatures (e.g., OAuth + bearer token auth). Previously, mypy would reject the call because the wrapper passes all parameters from the implementation signature, which doesn't match any single overload. Uses explicit is not None check for mypy type narrowing on root_client.init_parameters.

  3. seed/python-sdk/examples/client-filename/src/seed/client.py — Updated seed snapshot reflecting the type ignore comment in the exported wrapper.

  4. packages/commons/mock-utils/index.ts — WireMock body patterns for SSE streaming endpoints now use the actual stream condition property name extracted from the endpoint's example request body, instead of hardcoding stream. A new findStreamConditionProperty method inspects the SSE endpoint's example to find the boolean property set to true. Falls back to "stream" if the property cannot be determined. This fixes WireMock stub routing for APIs like Vectara that use stream_response as the stream condition field.

  5. packages/cli/generation/ir-generator-tests/ — Regenerated IR and dynamic-snippets test snapshots for server-sent-events-openapi.json to reflect the new union streaming endpoints added to the test fixture.

Testing

  • pnpm seed test --generator python-sdk --fixture server-sent-events-openapi --skip-scripts passes (previously failed with SyntaxError: Duplicate keyword argument)
  • pnpm seed test --generator python-sdk --fixture examples --skip-scripts — all 6 test cases pass
  • pnpm seed run --generator python-sdk --path <vectara-fixture>/fern — generation succeeds, mypy passes, and all 5 SSE streaming wire tests now pass (previously failed with SSEError: Expected response header Content-Type to contain 'text/event-stream', got 'application/json' due to WireMock stub mismatch)
  • pnpm tsx scripts/debug-sse-pipeline.ts — all 3 pipeline stages (openapi-ir, write-definition, ir) pass
  • pnpm run check (biome) passes
  • pnpm format clean
  • poetry run pre-commit run -a in generators/python/ passes
  • ir-to-jsonschema snapshot tests pass after update
  • IR generator test snapshots regenerated and committed
  • Generated wire test file now imports both StreamXFernStreamingUnionRequest_Message and StreamXFernStreamingUnionStreamRequest_Message
  • Full CI suite green (261 checks passing)

Note: 8 wire test failures remain in the Vectara fixture for test_agents.py (agent CRUD operations). These are pre-existing issues with the Vectara API fixture's agent endpoint stubs, not related to any changes in this PR.

Review Checklist

  • The TS fix (DynamicTypeLiteralMapper.ts) deduplicates by Python property name, while the Python fix (simple_discriminated_union_generator.py) deduplicates by wire_value. These should be equivalent for the same properties, but worth verifying this assumption holds in edge cases where Python naming transforms differ from wire names.
  • The deduplication only applies to samePropertiesAsObject variants. Other variant types (singleProperty, noProperties) spread baseFields but don't add object properties, so no risk there.
  • WireTestGenerator reference transfer: The fix in WireTestGenerator.ts applies to all streaming endpoints (not just the new union ones). Verify via CI that existing streaming endpoint wire tests still generate correctly — any regressions would show up as snapshot diffs in other seed fixtures.
  • The apiCallAst.getReferences()block.addReference(ref) pattern is applied in 3 places (streaming loop, error+streaming, error+non-streaming). For non-streaming non-error cases, the AST node is pushed directly so references are preserved naturally. Confirm all code paths are covered.
  • Triple-quote escaping: escape_docstring() replaces """ with \""" after backslash escaping. Verify this produces valid Python in edge cases (e.g., descriptions ending with a quote character adjacent to the closing docstring).
  • Type ignore breadth: # type: ignore[call-overload, misc] suppresses two mypy error codes. The misc code is needed because mypy emits "Not all union combinations were tried" for complex overloaded signatures. Confirm this doesn't mask real type errors in the exported wrapper.
  • findStreamConditionProperty heuristic (mock-utils): The method finds the stream condition by looking for the first boolean property set to true in the SSE endpoint's example request body. This could theoretically match a wrong property if there are other boolean fields set to true, though in practice the stream condition is typically the only one pinned to true by the importer. Existing server-sent-events-openapi fixture snapshots are unchanged because the fixture uses stream (which matches the old default), so the stream_response codepath is only validated via the manual Vectara fixture run.
  • Seed snapshot changes in seed/python-sdk/server-sent-events-openapi/ and seed/python-sdk/examples/client-filename/ look correct.

Link to Devin session: https://app.devin.ai/sessions/93b20e99d0ee4097b021a8a2cb1d3cd0
Requested by: @jsklan


Open with Devin

jsklan and others added 4 commits April 9, 2026 18:37
…reaming test cases

Add endpoints 8-14 covering x-fern-streaming extension patterns that have
been the source of multiple regressions:

- Endpoint 8: basic stream-condition with $ref request body (#13568)
- Endpoint 9: stream-condition with x-fern-type-name (#14256)
- Endpoints 10-11: shared request schema across streaming/non-streaming (#14291)
- Endpoint 12: discriminated union request with allOf-inherited stream
  condition field, reproducing the Vectara regression (FER-9556, #14730)
- Endpoint 13: nullable stream condition field (#13605)
- Endpoint 14: x-fern-streaming with SSE format only (no stream-condition)
Runs the locally-built Fern CLI against the server-sent-events-openapi
fixture through each transformation stage (openapi-ir, write-definition,
ir), collecting outputs in .local/results/ for inspection. Continues
past failures so all stages produce output even when earlier ones error.

Usage: pnpm tsx scripts/debug-sse-pipeline.ts
Endpoint 9's ChatCompletionRequest name collision blocks IR generation
for the entire fixture. Comment it out so the remaining endpoints can
be tested end-to-end. Uncomment when investigating the x-fern-type-name
disambiguation fix (PR #14256) in isolation.
…ariants

When a discriminated union's variants inherit the stream condition field
from a base schema via extends, the property appeared twice in generated
Python code — once from the union's base properties (pinned as a literal)
and once from the variant's extended properties (as boolean). This caused
SyntaxError: Duplicate keyword argument in generated wire tests and
pydantic model definitions.

Two fixes:
1. DynamicTypeLiteralMapper.ts: filter objectEntries that overlap with
   baseFields when building samePropertiesAsObject variant constructor args
2. simple_discriminated_union_generator.py: skip variant properties whose
   wire_value matches any union base property

Fixes FER-9556

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-09T04:46:50Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 95s 138s 84s -11s (-11.6%)
go-sdk square 107s 134s 105s -2s (-1.9%)
java-sdk square 290s 346s 159s -131s (-45.2%)
php-sdk square 85s 119s 87s +2s (+2.4%)
python-sdk square 130s 166s 125s -5s (-3.8%)
ruby-sdk-v2 square 115s 153s 115s +0s (+0.0%)
rust-sdk square 93s 95s 95s +2s (+2.2%)
swift-sdk square 104s 448s 103s -1s (-1.0%)
ts-sdk square 98s 134s 99s +1s (+1.0%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-09T04:46:50Z). Trigger benchmark-baseline to refresh.

…pi fixture

Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-09T04:46:50Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 95s 138s 92s -3s (-3.2%)
go-sdk square 107s 134s 103s -4s (-3.7%)
java-sdk square 290s 346s 152s -138s (-47.6%)
php-sdk square 85s 119s 85s +0s (+0.0%)
python-sdk square 130s 166s 127s -3s (-2.3%)
ruby-sdk-v2 square 115s 153s 114s -1s (-0.9%)
rust-sdk square 93s 95s 90s -3s (-3.2%)
swift-sdk square 104s 448s 98s -6s (-5.8%)
ts-sdk square 98s 134s 96s -2s (-2.0%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-09T04:46:50Z). Trigger benchmark-baseline to refresh.

Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-09T04:46:50Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 95s 138s 87s -8s (-8.4%)
go-sdk square 107s 134s 107s +0s (+0.0%)
java-sdk square 290s 346s 152s -138s (-47.6%)
php-sdk square 85s 119s 85s +0s (+0.0%)
python-sdk square 130s 166s 124s -6s (-4.6%)
ruby-sdk-v2 square 115s 153s 113s -2s (-1.7%)
rust-sdk square 93s 95s 92s -1s (-1.1%)
swift-sdk square 104s 448s 101s -3s (-2.9%)
ts-sdk square 98s 134s 101s +3s (+3.1%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-09T04:46:50Z). Trigger benchmark-baseline to refresh.

devin-ai-integration bot and others added 2 commits April 10, 2026 03:20
…ests

Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-09T04:46:50Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 95s 138s 90s -5s (-5.3%)
go-sdk square 107s 134s 104s -3s (-2.8%)
java-sdk square 290s 346s 160s -130s (-44.8%)
php-sdk square 85s 119s 85s +0s (+0.0%)
python-sdk square 130s 166s 129s -1s (-0.8%)
ruby-sdk-v2 square 115s 153s 116s +1s (+0.9%)
rust-sdk square 93s 95s 92s -1s (-1.1%)
swift-sdk square 104s 448s 98s -6s (-5.8%)
ts-sdk square 98s 134s 99s +1s (+1.0%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-09T04:46:50Z). Trigger benchmark-baseline to refresh.

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

…rors in exported client wrapper

Co-Authored-By: judah <jsklan.development@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

13 similar comments
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

4 similar comments
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

Co-Authored-By: judah <jsklan.development@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 92s -8s (-8.0%)
go-sdk square 104s 137s 105s +1s (+1.0%)
java-sdk square 157s 191s 168s +11s (+7.0%)
php-sdk square 86s 122s 91s +5s (+5.8%)
python-sdk square 124s 167s 127s +3s (+2.4%)
ruby-sdk-v2 square 120s 152s 115s -5s (-4.2%)
rust-sdk square 92s 94s 93s +1s (+1.1%)
swift-sdk square 105s 476s 103s -2s (-1.9%)
ts-sdk square 102s 129s 97s -5s (-4.9%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

Co-Authored-By: judah <jsklan.development@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 86s -14s (-14.0%)
go-sdk square 104s 137s 102s -2s (-1.9%)
java-sdk square 157s 191s 157s +0s (+0.0%)
php-sdk square 86s 122s 85s -1s (-1.2%)
python-sdk square 124s 167s 154s +30s (+24.2%)
ruby-sdk-v2 square 120s 152s 113s -7s (-5.8%)
rust-sdk square 92s 94s 93s +1s (+1.1%)
swift-sdk square 105s 476s 101s -4s (-3.8%)
ts-sdk square 102s 129s 97s -5s (-4.9%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

devin-ai-integration bot and others added 2 commits April 10, 2026 16:21
Instead of hardcoding 'stream' in the matchesJsonPath body pattern,
extract the actual stream condition property name from the SSE endpoint's
example request body. This fixes WireMock stub routing for APIs that use
a different property name (e.g. 'stream_response' in the Vectara API).

Co-Authored-By: judah <jsklan.development@gmail.com>
Co-Authored-By: judah <jsklan.development@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 87s -13s (-13.0%)
go-sdk square 104s 137s 85s -19s (-18.3%)
java-sdk square 157s 191s 161s +4s (+2.5%)
php-sdk square 86s 122s 87s +1s (+1.2%)
python-sdk square 124s 167s 129s +5s (+4.0%)
ruby-sdk-v2 square 120s 152s 114s -6s (-5.0%)
rust-sdk square 92s 94s 91s -1s (-1.1%)
swift-sdk square 105s 476s 102s -3s (-2.9%)
ts-sdk square 102s 129s 100s -2s (-2.0%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

devin-ai-integration bot and others added 2 commits April 10, 2026 16:48
…pshots

Co-Authored-By: judah <jsklan.development@gmail.com>
Co-Authored-By: judah <jsklan.development@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 92s -8s (-8.0%)
go-sdk square 104s 137s 103s -1s (-1.0%)
java-sdk square 157s 191s 158s +1s (+0.6%)
php-sdk square 86s 122s 85s -1s (-1.2%)
python-sdk square 124s 167s 127s +3s (+2.4%)
ruby-sdk-v2 square 120s 152s 114s -6s (-5.0%)
rust-sdk square 92s 94s 92s +0s (+0.0%)
swift-sdk square 105s 476s 100s -5s (-4.8%)
ts-sdk square 102s 129s 107s +5s (+4.9%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 85s -15s (-15.0%)
go-sdk square 104s 137s 100s -4s (-3.8%)
java-sdk square 157s 191s 172s +15s (+9.6%)
php-sdk square 86s 122s 86s +0s (+0.0%)
python-sdk square 124s 167s 125s +1s (+0.8%)
ruby-sdk-v2 square 120s 152s 115s -5s (-4.2%)
rust-sdk square 92s 94s 94s +2s (+2.2%)
swift-sdk square 105s 476s 81s -24s (-22.9%)
ts-sdk square 102s 129s 96s -6s (-5.9%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

… exported client wrapper

Mirror the base client's @overload signatures on the wrapper class and
use **kwargs pass-through for super().__init__(), so mypy is satisfied
without suppressing the error.
@jsklan jsklan enabled auto-merge (squash) April 10, 2026 20:29
devin-ai-integration[bot]

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 85s -15s (-15.0%)
go-sdk square 104s 137s 104s +0s (+0.0%)
java-sdk square 157s 191s 172s +15s (+9.6%)
php-sdk square 86s 122s 84s -2s (-2.3%)
python-sdk square 124s 167s 124s +0s (+0.0%)
ruby-sdk-v2 square 120s 152s 115s -5s (-4.2%)
rust-sdk square 92s 94s 92s +0s (+0.0%)
swift-sdk square 105s 476s 79s -26s (-24.8%)
ts-sdk square 102s 129s 98s -4s (-3.9%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

jsklan and others added 2 commits April 10, 2026 16:43
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-10T04:56:48Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 100s 135s 90s -10s (-10.0%)
go-sdk square 104s 137s 103s -1s (-1.0%)
java-sdk square 157s 191s 157s +0s (+0.0%)
php-sdk square 86s 122s 83s -3s (-3.5%)
python-sdk square 124s 167s 123s -1s (-0.8%)
ruby-sdk-v2 square 120s 152s 117s -3s (-2.5%)
rust-sdk square 92s 94s 92s +0s (+0.0%)
swift-sdk square 105s 476s 78s -27s (-25.7%)
ts-sdk square 102s 129s 96s -6s (-5.9%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-10T04:56:48Z). Trigger benchmark-baseline to refresh.

@jsklan jsklan merged commit 320f126 into main Apr 10, 2026
276 checks passed
@jsklan jsklan deleted the jsklan/fix-streaming-parsing branch April 10, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants