feat(rate-of-closure): land the variation slice of #4466 - #4520
Merged
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
dieterolson
enabled auto-merge (squash)
August 17, 2026 09:22
…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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
ensemble_chunks.py_ensemble_parser.pyplot_definition.pyconfidence_ellipsoid_mesh.pySymbol comparison confirms the direction —
from_json_dict,read_plot_definition,build_dispersion_metric_variabilityandapply_global_simulation_valuesexist only on main. Taking those files would have reverted shipped work: the same trapplotting/render.pysprang in #4519 andtest_wind.pyin #4518.simulation_adapter.pygenuinely diverges (run_simulation_ensemble_chunkson main vs_TRIAL_FAILURESon the branch), so it stays at main's version pending its own reconciliation rather than being guessed at here.Two mypy fixes at the
AnyboundaryThe changed-file gate runs
--follow-imports=skip, which degrades imported types toAny:capability_observation_ensemble_jsonconverts explicitly rather than returningAnyfrom a-> strfunction_spin_axisunpacks the three components instead of returning the attribute — which also pins the arity itstuple[float, float, float]annotation promisesVerification
tests/rate_of_closureandsrc/shared/python/swing_simruff check/ruff formatclean across the packagecheck_test_assertions.pypassesPart of epic #4103.
🤖 Generated with Claude Code