Repository navigation
Conversation
pjeweb
force-pushed
the
osb/pr/heat-link-box
branch
from
November 13, 2026 21:24
8b3e3a1 to
fa3142e
Compare
pjeweb
force-pushed
the
osb/pr/heat-client-lease
branch
from
November 13, 2026 21:48
5f30f3d to
ed725df
Compare
1 of 5 tasks
pjeweb
force-pushed
the
osb/pr/heat-client-lease
branch
from
November 14, 2026 00:45
ed725df to
68c91d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The heat plan in #71 ends, at critical temperature, with pausing other devices on the box's hotspot. But the box has no safe, reversible way to pause one device's traffic, so that step can't be wired up yet. Any such pause also has to undo itself if the box software crashes, or a guest could be left offline for no reason.
What
How: the pause is one marked nftables table (the Linux kernel firewall), replaced in a single atomic transaction, with the client in a set whose entries expire. Updates run one at a time and recheck admission right before they apply, and once stopped the owner can't be re-armed. Devices with both IPv4 and IPv6 addresses are left alone until complete address bindings exist.
docs/HEAT-CLIENT-LEASE.mdexplains it.Automatic use has to wait for a session owner that can prove which path is the phone's and how much room the other links have; today's transport statistics can't. Missing evidence stays unknown and leaves traffic alone.
Sits on #71 (heat planning while carrying a phone's traffic).
How to verify
Run
apps/backend/src/tests/heat-client-pause.test.ts. Its namespace fixture uses two virtual clients and the real kernel: the phone keeps forwarding, the paused guest is blocked both ways, local traffic still works, the pause clears on restart and expires after SIGKILL, unrelated rules survive, and a foreign table is refused.Testing and limits
Risks
None for running boxes: nothing calls it yet. If a later owner misidentifies a device, the five-second lease limits the damage to as long as it keeps renewing.
Checklist