Skip to content

Harden MAVLink transport and state lifecycle - #2152

Draft
mbuckton wants to merge 12 commits into
developmentfrom
agent/mavlink-runtime-hardening
Draft

Harden MAVLink transport and state lifecycle#2152
mbuckton wants to merge 12 commits into
developmentfrom
agent/mavlink-runtime-hardening

Conversation

@mbuckton

@mbuckton mbuckton commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

This change hardens the existing MAVLink implementation without changing the protocol architecture used elsewhere in MapsMessaging.

Changes

  • prevent logical UDP facade sessions from closing the shared physical UDP endpoint
  • process packets received from configured forwarders through the normal MAVLink pipeline without forwarding loops
  • contain failed session creation and always restore selector read registration
  • retain and cancel scheduled MAVLink heartbeat tasks
  • support serial endpoints without parsing their device name as a network socket
  • separate serial input and output scratch buffers
  • correct MAVLink v1 serial framing to read four header bytes after magic and payload length
  • track MAVLink sequence state independently per component
  • support JSON list-backed numeric arrays in typed MAVLink packets
  • clean up twin observers and partially started state subscribers
  • preserve model-provided detection contact identifiers
  • contain malformed telemetry in the state subscriber

Tests

  • deterministic concurrent serial input/output regression test
  • MAVLink v1 serial frame-length and byte-preservation coverage
  • JSON numeric-list to integer-array conversion coverage
  • invalid JSON array element coverage

Scope

The MAVLink schema library remains responsible for MAVLink packet formats and encoding. These changes are limited to transport flow, session/state lifecycle, error containment, and the server-side handoff around that schema layer.

@coderabbitai

coderabbitai Bot commented Aug 4, 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: 3af3b534-e959-4043-b334-fb1de58c9403

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

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