Skip to content

feat(services): pause polls, OCR and renewal for friends whose Canvas token was refused - #182

Merged
SebasB76 merged 1 commit into
mainfrom
feat/skip-broken-token
Nov 23, 2026
Merged

SebasB76 merged 1 commit into
mainfrom
feat/skip-broken-token

Conversation

@SebasB76

Copy link
Copy Markdown
Owner

What

A friend whose Canvas token was refused has nothing to read or renew until they send a new one through the form, but the container kept running their poll, maintenance and OCR every 10 minutes. Live today, 9 of 11 friends are in that state, and their runs (3–4 s of Python each, ×3 per cycle) take about half of the background CPU:

sondeo --todos: capitán ✓ 42 s · A ✓ 50 s · B ✓ 4 s · C ✓ 3 s · D ✓ 4 s · … (9 cut friends at 3–4 s each)

Now, for a friend whose chain is cut:

  • vinci-sondeo skips their poll and OCR. The 07:00 summary still goes to them.
  • vinci-mantenimiento runs them only in the :02 pass each hour. That is enough for the daily message with the reconnect form (poller._token_refused, at most once every 24 h, during the day).
  • Once their new token arrives (saved by the gateway plugin, not by these loops), the next pass picks them up again.
  • health reports their «Sondeo» as «en pausa» and allows 75 min for their maintenance. A reseed writes canvas_reseeded_at, and lateness is counted from it, so the watchdog never warns the captain about a friend who just came back.

The trade-off: while paused, a friend gets no deadline reminders from the stale copy of their aula. They do get the daily summary and the reconnect form.

Original request (captain, in chat): «podriamos hacer que vinci tenga una arquitectura distribuida en la cual escale segun la carga». After measuring the container (2 GB limit, 1.2 GB used, about 0.5 core on average, no active agents), autoscaling would save nothing on a fixed-price VPS. The waste was these runs, and the captain chose to skip them.

E2E: test_whatsapp_friend adds a friend whose token was refused and checks that sondeo --todos and the OCR pass leave them out. 5 passed.

Not run end to end on the live container yet: needs the Redeploy.

Docs: docs/guia/servidor.md (both services), docs/guia/problemas.md (paused alerts), .claude/skills/control-vinci/references/features/token.md, AGENTS.md «Status».

… token was refused

A friend whose chain is cut has nothing to read or renew until the form brings
a new token, yet every 10 min the services still ran a poll, a maintenance and
an OCR child for them (3-4 s each, about half the background CPU with 9 of 11
friends cut). vinci-sondeo now skips their poll and OCR; vinci-mantenimiento
runs them only in the :02 pass, which keeps the daily reconnect form going out.
The 07:00 summary still reaches them. Health reports their poll as paused and
counts lateness from a reseed, so the watchdog raises no false alarm.
@SebasB76
SebasB76 merged commit cb2e7c6 into main Nov 23, 2026
1 check passed
@SebasB76
SebasB76 deleted the feat/skip-broken-token branch November 23, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant