Skip to content

fix(sim): label calculated spin as estimated - #271

Draft
rjnutter wants to merge 1 commit into
open-flight:mainfrom
rjnutter:fix/calculated-spin-provenance
Draft

rjnutter wants to merge 1 commit into
open-flight:mainfrom
rjnutter:fix/calculated-spin-provenance

Conversation

@rjnutter

Copy link
Copy Markdown

What does this PR do?

Labels spin produced by --calculated-spin as estimated in simulator provenance while preserving its RPM value. Derived backspin and sidespin also remain estimated. Measured-spin and low-confidence fallback behavior are unchanged.

AI assistance: Codex prepared the patch and regression tests, reviewed the code paths, and ran the automated checks below. Contributor review and human manual testing are pending; this PR is a draft.

Why was this required?

The calculated-spin path sets spin_source="calculated" and confidence to 0.7. The simulator resolver checked confidence but ignored the source, so a calculated value appeared measured in the simulator badges and session-log provenance.

Automated tests

  • Regression tests failed before the fix: 3 failed, 29 passed. After the fix and expanded fallback coverage: 34 passed.
  • Coverage includes calculated/measured/legacy sources, present/missing spin axis, unchanged numeric spin values, low-confidence fallback, and server forwarding into the simulator and UI payload.
  • uv run --extra camera pytest tests/ -q --tb=short: 1,564 passed, 7 skipped.
  • Ruff lint passed; Pylint passed at 9.58/10.
  • UI unit tests: 239 passed. UI build and lint passed.
  • Changed production file passes Ruff formatting. Repository-wide formatting flags six untouched files; no unrelated formatting changes are included.

The camera extra supplies OpenCV needed by existing tests. Test connectors require no physical radar or live simulator.

Manual (human) testing

Not performed yet. I have not physically built the project. The results above are automated checks executed by Codex, not human manual testing or hardware validation. This draft remains pending my review and a software-only manual check.

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, with --extra camera as noted above)
  • 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

@HuggeK HuggeK added the bug Something isn't working label Nov 10, 2026
@Robinante Robinante moved this to In Review in OpenFlight Kanban Board Nov 26, 2026
@Robinante Robinante moved this from In Review to In Progress in OpenFlight Kanban Board Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants