Skip to content

Judge the records covering one cell together, by kind and by line - #7254

Merged
Koudai Aono (koxudaxi) merged 1 commit into
mainfrom
records-compose-covering
Nov 20, 2026
Merged

Koudai Aono (koxudaxi) merged 1 commit into
mainfrom
records-compose-covering

Conversation

@koxudaxi

@koxudaxi Koudai Aono (koxudaxi) commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Behavior Updates

    • Decision records are considered together, and every changed line must be selected by a covering decision.
    • Output and notice records can coexist with differences addressed by other records. Differences not covered by records, along with output and exit-status conditions, are assessed according to the documented rules.
    • The documented handling of unprovable cells, timeouts, memory limits, and inconsistent second-run results is clarified.
  • Documentation

    • Updated contribution guidance to explain record coverage and decision selection rules.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T18:46:56.173898Z e370a7c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The classifier now allows output-text and notice records to admit differences covered by other records. It combines selectors from covering decision records and checks each change line. Documentation and judge tests describe and exercise these rules.

Changes: Behavior judgment

Layer / File(s) Summary
Record evidence rules
scripts/_behaviour_classify.py, docs/development-contributing.md
Output-text and notice records can admit differences covered by other records. The documentation describes the requirements for differences without such coverage.
Decision selector aggregation
scripts/_behaviour_classify.py, docs/development-contributing.md, tests/test_behaviour_diff_script.py, tests/test_behaviour_diff_script.refs
The judge combines selectors from covering decision records and checks that every change line is selected. Documentation and test cases cover combined records and multiple decision selectors.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to e370a

This change updates how the behaviour classifier combines decision records and checks change lines, with matching documentation and tests. No concrete merge-blocking problem was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: records that cover one cell are now judged together, by kind and by line. The raw summary describes this change, including the judge logic, the DECISIONS constant, an…
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.
Full details: Title check

Explanation

The title states the main change: records that cover one cell are now judged together, by kind and by line. The raw summary describes this change, including the judge logic, the DECISIONS constant, and the per-line selector matching. The title is specific and matches the changeset. The PR objectives add no contradicting intent.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 89c221b and e370a7c.

Files ignored due to path filters: 9

  • docs/data/migration/unreleased/records-compose-covering.toml is excluded by none and included by none
  • tests/data/expected/behaviour_diff_script/judge[a decision and a notice, a warning line only the notice selects].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[api for a removed option it does not name].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[notice on an exit difference too].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[output-text and notice on a text change with a warning and an exit difference].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[output-text and notice on a text change with a warning].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[two decisions and a line neither selects].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[two decisions of one category, each line selected by one].txt is excluded by !tests/data/**/*.txt and included by none
  • tests/data/expected/behaviour_diff_script/judge[two decisions, each line selected by one].txt is excluded by !tests/data/**/*.txt and included by none
Files selected for processing: 4

  • docs/development-contributing.md
  • scripts/_behaviour_classify.py
  • tests/test_behaviour_diff_script.py
  • tests/test_behaviour_diff_script.refs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

@codspeed

codspeed Bot commented Nov 20, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 49.42%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 53 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

❌ 53 regressed benchmarks
⏩ 98 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_perf_client_calls[sync] 18.4 ms 44.8 ms -58.85%
❌ test_perf_client_calls[async] 20.1 ms 48.5 ms -58.54%
❌ test_perf_load_pyproject_config[mapping-multiple] 134.2 µs 294.6 µs -54.45%
❌ test_perf_load_pyproject_config[config-multiple] 135.5 µs 296.6 µs -54.33%
❌ test_perf_load_pyproject_config[mapping-None] 128.4 µs 279.7 µs -54.09%
❌ test_perf_load_pyproject_config[config-None] 127 µs 275 µs -53.82%
❌ test_perf_simple_msgspec_unset_field_rendering 294 ms 615 ms -52.19%
❌ test_perf_scalar_root_collapsed_builtin 124.6 ms 259.2 ms -51.92%
❌ test_perf_unique_items_schema_validators 206.7 ms 429.3 ms -51.84%
❌ test_perf_complex_refs 1.1 s 2.3 s -51.74%
❌ test_perf_unique_items_collapsed_builtin 162.7 ms 334.4 ms -51.33%
❌ test_perf_pydantic_field_name_resolution 1.3 ms 2.6 ms -51.26%
❌ test_perf_graphql_style_pydantic_v2 447 ms 915.8 ms -51.19%
❌ test_perf_large_models_typed_dict[legacy-requiredness] 690.9 ms 1,415 ms -51.17%
❌ test_perf_large_models_pydantic_v2_noformat 839.7 ms 1,718.2 ms -51.13%
❌ test_perf_large_models_dataclass_builtin 806.7 ms 1,645.9 ms -50.99%
❌ test_perf_mapped_reference_users 437.1 ms 890.9 ms -50.94%
❌ test_perf_all_options_enabled 3.3 s 6.7 s -50.92%
❌ test_perf_duplicate_names 561.3 ms 1,135.9 ms -50.58%
❌ test_perf_kubernetes_style_pydantic_v2 1.4 s 2.8 s -50.5%
... ... ... ... ...

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

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing records-compose-covering (e370a7c) with main (89c221b)

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

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@koxudaxi
Koudai Aono (koxudaxi) merged commit 606f2d6 into main Nov 20, 2026
116 of 117 checks passed
@koxudaxi
Koudai Aono (koxudaxi) deleted the records-compose-covering branch November 20, 2026 19:06
@github-actions

Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: The PR only touches the internal behaviour diff gate harness: scripts/_behaviour_classify.py now judges covering default-fix and decided-change records together and drops the per-record equality checks in output-text and notice evidence, alongside contributor documentation, a harness-category migration record, test cases and expected judge oracle files. No file in the datamodel_code_generator package, its templates, CLI options, Python API, defaults, error handling or supported Python versions changes, and the behaviour diff lists only both-fail cells with no accepted or violation cells, so generated output is unaffected.


This analysis was produced by the release draft workflow

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Released in 0.100.0

This PR is now available in the latest release. See the release notes for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant