Expand description
The other devices’ files fetched from the server too (docs/database.md, “Fetched from the server too”). The sharing folder stays the one a sync app carries, whichever it is; when that folder lives on a WebDAV server Sioul has an account for (Nextcloud, Murena, ownCloud), Sioul also reads it there, in case the sync app is late bringing the others’ files, or stops: Murena’s eDrive was seen bringing a computer’s records an hour and a half late, and its entry among the devices never.
- Found on the servers of the contacts-and-calendars accounts that keep
files Nextcloud’s way (
…/remote.php/dav/files/<user>/, the user as the server names it): the place given by hand, else the folder’s path from a phone’s storage (eDrive carries it as the cloud’s root), from a folder the Nextcloud client carries (localPath→targetPath), or its last names. - Confirmed only where the server’s
seal.tomlis this folder’s, byte for byte: a folder sealed otherwise is never read. Read again when it changes there, and every six hours. - Fetched when the window or the phone’s background step asks
(
pull):PROPFIND(Depth: 1) on the folder,devices/,leases/and each part’s claims, a folder whose ETag did not change skipped for ten minutes; of the other devices’ files, only those newer than both the synced folder’s copy and what was fetched before come down, into this device’s own state ($XDG_STATE_HOME/sioul/share/remote/, their paths as in the folder): records from where the copy here ends (its last line asked again and checked: a copy that does not join comes whole), only whole lines kept; the rest whole, a few hundred bytes each, kept only when it came whole. Ten seconds for each wait of the network, thirty for a pull. - Read (
overlay): the sharing reads, for each other device’s file, the newer of the two copies: records the longer (they only grow), notes to each other, entries and claims by the times they hold. The folder’s copy wins a tie. What was fetched goes once the folder’s copy caught up. - Sent too (
send, docs/database.md, “Sent to the server too”): this device’s own files, beside the sync app, each over what is there as it was seen; found there the same (the sync app sent it), not sent twice; records never shorter; never another device’s file. - Never: another device’s file written, moved or deleted on the server; anything written into the synced folder; this device’s own files fetched or read from there; plain HTTP (a test’s own stand-in apart); the password kept or said (it comes from the keyring, as the calendars’ sync has it, for the requests only).
Structs§
- Again
- What “Send everything again” did: when (Unix seconds), how many files went, how many were there already as they are here, and why it stopped (“” when it went through).
- Alarm
Times - How long a dose’s or a waking’s alarm waits for the others’ news (
alarm_news). - Counted 🔒
- A body read from memory, counting what went: what a failure says it sent.
- Failure
- A failed send, in detail: what the panel and the log say of it.
- Fetched
- A file of the server, as last fetched: its ETag and size there.
- Got 🔒
- What came of a file asked from a place in it: where it starts, its bytes, whether all came, and why not.
- Held
- A file held back after it failed: tries in a row, and when to try again (Unix seconds).
- Item 🔒
- Limits 🔒
- How long the network may take: each wait (to connect, for the next bytes); a listing or a small file in all; a records’ file in all, as long as it moves; a whole pull.
- Listing 🔒
- A folder of the server, as listed: its own ETag, and what it holds by name.
- Login
- An account to fetch with: its id in the configuration, where its server
was found (
Account::url), its login, and its password from the keyring (none kept there): used for the requests only, never kept nor said. - Looked
- A folder of the server, as last looked through: its ETag, and when (Unix seconds).
- Opened
- A folder of an account’s files as Sioul keeping it itself finds it: its address, where it is among the files, and its seal when it has one (another device shares through it: joining), else none (a new sharing).
- Pace
- How a device stands, for the pace of its pulls (
due). - Pulled
- What a pull did.
- Puller 🔒
- One pull: the server’s folder looked through, what is newer there fetched.
- PutFailed 🔒
- A file that did not go (
Server::put_file): the error, what kind of failure (“timeout”, “stalled”, “unreachable”, “tls”, “login”, “network”), how long the try lasted (seconds), how many of its bytes went, of how many. - Sender 🔒
- One send beside the sync app.
- Sending
- What sending this device’s own files beside the sync app knows (
send):share/sending.toml(share/sending-urgent.tomlfor the urgent lane), never shared, apart from the backup’s state, so that a pull and a send never write over each other’s. - Sent
- One of this device’s own files as it last went up (
MIRROR): its size and time here (nanoseconds), its ETag there (“” when the server did not say). - Server 🔒
- One server, signed in: requests with the account’s login, over TLS (plain
HTTP only to a test’s own stand-in,
dav::allowed), never redirected. Its requests go through the process’s one agent (dav::shared_agent): a pull, the sends after it and the next pull reuse one connection while it is open, each request with its own budget (limits). - State
- What the backup knows, kept privately beside the sharing’s memory
(
remote.toml), never shared.on,givenandaskedare yours, written only throughState::choose; the rest is the backup’s.
Enums§
- Alarm
News - Where an alarm’s news came from (
alarm_news). - Kind 🔒
- What a file of the folder is, by its path, and whose: a device’s records
(
<id>-<n>.jsonl), its notes to the others (<id>.toml), its entry (devices/<id>.device), a claim (leases/<part>/<id>.lease). - Lane 🔒
- The two ways this device’s files go (
send,send_urgent), each with its own lock and its own memory, so that a large file on a slow line, going up for minutes, never holds back a text to send. - Stop 🔒
- Why a pull stopped: the network or the server, or the folder no longer confirmed.
- Went 🔒
- What came of one file: gone or the same there, left (unchanged, paced, longer there), or held back after a failure.
Constants§
- ALARM_
TIMES - An alarm’s waits, as they are on a phone.
- BLOB_
LIMIT 🔒 - A sealed file is never fetched past this: the largest note’s, sealed.
- CHECK_
AGAIN 🔒 - A full check of what the server holds of this device’s files, beside the quick sends (each a few requests): every six hours, and when asked (“Send everything again”).
- FLOOR
- The slowest upload Sioul waits for (bytes a second): a phone’s mobile data on 3G sends faster. A 2.5 MB file is given 60 s and 156 s more.
- LARGEST 🔒
- A records’ file is never fetched past this.
- LARGE_
FILE - A file past this size (bytes) is a large one: on a metered or slow
connection (
Sending::frugal), sent at most everyPACEseconds. - LIMITS 🔒
- LIST 🔒
- LISTING 🔒
- A listing is never read past this.
- LIST_
AGAIN 🔒 - A folder whose ETag did not change is looked through again after this long all the same (seconds).
- LOOK_
AGAIN - Looked for again this long after the last look, when not found (seconds).
- MIRROR
- The mode where Sioul keeps the folder in step with the server itself, no
sync app at all (docs/database.md, “Kept in step by Sioul itself”): the
folder here is its own copy (
mirror_of), the server’s the one the devices share, a device beside a sync app reading the same. - OC 🔒
- Nextcloud’s own properties: the checksums a file was sent with (
oc:checksums). - OVERLAP 🔒
- The last line asked again, to check the copy here joins what is there, when shorter than this.
- PACE 🔒
- PRINCIPAL 🔒
- SEAL_
AGAIN 🔒 - The server’s seal read again this long after the last time, even unchanged (seconds).
- SEND_
LIMITS 🔒 - Sending this device’s files (
send): a step that sends a large file on a slow line is not cut after thirty seconds, as a pull is; each file is given the time its size asks (FLOOR). - SLOW
- Under this rate (bytes a second), measured on a file sent of 64 KiB at least, the connection counts as slow: paced as a metered one.
- SMALL_
WANTED - A file waited for under this size (a note, bytes) comes at once, the connection metered or slow too; a larger one (a paper) at most every ten minutes then.
- TEXTS_
LARGEST 🔒 - A device’s texts to send (
texts/send/<id>.jsonl) are never fetched past this. - WANTED_
AGAIN 🔒 - A sealed file waited for and not on the server yet (or cut on the way) is asked again within this long (seconds): it comes as soon as it is there.
- WANTED_
BYTES 🔒 - and this many bytes of them, the first whatever its size.
- WANTED_
FILES 🔒 - A step fetches at most this many sealed files waited for (
fetch_wanted), - WANTED_
KEPT_ 🔒DAYS - A sealed file fetched for a note waiting is kept this long at most (days),
in case it was not written meanwhile (
tidy_cache). - XML 🔒
Statics§
- ATTACHED 🔒
- PULLED 🔒
- The last pull of each memory gone through in this process: when it began
on the process’s own steady clock, and its time as saved (
State::last). A clock set back makes a pull’s saved time later than the moment; an alarm in this process tells by this one whether that pull began before it.
Functions§
- again_
mirror - Sioul keeping the folder itself (
MIRROR): “Send everything again”. What it remembers of sending this device’s own files is forgotten (its sealed files apart, which tell its own from the others’), and the server’s folders are looked through again: each own file goes over what is there now, the others’ newer files come. Said asSending::againsays it. - again_
mirror_ 🔒with - alarm_
news - What a dose’s or a waking’s alarm reads before it decides,
sinceits start (Unix seconds), on a phone whose folder is found on the server (State::fetching; docs/android.md, “Doses while Sioul is away”). Sioul’s own pull alone is trusted only once a pull begun since the alarm went through (State::went_through_since; in this process, by its steady clock:PULLED): this one, or another’s that ran meanwhile in this process (lock, one pull at a time: another alarm’s, the window’s), waited for, never passed over. A pull that fails, or has not gone through withintimes.alone: the sync app asked as before (ask, which asks it and says how long its wait still runs: twenty seconds, less when another alarm asked it a moment ago), and waited for, that wait ended as soon as a pull since the alarm goes through;times.mostin all at most.clockgives the time now (Unix seconds);keyopens the others’ entries and claims. - alarm_
news_ 🔒with - attach
- The copy fetched for the sharing folder
folder, read beside it from now on in this process (overlay), when there is one for it: its state names this folder, and what was fetched was fetched under this folder’s seal (the cache’sseal.toml, written when the server’s was found the same). Cheap when nothing changed; nothing of it needs the network. Returns it. - backoff
- How long a failed send waits before it is tried again, by how many failed in a row: a minute, two, five, a quarter of an hour, half an hour, an hour.
- begin
- From now on Sioul keeps
folderin step withopeneditself (MIRROR), withlogin’s account: what the backup knew goes. - cache_
of - Where the backup keeps what it fetched, beside the sharing’s memory:
<state>/share/remote/. - cached_
files 🔒 - The files of the cache, by their path in the folder: the folder’s own,
devices/,leases/<part>/. - checksums 🔒
- The checksums a multistatus says (
oc:checksums, Nextcloud’s), by the path of each response: “SHA1:… MD5:… ADLER32:…”. - code 🔒
- Why, in a code the window says in words: “login:murena.io”.
- confirm 🔒
- The folder found at
url: confirmed, its seal kept in the cache, which holds what was fetched under that seal only. - create
- A new sharing there: each missing folder of its place made (
MKCOL), thenfolder’s seal sent only if none is there yet (If-None-Match: *): two devices starting at once never seal it twice (“sealed-meanwhile”). - create_
with 🔒 - dir_of 🔒
- The folder a file of the folder is in, as the server’s listings are kept: “” the folder itself, “devices/”, “leases/health/”.
- due
- Whether a pull is due now. The first after the folder is found, at once, whatever the hour: until it comes, this device knows the others only from the folder the sync app left stale, so whether another one is in use cannot be told (6 October 2026, 23:30: found on the phone at night, never pulled, the desk in use taken for closed hours before). Then a computer, a phone with Sioul on its screen or another device in use, once a minute; a phone in the background otherwise at its step’s pace, the night’s included: a device opened at night is noticed within its fifteen minutes. Asked for news, twenty seconds after the last.
- encode_
path 🔒 - A path in a folder of the server as an address’s: each name percent-encoded (“Mes documents/Sioul” → “Mes%20documents/Sioul”).
- failed 🔒
- fetch_
wanted - The sealed files of the others’ notes and papers this device waits for
(
blobs::Wanted: their records came, the files they name did not), fetched from the folder’s server by their names, beside the synced folder (overlay’sblobs/, read byblobs::get), when the backup is found there under the same seal (docs/database.md, “Sealed files fetched when waited for”). Only those neither in the folder nor fetched yet, the smallest first, at mostWANTED_FILESandWANTED_BYTESa step (the first whatever its size). On a metered or slow connection (frugal), the pace of what is sent (send): one ofSMALL_WANTEDor more at most every ten minutes, a note’s at once. Each kept only once it opens whole to its content (blobs::check): one that does not is asked again after a while (backoff, up to an hour); one not on the server yet, within five minutes. No listing of the server’sblobs/: the records name them. Never on the window’s thread; one fetch at a time on this device. - fetch_
wanted_ 🔒with - file_
kind 🔒 - A file of the folder, by its kind, for what is said: never its name.
- file_
names 🔒 - The files of a folder, by name, hidden ones left out.
- files_
root 🔒 - Where an account’s files are on its server, Nextcloud’s way
(
…/remote.php/dav/files/<user>/, the user as the server names it in its principal), from the address its calendars were found at; none for a server of another kind. On that server only: a principal named on another is refused (SyncError::Elsewhere), since every request there would carry the account’s login. - find
- Looks for the sharing folder on the accounts’ servers: the place given by
hand alone when there is one (
State::given), elseplacesunder each account’s files. Confirmed only where the server’sseal.tomlis this folder’s, byte for byte; a folder sealed otherwise is never used. The state, saved, says what was found, or why nothing was. - find_
with 🔒 - forget
- Sharing stopped here: what was fetched and known goes, and nothing is read beside the folder.
- header 🔒
- heard_
since 🔒 - The devices whose entry or health claim says more than before: later by its own times. Another part’s claim (notices, invoices) is no news of a session for the doses; a file touched with the same bytes, or an older copy put back, is none either.
- host_of
- A server’s name, to say where: “murena.io”.
- is_id 🔒
- kind_of 🔒
- kind_
of_ 🔒error - A failure’s kind, from its error alone (no file under way).
- mirror_
of - Sioul’s own copy of the folder in that mode:
<state>/share/mirror/. - newline_
before 🔒 - Where the last line break before
beforeis, read back a piece at a time. - nextcloud_
places 🔒 - The places a Nextcloud client’s configuration gives a folder: under one of
its
localPath, the same under that folder’stargetPath(“0\Folders\1\localPath=/home/me/Nextcloud/”, “0\Folders\1\targetPath=/”). - open
- Where
place(“Documents/Sioul”) is amonglogin’s files, and what it holds; why not, in a code asState::saidhas them. - open_
with 🔒 - overlay
- The copy fetched for
folder, when one is attached in this process: the sharing reads, for each other device’s file, the newer of the two. - own_
files 🔒 - This device’s own files in the folder (
MIRROR), by their path in it, in the order they go up: its records, its notes to the others, its claims, its entry (it says how far its records went), then the sealed files it made (inblobs/, not fetched). A large sealed file on a slow line never holds back the records, the doses’ answers among them; a record naming a sealed file not there yet is read as a sync app’s late copy is: the others wait for it (docs/database.md, “Coming in”). - own_
latest 🔒 - The highest round of this device’s records in the folder here; none when it holds none.
- own_
plain 🔒 - This device’s own files in the folder but its sealed ones, in the order they go up: its records, its notes to the others, its claims, its entry.
- own_
urgent 🔒 - This device’s urgent files in the folder: its texts to send.
- place_
texts - This device’s texts to send copied into the sharing folder as a small
file of its own,
texts/send/<id>.jsonl(source: its own file of the part “texts”, every line sealed already): the sync app carries it, Sioul sends it first (send_urgent), the others read it beside the records’ copy, so that a request reaches the phone within its quarter of an hour whatever the records’ size. None here, none there. Whether it changed. - places
- Where a folder may be on a server, as paths in an account’s files, the
likeliest first: on a phone, its path from the storage, which eDrive
carries as the cloud’s root (
/storage/emulated/0/Documents/Sioul→Documents/Sioul), or from the Nextcloud app’s own folder; under a folder the Nextcloud client carries (nextcloud: itsnextcloud.cfg, as text), the same under itstargetPath; then its last one, two and three names. - pull
- The other devices’ files newer on the server than here, fetched beside the
synced folder (see the module’s words);
ownis this device’s id, whose files are never fetched. Nothing when the folder is not confirmed, or its seal here is no longer the one fetched under. Never on the window’s thread. - pull_
since_ 🔒with - A pull begun since the alarm (
since, Unix seconds;begun, this process’s steady clock) gone through: one that ran meanwhile, waited for (lock: one pull at a time in this process), else this one, begun beforeuntil. False when a pull begun since failed, or none could begin in time. - pull_
with 🔒 - read_
range 🔒 - round_
cap 🔒 - The longest of another device’s records a pull brings (
LARGEST); a test’s own, in its thread. - said_
by_ 🔒each - seal_of 🔒
- The seal of a folder, its bytes: at most a small file’s.
- send
- This device’s own files sent to the server beside the sync app that
carries the folder (docs/database.md, “Sent to the server too”), once the
backup found the folder there under the same seal. Only its own files
(
own_plain, and the sealed files it made,sealed: their name and the size it sealed, sent whole only), each over what is there as it was seen; a file found there as it is here is not sent again (the sync app sent it, or will find it there as its own); records only grow (never one shorter than what went, or than the server’s), and go in order; never another device’s file. Each file is given the time its size asks (FLOOR); one that does not go is held back (backoff), never tried sooner, the next records with it, the other files still going. The server unreachable, nothing is tried before its backoff. Withfrugal(a metered connection), or the connection measured slow, a large file goes at most every ten minutes. Withagain, or every six hours, or the first time, the server’s folders are listed and every file compared: one lost there is sent again. This device’s records past their time and the sealed files it swept are taken out there. One send at a time on this device, whichever process runs it. - send_
lane 🔒 - send_
urgent - This device’s texts to send (
texts/send/<id>.jsonl,place_texts), on a lane of their own: a small file, sent first and alone, never waiting behind a large one going up on a slow line; Sioul keeping the folder itself too (MIRROR). - sha1_
hex 🔒 - A content’s SHA-1, in lower case hexadecimal, as
OC-Checksumsays it. - sha1_of 🔒
- The SHA-1 among checksums as a server says them (“SHA1:ab12… MD5:…”), in lower case.
- shown 🔒
- stamp_
of 🔒 - state_
path 🔒 - What the backup knows, beside it:
<state>/share/remote.toml. - step
- One step of Sioul keeping the folder itself (
MIRROR): withwhole, the server’s folder looked through first and the other devices’ newer files brought into the copy here, aspullbrings them beside a synced folder; then this device’s own files changed since they went up, or changed there since, sent (Puller::push), its records first, its sealed files last; then the others’ sealed notes, papers and spam filter’s tables brought (Puller::fetch_blobs). A large sealed file on a slow line, going up or coming down, never holds back the records: the doses’ answers go first. Never another device’s file written; nothing here lost when the server refuses. One step at a time on this device, whichever process runs it. - step_
with 🔒 - texts_
file - Where a device’s texts to send are, in the sharing folder (or a copy fetched from its server).
- through_
since 🔒 - Whether a pull begun since the alarm (
since, Unix seconds;begun, on this process’s steady clock) went through. The last one gone through in this process, when it is the one the state says, is judged by the steady clock (PULLED), which no setting of the clock moves; another process’s by its saved time, withinsinceandnow. - tidy
- What is no longer needed in the cache, gone, without the network: this
device’s own files (never fetched, never read from there), records the
synced folder caught up with, entries and notes the same as the folder’s
and, the backup switched off, all of them; records longer than the
folder’s stay until it catches up (read past its end here, a records’
file gone would read as cut, and the doses would doubt for hours). Sealed
files fetched for a note waiting (
fetch_wanted) go once it is written, once the synced folder holds them, or after a few days. - tidy_
cache 🔒 - usable 🔒
- What was fetched for this folder may be read: fetched for it, under its seal.
- wanted_
due - Whether a sealed file waited for is due to be fetched (
fetch_wanted): cheap, nothing of the network; none while nothing waits. - wanted_
now 🔒 - The sealed files waited for that are neither in the folder nor fetched
(
into), and not asked lately in vain. - whole_
end 🔒 - Where a file’s last whole line ends, and where it starts: (0, 0) when it holds none.
Type Aliases§
- Said 🔒
- What each other device says of itself as the doses read it (
health::know): its entry (devices) and its claim on the health part (lease), the later of the folder’s copy and the one fetched beside it, each by its own times (devices::written; the claim’s renewal and its end). - Stamp 🔒
- The cache attached to each sharing folder in this process (
attach), and what that was decided on: the backup’s state, this folder’s seal, the cache’s (their sizes and times).