Repository navigation
feat(read-state): sync mark read, channel mark unread and thread follows - #9501
Draft
wpfleger96 wants to merge 12 commits into
Draft
wpfleger96 wants to merge 12 commits into
wpfleger96 wants to merge 12 commits into
Conversation
Specify and implement cross-device sync for manual read state and thread follow choices in NIP-RS and the mobile client. - Catch-up advances the channel frontier (top-level messages) or thread:<root>; activity: and thread-activity: become read-only legacy keys. - Explicit mark read publishes; a first explicit read of a message writes only its msg: frontier. Passive marks stay on the device. - Whole-channel mark unread publishes an override group that merges and clears with its counter across installations; msg:/thread: groups from peers are ignored. Message and thread mark unread stay on the device and end once a covering frontier passes their baseline. - Thread follows sync on thread-follows:<slot> coordinates, with legacy local follows imported at at=0. An explicit unfollow suppresses ordinary replies at admission, and retained unread state is re-evaluated when follow choices change. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
…played Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
… apart Every follow edit and packet takes a saved, strictly increasing reservation. Pending edits stay in every later full-slot packet until an own head at or above them, or the exact packet that captured them by event ID and generation, covers them. Adds witnesses W1, W2, no-omission and the same-second own-head tie. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Reading one Inbox row clears only that row's marks; catch-up and explicit channel or thread reads still clear the whole scope. A failed synced clear stays reported through unrelated successful syncs until it lands or the override ends. Adds the real-seam two-row Inbox test, the isolated unreadable peer head across restart and the failed-clear lifetime test. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
setThreadFollow resolves after the journal write; a failed write reverts that tap and reports it. Reservations past uint32 fail visibly. Adds tests for spill no-omission, exact-byte retry after an unknown outcome and a writer retired while signing. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Freeze each follow candidate's plaintext, captures, basis and reservation together and journal the reservation before signing. Allocate owned slot IDs when an edit is placed. Resolve an OK placeholder against the retained signed packet. Floor reservations at accepted own heads, hold follow retries and refuse taps behind an unreadable own head, settle legacy imports only once journaled, and never prune an explicit unfollow. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Every import awaits the serial journal queue, so a key is settled only once a write covering it succeeded, including an overlapping import's or tap's still-saving entry, and only if that entry survived. Reserve before touching a key so a refused reservation leaves nothing behind. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
…aved state Refuse follow and unfollow until this writer's first complete recovery, with every owned follow head readable. Settle a legacy import only for entries the awaited journal write covered and that are still current. Describe the overfull primary's compact rewrite in NIP-RS. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
A writer accepts follow taps only once a complete recovery is durably journaled, on both the startup and publish recovery paths. Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Member
Author
|
Desktop counterpart (new Buzz): block/buzz-app#3552 |
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
This branch has not been deployed
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.
Reading, mark read, whole-channel mark unread and thread follow choices now sync across a person's installations. This PR specifies the rules in NIP-RS and implements them in the mobile app.
Spec (
docs/nips/NIP-RS.md)thread:<root>.activity:andthread-activity:become read-only legacy keys.msg:frontier. Display, dwell, scroll, catch-up and mention visibility create nomsg:entries.msg:andthread:groups.thread-follows:<32hex>coordinates, validation, three-state verdict, last-writer merge with ties going to unfollow, publication and recovery, legacy import atat = 0, and capacity.Mobile
msg:marks stay on the device.thread-follows:slots. They share the read-stateclient_id, journal,created_atsequence, snapshot and live subscription, and spill across up to 16 slots with stable placement. An unreadable coordinate marks follow state incomplete and blocks this installation's follow publication.at = 0after a complete merge, once their channel is known from a relay event. An imported key is settled, and its legacy copy retired, only when the journal write the import awaited covered it and that entry is still current.Related: block/buzz-app#3552