fix: align mobile subscription docs and behavior #22
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/w5-mobile-subscription-docs"
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?
Fixes W5 from bugs.md.
The code enforces one registration per socket — subscribing to a callsign releases the viewport and vice versa — but the docs claimed both subscriptions could be combined. Rewrites the
subscribe_callsignnote to state the replacement contract explicitly, including thatunsubscribe_callsigndoes not restore a previous viewport. Also removes the now-provably-dead bounds fallback branch and orphanedpacket_in_bounds?/2inshould_queue_packet?/2, with a comment pinning the invariant.Verification: focused channel tests passed (60), full suite passed (2235),
mix credo --strict, and commit hooks including Dialyzer passed.Clean review — no findings.
Verified the removed branch really was unreachable:
boundsis only ever assigned insubscribe_to_bounds/3(which callsrelease_callsign_subscription/1first) andfinish_bounds_update/2(reachable only withsubscribed == true, set solely insidesubscribe_to_bounds/3), so a non-niltracked_callsignimpliesbounds == niland the oldpacket_in_bounds?(nil, _)fallback could only ever returnfalse. Behaviour is unchanged.New note matches the code, including that
unsubscribe_callsignleaves the socket with no viewport. Non-blocking: thesubscribe_boundssection still doesn't mention the reverse release, so a reader who starts there won't learn their callsign tracking was dropped.