Skip to content

test(rate-of-closure): recover ten stranded test modules covering source already on main (remainder of #4466) - #4527

Merged
dieterolson merged 1 commit into
mainfrom
remainder/extract-2026-08-17
Aug 18, 2026
Merged

test(rate-of-closure): recover ten stranded test modules covering source already on main (remainder of #4466)#4527
dieterolson merged 1 commit into
mainfrom
remainder/extract-2026-08-17

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

Extracted remainder of #4466. Test-only — no source file is touched.

Why

#4466 is being absorbed into main as reviewable slices (#4517#4523). Those slices took source modules but left their suites behind on the branch. The clearest case: the five ground_playback modules that #4522 landed arrived on main with zero test coverage — grepping the whole repo for ground_playback matches SPEC.md and the source files themselves, and nothing under tests/.

This recovers the suites that already pass against main unchanged, so the coverage stops depending on a branch that cannot be merged.

What

Ten files, all under tests/. Because no source changes, every assertion runs against main's implementation exactly as it stands.

File Covers
tests/rate_of_closure/test_ground_playback.py simulation/ground_playback* (#4522) — previously untested
tests/rate_of_closure/test_capability_observation_adapter.py capability observation adapter
tests/rate_of_closure/test_chip_forgiveness_analysis.py chip forgiveness analysis
tests/rate_of_closure/test_ground_study_scalar_adapter.py ground-study scalar adapter
tests/rate_of_closure/test_regional_ground_study_adapter.py regional ground study adapter
tests/rate_of_closure/test_regional_ground_target_projection.py regional ground target projection
tests/rate_of_closure/test_scalar_ensemble_contract.py scalar ensemble contract
tests/rate_of_closure/test_wind_strategy_plot_adapter.py wind-strategy plot adapter
tests/rate_of_closure/regional_ground_target_support.py shared helper the projection suite imports
tests/shared/python/test_canonical_numeric_json.py swing_sim/canonical_numeric_json

Verification

Repo venv (Python 3.11, PyQt6, QT_QPA_PLATFORM=offscreen): 93 passed, 0 failed.
Pinned ruff 0.14.10: check and format --check clean on all ten files.

Deliberately excluded

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

Suite Blocked on
test_chip_forgiveness_runner.py SimulationEnsembleResult.runs absent from main
test_club_assembly_simulation_adapter.py SimulationRun.club_assembly_usage absent from main
test_regional_ground_result_golden.py __fixtures__ golden absent from main
test_club_assembly_binding.py __fixtures__ golden absent from main
test_clubhead_engineering_sidecar.py __fixtures__ golden absent from main
test_ground_playback_workspace_v2.py __fixtures__ golden absent from main
test_regional_ground_variation_request_io.py needs a ui.pyqt6 module of the same name
test_campaign_release_manifest.py needs scripts/rate_campaign_manifest
test_browser_companion_harness.py needs sibling browser_companion_harness helper
tests/ops/test_maturin_swing_core_workflow.py asserts on a workflow file main lacks
tests/ops/test_rate_of_closure_windows_state_workflow.py asserts on a workflow file main lacks

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.

Note on unrelated CI

ruff format --check is currently red on main for four files under src/data_processing/data_processor/python/ that this PR does not touch. That is being fixed separately.

Part of #4103

🤖 Generated with Claude Code

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

…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
dieterolson force-pushed the remainder/extract-2026-08-17 branch from 4a6692e to 8b53958 Compare August 18, 2026 07:19
@dieterolson
dieterolson merged commit 5d4db71 into main Aug 18, 2026
12 checks passed
dieterolson added a commit that referenced this pull request Aug 18, 2026
Only conflict was SPEC.md's Change Log: both remainder PRs prepended a row, so
#4527's 1.17.28 (now on main) collided with this branch's 1.17.29.

Resolved keeping both, ordered 1.17.29 above 1.17.28 above 1.17.27. The table is
newest-first, so the higher version goes first -- a mechanical "take theirs
first" would have produced 1.17.28 / 1.17.29 / 1.17.27, silently breaking the
ordering, which is what a first pass here did before it was caught.

SPEC.md is CRLF on main (see 26159e2, which rewrote its line endings while
.gitattributes pins eol=lf for *.py only), so this was edited in binary mode:
CRLF 6133 unchanged, bare LF still 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dieterolson added a commit that referenced this pull request Aug 18, 2026
… main

Two things, neither of them a defect in the ported code.

1. quality-gate failed at "Type Check (Mypy)" with a single error:
   `variation/registry.py:404: error: Returning Any`. That function is
   PRE-EXISTING and byte-identical on main (line 374 there) -- this PR did not
   introduce it. It surfaced only because CI runs mypy on CHANGED FILES ONLY, so
   putting registry.py into a diff exposed a latent error that main never checks.

   The cause is a delta-CI artifact rather than a real typing problem: the
   delegate `registry_mode_policy.keys_for_mode` IS annotated
   `-> tuple[str, ...]`, but it is not among the changed files, so with
   `ignore_missing_imports` its import resolves to `Any` and returning that
   directly trips `warn_return_any`. Fixed by binding to an annotated local,
   which narrows a value that genuinely has that type rather than asserting
   something untrue. Verified: zero mypy errors across all four ported files.

2. Re-synced onto main after #4527 and #4528 merged, which collided in SPEC.md's
   Change Log. Main's max is now 1.17.29, and this branch had also claimed
   1.17.28 -- a straight union produced TWO rows at 1.17.28. Renumbered this
   change to 1.17.30 and re-sorted the 2026-08-18 block version-descending;
   verified four rows, zero duplicate versions. Edited in binary mode so the
   file's CRLF endings survive (6134 CRLF, 0 bare LF).

Part of #4142

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