S048: test file, release notes, packaging fixes, progress
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
bc8f9ae97d
commit
7b00bcbfb9
4 changed files with 61 additions and 10 deletions
|
|
@ -61,3 +61,4 @@
|
|||
- D-059 — 2026-11-25 — A pasted link is looked at 0.5 s after the last change, without being kept; links of a batch are not. A list makes 10,000 downloads at most, the rest is counted and said. Patterns count in what the user writes, never in what programs and files give. — One-time links, servers and the user's patience. — 03, 05
|
||||
- D-061 — 2026-11-25 — A task's keyring items are named `task:…`, one per site and login of what was added together, and deleted by the manager with the last task that has them. Folders by type and the recent ones are in `view.json`. A start time is a `Waiting` task with `Hold::Until`. — No secrets stay behind; no new setting. — 03, 04, 05
|
||||
- D-071 — 2026-11-25 — What the list knows comes first in the dialog: the same link or checksum offers Resume or Show, a likely match offers Continue; `Same` goes on at once, all other verdicts are shown before a second click, `Different` leaves only a new file. The same name alone changes nothing: the new file gets a number. — Nothing is lost or loaded twice by accident. — 03, 05
|
||||
- D-072 — 2026-11-26 — Server farms: a same-size HTTP reply with other validators is used only after its bytes equal a known 64 KiB sample; proven versions are kept per link (a liar node stays untrusted), a farm gets no If-Range, the first validators stay for display, `tasks.farm` is stored. FTP/SFTP stay strict. — S048
|
||||
|
|
|
|||
|
|
@ -275,3 +275,8 @@ Seen: boxes were ticked together after the tests, against rule 3.
|
|||
- Server name beats placeholder (`output.bin`), window raised on arrival, Ctrl+C/A in fields, readable speed (2 s mean, 1 s hold), setting "One bar / One per part", snail cap 8 kB/s (migrated) and a snail button.
|
||||
- Version 0.1.1; `dist/` has tar.gz, AppImage, Arch package, SHA256SUMS-0.1.1; notes in `docs/releases/0.1.1.md`. Nothing in releases/.
|
||||
- Suite passed except one mirror timing flake under load. Not done: tray tooltip smoothing, live Wayland raise, snail covers pause icon at 480x360.
|
||||
|
||||
## S048 — Server farms
|
||||
- Same-size replies with other dates/tags (nginx `W/"size-mtime"`) are checked by 64 KiB of bytes before writing; proven versions per link, no If-Range on a farm, `tasks.farm` stored (migration 007). HTTP only; FTP keeps mtime strict.
|
||||
- testserver `farm=N`, `liar=1`; `crates/core/tests/farm.rs`. Hidden smoke on a farm passed; dist/ rebuilt (0.1.1), copied to `~/Projects/Medlar/dist/`.
|
||||
- Not done: `connector_flood_15` fails (connector untouched), CPU right after done 160 %, packaged builds not launched, no real farm.
|
||||
|
|
|
|||
|
|
@ -21,8 +21,15 @@ Fixes and small changes after 0.1.0. Linux x86_64, glibc 2.44 or newer.
|
|||
- **Snail mode.** The cap is now 8 kB/s (was 32 kB/s). A saved 32 kB/s moves to 8 kB/s; a value you changed is kept.
|
||||
A round snail button at the bottom right of the main window turns it on and off; its tooltip shows the shortcut.
|
||||
|
||||
- **Server farms.** Links served by several servers behind one address (for example romsgames.net), which answer with
|
||||
the same file but their own dates and tags, no longer fail with "File changed on the server". When a reply has other
|
||||
dates but the same size, Medlar compares 64 KiB of bytes it already has, or that a known server sent, before writing
|
||||
anything. The same bytes: the download goes on in parts and remembers the farm across restarts. Other bytes or another
|
||||
size: it still stops with "File changed", and what is already downloaded is kept. Two files are never mixed.
|
||||
|
||||
## Known gaps
|
||||
- Needs glibc 2.44 or newer; not tested on other systems.
|
||||
- The snail button can cover the right edge of the last row in a very small window (480x360).
|
||||
- The snail crawl motion and the raise on a real Wayland desktop were not watched live.
|
||||
- yt-dlp and ffmpeg are not bundled.
|
||||
- The farm fix was tested against a local server that imitates one, not against a real farm.
|
||||
|
|
|
|||
37
docs/tests/S048-server-farms.md
Normal file
37
docs/tests/S048-server-farms.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# S048 — Servers behind a load balancer with different validators: test file
|
||||
|
||||
Written by the worker that built it, run in the same session (Phase: test). Results say what was seen.
|
||||
|
||||
## Built
|
||||
- `crates/core/src/http/mod.rs` · `Validators::maybe_same`: equal known sizes, nginx tags `W/"<size hex>-<mtime hex>"` agree on the size part; `Source::web` (HTTP only).
|
||||
- `crates/core/src/http/fetch.rs` · `Farm` per link: versions proven to have the same bytes, one known 64 KiB sample; `send_range` sends no If-Range on a farm, 200 on a farm is `RangeIgnored`; `sure_range` and `prove` compare bytes before anything of an unsure reply is written.
|
||||
- `crates/core/src/http/download.rs` · probe and resume accept a same-size reply (HTTP only), seed the sample from disk, store `task.farm` once proven.
|
||||
- `crates/core/src/store/007.sql` · `tasks.farm` column; `crates/core/src/model.rs` `Task::farm`.
|
||||
- `crates/testserver` · `farm=N` (N nodes in turn, own Last-Modified and nginx ETag) and `liar=1` (odd nodes other bytes, same size).
|
||||
- Tests: `crates/core/tests/farm.rs`, unit `farm_versions` in `http/mod.rs`.
|
||||
|
||||
## Checks
|
||||
| # | Risk | Do this | Expect | How | Result |
|
||||
|---|---|---|---|---|---|
|
||||
| 1 | HIGH | Download 8 MB from `farm=3`, throttle 1 MB/s per connection | Right SHA-256, at least 3 parts at different starts, `task.farm` true | integration (`a_farm_downloads_in_parts`) | pass (3 starts seen in most runs, 4 in some) |
|
||||
| 2 | HIGH | Stop a farm download when every part has bytes, resume with the farm flag stored | Right hash, first ETag/Last-Modified kept, no `If-Range` sent | integration (`a_farm_goes_on_after_a_stop`) | fixed (proof flake: `prove` now ends when another part proved the version), then 15/15 |
|
||||
| 3 | HIGH | Same as 2 with the flag cleared before resuming | Right hash; farm found again by bytes or not needed | integration | fixed, then pass |
|
||||
| 4 | HIGH | Fresh download from `farm=2&liar=1` | `Changed` with `task.farm` false, or a file wholly of one version; never mixed | integration (`a_liar_of_the_same_size_is_another_file`) | pass |
|
||||
| 5 | HIGH | Half an honest farm download, then switch to liar mode and resume | `Changed`; finished bytes untouched and equal to the right content | integration (`a_liar_on_the_way_keeps_what_is_there`) | pass |
|
||||
| 6 | HIGH | Tags differing after the size part; other size; other size in tag; opaque tags; unknown size | maybe same / no / no / maybe / no | unit (`farm_versions`) | pass |
|
||||
| 7 | HIGH | FTP file with a new mtime, same size, resumed | Still `Changed` (farm rule is HTTP only) | integration (`ftp_resumes`) | fixed (rule had leaked to FTP) |
|
||||
| 8 | HIGH | Old store opened | Migration 007 adds `farm` = 0 | integration (store tests in suite) | pass |
|
||||
| 9 | MED | Full workspace suite, absolute TMPDIR | All green | `cargo test --no-fail-fast` | 35 targets ok; `relink` pause/resume race passed on rerun; `control::connector_flood_15` fails (40 ok, 0 busy): connector untouched by S048, KNOWN BUG, timing of the rate gate |
|
||||
| 10 | MED | Release build, hidden run (spare port 17998, testserver 18431, throwaway home), POST a 64 MB `farm=3` link | Done, hash equal to the plain file, `tasks.farm` = 1 | by hand (`tools/hidden.sh`) | pass: hash 0095b3fa…, farm 1, list shows Done |
|
||||
| 11 | LOW | Same hidden run: CPU 1 s after done | 0 % when idle | by hand | not run cleanly: 160 % measured 1 s after done (graph still moving or finishing); idle not measured later |
|
||||
| 12 | MED | `tools/package.sh` 0.1.1 | AppImage, tar.gz, Arch package, SHA256SUMS; checksums verify | by hand | pass (PKGBUILD tar.gz hash updated); the packaged builds were not launched |
|
||||
|
||||
## Needs
|
||||
`crates/testserver` on 127.0.0.1 only. Spare ports 17998/18431 and a throwaway home for hidden runs. Never romsgames.net or any real site; never the user's Medlar on 17616 or `~/.local/share/medlar`.
|
||||
|
||||
## Doubts
|
||||
- A sticky load balancer that never again shows the probe's node at a fresh start: parts are accepted only for proven versions, which needs one sure reply to compare against; PROOF_TRIES (12) may be too few on a big farm.
|
||||
- Proof compares 64 KiB at one place. A same-size different file that matches there would be taken as the same; the plan accepts this.
|
||||
- Without the stored flag a resumed task may finish without re-proving the farm (the flag then stays false).
|
||||
- `connector_flood_15` and the 160 % CPU right after done were not investigated (outside the plan).
|
||||
- Never tried against a real farm.
|
||||
Loading…
Reference in a new issue