Archilyzer · Source

archilyzer

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

commit f957c5df364d552c5c7a92baf6351388c9f059dc
parent e1e7aa0b9280ddc48605c9bdbc142e43ca96d4c2
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 21 Oct 2026 17:44:02 -0400

plans: cookie refresh alerts — one state per service, one banner on the dashboard

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

Diffstat:
Aplans/cookie-refresh-alerts.md | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+), 0 deletions(-)

diff --git a/plans/cookie-refresh-alerts.md b/plans/cookie-refresh-alerts.md @@ -0,0 +1,53 @@ +# Cookie refresh alerts — one state per service, one banner on the dashboard + +Operator, 2026-10-21 (after Rumble embeds 403'd mid-fetch and cleared once rumble.com was opened in Firefox): +"make this state a first class feature for all sources that shows an alert on the dash that cookies need to be +refreshed for that service, either rumble, odysee, or KF". + +## What happened (the case this answers) + +A `fetch-windows` job for the Huck timeline stopped twice with `stopped: network`. Rumble answered +`[RumbleEmbed] <id>: Unable to download JSON metadata: HTTP Error 403: Forbidden` on some embeds and not others. +Nothing in the editor said why; the fix was the operator opening rumble.com in Firefox (fresh `cf_clearance`), +after which the same windows fetched. Today `classifyDownloadFailure` files a bare 403 as "network" +(`common/lib/availability.ts`), the backoff stores only `{until, fails}` (`common/jobs/platformBackoff.ts`), and the +Kiwi Farms block lives per channel (`needsCookies` in `fetchPosts.ts`) — no service-level "your session is stale". + +## Shape + +**State** — a service-keyed record, its own small file `<transcriptsDir>/.service-sessions.json` +(`common/lib/serviceSessions.ts`, atomic write, coerce-tolerant): +`{ [service]: { since, lastSeen, count, kind: "embed-403"|"bot-check"|"challenge"|"check-page", evidence: {jobId?, +channel?, videoId?, line}, clearedAt? } }`. Services: `rumble`, `youtube`, `odysee`, `kiwifarms` (any xenforo host, +keyed by host), `archive.today`. Not "hold", not `needsCookies`, not "session" alone (naming hazards: all taken). + +**Signals** (a classifier beside `isBotCheck` in `availability.ts`, exported, unit-tested on real stderr): +- Rumble: the RumbleEmbed JSON-metadata 403, on 2 different videos in a row (a removed page 403s too — one is not + enough). Odysee: its Cloudflare 403/"Just a moment" signature (collect a real sample first; if none exists yet, + ship the hook with the YouTube/Rumble ones and add Odysee's pattern when one is seen). +- YouTube: the bot check ("Sign in to confirm you're not a bot") — today a rate_limit; also record it here. +- Kiwi Farms / xenforo: `classifyForumPage` → `challenge` (already `needsCookies=true` per channel) → also the + service record. +- archive.today: `ArchiveRefusal "challenge"` → the record, its action "Connect archive session" (existing flow). + +**Clearing** — automatic on the next clean request for that service: `recordPlatformClean` +(`common/jobs/downloadBackoff.ts`) and the forum/archive success paths; manual "Dismiss" too. A cleared alert keeps +`clearedAt` for a day so the dashboard can say "Rumble cookies OK again — re-run the 2 jobs it stopped". + +**Surfaces** +- Dashboard (`DashboardCockpit`, top slot like `FirstRunPanel`): a banner per stale service — "Rumble needs fresh + cookies: open rumble.com in Firefox (2 embed 403s since 17:02, job fetch-windows …)" with **Recheck** (one cheap + probe request through the service's own path; clears on success) and **Re-run stopped jobs** (the jobs the alert + stopped, via job retry) once clear. New view `cookieAlerts` (`common/views/cookieAlerts.ts`, `VIEW_NAMES`, + `/api/view`), polled SLOW. +- A failing job's log line names it: "stopped: Rumble cookies look stale — open rumble.com in Firefox, then Recheck". +- `archilyzer doctor`: a "service cookies" section; `pnpm ops get services` (read) and `pnpm ops recheck-service + {"service"}` (COMMANDS.md regenerated). +- The channel page's existing per-channel `needsCookies` stays; it links to the service banner. + +## Tests and gates + +Unit: classifier on captured stderr (Rumble embed 403 vs removed-page 403, YouTube bot check, KF challenge HTML, +archive.today check page); state coerce/clear; two-in-a-row rule. Editor e2e: a fake yt-dlp that 403s twice → banner +appears with the right text → Recheck with the fake now succeeding → banner clears, "re-run" offered. Docs: +OPERATING.md (recipe), FACTS. Full gates + editor restart (operator rule: no ask, mind the memory gate).