Support full-width MAVLink source and destination system IDs - #46
Conversation
Previous review (2026-09-25)Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Full report: https://uav.tridgell.net/DevCallReviews/2026_09_25_AIReview/devcall_pr_reviews.html#prSupportProxy-46 Reviewed at head The relay change is correct, and I checked that by mutation rather than by reading. Five separate reversions each fail the new tests: turning off the Three things worth a look, none of them a defect in this repo's own code. 1. Every relayed frame now advertises Severity stated honestly: nothing in the pinned stack currently reads 2. Wide-ID The consequence is operational: 3. This PR's own webadmin test never ran in CI. Smaller notes:
Also checked and clean: Not covered: no hardware, all loopback. The interop claim in point 1 is reasoned from the flag's definition plus the fact that nothing reads it yet — I did not test against a genuinely legacy peer, so "a peer that acts on it will mis-send" is a prediction. |
Previous review (2026-09-25)Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Re-reviewed at head Verdict: COMMENT — there is no defect in this repo's own code at this head: no memory-safety problem, and no possibility of cross-tenant routing or log leakage. It is not a clean APPROVE only because a separate cold review pass found a real behavioural asymmetry on a path our primary review had explicitly cleared. Everything below is a NOTE. We built and tested this head locally ( Routing and cross-tenant isolationStating this unambiguously because it is the most serious thing that could be wrong in a relay: there is no sysid-keyed routing in SupportProxy, so a sysid above 255 cannot collide with, alias, or leak into another peer's traffic, and there is no Two corrections to our own wording, from the Codex pass: our grep claim was too absolute ( FindingsNOTE — relaying a TARGET32 frame whose target is at or below 255 drops the header target. At
The cold pass called this a BUG and returned REQUEST CHANGES; we have reduced it to a NOTE. A conforming sender cannot produce the frame: TARGET32 is set on the sending side only when the target exceeds 255 (the same condition, in both It is still worth raising for two reasons. It corrects our own primary review, which cleared this path as "forwarded verbatim" on the strength of a wide-target probe alone (Codex separately noted "verbatim" overstates it, since the relay re-finalises and re-signs). And the PR description opens with "Re-finalizing forwarded frames discarded explicit header targets ... Preserve targets" — so this is precisely the behaviour the PR sets out to fix; it is fixed for every value a conforming sender can emit, and not for the rest. Either a line in the description scoping the claim, or preserving target presence independently of its value. Note the delta also dropped the only regression test for a header/payload target disagreement ( NOTE — wide-ID tlogs are silently truncated by the default pymavlink reader. NOTE — the TARGET32 branch at NOTE — the description does not link the companion PRs. We checked it directly. The pointer chain itself is correct and coherent: NOTE — a legacy engineer GCS loses the proxy's own diagnostics after a wide heartbeat. The proxy neither translates nor truncates a wide sysid: it forwards verbatim and a pre-2.1 peer drops the frame silently, because the old NOTE — seven test files are in no phase of the runner at all. Parsing NOTE — rollback asymmetry. Previous round
Checked and clearedFive mutations, each rebuilt in the foreground with the binary's mtime verified before measuring — because a failed build leaves the old binary in place: dropping the TARGET32 branch → 6/9 fail; Frame sizing: 10 core + 3 SYSID32 + 4 TARGET32 + 255 payload + 2 CRC + 13 signature = 287, and a compiled probe confirms Untrusted input: Codex ran ASan/UBSan over the full serialisation matrix (2048 payload-length/flag combinations), 274 truncated frame prefixes with recovery padding, and one million pseudorandom parser bytes — no overflow. We separately drove hand-built hostile frames into the real binary over UDP: a truncated frame claiming Also cleared: the CI at this head: Not covered: no hardware, all loopback; Codex cross-check: the finding-validation pass returned 5 confirmed, 2 adjusted, 1 refuted, 0 new and judged the approval defensible; the cold pass, given only the PR, independently confirmed no cross-tenant aliasing and clean parser bounds but found the small-header-target normalisation above — which is exactly what a cold spot-check exists for, since it lands on a path the primary review had cleared rather than on a finding it had made. |
Preserve full source and target IDs while forwarding and re-signing received payloads, including unknown extension bytes. Widen log replies, reboot filters, status identities and configuration without changing the database layout. Use the pinned MAVLink generator for builds, CI and Docker, with end-to-end coverage of forwarding, signing, logging and uint32 configuration boundaries.
Previous review (2026-09-25)Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Re-reviewed at head Verdict: COMMENT — no defect established in this repo's own code at this head. The 20-line delta is an upstream convention bump plus the matching test assertion, and no SupportProxy C++ changed: Two notes1. Note what this closes: the previous round raised the behaviour as a finding, and you have now answered it on the merits by redesign — with 2. Still open from earlier rounds, restated so they aren't lostWide-ID tlogs are still silently truncated by the default pymavlink reader, and this belongs in What was checked and clearedSentinel audit — the one place this delta could have introduced a bug here. The payload target byte for a wide target is now 255, not 0, so anything reading a decoded payload target could misread it as a real system 255. There are exactly three Mutations actually run (each rebuilt in the foreground with the binary's mtime checked first, because a failed build leaves the old binary in place). Most usefully: installing the old pinned pymavlink ( Routing and isolation: no sysid-keyed forwarding, no What the suite does not catch, plainly: there is still no test for a frame whose header and payload targets disagree, so the small-header-target normalisation is unpinned in either direction — those frames had to be hand-built for the probe above. A raw- CI
|
Pin the upstream merged generator and exercise its default mmap-backed tlog reader. Clarify payload targeting for 8-bit peers and the configuration limits when rolling back to an older proxy.
An early pytest failure skipped later phases, and several regression files were omitted from the standard runner. Run every phase while preserving failure status, include the missing tests, and terminate each test proxy process group so orphaned children cannot retain ports used by subsequent tests.
The binlog test could lose its first block before the sockets were bound, and the RTMP test stopped its publisher during the handshake. Wait for listeners and a joinable stream, settle shared ports for directly created sessions, and track only the tested proxy's backend PIDs so parallel workers cannot cause false orphan failures.
|
Automated review note — AI-generated (Claude), validated against the live diff (Claude + Codex cross-checked). Please sanity-check before acting. Re-reviewed at head My previous comment had 8 items. 6 are resolved; the other 2 were optional and still stand (a simplification and a test gap). Nothing here blocks.
Submodule: Test harness: the group kill via
CI is green (2/2) and all four phases ran. |
Preserve full-width source and destination system IDs when forwarding MAVLink frames, including signed frames and unknown payload extension bytes. Widen log replies, reboot filters, status identities and configuration without changing the database layout. Ordinary 8-bit targets remain in the message payload; wider targets use the TARGET32 header extension.
Build against the merged ArduPilot MAVLink/pymavlink revision. Exercise the default pymavlink tlog reader, include previously omitted regression tests in the standard runner, and continue through every test phase while retaining a failing exit status. Document extension-aware peer requirements and configuration precautions for rollback to older binaries.
Stabilize parallel integration tests by waiting for listeners and completed publisher handshakes, cleaning up test process groups, and restricting backend-process checks to the relevant proxy. Orphan checks still track captured backend PIDs after their parent exits.
Validation: Docker and Test CI checks pass on 8503e6a. Local validation includes 59 connection, 13 authentication, 301 robustness and 305 webadmin tests, plus all 90 tests in the two affected fixture files with 16 workers. Claude reviewed the dependency, runner and fixture changes with no remaining findings.