Mobile callsign history stops at 1000 packets with no sign that it was truncated #56
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
subscribe_callsignacceptshours_backup to 168 and documents that history follows, but the replay is a hard-coded 1000 rows, newest first. A busy station asked for 24 hours arrives starting partway into the window, with no count, no cursor and no truncation flag, so a plotted track silently begins late.Evidence
At
2f150f66:lib/aprsme_web/channels/mobile_channel.ex:715callsPackets.get_callsign_history(callsign, hours_back, 1000)with a literal limit the payload cannot change.lib/aprsme/packets.ex:470orders descending withlimit: ^clamp_limit(limit), so the newest rows win and the rest of the window is dropped.docs/mobile-api.md:326documentshours_backwith a maximum of 168 and no packet cap.docs/mobile-api.md:71shows thatsubscribe_boundsalready takes a documentedlimit, so the shape exists in this API.Expected
Either load the requested window, or take a documented limit and report when the replay was truncated, in the same style as
subscribe_bounds.How to verify
Insert 1500 packets for one sender across 24 hours, push
subscribe_callsignwithhours_back: 24, and sum the packets events: they total 1000.Acceptance criteria
Effort: S
Lens: api