Background
A mobile client RX uploader (meshcore/client/{PUBLIC_KEY}/packets, see docs/client-rx-coverage.md) may send a minimised raw packet to limit what it shares:
- non-advert packets: header, transport codes (for TRANSPORT_* routes) and path only, with the payload removed;
- adverts: sent whole, because the heard key is the advertiser's pubkey.
Coverage only needs the directly-heard node:
path[last] for FLOOD routes with ≥ 2-byte hashes;
- or the 0-hop advert pubkey (see "Capture HARD RULE" in the docs).
Question
Does the ingestor's client path (handleClientPacket → DecodePacket → deriveHeardKey) accept such a minimised packet? Or does DecodePacket reject the truncated payload, so the reception is silently dropped?
Task
- Tests through the real
handleClientPacket path. Write a test for each case:
- FLOOD non-advert with a 2-byte and a 3-byte path and the payload removed. Expected: one
client_receptions row with heard_key = path[last].
- TRANSPORT_FLOOD with transport codes, the path and no payload. Same expectation.
- The same packets whole (control).
- Whole adverts (0-hop, and with a path).
- DIRECT and TRACE minimised packets. Expected: still not attributable, so no row.
- Malformed input: a path length byte that claims more bytes than are present. Expected: drop without a panic.
- If the minimised form is rejected, make the client path decode only what coverage needs (header, transport codes, path) when the payload is absent, without changing the observer path. Keep the HARD RULE unchanged.
- Document in
docs/client-rx-coverage.md that a minimised raw packet is accepted and what it must contain.
Acceptance
Background
A mobile client RX uploader (
meshcore/client/{PUBLIC_KEY}/packets, seedocs/client-rx-coverage.md) may send a minimised raw packet to limit what it shares:Coverage only needs the directly-heard node:
path[last]for FLOOD routes with ≥ 2-byte hashes;Question
Does the ingestor's client path (
handleClientPacket→DecodePacket→deriveHeardKey) accept such a minimised packet? Or doesDecodePacketreject the truncated payload, so the reception is silently dropped?Task
handleClientPacketpath. Write a test for each case:client_receptionsrow withheard_key = path[last].docs/client-rx-coverage.mdthat a minimised raw packet is accepted and what it must contain.Acceptance
DecodePacketbehaviour for full packets are unchanged.cmd/serveris untouched or read-only. No newmap[string]interface{}.