Skip to content

Preserve hub ownership evidence and clarify takeover and privacy controls - #7

Draft
pjeweb wants to merge 4 commits into
osb/T1015from
osb/T1016
Draft

pjeweb wants to merge 4 commits into
osb/T1015from
osb/T1016

Conversation

@pjeweb

@pjeweb pjeweb commented Nov 17, 2026 •

Copy link
Copy Markdown

I noticed the phone could accept an older hub with the same key and lose what it had already seen of ownership and access changes. Guarding against that must not lock a phone out after an owner takes the hub over while the phone is away: the new hub restarts the access count, which can be lower than what the phone last saw. It also needed to distinguish devices that stayed in from those waiting for Allow, and make the privacy control clear for people who cannot show the picture.

  • Check ownership signatures and freshness before accepting a hub, waiting or not. Keep the owner's highest access counter between hubs that handed over in a planned move, and start a new count only after a signed owner takeover. Send only recent removals on reconnect.
  • Show a calm “still in” line after an agreed takeover, or explain the wait and offer Allow all by name with the possible gap, reported removal count and known names.
  • Give HIDE a crossed-out eye and a separate “Privacy screen on” state, with a visible disabled reason when it cannot be used. Keep Move stream outlined and fill only the next primary action.
  • Respect an owner's earlier end time while waiting for Go live, treat an absent end as no fixed end, and clear stale handover reminders from authoritative state.

The phone pins the accepted ownership root and signed history in its setup settings, together with the highest access counter it saw and the takeover it was counted under. A takeover in the signed history newer than that one starts a new count. Protected local access evidence travels in the encrypted reconnect handshake so a standby can detect a stale copy. A newly scanned setup starts a separate account. It does not initiate takeovers itself. The status and controls follow the hub's confirmed state.

Sits on #6 (which sits on #5).

Choices, validation and limits

The inherited not-live handover picker uses fixed choices: 30 minutes (preselected), 1 hour, 3 hours, 12 hours, 24 hours and 7 days. The end-time picker uses 1 hour, 3 hours, 12 hours, 24 hours and 7 days, plus No end time when one is already set. These are app choices, not a dynamic list from the hub. The 7-day end request subtracts 60 seconds to tolerate a slightly fast phone clock; larger clock errors can still be refused. Going live does not override an earlier end time set by an owner.

Status: Protocol review passed. The two evidence-storage follow-ups are fixed with focused regressions; this remains a draft.

  • Catalyst command-line tests: 98/98 with the brand flag and 98/98 without it, compiling the production hub sources and the setup settings. They drive the same check, learn, settings and storage calls the app makes, with restarts through the settings encoding and the evidence file. The prior revision's Catalyst app/test builds succeeded; no new Xcode build was run for the focused storage follow-up. The app-host test launcher stalled before reporting tests in earlier runs and was not used here.
  • The takeover tests use signed histories and access counters produced by the hub's own takeover code: an agreed takeover this phone did not see (counter 46 after the phone saw 50) is accepted and survives a restart; a waiting takeover stays connected through the owner's Allow (47). A stale host at the same epoch, waiting or not, a planned move with a lower counter, an older epoch, a tampered signature and forked histories are still refused.
  • The actual Noise reconnect regression covers the same cases over real connections: it skips an older epoch and a lower counter from hosts sharing the same key, accepts the unseen takeover, skips a stale waiting host, stays connected through Allow and keeps 47 across a restart.
  • A signed history whose base is newer than anything the phone held hides whether a takeover happened. The phone treats it as a new count, because a hub reached only by planned moves always carries the counter forward and so cannot report less.
  • The counter floor is kept in the setup settings. A damaged evidence file is set aside, not overwritten, and one that cannot be read yet (before the first unlock) is left alone until it can be read and merged. Removal ages use the phone's monotonic clock while it has not restarted, so a clock step neither drops a recent removal nor keeps an old one. Across a restart, a removal dated slightly in the future counts as just now, and one more than a day ahead is dropped.
  • Recovering an unreadable evidence file compares its device list with the newer in-memory state in the same counter lineage, so missing devices become removal evidence. Forgetting a hub deletes both the current evidence file and its damaged-file copy, including after a restart. Both new regressions fail before the fix and pass after it; the newer-takeover regression also checks that no removal is invented across a lineage change.
  • As before, the phone trusts any correctly signed takeover record; checking that its signer is an owner is left to the hosts.
  • With copy counter 45, the unchanged reference judge incorrectly agrees with the before-run counter 40, but refuses agreement with the after-run counter 50 (owner_saw_more).
  • Regressions cover the takeover trail's count-only removals, incomplete history, one-day removal expiry without another state, signed ownership, changed roots and setup scope.
  • The prior revision's 75/75 app-host Catalyst results and two Simulator builds are historical evidence. The attached synthetic screenshots are also from that revision, resized exports of the same landscape captures, not separate viewport tests. Some lower controls are outside the captures; they do not prove the updated removal wording.
  • No physical-device run, notification interaction test, installation or hub deployment.
  • The app has no offline HIDE queue, so it disables the control while the hub is unreachable. It does not follow hub redirects or initiate an owner's takeover.
Before and after screenshots (synthetic data)

Ready

Before (390 px):

Before ready, 390 px

After (390 px):

After ready, 390 px

Before (1280 px):

Before ready, 1280 px

After (1280 px):

After ready, 1280 px

Live phone

Before (390 px):

Before live-phone, 390 px

After (390 px):

After live-phone, 390 px

Before (1280 px):

Before live-phone, 1280 px

After (1280 px):

After live-phone, 1280 px

Hidden

Before (390 px):

Before hidden, 390 px

After (390 px):

After hidden, 390 px

Before (1280 px):

Before hidden, 1280 px

After (1280 px):

After hidden, 1280 px

Owner waiting

Before (390 px):

Before owner-waiting, 390 px

After (390 px):

After owner-waiting, 390 px

Before (1280 px):

Before owner-waiting, 1280 px

After (1280 px):

After owner-waiting, 1280 px

Hidden helper

hidden-helper, 390 px

hidden-helper, 1280 px

Hidden unreachable

hidden-unreachable, 390 px

hidden-unreachable, 1280 px

Hidden dark

hidden-dark, 390 px

hidden-dark, 1280 px

Takeover stayed

takeover-stayed, 390 px

takeover-stayed, 1280 px

Takeover waiting

takeover-waiting, 390 px

takeover-waiting, 1280 px

Access takeover

access-takeover, 390 px

access-takeover, 1280 px

@pjeweb pjeweb added fork-only Downstream-specific change; this change is not intended for upstream. stacked Sits on another open pull request. labels Nov 17, 2026
@pjeweb pjeweb changed the title Keep access evidence through hub takeover and clarify privacy controls Preserve hub ownership evidence and clarify takeover and privacy controls Nov 17, 2026
An owner takeover restarts the access counter above what the owner
devices reported, so a phone that was away can see a lower number than
it last saw. The counter floor refused that hub until the count caught
up, and closed the connection when an owner allowed a waiting phone.

Keep the floor only within one counter lineage: the same epoch or hubs
reached by planned transfers. A validated takeover in the signed
history that is newer than the lineage the counter was seen under starts
a new count, without inventing removals. A history whose signed base
hides everything this phone held is treated the same way.

Check the counter of a waiting welcome as well. Keep the floor in the
setup settings next to the pinned ownership, set a damaged evidence file
aside instead of overwriting it, and leave one that cannot be read yet
untouched until it can be merged. Age removals by the monotonic clock
within one boot, so wall clock steps neither drop recent removals nor
keep old ones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork-only Downstream-specific change; this change is not intended for upstream. stacked Sits on another open pull request.

Development

Successfully merging this pull request may close these issues.

1 participant