Skip to content

[WP32] N2K state core and emitters - #2137

Draft
mbuckton wants to merge 17 commits into
developmentfrom
review/state-n2k-core
Draft

[WP32] N2K state core and emitters#2137
mbuckton wants to merge 17 commits into
developmentfrom
review/state-n2k-core

Conversation

@mbuckton

Copy link
Copy Markdown
Contributor

Scope

Review and deterministic JUnit coverage for io.mapsmessaging.state.n2k and io.mapsmessaging.state.n2k.handler.

Tests added

  • N2K session lifecycle, cleanup, idempotency and post-stop delivery
  • Twin position/motion validity, partial updates and stale-event rejection
  • AIS report prerequisites, report types, scheduling, material-change thresholds and signatures
  • Heading/course wrap-around and geodetic boundary calculations
  • Drone monitor emission isolation and cleanup

Confirmed bugs fixed

  • Repeated session start/stop and post-stop events were not guarded
  • Startup/shutdown failures could skip protocol cleanup
  • Stale navigation or motion events could overwrite newer twin state
  • Null-to-null motion values were treated as material changes
  • Near-antipodal distance calculations could return NaN
  • PGN 129040 bypassed the half-interval material-change throttle used by PGN 129039
  • Monitor shutdown retained per-drone emission state

Verification

A work-package-specific GitHub Actions run executes targeted tests, the complete Maven test suite and assigned-package JaCoCo extraction. Final commands and coverage will be recorded in docs/review/WP32-README.md.

Remaining risks

SocketCAN, real CAN interfaces and live N2K traffic are explicitly excluded. The parser/protocol boundary is exercised with test doubles.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e189d38e-4d6d-4e2b-9ce8-3fd60aa3809c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review/state-n2k-core

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.

1 participant