Reading together (v0.6.0) #9
Reference in New Issue
Block a user
Delete Branch "feature/together"
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?
Day 5 (v0.6.0): reading together, the pure part (the app's
docs/05_together.md).liber_library::together:Wire::parse(kind, body): what another person's Liber sends in their Tabellarius group —liber.hello,liber.note,liber.note.withdraw,liber.buddy,liber.progress,liber.thread. Strict: unknown kinds and fields refused, every value capped (body 64 KiB, note 10,000 chars, quote 2,000, message 4,000, name 80, ids 1–64 of[A-Za-z0-9_-], progress finite in 0–1).place(doc, my_book, note): the note's anchor resolved in one's own copy withliber_format::resolve. Only the same book (ISBN-13 or fingerprint) can beExact; another edition is at bestApproximate; not found (or a tie within a chapter) isLost→ the side list.Reach::of(book)+folded(spot, placed, same, reach): the spoiler guard from the furthest position the library already keeps; a finished book folds nothing.Slot { slot, key, sha256 },Local { sha256 }), slot/key/mime checks.New ops (and their fold, export and restore):
PersonAdd,PersonRemove,Hide,Share,Unshare,BuddyRead,RecordAsk,RecordAskClose,RecordingAdd,RecordingApprove,RecordingRemove.Library::{hidden, playable, pending, removed_recordings}. A removed recording is final: a late add or approval does not bring it back; an approval that arrives before its add is kept.Tests (
tests/together.rs, 8): mandatory 2 (exact in the same edition, approximate at the right words in another, the side list for rewritten text and for a tie), 3 (folding by chapter, by progress across editions, after the library is rebuilt from events in another order, nothing folded once read), 4 (the core's half: unapproved never playable, removal final across devices, hostile values dropped), people/shares/hides with an export round trip, strict wire parsing. Workspace 124 green (116 before); clippy 0; deps 0 not allowed.Self-review
placedowngradesExacttoApproximatefor another edition even when positions and text agree: the positions are the sender's, and the reader should know.resolvetakes the chapter nearest the anchor's own when the same text is in two chapters (its Day 1 rule); only a tie inside one chapter isLost. That is a nearby place, never a random one.sha256of the sealed take, so a later take from the same link is a new recording that waits again (the app makes its id).