feat(rate-of-closure): land the application and web_authority slices of #4466 - #4524
Merged
Conversation
#4466 Sixth slice, and the two areas ship together because they import each other: `application` pulls `web_authority.{api,capability,runtime}` and `web_authority` pulls seven `application.*` modules. Neither builds alone. Adds 34 `application` modules — camera commands and preferences, capability workflow/overlay/wire and result export, flight execution profiles, the regional-ground authority failure/policy/status/transport chain, execution files and job preparation, atomic and bounded text files — and 15 `web_authority` modules, plus `view_workspace_recovery` and the workspace v2 format. `view_workspace` gains `camera_preferences` with deterministic v1->v2 migration, so `FORMAT_V1` is retained beside the new `FORMAT`. All 18 `application/morris/**` files stay at main's version. They exist only on main, landed by #4473, and the source branch predates them entirely — every one shows +0/-N against it. Copying the branch tree would have deleted the whole Morris host/client/contracts/router/runtime chain. Ships the 32 corresponding tests and 10 shared Python/TypeScript golden fixtures. 26 further branch tests are deferred: they need `ui/pyqt6`, `web_companion`, `runtime_manifest` or `four_surface_capability`, which later slices own. Deferring them is deliberate and reversible; shipping them would have been 40 failures pointing at absent modules. Adds an autouse `conftest` fixture restoring `swing_sim.variation.registry` after each rate_of_closure test. `regional_ground_variation_request` registers the ground variables from inside its parse path, so merely reading a request mutates the shared registry for the rest of the process. That leaked into `swing_sim/variation/tests/test_spec.py`, whose category pins assert exact membership — it passed alone and failed after this suite, which is precisely the shape of an intermittent CI failure. The registration is deliberate, so the fixture restores rather than blocks it, and keeps the leak inside the package that causes it. The parse-time global side effect is worth revisiting on its own; this slice contains it rather than redesigning it. Four `no-any-return` findings fixed where `--follow-imports=skip` degrades imported types to `Any`, including two casts for the deliberately deferred Windows-only security backend import. Verified: 2,955 tests pass across `tests/rate_of_closure` and `src/shared/python/swing_sim`; all 49 new modules import individually — the check that caught #4523's unreachable modules. Scoped ruff, ruff format, per-file mypy and the changed-test assertion gate are clean. The two remaining local failures are the known Windows-only ones. 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 15:56
Scoping the `ui/pyqt6` slice surfaced a gap in this one: `ui/pyqt6/main_window_file_commands` imports `write_text_atomic` from `application.workspace_files`, which this slice had left at main's version. Symbol comparison confirms `workspace_files.py` is branch-superset — the only difference is that function — so the branch copy is taken. Its `-32` lines are an internal refactor that drops the module-scope `os` import, which main's `test_workspace_files` monkeypatched; the branch updates that test in step, so both move together. `application/__init__.py` stays at main's version. Main is the superset there (it owns `_EXPORT_MODULE`, which the branch lacks), so only the one new name is registered in the lazy map rather than taking the branch's file and losing the map. Neither `__init__` exports the morris names — those are imported by path — so this does not touch that surface. Two `no-any-return` findings in the taken file are fixed at the `--follow-imports=skip` boundary. Verified: `write_text_atomic` resolves through the package, 149 workspace tests pass, and the full run is 2,992 passing. Scoped ruff, ruff format and mypy clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…coder resource errors
dieterolson
added a commit
that referenced
this pull request
Aug 18, 2026
39 new files under `rust_core/tools-core/src/flight_ground/`: the bounce, impact, reference and surface runtimes, canonical and strict JSON, the v1 request/result wire, resource limits, result geometry and validation, plus the `ground_reference` benchmark and the Rust, Python and Node conformance suites. This slice is genuinely independent — unlike the Python areas it depends on no other slice, which is why it goes now while `ui/pyqt6` waits on #4524. It includes the WASM boundary (`wasm.rs`, `wasm_reference.rs`, `wasm_request.rs`, `wasm_result.rs`). That is the kernel side of the Phase 7 parity work still open under #4103, and worth being precise about: this lands the crate only. It does not add a Pages deploy workflow and does not swap the hand-written TypeScript mirrors, both of which #4103 Phase 7 owns and the handoff explicitly says not to improvise elsewhere. `src/lib.rs` gains the pyo3 registrations for `PyFlightGroundRequest`, `PyFlightGroundResult` and the five `py_*` entry points. Both it and `Cargo.toml` are purely additive against main — `lib.rs` is +25/-0, and `Cargo.toml` promotes `serde_json` from dev-dependencies and registers the new bench — so neither reverts anything, which is the failure mode every earlier slice had to guard against. Verified: `cargo check` builds, 191 `tools-core` tests pass across nine binaries, `cargo fmt --check` and `cargo clippy --all-targets` are clean. No Python or TypeScript source changes. Co-authored-by: codex-scheduled <codex-scheduled@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
dieterolson
added a commit
that referenced
this pull request
Aug 18, 2026
(#4530) * feat(rate-of-closure): land the first React web/src/model slice of #4466 101 files: capability observation and result export, club assembly binding and engineering sidecar wire, ground playback workspace, regional-ground variation request/workspace/target projection, scalar ensemble contract, wind-strategy plot data, and their tests. The React tree cannot be taken wholesale, and the measurement is worth recording because it is the opposite of what the earlier slices found. This tree has diverged in *both* directions: - 129 files exist on main that the branch lacks entirely — the Morris component chain (`MorrisWorkflowPanel`, `MorrisResults`, `MorrisFactorEditor`, `MorrisWorkspaceActions`), `LaunchMonitorLinkedScatter`, `morrisAuthorityProxy`, and 15 Playwright specs, all landed by #4473. This is the React mirror of the `application/morris/**` situation in #4524. - 125 of the 270 modified `model` files delete content on the branch side. The worst, `morrisGlobalSensitivityContract.ts`, is +0/-355 — a strict subset of main. I first copied 324 modified files in bulk and then reset it: against a tree where main demonstrably owns 129 files the branch never saw, that was not a safe operation, and shipping it would have reverted exactly the kind of work this whole series has been protecting. What lands instead is the provably safe subset: files whose main->branch diff deletes nothing, then an iterative drop of added files whose dependencies need a main-newer module. That converged in five rounds. `flight.ts` and `wind.test.ts` are explicitly held at main's version so the #4518 ground-crossing guard and the 1e-9 parity tolerance (#4513) survive — verified after the fact, not assumed. 29 added files are deferred. They are not broken; they need their main-side counterparts, and a later slice can carry both together. Verified: `tsc --noEmit` clean, `eslint` clean, 1,324 React tests passing across 157 files, production Vite build succeeds. No Python or Rust changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(spec): renumber the web model slice row to 1.17.29 Another agent landed 1.17.28 on main while this branch was open. Renumbered rather than leaving a duplicate version in the change log. --------- Co-authored-by: codex-scheduled <codex-scheduled@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
dieterolson
added a commit
that referenced
this pull request
Aug 18, 2026
… restored tests) (#4531) * feat(rate-of-closure, #4103): land the ui/pyqt6 slice 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> * refactor(rate-of-closure): split the execution workspace under the LOC 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> * fix(rate-of-closure): satisfy quality-gate mypy and the secrets baseline 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> --------- 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.
Sixth slice. These two areas ship together because they import each other —
applicationpullsweb_authority.{api,capability,runtime},web_authoritypulls sevenapplication.*modules. Neither builds alone.Adds 34 application modules (camera commands/preferences, capability workflow + result export, flight execution profiles, the regional-ground authority failure/policy/status/transport chain, execution files, job preparation, atomic/bounded text files) and 15 web_authority modules, plus
view_workspace_recoveryand the workspace v2 format —view_workspacegainscamera_preferenceswith deterministic v1→v2 migration.The biggest revert trap yet
All 18
application/morris/**files stay at main's version. They exist only on main (landed by #4473) and the source branch predates them entirely — each shows+0/−N. Copying the branch tree would have deleted the whole Morris host/client/contracts/router/runtime chain.An intermittent CI failure, found and contained
swing_sim/variation/tests/test_spec.py's category pins assert exact membership. They passed alone and failed after this suite — the classic shape of a flaky gate.Cause:
regional_ground_variation_requestcallsregister_ground_variation_variables()from inside its parse path, so merely reading a request mutates the shared registry for the rest of the process.An autouse
conftestfixture now snapshots and restoresswing_sim.variation.registryper test, keeping the leak inside the package that causes it. The registration is deliberate (the plan parser needs those variables defined before validating), so this restores rather than blocks it. The parse-time global side effect is worth revisiting on its own — this slice contains it rather than redesigning it.Test scope
Ships 32 corresponding tests and 10 shared Python/TypeScript golden fixtures. 26 further branch tests are deferred — they need
ui/pyqt6,web_companion,runtime_manifestorfour_surface_capability, which later slices own. Shipping them would have meant 40 failures pointing at absent modules.Verification
tests/rate_of_closureandsrc/shared/python/swing_simno-any-returnfindings fixed, including two casts for the deliberately deferred Windows-only security backend importruff,ruff format, per-filemypy, and the changed-test assertion gate cleanPart of epic #4103.
🤖 Generated with Claude Code