clipwright/cloud
juancarlos.cavero 5a6f428075 fix(alerts): probe the static pool the way the download asks
The watcher fetched the YouTube watch page through each static IP with a
bare httpx client and no cookies. Anonymously, a datacenter IP making ~400
YouTube hits a day is rate-limited into "Sign in to confirm you're not a
bot", so playabilityStatus comes back LOGIN_REQUIRED and the watcher
declared the pool down. Those same IPs were serving every real download
fine, because a download carries YOUTUBE_COOKIES.

Measured in production on 8-sep-2026, all three statics, same minute:

    anonymous (what the watcher did)  -> LOGIN_REQUIRED
    with the download's cookies       -> OK

while proxy_usage showed 119 YouTube jobs routed to HD-static1 in the last
24 h with zero paid bytes. So the page that said "every download costs
money until the statics are back" fired while nothing was being spent, and
it re-nags every 2 h.

CLAUDE.md already recorded this shape for cloud/metering.probe_url_minutes
("The probe also carries YOUTUBE_COOKIES, like the download does"); the
watcher probe never got the same treatment. It does now, parsed once and
cached, and a blob that is not a Netscape cookie file is recognised before
the stdlib prints "http.cookiejar bug!" into the log every 30 minutes.

The paid probe stays anonymous on the cheap HTTP 204: it is billed per GB
and has no reason to carry a session.

The failure detail now names what YouTube actually said
(playabilityStatus: LOGIN_REQUIRED / UNPLAYABLE / ...) instead of blaming
the IP for every case. With cookies configured, LOGIN_REQUIRED means the
session expired and wants rotating, which is not the same problem as a
flagged address and should not read as one.

Claude-Session: https://claude.ai/code/session_01UZGqjYcZyfmKww1gcyKrp5
2026-09-08 11:30:26 +02:00
..
__init__.py feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII 2026-09-07 19:22:52 +02:00
account.py feat(mcp): OAuth 2.1 for claude.ai/ChatGPT, and a "connect an agent" panel 2026-08-27 01:17:49 +02:00
alerts.py fix(alerts): probe the static pool the way the download asks 2026-09-08 11:30:26 +02:00
analytics.py feat(billing): mirror paid invoices, top-ups and refunds into OpenPanel as revenue 2026-09-03 14:16:19 +02:00
api_keys.py feat(agents): the pipeline as a platform — API keys, MCP server, webhooks 2026-08-03 22:33:16 +02:00
auth.py fix(auth): harden MX verification after code review 2026-08-13 10:07:20 +02:00
billing.py feat(billing): mirror paid invoices, top-ups and refunds into OpenPanel as revenue 2026-09-03 14:16:19 +02:00
config.py feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII 2026-09-07 19:22:52 +02:00
database.py feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII 2026-09-07 19:22:52 +02:00
digest.py fix(digest): harden daily digest after code review 2026-08-18 14:53:31 +02:00
disposable_domains.txt feat(auth): verify email domain MX before sending magic links 2026-08-13 01:03:05 +02:00
disposable_mx.txt fix(auth): harden MX verification after code review 2026-08-13 10:07:20 +02:00
email_policy.py fix(auth): harden MX verification after code review 2026-08-13 10:07:20 +02:00
emails.py fix(cloud): close the gaps the account-deletion review turned up 2026-08-24 19:26:12 +02:00
LICENSE fix(cloud): harden paid-mode surface + source-available license for cloud/ 2026-07-16 17:30:12 +02:00
managed_keys.py feat: add hosted paid mode (managed keys, Stripe trial, metering) 2026-07-14 13:04:43 +02:00
marketing.py feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII 2026-09-07 19:22:52 +02:00
mcp_oauth.py feat(mcp): OAuth 2.1 for claude.ai/ChatGPT, and a "connect an agent" panel 2026-08-27 01:17:49 +02:00
metering.py fix(download): explicit default,mweb clients so account cookies stop yielding "Video unavailable" 2026-09-06 03:43:46 +02:00
models.py feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII 2026-09-07 19:22:52 +02:00
oauth.py feat(abuse): abrir free a email normal + bloquear dominios desechables 2026-07-21 00:45:54 +02:00
proxy_ledger.py fix(download): explicit default,mweb clients so account cookies stop yielding "Video unavailable" 2026-09-06 03:43:46 +02:00
social_profiles.py feat(social): keep scheduling calendar + add Content calendar button in dashboard 2026-07-16 19:26:51 +02:00
storage.py feat(delivery): serve clips from a custom R2 domain, and show download progress 2026-08-23 13:49:08 +02:00
videos.py feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII 2026-09-07 19:22:52 +02:00