diff --git a/CHANGELOG.md b/CHANGELOG.md index 7612154..2fe0b25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +**Fixes after M1: no browser profile left by Ctrl-C, captions judged as subtitles, a slow Chrome start, an exported CDPATH** +- `tools/textcheck/browser.mjs`: Chrome's profile folder (about 17 MB) went only when the browser was closed. Ctrl-C, SIGTERM or SIGHUP on `bin/vh frames`, `textcheck`, `determinism` or `cues` left it in the temp folder, and so did `bin/vh render`'s own Ctrl-C handler (one per worker). Now every browser not closed yet is killed, with its helper processes (Chrome runs in a process group of its own), and its profile removed when node exits or gets one of those signals; a tool with its own handler keeps it, and the cleanup runs when that handler ends the process. The listeners are there only while a browser is open: after the last one closes, a Ctrl-C during synchronous work (`determinism` comparing its frames) ends the process at once, as before. Measured: a 3-worker 4K render stopped with Ctrl-C twice and `frames` once left no profile and no Chrome process (before: 2 profiles after a render, 1 after frames). After `kill -9` of node, Chrome still ends by itself when its pipe closes. +- The browser gets 60 s to answer instead of 30: a cold start on a busy CI runner once took longer (the same code passed on a rerun). +- `bin/vh readcheck ` reads the project's `audio/captions.json`, the narration's own words, and judged it by the on-screen rule unless given `--mode subtitle`: showcase 02 showed 15 FAILs of the wrong kind. Caption items (`zh` / `en`, no `text`) now go by the subtitle rule unless `--mode` names another; showcase 02's captions now show the 9 they really have (English lines over 20 characters a second, a few Chinese lines under 1.8 s). `playbook/03` says so. +- `bin/vh` unsets `CDPATH`: an exported one that holds a `bin` folder sent the `cd` that finds the repo (bin/vh run as `bin/vh`) elsewhere, and every command that reads a file from the repo failed. `tools/ci.sh`, `tools/fetch_media.sh` and `references/fetch.sh` do the same. +- CI: a project's captions go by the subtitle rule and `--mode` still decides; `bin/vh` under a CDPATH; `frames` stopped with Ctrl-C exits 130 and leaves no profile and no Chrome; `determinism` stopped with Ctrl-C while it compares exits 130 at once. + **`bin/vh textcheck` measures in the Chrome that renders the film** - Why: on the maintainer's Mac (2026-10-11), `bin/vh textcheck` laid text out in HeadlessChrome 150.0.7871.24 from `~/.cache/puppeteer`, while `hyperframes render` drew the film in 152.0.7977.30 from `~/.cache/hyperframes/chrome`, and two Chrome versions can place text slightly differently. `bin/vh` looked in the puppeteer cache first because HyperFrames' default lookup does (`snapshot`, `check`), but `render` asks for its managed Chrome and never looks there. - `bin/vh textcheck`: the browser is `CHROME_PATH`, else the chrome-headless-shell `render` uses for the project: `HYPERFRAMES_BROWSER_PATH` (or `PRODUCER_HEADLESS_SHELL_PATH`), else the version the project's own HyperFrames pins (read from its `node_modules`; on macOS 12 its macOS 12 pin) in `~/.cache/hyperframes/chrome`, or the newest one there when no pin can be read. Then the newest in `~/.cache/puppeteer`, then Chrome or Chromium, with a line saying text may lay out a little differently in the film. Version folders compare as numbers, and on macOS 12 majors above 150 are skipped (HyperFrames does so in the puppeteer cache and matches its own cache on the exact pin; skipping there too changes nothing). diff --git a/bin/vh b/bin/vh index e819f07..83d8833 100755 --- a/bin/vh +++ b/bin/vh @@ -95,6 +95,7 @@ # (exit 1 when the picture differs: a layout that breaks at device scale 2) # gif