Skip to content

feat(rate-of-closure, #4103): land the ui/pyqt6 slice (40 modules + 8 restored tests) - #4531

Merged
dieterolson merged 4 commits into
mainfrom
feat/roc-ui-pyqt6-slice
Aug 18, 2026
Merged

feat(rate-of-closure, #4103): land the ui/pyqt6 slice (40 modules + 8 restored tests)#4531
dieterolson merged 4 commits into
mainfrom
feat/roc-ui-pyqt6-slice

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

Lands the 40 PyQt6 modules main still lacked, completing the desktop half of the impact-zone GUI. Part of the ongoing slice-by-slice migration of consolidated/rate-closure-remainder-2026-08-13, which cannot be merged wholesale (proven in both directions — see #4517 through #4530).

What this adds

40 net-new src/rate_of_closure/ui/pyqt6 modules:

Area Modules
Camera camera_controls, flight_camera_adapter
Capability capability_tab, capability_controls, capability_results, capability_worker
Ground playback ground_playback_view/_tab/_controls/_tables/_comparison/_persistence/_persistence_controls
Regional ground regional_ground_execution_controller/_presentation/_workspace, regional_ground_file_menu, regional_ground_variation_request_io, regional_ground_variation_window, regional_execution_evidence
Surface plan regional_surface_plan_tab/_widgets/_io
Wind strategy wind_strategy_panel/_basis/_launch/_lifecycle/_plot/_worker
Composition view_compositor, simulation_tab_compositor, simulation_legend_layout, synchronized_simulation_view, simulation_workspace_bridge
Other main_window_file_commands, main_window_view_commands, club_artifact_ui, engineering_number_input, torque_profile_workspace, variation_forgiveness_view

Four re-exports in variation/__init__.pyChipForgivenessStudy, ChipStudySummary, ChipTrialCohort, forgiveness_variation_dataset. All four already existed on main (in forgiveness_runner, chip_forgiveness, forgiveness_projection); only the package-level export was missing. main's eager-import __init__ is edited in place — the branch's version is +63/−32 and taking it would have dropped 32 lines of main's exports.

8 of the 35 tests deferred by #4524 are restored: capability worker and workflow, regional execution readback, the regional-ground execution controller and presentation, variation request IO, surface plan, and the wind-strategy worker.

Why the other 27 tests stay deferred

Two distinct reasons, and the distinction matters for whoever picks up the next slice:

  • 16 cannot import at all — they reference web_companion, web_distribution, runtime_manifest, or the regional-ground execution job chain, none of which have been sliced across yet. They ship with those slices.
  • 11 import cleanly but assert APIs main's shared modules do not haveSimulationView.camera_controls, PlotCanvasPane.render_custom, SimulationEnsembleResult.runs, extra SimulationConfig keyword arguments. Their source changes modify files main owns, so test and source have to land together rather than test-first here.

Type-check fixes

Sixteen attr-defined and no-any-return findings are fixed with explicit casts at the points the code already narrows. CI runs mypy with --follow-imports=skip, so an imported class degrades to Any, a type(x) is not Cls guard narrows nothing, and the value stays object. The runtime guards are untouched.

Verification

  • pytest tests/rate_of_closure src/shared/python/swing_sim3,092 passed, 7 skipped, 0 failed
  • All 40/40 new modules import individually
  • ruff check and ruff format --check clean across src/rate_of_closure and tests/rate_of_closure
  • Per-file mypy (--follow-imports=skip --ignore-missing-imports, matching CI) clean on all 41 changed source files
  • check_test_assertions.py passes; no print() in src/
  • SPEC.md: exactly one insertion (row 1.17.31)

One flaky failure was observed and ruled out: test_club_view_camera.py::test_worst_library_mesh_uses_bounded_playback_cadence is a wall-clock assertion (0.63 < 0.5) on a main-owned test exercising a main-owned module this slice does not touch. It passes 3/3 in isolation and passed on this identical tree in an earlier full run.

🤖 Generated with Claude Code

Adds the 40 PyQt6 modules main still lacked, completing the desktop half
of the impact-zone GUI: camera controls and the flight camera adapter, the
capability tab/controls/results/worker chain, ground playback, the
regional-ground execution and surface-plan surfaces, the wind-strategy
panel, the view and simulation-tab compositors, and the chip-forgiveness
view.

variation/__init__.py gains four re-exports the forgiveness view imports.
All four already existed on main; only the package export was missing, so
main's eager-import __init__ is edited in place rather than replaced by the
branch's +63/-32 version.

Restores 8 of the 35 tests deferred by #4524. The other 27 stay deferred:
16 cannot import at all (web_companion, web_distribution, runtime_manifest,
the ground execution job chain), and 11 assert APIs main's shared modules
do not have, so they must land with their source in a later slice.

Sixteen attr-defined/no-any-return findings are fixed with explicit casts
where the code already narrows -- CI runs mypy with --follow-imports=skip,
so an imported class degrades to Any and a `type(x) is not Cls` guard
narrows nothing.

Verified: 3,092 tests pass; all 40 modules import individually.

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 18, 2026 09:13
codex-scheduled and others added 2 commits August 18, 2026 02:21
…C budget

regional_ground_execution_workspace arrives from the source branch at 571
lines, over the repo's 500 LOC budget for changed files. Split along two
existing seams rather than baselined:

  - regional_ground_execution_files_mixin -- the atomic save/export commands
  - regional_ground_execution_status_mixin -- status label and action state

Both stay mixins, matching morris_workspace_mixin and plot_export_mixin,
because every method reads the workspace's own widgets or parents a modal
dialog on it.

The files mixin declares _set_status as an annotation rather than a
NotImplementedError stub: a concrete method there would have shadowed the
status mixin's real implementation through the MRO. Verified at runtime
that the workspace resolves _set_status to the status mixin.

Verified: 3,092 tests pass; 42/42 modules import; file-size budget clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CI type-checks every changed file in a single mypy invocation with
MYPYPATH=src, so imports within the changed set resolve. Checking files
individually degrades those same imports to Any, which is why the local
pass disagreed with CI in both directions:

  - regional_surface_plan_widgets: the cast on engineering_number_input is
    redundant once the batch resolves its annotated return type.
  - regional_ground_execution_status_mixin: the host declarations were
    overriding the workspace's own types. is_running is a read-only
    property there, not a writeable bool, and _preparation holds a
    callable, not a bare object.

Also records the ground-plan provenance digest in .secrets.baseline. It is
an input_sha256 asserted in test_regional_surface_plan, not a credential.

Verified with CI's exact invocation (mypy 1.13 on Python 3.12, one batch,
MYPYPATH=src:src/python/src): clean across all 43 changed files. mypy 1.13
raises an internal error on Python 3.13 for batch runs, so 3.12 is required
locally for the result to mean anything.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dieterolson
dieterolson merged commit 51ab10f into main Aug 18, 2026
15 of 17 checks passed
dieterolson added a commit that referenced this pull request Aug 18, 2026
…s mypy advice) (#4546)

* docs(rate-of-closure, #4103): bring the handoff doc back to current state

Twenty slices have merged since this was last accurate. The remaining-work
table is re-measured against origin/main and now names the real blocker:
the ~60 files left are not blocked on effort but on the camera-controls
cluster, which is a reimplementation rather than a migration -- wiring
CameraViewportMixin into simulation_view and flight_view passes 20 of 20
camera GUI tests while regressing three main-owned ones, and reproducing
the branch's Face-On behaviour needs ~20 further ui/pyqt6 files that delete
shipped work.

Corrects one entry that was actively harmful. The doc told the next agent
to check mypy files individually, which is exactly what made #4531 fail
quality-gate: CI passes every changed file to one invocation with
MYPYPATH=src, so per-file checking invents no-any-return findings CI does
not have and hides the redundant-cast findings it does. The replacement
gives the exact command, including that Python 3.12 is required.

Adds the traps found since -- pathlib.write_text rewriting LF as CRLF, the
detect_secrets scan/normalise ordering, and purely-additive files that
still fail against main -- and balances the "branch is not uniformly newer"
rule with its converse, since applying it blindly cost two good ports.
Deletions are not disqualifying; the bar is main's whole suite green
against the swapped-in version first, as #4542 and #4545 both cleared.

149 lines, inside the 150-line policy. No code changes.

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

* docs(rate-of-closure): re-measure the remaining-work table after #4536

#4536 landed while this PR was open, so the table would have merged already
stale. Re-measured against origin/main: 52 files, not ~60, and the split
moved -- 19 tests, 18 web/src, 15 elsewhere.

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

---------

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