gate: a re-do of an already-playable file gets a 0.975 mean bar (owner decision)

One pass measured 11 attempts rejected purely on the window mean (0.9655-0.9795)
while accepted encodes had worse frame minima (0.33-0.90): the bar was splitting a
continuum, not separating defects. 0718 马斯克原理 failed with min 0.887 and 0.00% of
frames below 0.85. Those files already play (HEVC hvc1 + AAC) and a re-do exists only
to reclaim an old setting's bloat; reaching a 0.98 mean costs more than the source's
own bitrate, which the size ceiling forbids - so the strict bar stranded them with
their bloat while burning an encode every pass.

SSIM_MEAN_MIN_REDO = 0.975 now applies only when the run is re-doing a file that is
genuinely playable (HEVC hvc1 AND aac) from the snapshot original. The frame-share
test (>1% of frames below 0.85) is unchanged and is what catches a real defect.

Verified on ONE file before the tiers were restarted: 0321 随他们去 (rejected last
pass at mean 0.9789) -> ok, mean 0.9786, min 0.5092 with 5 of 1500 frames below 0.85
(fades), 633 MB -> 418 MB installed, live byte count == the encoded output.
This commit is contained in:
2026-10-08 20:07:26 +08:00
parent b2f61295cc
commit 4385724c5e
3 changed files with 46 additions and 6 deletions
+1
View File
@@ -278,6 +278,7 @@ re-encoded to `-b:a 256k`: that added ~128 kbps for no audible gain, ~+10% file
- **Kill by PID only**, one lock per tier, one NVENC job at a time, and pause GPU tiers before a driver update (an update wedges GPU work silently — the output-growth watchdog is the net).
- **A multi-day run must not be tied to the agent session.** Two tiers launched as Hermes background jobs with `persist_on_release` were both killed mid-encode the moment the user closed their session (measured 2026-10-08 10:37: `*_out.mp4` and `.err` frozen in the stage dir, no `PASS-DONE` in either log, ~40 min of work lost). Launch them **orphaned** instead — `powershell -NoProfile -Command "Start-Process -FilePath <bash.exe> -ArgumentList <script.sh> -WindowStyle Hidden"`, the script itself looping `library_run.py` with a retry — so the parent exits immediately and the agent's process cleanup cannot reach the tree. Verify the chain: the job's parent must be a bash whose own parent is already gone. Cost: no exit notification (watch the log) and **stopping is by PID only**.
- **The `copy` tier is not idempotent — never re-run a whole `--tier copy` pass.** Its only skip test is "already HEVC hvc1", and a copy output is H.264 by definition, so a second pass redoes every file it ever produced (193 of them here, ~40 GB of share I/O). For a handful of newly-arrived files use the single-file path per file: `library_run.py --tier copy --path <file> --keep-source`.
- **A re-do of an already-playable file earns a 0.975 mean bar; a first-time conversion does not.** Measured over one pass of this library: 11 attempts were rejected purely on the window mean (0.9655–0.9795) while accepted encodes had *worse* frame minima (0.33–0.90) — the bar was splitting a continuum, not separating defects (`0718 马斯克原理` failed with min 0.887 and **0.00 %** of frames below 0.85). A re-do exists only to reclaim an old setting's bloat from a file that already plays (HEVC hvc1 + AAC), and reaching a 0.98 mean costs more bits than the source's own bitrate — which the size ceiling forbids — so a strict bar strands the file with its bloat for ever while burning an encode every pass. `SSIM_MEAN_MIN_REDO = 0.975` therefore applies **only** when the live file is genuinely playable (HEVC hvc1 **and** AAC) and this run is replacing it from the snapshot original. The frame-share test (>1 % of frames below 0.85) is unchanged in both cases and remains the test that catches a real defect — under the relaxed bar `失控` (0.9655) is still rejected, and `0808 陌生人效应` (0.9739) keeps the full 0.98 bar because its live file is H.264 — not a re-do at all.
- **Full measured detail, every failure mode and its detector: `references/pitfalls.md`.**
## The owner's standing requirements — read this first