ReviewOS

also looking at this

stacks/drone

feat: add bounded TCP transport for autopilot drivers

#71
Merged chris wants to merge codex/mavlink-tcp-transport into main
22 files +1798 -154
9 days ago

ArduPilot and PX4 callers can select explicit literal-loopback TCP with transport: 'tcp'; UDP remains the default. Both transports share source identity, telemetry, acknowledged protocols, PX4 priming and physical receive-only policy. Fresh connections require fresh discovery and priming, without automatic transaction replay.

TCP enforces separate absolute 2-second connect and first-heartbeat budgets, plus separate 500 ms drain/progress limits. Native regressions exposed late connect, queued heartbeat and late output callbacks being accepted before timer callbacks ran. Admission and progress now check expiry themselves. A per-connection 4 KiB stream watermark sits below the separate 16 KiB outstanding-callback cap. Bounded MAVLink v1/v2 framing preserves CRC and strict signing checks. Detached transportSnapshot() records expose diagnostics without authority.

The QA-only OS peer sets a bounded receive buffer, sends matching telemetry independently and withholds application reads until explicit resume. Corrected passive fixtures distinguish sustained pressure from legitimate early native/kernel progress. One bounded establishment budget is shared across phases; writes stop during each original 1,500 ms observation. Establishment resumes only after an observed transition strictly before the original 500 ms epoch. Sustained no-fault stalls and late/ambiguous transitions fail immediately. The latest correction changes tests only; production transport bytes and deadlines are unchanged.

The parity inventory adds ten explicitly unsupported Linux/SITL HAL UART samples, four immutable source records and 35 anchors. Totals: 89 cases, 46 sources, 63 unsupported cases and 1,317 unclassified dimensions. This is inventory evidence, not firmware parity.

Validation of published commit b18e1d63d344452cf45719cf3b4072a752b71bce:

  • Full local Buddy suite: 1,555 pass, 27 skip, zero fail, 489,808 assertions, 1,582 tests across 200 files. All tracked source, HEAD and Bun 1.4.2 remained unchanged.
  • Exact-head Linux CI 39870834185: all five jobs passed. The Bun 1.4.3 full suite recorded 1,541 pass, 41 skip, zero fail and 489,785 assertions. Both rendered browser jobs, purge namespace and neutral-only firmware builds passed.
  • Four copied standalone ArduPilot/PX4 UDP/TCP campaigns ran outside the checkout, including signed PX4, dropped ACK/retry, parameter read/write and two-way mission transfer/resume. Physical flight, firmware SITL and hardware validation flags remained false. ACK acceptance does not claim vehicle execution.
  • Focused controls passed 42 tests and 699 assertions, including all 19 TCP cases. Disabling each real production expiry branch made the corrected regression fail; exact bytes were restored. A fixed four-trial Linux campaign passed 76 test executions and 536 assertions using the byte-identical test file.
  • Native Pickier, application/runtime types, docs/roadmap/parity checks and both independent review axes passed. Original failed product and diagnostic campaigns remain retained in #73. Research-only workflows and startup modes did not enter main.

Published to origin/main with a normal fast-forward push as Chris Breuer, author and committer, without coauthors. Issue #73 is complete. #7 and #28 remain open for their broader requirements. The previous workspace-startup cause in #72 remains unproven despite this successful run.

Physical commands remain disabled. Actual firmware SITL, serial, deployed signing/replay lifecycle, complete protocol variants, hardware/HIL and the remaining upstream inventory remain open. These optional drivers support our owned runtime and mission engine.

22 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.