Skip to content

Show unavailable route distance without numeric overflow - #1724

Merged
timohueser merged 2 commits into
developfrom
codex/unavailable-route-distance
Sep 13, 2026
Merged

timohueser merged 2 commits into
developfrom
codex/unavailable-route-distance

Conversation

@timohueser

@timohueser timohueser commented Sep 13, 2026

Copy link
Copy Markdown
Owner

An unreadable route can report no cross-track distance. Map and Statistics previously formatted its u32::MAX sentinel as a number, which overflowed in checked builds and produced false output in release builds. They now show their existing off-route label without a numeric distance.

Distance rounding uses wider intermediate values. The compact distance buffer and its two transient stat-cell consumers hold the complete u32-range result, including its unit. Normal thresholds, rounding, translations and navigation policy are unchanged. No resident App field changes.

Closes #1722. Parent #1433; program #1448. The original trace came from a truncated browser card followed by replay seek during #1720; its narrower reset checks remain intact.

Validation:

  • Independent source review approved e15c7c06 with no findings. Clean rebase onto80241949 preserved both patches exactly; final head e8534d6.
  • CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=/Users/timo/Documents/OSM/target ./tools/obc test -p obc-app -p obc-route: 1,371 passed (App1,152 unit/integration+4 doc; route215),4 existing ignored doc examples. Real empty/unreadable route sources pass through Navigator to both rendered screens in metric/imperial; text rows match label-only chrome. Formatter maxima and normal crossover cases pass.
  • Registry69 suites/350 units, affected plan29/69, all four Cargo-root formatting checks and diff check passed.
  • cargo clippy --locked -p obc-app -p obc-route --all-targets --all-features -- -D warnings: passed. cargo check --locked -p obc-app -p obc-route --no-default-features --target thumbv8m.main-none-eabihf and cargo build --locked -p obc-sim --bin obc-sim also passed. Only normal Map/Statistics frames were rendered; both match their existing manifest hashes.
  • One final shipping image on the combined head passes strict alignment and all resource limits. Linked resident312,952 B; arena131,072 B; residual stack46,472 B; guarded poll9,952 B; task4,048 B; boot chain16,688 B. Named frame maxima: init72 B, storageflat10,264 B, boardflat9,344 B. ELF SHA-256 f5e128e95057d3d3ca3928ebbc8f188ce44a55c3fa8e414c026a16f687f05c1b. This includes independently merged Peak View storage changes; this PR changes no resource baseline or ceiling. The selected direct planning chain is40,792 B including common prefix, leaving5,680 B before interrupt/other indirect costs. Physical high-water remains unmeasured on this image.

No public documentation changes: this corrects an error label and bounds arithmetic, with no new strings or normal behavior. No full local snapshot/workspace sweep, external fixture download, base/diagnostic firmware build or physical test. CI covers wider consumers.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5ddc6046-f08f-4705-916b-75251781d2b1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Handle unavailable route distance without numeric overflow

1 participant