Review round 2: a media restart no longer starts an app the household stopped (R-721); the file manager's header name file appears whole (R-1100 race, 44/300 -> 0/300); both red-proved; unreleased
gates / gates (push) Successful in 1m22s

This commit is contained in:
2026-10-24 15:26:56 +02:00
parent 321df1f87a
commit b01bb4b88d
8 changed files with 163 additions and 31 deletions
+16 -18
View File
@@ -1,20 +1,18 @@
# REPORT — the line test for a box that seeds all day (R-1250), 2026-10-24 (attended)
# REPORT — review round 2 (2026-10-24, unattended): two small fixes, commit only
Brief: „two DooPlex backup alarms …", Part 4 (commit only; the release rides the next normal train). Design: felhom.eu
`architecture/08-alarm-ladder.md` §9 item 5. Commit `046b808` (CI 2287 success). Not released, no image built.
**What:** found by the review round's readers and verified at `file:line` by the main session (felhom.eu
`documentation/audits/review-round-2-2026-10-24/`). No release; both ride the next normal train (next v0.343.0).
- **What:** when the agent says the weekly test is due and waits only for quiet, and qBittorrent or Transmission runs,
the controller records the app's upload limit first, holds the app at 1 KiB/s, asks the agent for a test on request,
then puts the exact old limit back. Deferred release; a failed hold is undone first; a household change during the
test stays; an unreachable app keeps the record; a killed controller's start-up check puts it back; the 50 % rule
waits while a record exists. `agentapi.LineTestRun` (own 2-minute timeout via `postSlow`); Transmission's RPC shared.
- **Tests:** 13 new (CHANGELOG lists them), each seen failing: seven hold rules broken one by one, the slow POST, the
start-up order, the wiring of both agent calls.
- **Live (demo-hp, endpoint level, probes from this commit and agent `1e087bb`):** a real 10 Mbit/s seed from scratch
guest 9202 to DooPlex's qBittorrent. Without the hold the agent refused (`not-quiet`, 11.1 Mbit/s). With it the uplink
fell to 0.02–0.16 Mbit/s, the test read 94.2 Mbit/s, the hold lasted 56.8 s, and qBittorrent was back at 1 249 280 B/s
exactly. A `kill -9` in the middle left the record and the 1 KiB/s; the start-up check put the limit back. The pinned
agent client is unit-tested only (the probes spoke plain HTTP). Evidence: felhom.eu
`audits/dooplex-alarms-2026-10-24/part4-r1250-live-proof.txt`.
- **Teardown:** the probe and its store removed from 9202's controller container; qBittorrent removed through the product.
- **MinAgent:** 0.158.1 unchanged (an older agent never reports `waiting_for_quiet`, so nothing is held).
1. **A media restart no longer starts an app the household stopped (R-721).** `restartMediaApps` and
`mediaSafeRemoval` recreated every media app (`RestartStack` = `up -d --force-recreate`), skipping only held ones.
Now both take `stacks.MediaAppsToRecreate`, which leaves out an app whose recorded intent is „stopped" (logged). Its
override is already written, so its next start sees the drives. Tests: `TestMediaAppsToRecreate_SkipsAppsTheHouseholdStopped`
(red with the rule off) and `TestR2_MediaRecreateLoopsSkipStoppedApps` (source pin of the two loops; red with
`s.mediaApps()` back in the safe removal).
2. **The file manager's header name file appears whole (R-1100).** `LoadOrCreateFileBrowserSSOHeader` created the file
empty and wrote it after; a parallel caller read "" and got an error. Measured on clean `main` `321df1f`: 44 of 300
runs of the existing parallel-writers check failed (4 of 50 under `-race`). Now: temp file, sync, hard link into place
— 0 of 300, 0 of 50 under `-race`.
`go vet ./...` and `go test ./...` green. Design docs read: `15-media-library.md` §10–11 (the restart), `01` §5 / `02`
(the file manager sign-in).