# Decisions `D-NNN — date — decision — why — plans affected`. Never rewrite an entry; supersede it with a new one. - D-001 — 2026-11-24 — The app is called Medlar (binary `medlar`). — User's choice. — all - D-002 — 2026-11-24 — Linux only: AppImage and tar.gz. — User's choice. — all - D-003 — 2026-11-24 — Own browser extension and own protocol; no AB Download Manager protocol. Nacre's existing "custom manager" JSON is accepted as it is, so Nacre needs no change. — User chose "own extension only"; Nacre already posts this format (`~/Projects/Nacre/src/net/dlm.rs`, `custom_body`). — 05 - D-004 — 2026-11-24 — No user stops during the work. The user is asked only before a release, and for things only they can do. — User's choice. — all - D-005 — 2026-11-24 — Rust, egui/eframe 0.37 (glow), tokio. Motion starts from Damson's `src/motion.rs`, colour from Damson's `src/theme.rs`, shapes and the wavy line from Mulberry's `src/ui/shape.rs` and `src/ui/widgets.rs` (the user's own MIT code). — Same stack as the user's other apps. — all - D-006 — 2026-11-24 — Default port 17616, 127.0.0.1 only. ABDM keeps 15151 on this PC and is left alone. — Free on this PC; no clash. — 05 - D-007 — 2026-11-24 — Torrent engine is librqbit if it passes a spike (features in FEATURES 5, loopback swarm); otherwise libtorrent-rasterbar through a small C++ bridge. — Pure Rust is easier to bundle. — 06 - D-008 — 2026-11-24 — The `/improve-animations` audit runs after the interface exists (category 08). Its "ask which findings" step is answered in advance: plan every HIGH and MEDIUM finding. Its plans go to `animation-plans/`. `AUDIT.md`, `PLAN-TEMPLATE.md` and `review-animations` are not installed with that skill, so the audit uses the eight categories named in its SKILL.md plus the motion rules in app-taste. — D-004. — 08 - D-009 — 2026-11-24 — `yt-dlp` and `ffmpeg` ship with the app; nothing tells the user to install something. — User's standing preference. — 06, 09 - D-010 — 2026-11-24 — No BitTorrent and no browser extension. The browser hands links straight to the local port; continuing from links and error recovery are first-class. Supersedes D-003's extension and D-007. — User's choice. — 02, 05 - D-011 — 2026-11-24 — Nothing is downloaded except Rust crates. Tests and builds use the yt-dlp and ffmpeg in /usr/bin and the appimagetool already in `~/Projects/Mulberry/dist`. Bundling yt-dlp and ffmpeg waits for the user; until then a missing tool shows a designed state. Supersedes D-009. — User's choice. — 06, 09 - D-012 — 2026-11-24 — Colours: "Follow desktop" and "Own colour" are equal choices in settings and first run; desktop is preselected when a scheme is found, otherwise own colour. — User answered "both". — 03 - D-013 — 2026-11-24 — 40 plans, reviewed by the user as a 43-plan table, then cut: torrents and extension out, error recovery (S007) and continuing from new links (S008) added. — User's answers. — all - D-014 — 2026-11-24 — Work happens on the branch `claude/caveman-orchestrate-run-41d3a3`; the orchestrator fast-forwards `main` (local and `origin`) after each validated category. Sessions push only the branch. — User said yes to merging after each category. — all - D-015 — 2026-11-24 — SQLite and settings hold only keyring item names; the store refuses cookie/authorization headers and `user:password@` in links, mirrors and proxies. Callers split them off first. Tokens in a link's query stay in the link. — Secrets must not sit in plain files. — 02, 04, 05 - D-016 — 2026-11-24 — Up to three plans run at once when they do not depend on each other and their "files touched" do not overlap; waiting sessions may be prepared out of INDEX order for this. All share one target folder, so cargo queues builds by itself. Replaces the "at most two" limit in ORCHESTRATOR.md. — User asked for three at once. — all - D-017 — 2026-11-24 — HTTP client is reqwest 0.13.5 (pinned exactly), rustls with ring and the system certificates, HTTP/1.1 only, `Accept-Encoding: identity`, no decompression, no Referer of its own, its retries off, ≤ 10 redirects, 20 s connect and 30 s idle timeout, no proxy from the environment. Segments go to the final link; cookies and logins are dropped when its origin differs. — Docs of 0.13.5 checked: `http1_only`, `redirect::Policy`, `connect_timeout`, `read_timeout` (per read), `retry::never`. — 02, 05, 06 - D-018 — 2026-11-24 — HTTP/1.1 everywhere; no HTTP/2 or HTTP/3 (1.14), so reqwest's `http2` feature stays off. — Measured over TLS with netem, mean MB/s of HTTP/1.1 ×1, ×4, ×8 and HTTP/2 ×1: loopback 437, 950, 899, 306; 20 ms 8.7, 8.5, 8.9, 8.6; 20 ms with 0.1 % loss (15 runs) 7.6, 6.0, 7.3, 6.6; 50 ms with 0.5 % loss 1.7, 1.8, 3.2, 0.7. HTTP/2 never won. HTTP/3 was not measured: reqwest's needs an unstable build flag and another TLS stack (quinn). — 02 - D-019 — 2026-11-24 — A stored part with `end: None` means the server had no ranges: it starts over on resume unless the server has ranges by then. A part with an end never starts over by itself (`Error::NoResume`, `Error::Changed` instead). The record of parts is written only after `fdatasync` of the data it names. — No state loses finished bytes. — 02 - D-020 — 2026-11-25 — Connections start at 2 (or what the host stood, kept 7 days) and double, then go up by one, while the new ones bring ≥ 30 % of a fair share and more than twice the noise; measured 3 s after 1 s of settling. A failed try holds 30 s, doubling to 4 min; counts that were not proven are tried lower. Never below 2 without a refusal or cap. — The user's line is slow: a connection has to prove itself. — 02 - D-021 — 2026-11-25 — A refusal (429, 503, any other 4xx, no connection, 200 for a range) while others deliver lowers the count for 10 min for all downloads of that host, and is remembered; alone, 4xx and 200 are final. New requests per host: 16 at once, then 4/s. Idle connections close after 0.5 s; a host that refused gets 0.3 s to notice a closed one. A part that waits after a failure keeps its place, so that failures cause no further cuts. — Must not look like abuse. — 02 - D-022 — 2026-11-25 — A failed part never ends the download while others deliver. It ends after 5 failures in a row without a byte (1 s, doubling, half of it chance, ≤ 60 s) with nothing else delivering, or when Retry-After is longer than 60 s. Changed, disk, store, encoding and contradicting replies end it at once. Longer waits and task retries are S007's. — FEATURES 1.6. — 02 - D-026 — 2026-11-25 — Amounts on screen count in thousands: B, kB, MB, GB, one decimal, and speeds as the same per second (`ui::odometer::{amount, rate}`). — It is what the units mean, and disks and lines are sold in them. No setting until someone asks. — 03, 04 - D-027 — 2026-11-25 — Wave height and travel follow the logarithm of the bytes per second, from 0 to 64 MiB/s, not a share of the limit or of the fastest so far. At 0 B/s, when paused, and with motion off or reduced the bar is flat and draws no frames. — The same speed always looks the same, and a slow line still moves visibly. — 03 - D-028 — 2026-11-25 — Progress widgets keep their springs per `Id` and start in place when they were not drawn in the frame before, so scrolling shows no motion and the tick plays only for someone who saw the download finish. A list row's id comes from the task's id, not its position. — 03 - D-023 — 2026-11-25 — Menus are Medlar's own (`ui::menu`), not egui's: one open at a time, own keyboard. Dialogs never close by a click on the scrim (the side sheet does); Enter does the main action unless a button has the focus; dangerous questions start on Cancel. Elevated buttons have no shadow. — egui's arrow keys leave its menus; typed links must not be lost. — 03 and later - D-029 — 2026-11-25 — Running set: at most `max_active`, one place per connection a host gives. Rank: forced start (latest first), priority, running before waiting, queue position, position. A running download gives way to a higher priority, a forced start or an "only", never to a better position; one that can't resume never gives way. Stop = pause and go last. Remove can be undone for 60 s and until the program ends; at the next start it is final. Closing turns running into queued, so that they go on at the next start. — FEATURES 1.1, 2.3, 7.3. — 02, 04, 05 - D-030 — 2026-11-25 — A file name belongs to the unfinished task that has it recorded, even when its file is empty or missing. Looking for a free name and taking it happens under `disk::names()`. Tasks are changed through `Store::edit_task` (one transaction), never read, changed and saved. — The command fuzz mixed up the files of two tasks without this. — 02, 06 - D-031 — 2026-11-25 — Retries of a task: 10 failures in a row without a new byte (setting, per task, 0 is forever), waits by kind (docs/RECOVERY.md), Retry-After honoured up to 24 h. Three network, busy or server failures of a host in a row shut it for all for 30 s, doubling to 10 min; then one download tries. Start and Resume by the user go past it. 4xx are never repeated blindly. — FEATURES 1.6, 1.17. — 02, 04 - D-032 — 2026-11-25 — Offline is only believed after a failure: downloads are always tried first, so local servers work without a network. D-Bus is `Bus::Off` by default; the app turns it on. zbus without its tokio feature. Downloads that can't resume are not stopped for sleep or a network change. — Never touch the real system in tests; lose no bytes. — 02, 03, 05 - D-033 — 2026-11-25 — A started download whose file or folder is gone waits for it (`Error::Missing`) and is never started over, nor its folder made again, by itself. A changed file fails and asks; keeping both leaves the old task as it is and adds a new one. — A pulled-out drive looks like a missing folder. — 02, 04 - D-034 — 2026-11-25 — A new link is judged by size, versions and bytes: the last 4096 bytes of up to 32 finished ranges, the first ones and 8 places in between. Equal samples with a matching tag or date are "same", without are "probably same". Another tag or date counts against it only on the same server, and a differing tag with the same date decides nothing. — Two servers name the same file differently. — 02, 04, 05 - D-035 — 2026-11-25 — Without ranges a new task starts over and the old one keeps its file until the new one is whole (`tasks.replaces`), then goes to the bin. — Nothing is lost if the new link fails too. — 02, 04 - D-036 — 2026-11-25 — Other programs' unfinished files are copied, never moved or written. Zero-filled stretches count only where the server has zeros too. — The browser may still have the file open, and space is often taken before it is filled. — 02, 04, 05