Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 16084a229b3fe78fce8b0f3609fa2ce99e2a153f
parent 4aa03f6959a510808f06cc38077abd18c2ea24aa
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 17 Oct 2026 01:44:41 -0400

plans: release 32 R9 as shipped — the Odysee loop: the cut's page open, one stored-URL rest, the lane's stored-URL work, the browser lookup; FACTS; CHANGELOG

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 3+++
Mplans/FACTS.md | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aplans/release-32/odysee-loop.md | 141+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 226 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +- **An Odysee record can be read from its page in a browser when Odysee refuses yt-dlp.** The video page of an Odysee channel has **Read from the page**: it opens the video's Odysee page in a headless browser (which Odysee answers when it answers yt-dlp with 429), reads the record from what the page itself loads, and writes `metadata.info.json` — or, when there is one, adds only what it lacks and the media file the page's player asked for, so a stored-URL download can then read it. The record says `_source: "browser"`, and the change is in the metadata history. The channel's Playlist stage has **List from the page** (the uploads the channel page shows, scrolled as many times as you say, added to the top of the playlist — nothing removed, nothing downloaded) and **Read records from their pages** (a list of ids). A channel's Configure form has **Browser lookup**: with **Stored media URL downloads** set, a video whose record names no media file is looked up this way first and then downloaded. The channel's `--match-filter title~='…'` and download filters still decide what is listed and downloaded. One page a minute; Odysee only. `pnpm ops browser-lookup --json '{"slug":"<channel>","ids":["<claim id>"]}'` or `'{"slug":"<channel>","listing":true}'`. Needs a restart of the editor. +- **The download lane takes an Odysee channel's held videos from their stored media URLs.** With **Stored media URL downloads** on (fallback or only), when Odysee is cooling down or held the lane still downloads that channel's videos whose record stores the media file — one new file per 20 minutes, without asking Odysee anything and without counting as Odysee answering. A refusal from the file's server defers the video; Odysee's own backoff is not touched. Needs a restart of the editor. +- **Clip windows cut from Odysee's stored media URL open the video's page first, and wait their turn with full downloads.** Odysee's file server serves a video only once its player has opened the page, so **Fetch windows** with the stored media URL opens each video's page in a headless browser before its first window (again if the server refuses after a window came down), and a window of a new video waits out the same 20-minute rest a full download does — a second window of the same video does not. The window's provenance counts the page opens. Needs a restart of the editor. - **"Cut from the stored media URL" wherever a clip window is fetched.** When Odysee refuses its page lookup, a window can be cut from the video file address the record already stores. The option sits beside the editor's **Fetch missing evidence** (Reports and Articles tabs — offered once a preview finds Odysee windows with a stored address, and the preview says how many) and umtool's **Fetch clip** (articles, the drafts deck, the research reader), the clip and claim benches and **Fetch N unfetched clips** — only where the record stores one, off by default. Ticked, the page is asked first as always, and the stored file is used only when Odysee refuses. `POST /api/media/fetch-window` and the MCP's `fetch_clip` take `storedUrl` (`"fallback"` or `"only"`). - **The Inbox reads on a phone.** At narrow widths each row wraps: the piece, what and why on top, the count and its action underneath. Before, at about 380 px the rows showed only the count and the button. - **Attach a whole local archive and make playable copies from the channel page.** The Cleanup stage's **Media for the whole channel** has **Attach media from a local archive** (a folder, a .zip or a .7z; only names matching, create records for videos the channel does not hold, replace files already saved) and **Playable copies** (trackers, folder) — what `archilyzer media attach` and `media playable` did for a channel. Each previews first, the run is armed by a preview of the same settings, and the result is said in plain words with the job linked. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -10189,3 +10189,85 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri refusal. UI: the Configure form's **Stored media URL downloads** select (`aria-label "stored media URL downloads"`, Transcription section); the video page's re-download **Stored media URL** select (`aria-label "stored media URL"`) shown only when the record stores a trusted URL and the channel is transcribe handling. + +## Release 32 lane R9: the Odysee loop — the cut's page open, one stored-URL rest, the lane, the browser lookup (verified 2026-10-17, branch `r32/odysee-loop`) + +- **The clip cut opens the player's page** (`ytdlp/fetchWindowManaged.ts`, the stored-URL ffmpeg branch). + `FetchWindowOpts.storedUrlCut?: {pageSession?, openPage?, gapMs?, sleep?}`; production passes at most `pageSession`. + `StoredPageSession` (`ytdlp/storedUrlPageOpen.ts` `newStoredPageSession()`: `{pages: Map<pageUrl, {cutsSinceOpen}>, + opens}`): `fetchWindows` makes ONE per run and hands it to every stored-URL item; absent, `fetchWindowManaged` makes + one per window (kept across its corrupt re-fetch). Before the first cut of a video: open (absent `openPage` = the real + `openPlayerPage` for PAGE_OPEN_PLATFORMS; null = none). A 429 (stderr `429`/`Too Many Requests`) after + `cutsSinceOpen > 0`: open again, delete the part, cut once more; a 429 with `cutsSinceOpen === 0` (straight after an + open) is the `rate_limit` FetchWindowError as before. Provenance `pageOpens` (count for THIS window, > 0 only; + `parseClipProvenance` keeps it). `openPlayerPage` returns `{ok:false}` without a browser when `NODE_TEST_CONTEXT` + (node's test runner) or `E2E_ODYSEE_PAGE_FIXTURE` (the e2e server) is set. +- **One stored-URL rest** (`jobs/storedUrlPace.ts`): `storedUrlGapRemainingMs(platform, {url?, sameFileFree?})`, + `noteStoredUrlRead(platform, url, gapMs)` (platformGap key `stored-url:<platform>` + the last file, on globalThis + `__yttStoredUrlLastFile__`), `storedUrlLastFile`, `clearStoredUrlFiles` (tests). The cut waits `sameFileFree: true` + (a cut of the file read last owes nothing) and notes at start and end; the full download (`runStoredUrlDownload`) + waits without the exemption (R7's test: the same file twice still waits) and notes through `noteStoredUrlRead`. + The cut's rest = `storedUrlCut.gapMs` ?? `E2E_CLIP_WINDOW_GAP_MS` (when set, ≥ 0) ?? STORED_URL_NEW_FILE_GAP_MS. +- **The lane's stored-URL rescue** (`controller/laneStoredUrl.ts`; `autoRunner.ts` next()): `backedOff` = platforms + added to platformSkip by the cooldown loop that were not already skipped as busy; `rescuable` = those whose + `storedUrlGapRemainingMs(pf) === 0`. `storedUrlRescue({pending, owner, platformSkip, rescuable, platformOf, optedIn, + known})` keeps a skipped platform's id when rescuable, the owner is opted in (`storedUrlLaneMode(config, platform)`: + `storedUrlDownloads` only|fallback, handling transcribe, STORED_URL_PLATFORMS) and `known === true`; unknown ids are + read after the filter (`makeStoredUrlLaneMemo().probe`, ≤ STORED_URL_LANE_PROBES_PER_TICK = 40, `storedMediaUrl` of + `data/<id>`, memo for the runner's life). `Picked.storedOnly = {held}` → `LaunchArgs.storedOnly` → downloadOneManaged + `{storedUrl: "only", storedUrlHeld?}`. A failed stored-only unit returns `{outcome: "failed", viaStoredUrl: true}`; + `applyUnitOutcome`'s new first branch: rate_limit/network → `deferVideo` (6 h), no escalation, `markCompleted: + false`; else `markCompleted: true`, nothing touched. +- **The browser lookup.** `lib/odyseePageApi.ts` (pure): `PageApiResponse {url, status, request?, body}`, + `ODYSEE_API_HOSTS` (`api.na-backend.odysee.com`, `api.odysee.com`, `api.lbry.tv`, `api.lbry.com`) + + `isOdyseeApiUrl`; `claimsFromResponses` (2xx only; a JSON-RPC `result`/`data`, a batch array; a claim = 40-hex + `claim_id` + `name` + object `value`, found bare, in `items`, or as a value of a URL-keyed result); + `claimForPage(claims, pageUrl)` (by the URL's `:<claim id or prefix>`, name agreeing unless the id is full; else a + unique stream claim by name; never "the one claim"); `streamingUrlFor(claimId, responses, mediaUrls)` (a `get` + result's `streaming_url` containing the claim id, `/api/vN/` → `/api/v3/`; else the first CDN request under + `/streams/<claimId>/`, query dropped); `odyseeInfoFromClaim(claim, {pageUrl, streamingUrl, at?})` (yt-dlp's lbry + fields + `upload_date` from timestamp UTC, `release_date`, one format `{format_id: "original", quality 1, ext, + protocol, filesize, width, height, http_headers.Referer}` and its top-level twins, `_type: "video"`, + `_source: "browser"`, `_browserLookupAt`); `listingFromResponses(responses, {claimId?, name?})` (stream claims signed + by the channel, newest first by `release_time`, `https://odysee.com/<name>:<claim_id>`); `channelClaimFor`. +- `ytdlp/odyseePageReader.ts`: `PageApiReader({pageUrl, signal, onLog, play?, scrolls?}) → {ok, responses, + mediaUrls, error?}`; `readOdyseePage` (headless Playwright, fresh context; JSON answers of the API hosts with the + request's postData; CDN `*.odycdn.com …/streams/` request URLs; settle 10 s, play 8 s, each scroll 3 s, ≤ 40). + `E2E_ODYSEE_PAGE_FIXTURE` = a JSON file `{<pageUrl> | "*": PageApiRead}` answered instead (read per call). +- `ytdlp/odyseeBrowserLookup.ts`: `BROWSER_LOOKUP_PLATFORMS = ["odysee"]`; gap key `browser-lookup:<platform>`, + `browserLookupGapMs` = max(60, import floor) s, 0 under the e2e fixture; `browserLookupVideo({videoDir, pageUrl, + onLog, signal, requestedBy?, deps?: {reader?, gapMs?, sleep?}})` → `written` (no file: whole, `writeJsonAtomic` + compact) | `patched` (`patchMetadataInfo` by **`browser-lookup`**, new METADATA_HISTORY_WRITERS entry: absent/null/"" + keys, the format group only when `storedMediaUrlFromInfo(current)` is null, `_browserLookupAt`; never `_source`) | + `unchanged` | `refused` | `unreadable` | `not-found`. `matchFiltersOf(config)` (`--match-filter(s)[=]`), + `titleMatchFilter(expr)` (`title~='…'`/`"…"`, leading `(?i)`; else null), `browserLookupDecision(config, info, + {skipLiveDownloads})` → ok | `{skip: true, filter: "ytdlpMatchFilter"|<app filter>}` | `{skip: false}` (a match + filter it cannot read). `browserLookupWanted(request, config)`. +- `downloadOneManaged({browserLookup?, browserLookupDeps?})` + channel key **`browserLookup: true`** (CHANNEL.md; + coercion: only `true` kept): with a stored mode and no stored URL — `only` (before `noStoredUrlOutcome`) or + `fallback` after a rate-limited prefetch — `storedViaBrowserLookup` looks up first (transcribe handling, the PAGE url + on BROWSER_LOOKUP_PLATFORMS); found → the stored-URL download as before (why `only`/`held`/`rate-limited`); a filter + skip → a `skipped-filtered` outcome with `filter` (dir kept); an unreadable match filter → `failed`, per_video; + nothing found → on as without it. +- `controller/odyseeBrowserListing.ts` `browserListChannel({paths, slug, config, scrolls?, skipLiveDownloads, onLog, + signal, deps?})`: `browserListingRefusal(config)` first (an Odysee `@channel` URL; a readable match filter); the + channel page (default 5 scrolls); listing through `browserLookupDecision`; new ids (by `extractVideoId`) PREPENDED to + `playlist` (`writeFileAtomic`), every kept URL to the roster (`mergeRosterFile`, "listing"). A third `playlist` + writer, additive only (store-playlist and the full sweep replace it). +- `controller/browserLookupJob.ts` `runBrowserLookupJob({paths, slug, channelConfig, videoIds?, listing?, scrolls?, + skipLiveDownloads, queueKey?, requestedBy?, afterRun?, deps?})`: kind **`browser-lookup`** (jobKinds: platform queue, + needsText, replayable, not drainable; spec params `videoIds`, `listing`, `scrolls`, `queueKey`); door: text readable, + ids or listing, ≤ BROWSER_LOOKUP_MAX_VIDEOS (50), ids as path segments, each id's `findVideoSourceUrl` on Odysee; + not refused for a held/cooling platform. Log ends `summary: {"videos":[{id,status,stored,error?}],"listing"?:…}` + (`browserLookupSummaryOf`); the job fails when nothing was written or listed. +- Editor: `browserLookupAction(slug, {ids?, listing?, scrolls?, queueKey?})` + (`app/channels/[slug]/browserLookupActions.ts`); `POST /api/ops/browser-lookup` (`ids` non-empty strings, `listing`, + `scrolls` 1–40); the video page's **Read from the page** (`BrowserLookupControl`, channels whose platform/url is on + BROWSER_LOOKUP_PLATFORMS); the Playlist stage's `BrowserLookupSection` (`data-browser-listing`: **List from the page**, + `aria-label "page scrolls"`; `data-browser-records`: **Read records from their pages**, `aria-label "video ids to read + from their pages"`), shown for an Odysee channel (`PlaylistStage browserLookup`); the Configure form's checkbox + `name/aria-label "browser lookup"` (CHANNEL_FORM_FIELDS + CHANNEL_FORM_FLAGS). The e2e server sets + `E2E_ODYSEE_PAGE_FIXTURE` per slot (`e2e/servers.ts` `odyseePageFixtureFile` = `<transcripts>/.fake-odysee-pages.json`). +- Test kit: `testing/web/fakeOdyseePage.mjs` — `syntheticChannel`, `syntheticClaim`, `pageUrlOf`, `channelUrlOf`, + `cdnUrlOf` (`/v6/streams/<claim>/<sd_hash[:6]>.mp4`), `resolveAnswer`, `claimSearchAnswer`, `getAnswer`, + `refusedAnswer`, `videoPageRead`, `channelPageRead`, `fakePageReader` (`.calls`). diff --git a/plans/release-32/odysee-loop.md b/plans/release-32/odysee-loop.md @@ -0,0 +1,141 @@ +# 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:<platform>` 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:<platform>`, 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~='<regex>'` (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: {<url>: 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 <claim> (…)"; +(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/<claim>/<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.