Repository navigation
fix: pool real de 1000 al motor, Autopilot explica por qué salta un Short y 7 días de gracia de la biblioteca (soporte 7984) - #217
Merged
Conversation
added 3 commits
November 26, 2026 21:20
… meant to be
front_proxy gave its limits to the httpx client, and httpx ignores a
client's limits once it is handed a transport: the pool to the engine was
the default 100 connections per front, not 1000.
A streamed response holds its connection until the client has read it, and
a player that buffers a long source reads slowly on purpose. One viewer
seeking through a long video kept a hundred of them open on one front, and
from then on that front answered every proxied request, the health check
included, with a 503 after the 10 s pool wait ("Front: engine unreachable
(PoolTimeout)"), while the engine and the other fronts were fine.
The limits now go on the transport. The test holds 120 slow streams
against a stand-in engine on a unix socket and asks for one more request:
on the old code only 100 streams reach the engine.
…d for the channel
The channel list cannot tell a Short from a regular video before trying it,
and the latest uploads of a channel that posts through us are our own
shorts, so "clip it" most often lands on one. The answer was a three-word
badge ("already a short"), the activity list showed no reason at all, and a
channel with nothing but Shorts read as Autopilot doing nothing.
- Every run view and the POST /api/autopilot/run answer carry a `message`
next to the `reason` code (REASON_MESSAGES): what happened and, where
there is one, the way out.
- GET /api/autopilot sends a `notice` for the whole channel while every run
so far was skipped as a Short.
- The tab shows the sentence on the click, as the badge's tooltip and in
the activity list, and the switch says what Autopilot clips instead.
A test walks the module so a new reason gets its sentence.
… Terms say The Terms (section 13), the privacy policy and the History tab say a paid library is kept while the subscription is active and deleted 7 days after it ends. Only accounts that cannot fall back to the free plan got that. Everyone else read as a plain free account the moment the plan ended, and the free sweep (every clip older than 7 days) took the whole library on its next pass: hours after the end, not 7 days. - metering.plan_ended_at / in_paid_grace: when a subscription row stopped granting its plan (the webhook that cancelled it or marked it unpaid, never later than the paid period; a checkout that never charged was never a plan). - purge_free_expired skips an account inside that grace, and so does the "deleted tomorrow" warning, which would not be true for it. - The cancel step and the admin alert now state the same rule. Tests pin the rule with stand-ins and run the real sweep against Postgres in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tres arreglos que salen de revisar el caso de un cliente (soporte 7984). Cada uno va en su commit y lleva un test que falla en
mainy pasa con el cambio.Qué entra
3ac80bbfix(api): pool de 1.000 conexiones de verdad.front_proxy.pypasaba los límites al cliente httpx, que los ignora cuando se le da un transporte propio: el pool real de cada proceso de entrada hacia el motor era de 100. Un solo usuario viendo la vista previa de un vídeo subido lo agotaba y ese proceso devolvía 503 («engine unreachable (PoolTimeout)»): 2.071 veces el 25-nov entre las 07:39 y las 10:38 UTC.7235d50fix(autopilot): un vídeo que se salta por ser Short dice por qué. La API añademessagea cada ejecución y aPOST /api/autopilot/run, ynoticeenGET /api/autopilotcuando todo lo probado eran Shorts; el panel lo enseña. Al 59 % de quienes prueban Autopilot todas las ejecuciones les salían «youtube_short» sin explicación.cdd47f5fix(billing): un plan que acaba conserva su biblioteca 7 días más. Los Términos (§13), la política de privacidad y la pestaña History prometen 7 días tras acabar el plan; el código borraba en el primer barrido todo clip con más de 7 días. Solo retrasa borrados, nunca borra antes ni más.Pruebas
pytest tests/completo: 2.629 correctos, 105 omitidos, 0 fallos.npm run lintynpm run buildcorrectos. Detalle en el informe del ticket.Riesgo
Bajo. Cada commit se revierte por separado con
git revert.