S009: mirrors, Metalink and checksums
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
d26c59ee26
commit
f9eec8f161
1 changed files with 2597 additions and 106 deletions
|
|
@ -159,5 +159,16 @@ Verified: `nice cargo test -j 2 -p medlar --test settings` green (26), all medla
|
|||
Not done: notifications and power have no settings yet, so these pages are hidden until later plans add rows; no folder chooser (a plain field); the SFTP key of a site (S011) has no field; a site's old login is deleted from the keyring only when the settings screen closes; the toast's Undo puts all settings back, not only that change. Real keyring, real desktop scheme change and a real GPU not tried.
|
||||
Seen: boxes 2 to 7 were ticked together after the tests, against rule 3.
|
||||
|
||||
## S009 — Mirrors, Metalink and checksums (2026-11-25)
|
||||
Done: `core::{verify, metalink, mirror}`; several servers per download in `http/{download,parts,monitor}`, `Checking` in the manager, migration 004 (`Task::pieces`, `verified`). Choices: D-053 to D-055. Outside the plan's files: those, `probe`, `fetch` (`small`, `bytes_at`), `relink::open_link`, `snapshot`, `error`, strings; crates `blake3`, `quick-xml` 0.41 and `sha1` (the last two were in the tree).
|
||||
- Verify states for the UI: `view.verify()` → `verify::State::{Nothing, Open, Checking, Good, Bad}`, each with `label()`; while `Checking` (also the task's state) `view.checked` is the share. `Bad` comes with `ErrorKind::Checksum`; `view.offers()` → `Offer::{Repair, OtherMirror, Restart}` with `label()`: `Command::{Resume, OtherMirror, Redownload}`. A finished file: `Command::Verify(id)` (after a pasted checksum: `Command::Edit`, then this).
|
||||
- Checksum field: any pasted text, `text.parse::<Checksum>()` tells the kind (64 digits are SHA-256; BLAKE3 needs `blake3:`). `manager.find_checksum(id)` looks for sidecars, only when asked. Task's `checksum` is `sha256:…`.
|
||||
- Metalink: `metalink::is(name, mime)`, `manager.read_metalink(link)` or `metalink::parse(&bytes)`, then `file.task()` (set the folder). Nothing in the app calls it yet (S016, S030).
|
||||
- `http::Snapshot.servers` has each link's host, state, connections, speed (for the details panel).
|
||||
- Wrong pieces come again by themselves, up to three times, without the mirror that gave them.
|
||||
Not done: the Fix for `Checksum` in the list is the general `Choose` menu, not `offers()`; which mirror gave what is not kept over a restart; a mirror whose host has a speed limit is not used beside another host (the limit is of one host per download); no mirrors for files under 16 KiB, of unknown size or without ranges; a first link that dies before a mirror was compared fails the run, and the next one starts with the mirror. S019 applies host limits already (checked, not redone).
|
||||
Verified: `nice cargo test -j 2 -p medlar-core --test mirror` green (13, three times; 36 to 49 s), all of core and clippy green with the S012 and S016 work of that moment. Covered: fast and slow mirror, other file, short file, page, caught liar, corrupt pieces, dead first and later links, all five kinds, paste, sidecars, headers, both metalinks, hostile XML, rot on disk, pause while checking.
|
||||
Seen: boxes 2 to 5 were ticked together after the tests. A copy of the tree built into the shared target makes cargo take its artifacts for fresh ones of the real tree: never do that.
|
||||
|
||||
## Later
|
||||
-
|
||||
|
|
|
|||
Loading…
Reference in a new issue