Skip to content

[WP29] MAVLink bootstrap and twin state - #2138

Open
mbuckton wants to merge 24 commits into
developmentfrom
review/state-mavlink-bootstrap
Open

[WP29] MAVLink bootstrap and twin state#2138
mbuckton wants to merge 24 commits into
developmentfrom
review/state-mavlink-bootstrap

Conversation

@mbuckton

@mbuckton mbuckton commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Scope

Reviews and tests the owned MAVLink root, bootstrap, and readiness-check packages on base commit 9455754a92ffb5136e1d15f0efd749a5dc20d838.

Explicitly excludes listener, message, packet, model, sender, and binary-decoding production changes.

Tests added

  • 48 focused JUnit methods across bootstrap state transitions, request tracking, readiness combinations, source matching, monitor/subscriber lifecycle, complete twin-update ordering, and twin update semantics.
  • Retry and timeout behaviour uses direct timestamps with no sleeps.
  • Regression tests cover recovered request trackers, stale/invalid readiness data, recursive observer updates, half-updated twin evaluation, cleanup failure paths, and late events after shutdown.

Confirmed bugs and fixes

  • Stale battery telemetry could still report command-ready.
  • Invalid coordinates, sentinel GPS fixes, and non-finite battery values were accepted.
  • Exhausted bootstrap trackers survived recovery and suppressed later requests.
  • Monitor-authored readiness writes recursively advanced bootstrap evaluation twice.
  • Readiness was evaluated before listener-decoded packet state completed, causing transient bootstrap requests from incomplete twins.
  • Valid battery events did not populate the freshness field used by readiness.
  • Subscriber/updater/monitor shutdown was not idempotent and could skip cleanup or process late events.

Coverage

  • Baseline assigned-package coverage: lines 0.0%, branches 0.0%.
  • After: not measured. The available execution container has Java 21 but no Maven, and DNS prevented a local checkout. No percentage has been inferred from test count.

Commands

  • GitHub connector branch creation and comparison succeeded.
  • java -version succeeded with OpenJDK 21.0.10.
  • Targeted mvn ... test and broad mvn test could not run: mvn: command not found.
  • Direct clone could not run: Could not resolve host: github.com.

Remaining risks

  • Tests and JaCoCo must be executed in a normal repository checkout or CI environment.
  • Binary decoding, live loopback/broker behaviour, hardware timing, model-specific detection, and sender acknowledgement interaction remain excluded.
  • The excluded battery listener should eventually own the powerUpdatedAt assignment directly.
  • High-contention concurrency stress was not possible in this environment.

Full review: docs/review/WP29-README.md

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: 69810c4b-978f-41e3-ae82-9b584be93843

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-mavlink-bootstrap

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