Skip to content

fix(sim): tag server-estimated launch angles as estimated - #307

Merged
jewbetcha merged 1 commit into
open-flight:mainfrom
puiji:fix/sim-estimated-launch-angle-provenance
Oct 18, 2026
Merged

jewbetcha merged 1 commit into
open-flight:mainfrom
puiji:fix/sim-estimated-launch-angle-provenance

Conversation

@puiji

@puiji puiji commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

resolve_shot tags any launch angle it gets as measured, even when _ensure_user_facing_launch_angles filled it in and set its source to "estimated". It now reads launch_angle_vertical_source and launch_angle_horizontal_source, and carry takes VLA's tag.

Why was this required?

When the server fills in a launch angle, the simulator badges, the sim_shot websocket event and the sim_send session-log entry say it, and the carry built on it, was measured. It's the launch-angle version of #271 (calculated spin). The code changes don't overlap.

Automated tests

Two new tests in tests/test_sim_resolver.py cover server-estimated VLA and HLA, and a measured VLA with an estimated HLA, which should keep carry measured. Both fail on main. Full suite passes.

Manual (human) testing

I ran an OPS243-only 7-iron shot (no angle radar, no hardware) through the server's real _ensure_user_facing_launch_angles and _forward_shot_to_simulators, with a stub simulator connector.

VLA 14.5 HLA 0.0 carry 187.6
main measured measured measured
this branch estimated estimated estimated

AI disclosure

Claude Code found this bug and drafted the fix, tests and description. I reviewed the changes and ran the tests and manual check myself.

Checklist

  • Single feature/fix — this PR is scoped to one thing with a clear story above
  • Automated tests included — new or updated tests cover this change
  • Manual testing described — I documented what I verified by hand above
  • Python tests pass (uv run pytest tests/ -v)
  • Pylint passes (uv run pylint src/openflight/ --fail-under=9)
  • Ruff passes (uv run ruff check src/openflight/)
  • UI builds (cd ui && npm run build)
  • UI lint passes (cd ui && npm run lint)
  • Updated docs or CHANGELOG if needed
  • No unrelated changes mixed in

When the radar has no launch angle, _ensure_user_facing_launch_angles fills
in an estimate and marks its source "estimated". resolve_shot ignored the
source and tagged any present angle, and the carry built on it, as measured.
Read the source, and derive carry's tag from VLA's.
@puiji
puiji marked this pull request as ready for review October 18, 2026 16:00
@jewbetcha
jewbetcha merged commit 8a25107 into open-flight:main Oct 18, 2026
15 checks passed
@jewbetcha

Copy link
Copy Markdown
Member

Thank you!

HarjotDhanota added a commit to HarjotDhanota/openflight that referenced this pull request Oct 20, 2026
…#305, open-flight#307)

Conflicts:
- server.py: upstream's mock-enrichment shortcut runs first, then our trace marks.
- sim/resolver.py: both sides tagged estimated launch angles; ours keeps
  _resolve_carry, which already replaced the launch-angle carry badge (E4, C8).
- tests/test_sim_resolver.py: both test sets kept; upstream's measured-VLA test
  now expects the estimated carry badge this fork gives an OPS-only carry.
- tests/test_mock_hardware.py: the deadline publishes OPS-only, still pending,
  and the late enrichment finalizes the same shot (D29), not 'skipped'.
- README.md: both contributor bullets kept.
- AGENTS.md: the bench's master plan is linked by repository, not a local doc path.
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.

2 participants