Skip to content

feat(rate-of-closure): land the ground-playback slice of #4466 - #4522

Merged
dieterolson merged 2 commits into
mainfrom
feat/roc-ground-playback-slice
Aug 17, 2026
Merged

feat(rate-of-closure): land the ground-playback slice of #4466#4522
dieterolson merged 2 commits into
mainfrom
feat/roc-ground-playback-slice

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

Fifth slice. Adds ground_playback, ground_playback_comparison and the three ground_playback_workspace modules under src/rate_of_closure/simulation/.

Genuinely blocked until now

These modules import swing_sim.ground (#4517), swing_sim.flight (#4518) and rate_of_closure.club.{assembly_binding,simulation_adapter} (#4519). With all three on main they import cleanly — verified by importing each of the five directly, not just by the suite passing.

Net-new only, again

Of the six files the branch also modifies, sources.py is the only branch-superset (world_from_selected_head) — and the new modules do not reference it. So every modified file stays at main's version rather than being taken on the strength of a single symbol.

One mypy fix

--follow-imports=skip degrades GroundSimulationResult to Any, so to_json() leaked out of a -> str function. ground_result_json converts explicitly; its exact-type precondition already guarantees the runtime value.

Verification

  • 2,635 tests pass across tests/rate_of_closure and src/shared/python/swing_sim
  • all five new modules import individually
  • the Morris UI contract still imports with scipy, fastapi and uvicorn blocked — the regression feat(rate-of-closure): land the club and plotting slices of #4466 #4519 had to fix in club/__init__.py, re-checked here because this slice adds modules to the same import graph
  • check_test_assertions.py passes; scoped ruff, ruff format and per-file mypy clean
  • the one remaining local failure is the known Windows-only test_text_reader_normalizes_decoder_resource_errors, confirmed against a clean tree

Part of epic #4103.

🤖 Generated with Claude Code

Fifth slice. Adds `ground_playback`, `ground_playback_comparison` and the three
`ground_playback_workspace` modules under `src/rate_of_closure/simulation/`.

This one was genuinely blocked, not merely unscheduled: the modules import
`swing_sim.ground` (#4517), `swing_sim.flight` (#4518) and
`rate_of_closure.club.{assembly_binding,simulation_adapter}` (#4519). With all
three on `main` they now import cleanly — verified by importing each of the five
directly, not only by the suite passing.

Net-new files only, as with every slice. Of the six files the branch also
modifies, `sources.py` is the only branch-superset (`world_from_selected_head`)
and the new modules do not reference it, so every modified file stays at main's
version rather than being taken on the strength of one symbol.

One `no-any-return` finding from the changed-file MyPy gate is fixed where
`--follow-imports=skip` degrades `GroundSimulationResult` to `Any`:
`ground_result_json` converts explicitly, its exact-type precondition already
guaranteeing the runtime value.

Verified: 2,635 tests pass across `tests/rate_of_closure` and
`src/shared/python/swing_sim`; all five new modules import; the Morris UI
contract still imports with scipy, fastapi and uvicorn blocked — the regression
#4519 had to fix in `club/__init__.py` — and the changed-test assertion gate
passes. Scoped ruff, ruff format and per-file mypy clean.

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 12:12
@dieterolson
dieterolson merged commit 874e666 into main Aug 17, 2026
16 of 17 checks passed
dieterolson pushed a commit that referenced this pull request Aug 18, 2026
…rce already on main (#4103)

Extracted from `consolidated/rate-closure-remainder-2026-08-13` (#4466).

The slice programme that has been landing that branch piecemeal (#4517-#4523)
took source modules but left their suites behind. The clearest case: the five
`ground_playback` modules #4522 put on `main` arrived with ZERO test coverage —
grepping the whole repo for `ground_playback` matches `SPEC.md` and the source
files themselves, and nothing under `tests/`.

This is test-only. No source file is touched, so every assertion here runs
against `main`'s implementation exactly as it stands. 93 tests pass unmodified:

  tests/rate_of_closure/test_ground_playback.py
  tests/rate_of_closure/test_capability_observation_adapter.py
  tests/rate_of_closure/test_chip_forgiveness_analysis.py
  tests/rate_of_closure/test_ground_study_scalar_adapter.py
  tests/rate_of_closure/test_regional_ground_study_adapter.py
  tests/rate_of_closure/test_regional_ground_target_projection.py
  tests/rate_of_closure/test_scalar_ensemble_contract.py
  tests/rate_of_closure/test_wind_strategy_plot_adapter.py
  tests/rate_of_closure/regional_ground_target_support.py   (shared helper)
  tests/shared/python/test_canonical_numeric_json.py

Eleven further stranded suites were run against `main` and deliberately left
out rather than widening this change to chase their dependencies:

  test_chip_forgiveness_runner.py             SimulationEnsembleResult.runs
  test_club_assembly_simulation_adapter.py    SimulationRun.club_assembly_usage
  test_regional_ground_result_golden.py       __fixtures__ golden absent
  test_club_assembly_binding.py               __fixtures__ golden absent
  test_clubhead_engineering_sidecar.py        __fixtures__ golden absent
  test_ground_playback_workspace_v2.py        __fixtures__ golden absent
  test_regional_ground_variation_request_io.py  ui.pyqt6 module of same name
  test_campaign_release_manifest.py           scripts/rate_campaign_manifest
  test_browser_companion_harness.py           sibling browser_companion_harness
  tests/ops/test_maturin_swing_core_workflow.py            workflow file absent
  tests/ops/test_rate_of_closure_windows_state_workflow.py workflow file absent

`test_regional_ground_variation.py` is excluded for a genuine behavioural
divergence that deserves its own fix: one bounds case expects the module's own
validation error, but on `main` a DbC pre-condition ("lower must be") raises
first. `test_regional_ground_variation_execution.py` imports from it, so it is
excluded too.

Verified with the repo venv (Python 3.11, PyQt6, QT_QPA_PLATFORM=offscreen):
93 passed, 0 failed. ruff 0.14.10 check and format --check clean on all 10 files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dieterolson added a commit that referenced this pull request Aug 18, 2026
…rce already on main (#4103) (#4527)

Extracted from `consolidated/rate-closure-remainder-2026-08-13` (#4466).

The slice programme that has been landing that branch piecemeal (#4517-#4523)
took source modules but left their suites behind. The clearest case: the five
`ground_playback` modules #4522 put on `main` arrived with ZERO test coverage —
grepping the whole repo for `ground_playback` matches `SPEC.md` and the source
files themselves, and nothing under `tests/`.

This is test-only. No source file is touched, so every assertion here runs
against `main`'s implementation exactly as it stands. 93 tests pass unmodified:

  tests/rate_of_closure/test_ground_playback.py
  tests/rate_of_closure/test_capability_observation_adapter.py
  tests/rate_of_closure/test_chip_forgiveness_analysis.py
  tests/rate_of_closure/test_ground_study_scalar_adapter.py
  tests/rate_of_closure/test_regional_ground_study_adapter.py
  tests/rate_of_closure/test_regional_ground_target_projection.py
  tests/rate_of_closure/test_scalar_ensemble_contract.py
  tests/rate_of_closure/test_wind_strategy_plot_adapter.py
  tests/rate_of_closure/regional_ground_target_support.py   (shared helper)
  tests/shared/python/test_canonical_numeric_json.py

Eleven further stranded suites were run against `main` and deliberately left
out rather than widening this change to chase their dependencies:

  test_chip_forgiveness_runner.py             SimulationEnsembleResult.runs
  test_club_assembly_simulation_adapter.py    SimulationRun.club_assembly_usage
  test_regional_ground_result_golden.py       __fixtures__ golden absent
  test_club_assembly_binding.py               __fixtures__ golden absent
  test_clubhead_engineering_sidecar.py        __fixtures__ golden absent
  test_ground_playback_workspace_v2.py        __fixtures__ golden absent
  test_regional_ground_variation_request_io.py  ui.pyqt6 module of same name
  test_campaign_release_manifest.py           scripts/rate_campaign_manifest
  test_browser_companion_harness.py           sibling browser_companion_harness
  tests/ops/test_maturin_swing_core_workflow.py            workflow file absent
  tests/ops/test_rate_of_closure_windows_state_workflow.py workflow file absent

`test_regional_ground_variation.py` is excluded for a genuine behavioural
divergence that deserves its own fix: one bounds case expects the module's own
validation error, but on `main` a DbC pre-condition ("lower must be") raises
first. `test_regional_ground_variation_execution.py` imports from it, so it is
excluded too.

Verified with the repo venv (Python 3.11, PyQt6, QT_QPA_PLATFORM=offscreen):
93 passed, 0 failed. ruff 0.14.10 check and format --check clean on all 10 files.

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