The symptom that put it in TODO.md — a small sync taking minutes — is fixed. What remains is the algorithm for nodes learning whom they can reach, which is deliberately not being designed yet. It absorbs the long-term list's own "Sequential vs. parallel peer fetch" entry, which was the same subject. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
16 KiB
Long-term TODO
Work that is deliberately not being done now, kept apart from TODO.md.
Nothing lands here for being a bad idea. TODO.md is the list of things this
project intends to get to, and an item sitting there is a small standing claim
that it should be built soon. An item here is one where the decision has
already been taken to not build it yet, for one of three reasons:
- It isn't urgent. A good idea, sometimes an obviously good one, that the project does not need in order to have a working app. It will still be a good idea when there is one.
- It costs more than it is currently worth. Not that the work is too hard, but that the difficulty is out of proportion to what it buys today — parallelising a fetch that already completes, say, or building the editing half of a system whose defaults are fine.
- It waits on a design decision nobody is ready to make. The work is blocked on a choice about the shape of the system, and making that choice now would be guessing at requirements that don't exist yet. Leaving it here keeps the option open instead of closing it badly.
Whichever it is, the reasoning is written down below, and the item should stop appearing in a reader's field of view as unfinished business.
Each entry says what it is and why it is worth doing eventually. Where there is a concrete trigger — some event after which the answer changes — what would make it worth doing then is the most valuable line the entry carries, because an entry with no trigger is one nobody will know how to act on. When the honest trigger is just "once there is more app to hang it on", that is worth writing down as well.
Optional start-time password protection for a node
What. A node could ask for a password at start-up and hold its secrets
under a key derived from it, so that a copy of the store directory taken while
the node is not running is inert. Argon2id is the right primitive for the
derivation — the argon2 crate is already a dependency and
VaultKeySpec::Passphrase already names the shape, though nothing constructs
it — and the wrapped thing would be the node secret in secrets.value, which
is what the vault key and every blob below it hang from
(vault::encrypt_vault_key, and ADR 0052 for the chain).
Why it is not being done now. It would change the security model rather
than reinforce it, and the current model is coherent as it stands: the whole
store directory is a secret, protected by its mode, and an attacker who can
read store.db has the node. stores::permissions enforces that ssh-style —
0700/0600, and Store::validate refuses to open a store that group or other
can reach. Within that model, offline copies of the store — a backup, a stolen
disk, a synced folder, a misconfigured container mount — are out of scope,
deliberately and explicitly, and the file mode is the whole of the at-rest
story.
Passwords are also the wrong first reach even when that changes. Encrypting a secret only buys something if the unwrapping key lives somewhere the attacker's copy does not reach, and there are three places it could live: a passphrase in the user's head, an OS keychain (Secret Service, macOS Keychain, DPAPI), or a TPM. Only the first needs a prompt. On a desktop with an unlocked session the keychain gives the same protection against an offline copy with no interaction at all, so a password requirement there is a cost with no matching gain. The case that genuinely has no alternative is the headless node — a VPS with no keychain, no TPM guarantee and nobody at the console to type anything — and "what unlocks a headless node at boot" is the actual open design question hiding inside this item.
What would make it worth doing. Any of:
- the threat model gains offline copies — the first time a store directory is routinely backed up, put in a synced folder, or run from removable media;
- a node runs somewhere the OS mode is not a real boundary, such as a shared host or a container with a mount somebody else can read;
- a user wants a node that is inert while they are away from it, which is a usability want rather than a threat-model one and is fine as a reason.
Start with the keychain, not the prompt, unless the trigger is the headless case. And note what a password can never buy: code running as the node's own user is inside the boundary either way, because the daemon has to hold the unwrapped key to run at all. ADR 0052 has that argument in full.
A genuinely hidden vault, as its own key spec
What. A vault whose existence an adversary with a forensic image of a node
cannot establish — Xous' PDDB Basis, rather than the locked-but-visible vault
docs/data-model.md specifies. docs/vault-pddb-research.md is the full
comparison; this entry records the decision it argues for.
Why it is not being done now. Two reasons, and the second is the hard one.
It is a different product from a locked vault, not a stronger setting on one. A
hidden vault can keep no record of itself anywhere: no row in vault_keys, no
name, and in particular no stored salt, because a per-vault salt is exactly
the record that betrays the vault. The PDDB derives its salt from the vault name
and password against one global salt block for precisely this reason, and pays
for it with the property that a forgotten name is unrecoverable data loss
indistinguishable from a wrong password. So it needs its own VaultKeySpec
variant with its own storage rules, and cannot be a flag on Passphrase.
And sync is close to fatal to the idea. The deniable-storage literature's
adversary hierarchy runs single-snapshot → multi-snapshot → online, and the PDDB
only claims the first; its own book concedes that repeated disk images erode
deniability toward zero. An ensemble manufactures snapshots: every peer keeps a
catalog row carrying vault_id for every document, a revoked node keeps a dated
copy of everything it had, convergent encryption makes blob ciphertext
deterministic so two images of the blob store diff perfectly, and sync traffic
is itself an online side channel. Hiding a vault would mean it does not sync, or
syncs on a plane that puts nothing about it in a record every peer keeps — a
protocol redesign rather than a feature.
Against that, the threat a locked vault already answers — the device is unlocked
and in someone else's hands — is the one docs/data-model.md actually names, and
a Passphrase vault answers it completely.
What would make it worth doing. The threat model gaining compelled disclosure: a node expected to be seized and imaged, with the user expected to be made to unlock it. That is a different user than "my phone was taken off me at a bar", and it is worth waiting for a real one rather than guessing.
If it is ever built, three rules are not negotiable, and they are why the decision has to be taken before a hidden vault is written rather than after: no per-vault record on disk of any kind; one global salt block that exists whether or not a hidden vault does; and a sync story of its own, or none.
Build a user-editable color theming system for gui-app
- Description:
rust/gui-app/src/theme.rsnow defines the role tokens (surfaces, text, accent, semantic status colors) and resolves them for light/dark from aThemeModesetting. What's missing is the user-facing half: editing tokens, and a small set of starter presets to pick between. - Details: Surfaced during
/plan-design-reviewon the PDF-library MVP (2026-07-16) — hand-picking one "final" palette is the wrong call for a personal tool, since tastes differ and any single hardcoded scheme dates. The token module is the foundation this builds on. Android now has the equivalent inui/theme/SynPalette.kt— aSynPaletterole table with two instances — so a preset system should drive both from one set of values rather than growing separately on each side.
Make relay/DNS infrastructure configurable and self-hostable
- The P2P layer relies entirely on n0's public infrastructure: relay servers
(
*.relay.n0.iroh.link) for NAT traversal, and pkarr DNS (dns.iroh.link) for publishing/resolving node addresses by public key. Both are open source (iroh-relay,iroh-dns-server) and designed to be self-hosted. - Options to investigate:
- Configurable custom relay URLs and DNS server in
Settings - A bundled
iroh-relaymode so a node can optionally relay for others - The Mainline DHT path (
DhtAddressLookup) as a fully decentralized fallback needing no trusted server. It's the BitTorrent DHT — ~20M nodes since ~2005, maintained "for free" by BitTorrent's existence. BEP 44 (~2014) added storage of arbitrary signed data. pkarr builds on that: sign a packet of DNS-like records (IPs, relay URLs) with your Ed25519 key, published indexed by your public key, self-authenticating. iroh'sPkarrPublisherusesdns.iroh.linkas an HTTP relay to the DHT (convenient but centralized);DhtAddressLookupparticipates directly with no intermediary. - mDNS (
address_lookup::mdns) for local-network discovery with no infrastructure
- Configurable custom relay URLs and DNS server in
Nodes learning which peers they can reach
What. Nodes work out for themselves which other nodes they can and cannot reliably communicate with — without the user stepping in, without permanently abandoning a node that has been unreachable for a while, and without letting the unreachable ones slow down communication with the ones that are active.
Where it stands. scheduler::ensemble_peers_freshest_first returns every
node gossip has ever heard from for this ensemble, less any whose cert is
revoked. Rows are never pruned, so a machine retired without being revoked is
still in the list months later. A scheduler pass and a recursive pull dial all
of them at once and work with whoever answers (scheduler::run_catalog_pass,
asset_sync::refresh_document_catalog), so a dead node costs a pass one dial
timeout rather than one per peer per document. Nothing is remembered between
passes: every one dials every node again.
Why it is not being done now. That was the fix for the symptom — a small sync taking minutes — and what is left costs more than it currently buys. The real thing is an algorithm, expected to be complicated and to arrive in steps, and designing it now would be guessing: there is no record yet of how nodes actually come and go to design it against.
What is left.
- The walks with no catalog phase in front of them still go one peer at a
time over the whole list: a single document's or single artifact's pull
(
asset_sync::sync_document_assets,sync_document_asset) and a blob stream (content_fetch::stream_from_peers). Each attempt is bounded by a connect timeout and a transfer timeout and the list is ordered freshest-first, so this bites only when a dead node ranks ahead of a live one — but the worst case still pays each timeout in series, and multiple healthy peers go unused. Trade-offs to weigh:- Racing the same large blob across peers wastes bandwidth; canceling in-flight transfers once one wins adds complexity.
- Better middle ground: shard distinct missing items across peers, and/or race only the connect/handshake phase and commit the transfer to the first responder.
- Keep bounded-sequential as the simple fallback.
- Record what each dial found, so a node that has not answered in weeks is dialed less often rather than every pass — backed off, not dropped. Needs care: "asleep" and "retired" look identical from here, and a skip that never ends turns a delay into a node that never syncs.
- Prune or archive peer rows that have not been seen in a long time, with a way to see and undo it. A revoked node is already skipped; this is for one that went quiet without being revoked.
What would make it worth doing then. A pass that is slow again for this reason: an ensemble with enough long-dead nodes that the one dial timeout per pass is itself felt, or a single-document pull that visibly waits on a dead peer before reaching a live one. Recording dial outcomes is the piece to start with, since the other two are decisions made from that record.
Telling the user that live sync has stopped
What. When this node is continuously updating a document — a podcast's playback position as it plays, a note as it is typed — and that document is one meant to reach the rest of the ensemble live, the user should find out if that stops happening. Not as a connectivity readout, but as a statement about the thing they are doing: this is still being written down here, and it is no longer going anywhere else.
Why it is not being done now. The functionality it would warn about does not exist yet. Nothing in the app currently streams a running update to the ensemble as it happens; sync is per-document and episodic, so there is no live flow whose interruption could be detected, and a warning built now would be guarding a hypothetical.
It is also genuinely hard to design, in a way that is worth respecting rather than pushing through. The signal has to distinguish "the network is quiet and that is fine" from "you are accumulating changes nobody else will see", and those look identical from the transport's point of view — a node with nothing to say and a node that cannot say it are both silent. Getting it wrong in either direction is bad in a specific way: a warning that fires whenever a peer is asleep trains the user to ignore it, and one that only fires on a hard failure will miss the case this exists for, which is a slow drift nobody noticed. It also has to obey the design principle that a sync must never disrupt what the user is doing — a modal about connectivity landing mid-episode is itself the disruption.
Note this is what the Ensemble screen's per-peer Connected/Degraded badge
was reaching for and getting wrong. That badge answered "is this peer a gossip
neighbor", which is a fact about iroh-gossip's bounded partial mesh and not
about anything the user was doing; it was removed rather than corrected (ADR
0032's amendment on the reachability matrix). The question worth answering was
never "which nodes can I see" in the abstract — it is "is the thing I am doing
right now still reaching them".
What would make it worth doing. One trigger, and it is concrete: the first agent that actually pushes a live, continuous update to the ensemble. Podcast playback position is the obvious candidate and the best one to design against, because it updates constantly, matters little in any single instant, and matters a lot in aggregate — exactly the profile where silent failure goes unnoticed longest. Build that first, for its own sake; the warning is a question about that feature, and cannot be designed before it.
When that arrives, the shape to reach for is probably a per-document "last reached the ensemble at …" that the document's own screen can show, not a global connectivity indicator — the scope of the claim should match the scope of what broke.
Daemon sockets for deeply nested stores on macOS
A Unix socket's address has to fit sun_path, 104 bytes on macOS, so a store
whose path is much past 90 bytes can't bind or reach <store>/.daemon.sock.
Linux avoids this by reaching the socket through /proc/self/fd
(syn-daemon/src/socket.rs). macOS has no /proc, so there it still uses the
plain path and fails with the OS's error.
The likely fix is pthread_fchdir_np, which changes the working directory of
the calling thread only. On a thread we own, change into the store directory,
bind or connect to the relative .daemon.sock, switch the thread back with
pthread_fchdir_np(-1), and hand the socket to tokio with from_std. The
fallback that needs no thread-level API is a temporary short symlink to the
store under $TMPDIR, removed after each call.
What would make it worth doing. Running the daemon on a Mac at all, with a Mac to test on. Neither approach can be checked from Linux, and nobody hits this today.