Skip to content

feat(rate-of-closure, #4103): complete the regional-ground registry contract (+11 tests) - #4543

Merged
dieterolson merged 1 commit into
mainfrom
feat/roc-ground-registry
Aug 18, 2026
Merged

feat(rate-of-closure, #4103): complete the regional-ground registry contract (+11 tests)#4543
dieterolson merged 1 commit into
mainfrom
feat/roc-ground-registry

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

Finishes a port I got half-right in #4541, and lands the 11 tests it was blocking.

The bug in my own earlier slice

#4541 shipped GROUND_NORMAL_RESTITUTION_KEY and GROUND_ROLLING_RESISTANCE_KEY as bare constants. That is not enough — keysForMode("launch") selects VARIABLE_REGISTRY entries by category prefix, so with no definitions behind them the study plan validator rejected every regional-ground plan:

noise variable not legal in launch mode: swing_sim.flight.launch.ground_rolling_resistance

43 tests failed on it. This adds the two missing VARIABLE_REGISTRY definitions. Their numeric fields match regional_ground_variation_dataset.py exactly — unit 1, defaults 0.4 / 0.04, typical scales 0.05 / 0.01.

The parity assertion, verified rather than assumed

Adding those entries moves variation.test.ts's Python-parity guard from 5 launch keys to 7. Rather than just editing the number, I ran the Python registry directly:

launch keys BEFORE ground registration: 5
launch keys AFTER  ground registration: 7
added: ['swing_sim.flight.launch.ground_normal_restitution',
        'swing_sim.flight.launch.ground_rolling_resistance']

So the two sides do agree on 7. The only difference is mechanism: Python registers through a dynamic extension seam, called from inside regional_ground_variation_request's parse path, while TypeScript has no such seam and declares them statically. The updated assertion carries that reasoning inline so the next reader doesn't have to re-derive it.

(That same dynamic registration is what leaked into the shared registry and broke swing_sim/variation/tests/test_spec.py's category pins during #4524 — hence the autouse restore fixture in tests/rate_of_closure/conftest.py.)

What lands

The 11 regional-ground tests this unblocks: authority client, execution job and its files, execution result, execution presentation, job-preparation request, variation request wire and files, variation workspace, the imported-job panel, and the execution controller hook.

Four tests are dropped (they assert branch-side behaviour main's App, ViewCompositorApp, chipForgivenessEnsemble and workspaceVariationSession do not have), and PrimaryViewTabs.test.tsx is restored to main's version once more.

Verification

  • tsc --noEmit — clean
  • eslint . — clean
  • vitest run1,551 passed, 0 failed (up from 1,420 with 43 failing)
  • npm run build — production Vite build succeeds
  • Staged diff: 13 files, zero deletions
  • SPEC.md: exactly one insertion (row 1.17.37)

🤖 Generated with Claude Code

…ontract

The ground variation keys shipped in 1.17.35 as bare constants, which was
not enough. keysForMode("launch") selects VARIABLE_REGISTRY entries by
category prefix, so with no definitions behind them the study plan
validator rejected every regional-ground plan with "noise variable not
legal in launch mode" and 43 tests failed on it.

Adds the two VARIABLE_REGISTRY definitions, whose numeric fields match
regional_ground_variation_dataset.py exactly: unit "1", defaults 0.4 and
0.04, typical scales 0.05 and 0.01.

That moves variation.test.ts's Python-parity guard from 5 launch keys to 7.
Checked rather than assumed: running the Python registry directly reports 5
launch keys before register_ground_variation_variables() and exactly 7
after, the two added being ground_normal_restitution and
ground_rolling_resistance. The counts agree; the difference is only that
Python registers through a dynamic extension seam from inside the request
parse path, while TypeScript has no such seam and declares them statically.
The assertion carries that reasoning inline.

Lands the 11 regional-ground tests this unblocks. Four tests are dropped
and PrimaryViewTabs.test.tsx is restored to main's version once more.

Verified: tsc clean, eslint clean, 1,551 tests, production build succeeds,
zero deletions.

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 15:04
@dieterolson
dieterolson merged commit 7440a9c into main Aug 18, 2026
15 of 20 checks passed
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