Skip to content

Harden runtime edge cases - #3844

Merged
koxudaxi merged 4 commits into
fix/api-schema-semanticsfrom
fix/runtime-edge-cases
Sep 4, 2026
Merged

Harden runtime edge cases#3844
koxudaxi merged 4 commits into
fix/api-schema-semanticsfrom
fix/runtime-edge-cases

Conversation

@koxudaxi

@koxudaxi koxudaxi commented Sep 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c8d34e70-14b3-40d9-bd47-e14224f1670e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@koxudaxi koxudaxi changed the title fix/runtime edge cases Harden runtime edge cases Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

📚 Docs Preview: https://pr-3844.datamodel-code-generator.pages.dev

@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from bcb0006 to 2315876 Compare September 2, 2026 05:59
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 2315876 to 75dae8a Compare September 2, 2026 06:01
@codspeed-hq

codspeed-hq Bot commented Sep 2, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 15.42%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 23 improved benchmarks
✅ 15 untouched benchmarks
⏩ 98 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
test_perf_large_models_single_module_stdout 720.4 ms 591.5 ms +21.81%
test_perf_large_models_typed_dict[total-false-requiredness] 519.9 ms 427.6 ms +21.57%
test_perf_ordinary_array_constraint_generation 1,031.8 ms 858.3 ms +20.21%
test_perf_large_models_pydantic_v2_noformat 618.5 ms 516.8 ms +19.68%
test_perf_large_models_typed_dict[legacy-requiredness] 507.8 ms 426.4 ms +19.1%
test_perf_large_models_pydantic_v2_builtin 616.8 ms 523.5 ms +17.82%
test_perf_large_models_pydantic_v2_builtin_double_quotes 660.2 ms 568.9 ms +16.05%
test_perf_scalar_root_collapsed_builtin 91.4 ms 78.8 ms +15.99%
test_perf_local_reference_file_resolution 61.9 ms 53.6 ms +15.52%
test_perf_inherited_required_fields[partial-base-first] 631.9 ms 547 ms +15.51%
test_perf_extreme_large_schema 13.9 s 12.1 s +14.8%
test_perf_all_options_enabled 4.9 s 4.3 s +14.71%
test_perf_inherited_required_fields[partial-derived-first] 648.4 ms 567.5 ms +14.26%
test_perf_duplicate_names 912.7 ms 799.3 ms +14.19%
test_perf_openapi_large_pydantic_v2_builtin 615.3 ms 541.4 ms +13.66%
test_perf_complex_refs 1.8 s 1.5 s +13.63%
test_perf_deep_nested 4.6 s 4.1 s +13.4%
test_perf_false_reference_validation 99.5 ms 88 ms +13.1%
test_perf_large_models_pydantic_v2 3.2 s 2.8 s +13.07%
test_perf_multiple_files_input 3 s 2.7 s +12.64%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/runtime-edge-cases (97916ec) with fix/api-schema-semantics (0703fed)

Open in CodSpeed

Footnotes

  1. 98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 75dae8a to 0cd967f Compare September 2, 2026 06:11
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 0cd967f to 433f3c9 Compare September 2, 2026 06:19
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 433f3c9 to 8fb77a9 Compare September 2, 2026 06:27
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch 2 times, most recently from 2689157 to c9bd756 Compare September 2, 2026 06:41
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from c9bd756 to 0c8fc1b Compare September 2, 2026 06:49
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 0c8fc1b to 5178e6e Compare September 2, 2026 07:02
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0703fed) to head (97916ec).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           fix/api-schema-semantics     #3844   +/-   ##
==========================================================
  Coverage                    100.00%   100.00%           
==========================================================
  Files                           257       257           
  Lines                         59347     59360   +13     
  Branches                       6558      6560    +2     
==========================================================
+ Hits                          59347     59360   +13     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 5178e6e to 8050bfe Compare September 2, 2026 07:31
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 8050bfe to 2c00dfd Compare September 2, 2026 07:36
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch 2 times, most recently from ad2af23 to 740f879 Compare September 2, 2026 09:06
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch 2 times, most recently from 7ef9da3 to 1cb1de0 Compare September 4, 2026 03:13
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 1cb1de0 to 0888535 Compare September 4, 2026 03:28
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 0888535 to e06f0a0 Compare September 4, 2026 03:44
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from e06f0a0 to f990f59 Compare September 4, 2026 03:47
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from f990f59 to 3861d27 Compare September 4, 2026 03:54
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 3861d27 to 0a88f3d Compare September 4, 2026 04:24
@koxudaxi
koxudaxi force-pushed the fix/runtime-edge-cases branch from 0a88f3d to 97916ec Compare September 4, 2026 04:44
@koxudaxi
koxudaxi merged commit 4f84405 into main Sep 4, 2026
67 checks passed
@koxudaxi
koxudaxi deleted the fix/runtime-edge-cases branch September 4, 2026 07:16
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.

1 participant