# Release 32 lane R9 — close the Odysee loop (as shipped) Proven live (the orchestrator, 2026-10-17): Odysee's CDN serves a stream's original file to this connection only after a player opened that video's page (headless Chromium: goto, ~10 s, play, ~8 s); cold reads 429. A browser's page load also gets 200 from Odysee's API (`api.na-backend.odysee.com/api/v1/proxy`, `api.odysee.com/*`) where yt-dlp's lbry extractor gets 429. R7 used the page open for full downloads; this lane gives it to the clip cut, makes the cut and the download share one pacing state, lets the lane take held-platform stored-URL work, and adds the browser-backed lookup. ## What 1. **The clip cut opens the page** (`ytdlp/fetchWindowManaged.ts`, the stored-URL ffmpeg cut): R7's `PageOpener` (`openPlayerPage` for PAGE_OPEN_PLATFORMS; `storedUrlCut.openPage` injects one, null = none) runs before the FIRST cut of each video in a run — fetch-windows passes one `StoredPageSession` per run (`storedUrlPageOpen.ts` `newStoredPageSession`), a single-window job gets a fresh one. A 429 after a cut was served since the last open opens the page again and cuts once more; a 429 straight after an open is the rate limit it always was (no second open). The window's provenance records `pageOpens` (`lib/clipWindow.ts`, parsed tolerantly). 2. **One gap** (`jobs/storedUrlPace.ts`): the clip cut now reads and sets R7's `stored-url:` rest (20 min) — a cut of a NEW file waits it out like a full download, a cut of the file read last (another window of the same video) owes only the clip gap; both note the rest at their start and end and remember the file (`noteStoredUrlRead`). A full download always waits (R7's rule, unchanged). `E2E_CLIP_WINDOW_GAP_MS` (test-only) also replaces the rest a cut sets. 3. **The lane takes held-platform stored-URL work** (`controller/laneStoredUrl.ts`, wired in `autoRunner.ts`): a channel with `storedUrlDownloads` `only`/`fallback` (transcribe handling, a STORED_URL_PLATFORMS platform) keeps its pending videos on a cooling or held platform whose record stores a trusted media URL — only when the platform is not busy and its stored-URL rest has elapsed (one new file per rest). "Stores a URL" is a file read, remembered per video for the runner's life, at most 40 unknown videos read per tick (offered from the next tick). The unit downloads as `only` (`storedUrlHeld` on a held platform) and settles nothing; a FAILED stored-URL unit moves no backoff either (`jobs/unitOutcome.ts`: a CDN refusal defers the video 6 h, anything else retires it for the session). 4. **The browser-backed lookup** (Odysee only): - `lib/odyseePageApi.ts` (pure): the page's API answers (`resolve`, `claim_search`, `get` through the proxy) read into claims, the page's own claim (by the URL's claim id or a prefix of it, else a unique name — never "the only one", a video page resolves its recommendations), the file (the `get` answer's `streaming_url` naming the claim, else the player's CDN request; yt-dlp's `/api/vN/` → `/api/v3/` rule), the metadata.info.json yt-dlp's lbry extractor writes (+ `_source: "browser"`, one `original` format), a channel page's listing (its own uploads, newest first). - `ytdlp/odyseePageReader.ts`: the injected `PageApiReader`; the real one is headless Chromium (Playwright, a fresh context, no cookies) keeping every JSON answer of the API hosts with its request body and the CDN requests; a video page is played (so the player asks `get` — the same view unlocks the CDN), a channel page scrolled (bounded, 40). Refuses under a test runner; answers from `E2E_ODYSEE_PAGE_FIXTURE` on the e2e server (and R7's page opener opens nothing there). - `ytdlp/odyseeBrowserLookup.ts` `browserLookupVideo`: paced (`browser-lookup:`, 60 s), writes the whole record when there is none, else patches only what it lacks and the one format when it stores no trusted URL (`patchMetadataInfo`, new history writer `browser-lookup`). `browserLookupDecision`: the channel's yt-dlp `--match-filter(s) title~=''` (the one form it can read; any other refuses) and the app's download filters. - `controller/odyseeBrowserListing.ts` `browserListChannel`: the channel page's uploads, filtered as yt-dlp's listing would be, ADD-ONLY — new ids at the top of `playlist`, every listed id into the roster (`mergeRosterFile`, "listing"). Nothing removed, nothing downloaded. - `controller/browserLookupJob.ts`: the `browser-lookup` job (platform download queue, `needsText`, replayable), refusals before the job (text unreadable, nothing named, > 50 ids, an id with no Odysee page URL, a listing of a non-Odysee or match-filter-unreadable channel); not refused for a held platform; the log ends `summary: {json}`. - The managed download (`downloadOneManaged`): with a stored-URL mode and the channel's new `browserLookup: true` (or `opts.browserLookup`), a record that stores no media URL (`only`, or `fallback` after a rate-limited prefetch) is looked up in the browser first and downloaded from the file the page named; a filter decline writes a `skipped-filtered` outcome, an unreadable match filter a `failed` (per_video) one. - Editor: `POST /api/ops/browser-lookup {slug, ids?, listing?, scrolls?, queueKey?}`; the video page's **Read from the page** (Odysee channels); the Playlist stage's **List from the page** (scrolls) and **Read records from their pages** (ids); the Configure form's **Browser lookup** checkbox (`aria-label "browser lookup"`); Retry; ops help, COMMANDS.md, CHANNEL.md, ENVIRONMENT.md. ## Files Common: `jobs/storedUrlPace.ts` (new), `ytdlp/fetchWindowManaged.ts`, `ytdlp/storedUrlPageOpen.ts`, `controller/fetchWindows.ts`, `ytdlp/downloadOneManaged.ts`, `lib/clipWindow.ts`, `controller/laneStoredUrl.ts` (new), `controller/autoRunner.ts`, `jobs/unitOutcome.ts`, `lib/odyseePageApi.ts` (new), `ytdlp/odyseePageReader.ts` (new), `ytdlp/odyseeBrowserLookup.ts` (new), `controller/odyseeBrowserListing.ts` (new), `controller/browserLookupJob.ts` (new), `lib/channelConfig.ts`, `lib/channelConfigSchema.ts`, `lib/metadataHistory.ts`, `jobs/jobKinds.ts`, `lib/envVars.ts`, `testing/web/fakeOdyseePage.mjs` (+ `.d.mts`, new). Editor: `app/channels/[slug]/browserLookupActions.ts` (new), `app/api/ops/browser-lookup/route.ts` (new), `app/channels/[slug]/components/BrowserLookupSection.tsx` (new), `app/channels/[slug]/videos/[id]/components/BrowserLookupControl.tsx` (new), `…/stages/PlaylistStage.tsx`, `app/channels/[slug]/page.tsx`, `…/videos/[id]/page.tsx`, `app/channels/components/{ChannelForm.tsx,parseChannelForm.ts,channelConfigToForm.ts}`, `app/jobs/jobReplayRegistry.ts`, `…/videos/[id]/videoActions.ts` (the merge's duplicate import), `e2e/servers.ts`, `playwright.config.ts`. `scripts/archilyzer-ops.mjs`, COMMANDS.md, CHANNEL.md, ENVIRONMENT.md. Tests: `ytdlp/fetchWindowStoredCut.test.ts` (7), `controller/laneStoredUrl.test.ts` (6), `lib/odyseePageApi.test.ts` (6), `ytdlp/odyseeBrowserLookup.test.ts` (8), `ytdlp/browserLookupDownload.test.ts` (4), `controller/odyseeBrowserListing.test.ts` (5), `jobs/jobKinds.test.ts` (+2 rows), `lib/channelConfigSchema.test.ts` (count), `controller/fetchWindowsStoredUrl.test.ts` (the rest zeroed), editor `app/api/ops/browser-lookup/route.test.ts` (3), `parseChannelForm.test.ts` (+1), `e2e/browser-lookup.spec.ts` (2). | Commit | What | | --- | --- | | `3c3c76cc` | common: the cut opens the page (one page state per run), one stored-URL rest (`jobs/storedUrlPace.ts`), `pageOpens`; the opener's test-runner guard; the merge's duplicate import in videoActions.ts | | `4dd12f67` | common: the lane's stored-URL rescue (`controller/laneStoredUrl.ts`), a failed stored-only unit moves no backoff | | `0d9add57` | common: the browser lookup (page reader, page-API reader, per-video lookup, listing, job), `browserLookup` in the download, CHANNEL.md, ENVIRONMENT.md, the e2e fixture knob | | `ae5a71bb` | editor: Read from the page, List from the page, Read records from their pages, the Configure checkbox, the ops route, Retry, the e2e spec, ops help, COMMANDS.md | | (this commit) | this record, FACTS, CHANGELOG | ## Gates All through the shared heavy lock (`r31-locked.sh` / `r31-locked6.sh`; unit suites and tsc also through `pnpm heavy` with an estimate), from the worktree root: - `pnpm -r --no-bail --workspace-concurrency=1 exec tsc --noEmit`: clean at `4dd12f67` (state of items 1–3) and at `ae5a71bb`. On `main` (`eb8d9523`) the editor did NOT type-check — `videoActions.ts` imported `StoredUrlMode` twice (the R6/R7 merge); fixed in `3c3c76cc`. - common: 4537 at the branch's start (4536 pass, 1 skipped, measured on a clean tree) → **4573 (4572 pass, 0 fail, 1 skipped)** (the one failure of the first full run was the channel-config key count, 35 → 36, fixed and re-run). - editor unit: 342 → **346/346**. - test:scripts: **1053 (1049 pass + 4 skipped)**, no script test added (the ops help text only). - mcp: not touched, not run. - `docs env --check`, `docs files --check`, `docs cli --check`, `settings example --check`: clean. - e2e, foreground, `browser-lookup.spec.ts` + `stored-url-downloads.spec.ts` at `ae5a71bb`: **4/4 passed** (20.1 s; start-mode build 55 s through the heavy slot). ## Rulings followed Opt-in everywhere (the channel's `storedUrlDownloads` for the lane, `browserLookup` for the automatic lookup, the op for a one-off); Odysee only; one stream, real gaps (one new stored-URL file per rest across cuts and downloads, one browser page a minute); add-only listings; the channel's filters still decide; no model; no live network or browser in any test (fakes: an injected opener, the fake CDN's page-open lock, synthetic page answers). Records state rulings. ## What the live check must confirm (the API shape was not knowable offline) The page-API reader was built against yt-dlp's own lbry extractor (`yt_dlp/extractor/lbry.py` in the installed yt-dlp-patched: `resolve` → `{result: {: claim}}`, `claim_search` → `{result: {items}}`, `get` → `{result: {streaming_url}}`) and synthetic answers of that shape. A live run must show: (1) the video page's answers include a `resolve` (or `claim_search`) carrying the page's own claim — the job log's "The page names (…)"; (2) the file comes from a `get` answer or the player's CDN request and equals the shape the corpus stores (`https://player.odycdn.com/v6/streams//<6 hex>.mp4`); (3) a channel page's answers include `claim_search` items signed by the channel, and five scrolls list more than the first page; (4) a stored-URL cut after the page open lands (the R7 finding, now on the cut path). ## Found and left - **A real browser may have opened during the first unit run** (before the guard existed): the editor route test `app/api/media/fetch-window/route.storedUrl.test.ts` drives the whole single-window cut, which then reached the real `openPlayerPage` for its synthetic page `https://odysee.com/@demo:1/stream-s1:s1` (the test timed out waiting ~10 s; the run was stopped). If Playwright launched, that was one headless page view of a nonexistent Odysee URL. The opener now refuses under a test runner and on the e2e server. - Not every R5 test of the cut exercised a second window of a different video — with the shared rest a run of windows over several Odysee videos now takes 20 minutes per new video (the ruling); the tests zero the rest with `E2E_CLIP_WINDOW_GAP_MS`. - The synchronous single-window path (`stream: true`, umtool's / the MCP's fetch_clip) can now wait up to 20 minutes for the rest when a download or another video's cut just read a file; the job log says so. Unchanged otherwise. ## Owed - The live check above: the page-API reader has never seen a real Odysee page (by rule). - The lane's rescue does not run the browser lookup for a held video whose record stores NO URL (it is not picked); the op, or a batch with `browserLookup`, fills those first. - A per-request `browserLookup` on the download routes (`download-missing`, `transcribe-one`, `retry-bucket`) was not added: the channel key and the dedicated op are the opt-ins (ManagedDownloadOpts carries it for a future caller). - The listing is the newest uploads only (a bounded number of scrolls); a full back catalogue still needs yt-dlp's listing (Store playlist) on a day Odysee answers it.