Skip to content

feat(rate-of-closure): land the variation slice of #4466 - #4520

Merged
dieterolson merged 4 commits into
mainfrom
feat/roc-variation-slice
Aug 17, 2026
Merged

feat(rate-of-closure): land the variation slice of #4466#4520
dieterolson merged 4 commits into
mainfrom
feat/roc-variation-slice

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

Fourth slice, after ground (#4517), flight (#4518) and club/plotting (#4519).

Adds 20 net-new modules: capability observation, Morris host/child adapters, regional ground variation + control surface, scalar ensemble contract/IO/wire, and the wind-strategy plot adapter.

Net-new only — and this time the evidence is emphatic

For the 16 files the branch also modifies, main is a superset. The branch copies are far older:

file branch vs main
ensemble_chunks.py +0 / −360
_ensemble_parser.py +0 / −340
plot_definition.py +17 / −312
confidence_ellipsoid_mesh.py +0 / −296

Symbol comparison confirms the direction — from_json_dict, read_plot_definition, build_dispersion_metric_variability and apply_global_simulation_values exist only on main. Taking those files would have reverted shipped work: the same trap plotting/render.py sprang in #4519 and test_wind.py in #4518.

simulation_adapter.py genuinely diverges (run_simulation_ensemble_chunks on main vs _TRIAL_FAILURES on the branch), so it stays at main's version pending its own reconciliation rather than being guessed at here.

Two mypy fixes at the Any boundary

The changed-file gate runs --follow-imports=skip, which degrades imported types to Any:

  • capability_observation_ensemble_json converts explicitly rather than returning Any from a -> str function
  • _spin_axis unpacks the three components instead of returning the attribute — which also pins the arity its tuple[float, float, float] annotation promises

Verification

  • 2,632 tests pass across tests/rate_of_closure and src/shared/python/swing_sim
  • Both changed files type-check clean; ruff check / ruff format clean across the package
  • check_test_assertions.py passes
  • Remaining local failures are the known Windows-only ones already confirmed against a clean tree

Part of epic #4103.

🤖 Generated with Claude Code

Fourth slice, after ground (#4517), flight (#4518) and club/plotting (#4519).
Adds 20 modules: capability observation, Morris host/child adapters, regional
ground variation and its control surface, scalar ensemble contract/IO/wire, and
the wind-strategy plot adapter.

Net-new files only. For the 16 files the branch also modifies, main is a
superset and the branch copies are much older — `ensemble_chunks.py` -360,
`_ensemble_parser.py` -340, `plot_definition.py` -312,
`confidence_ellipsoid_mesh.py` -296. Symbol comparison confirms the direction:
`from_json_dict`, `read_plot_definition`, `build_dispersion_metric_variability`
and `apply_global_simulation_values` exist only on main. Taking those files
would have reverted shipped work, which is the same trap that
`plotting/render.py` sprang in #4519 and `test_wind.py` in #4518.

`simulation_adapter.py` genuinely diverges — `run_simulation_ensemble_chunks`
on main against `_TRIAL_FAILURES` on the branch — so it stays at main's version
pending its own reconciliation rather than being guessed at here.

Two `no-any-return` findings from the changed-file MyPy gate are fixed at the
boundary where `--follow-imports=skip` degrades imported types to `Any`:
`capability_observation_ensemble_json` converts explicitly, and `_spin_axis`
unpacks the three components instead of returning the attribute, which also
pins the arity its annotation promises.

Verified: 2,632 tests pass across `tests/rate_of_closure` and
`src/shared/python/swing_sim`. Both changed files type-check clean; ruff and
ruff format clean across the package. The remaining local failures are the
known Windows-only ones already confirmed against a clean tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dieterolson
dieterolson enabled auto-merge (squash) August 17, 2026 09:22
dieterolson and others added 3 commits August 17, 2026 01:17
…7.20

A fleet agent merged an older main into this branch remotely while this
worktree merged a newer main containing #4521. Both are kept. SPEC.md is taken
from main verbatim and this branch's single row re-applied above 1.17.18 with
LF endings, avoiding the CRLF whole-file conflict seen earlier.
SPEC.md taken from main verbatim with this branch's single row re-applied above
the merged 1.17.19 club/plotting entry, keeping LF endings.
@dieterolson
dieterolson merged commit 26de676 into main Aug 17, 2026
16 of 17 checks passed
dieterolson added a commit that referenced this pull request Aug 17, 2026
…main (#4523)

`rate_of_closure.variation.regional_ground_study_adapter` cannot be imported on
current `main`:

    ImportError: cannot import name 'to_ground_model_result'
    from 'shared.python.swing_sim.ground'

Two of my own PRs combined to cause it. #4517 removed that name from the ground
package's eager exports, correctly — the package's own
`test_unqualified_compatibility_adapter_is_not_public` requires the explicitly
*unqualified* compatibility adapter to stay private, and it is absent from both
`__all__` and the lazy-import map. #4520 then landed a consumer importing it
from the package path. Neither PR's tests imported the adapter module, so both
were green while three modules could not be loaded at all:
`regional_ground_study_adapter`, `regional_ground_variation`, and
`regional_ground_target_projection`.

The import now names the owning module,
`shared.python.swing_sim.ground.result_adapter`, which does export it. That
keeps the package contract intact — the unqualified adapter is still not
package-public — while making the unqualified dependency explicit where it is
used, which is the honest thing for a compatibility path.

Adds `tests/rate_of_closure/test_variation_module_importability.py`, which
imports every module in the package. This is the check that was missing: a
suite can be entirely green while a module in it is unreachable, and no
existing gate covers that. It also catches the neighbouring cases — a symbol
dropped from a package's `__all__`, a rename, a new circular import. Verified
by reverting the one-line fix: 3 failed, 35 passed.

The ground contract test still passes, so this does not weaken what #4517
established. Scoped ruff and ruff format clean.

Co-authored-by: codex-scheduled <codex-scheduled@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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