Auto-summarize only recent videos (recency window); older = on-demand #2

Closed
opened 2026-06-08 05:00:09 +00:00 by mathias · 1 comment
Owner

Problem

Scheduled discovery auto-summarizes every discovered video when auto_summarize is on (default ON, ADR-018). For a real subscription backlog this means hundreds of old videos get queued — e.g. a freshly-onboarded user shows 15 summarized · 256 fetching soon. That hammers the captions path (YouTube timedtext 429s, 4h backoff, ADR-014) processing content nobody asked for, and makes the pilot's load unbounded.

Desired behaviour

  • Auto-summarize only videos published within a recency window (~last 7 days, configurable) when auto_summarize is on.
  • Older discovered videos are still listed, but NOT auto-summarized — they carry the existing "Summarize" button for on-demand processing (already built).
  • Manual mode unchanged.

Why

  • Bounds load to what's current → fewer 429s, no wasted compute on stale backlog.
  • A proper, defensible pilot scope: "summaries of this week's uploads, on tap for older."
  • Directly de-risks the open captions-viability question (ADR-014 / VISION Stage 0) by making the auto path tractable.

Implementation sketch

  • In the scheduler/runner auto path (internal/runner, cmd/tapir/scheduler.go): when auto-summarize is on, only queue/summarize videos with published_at >= now - window. Older videos: discovered + stored, left for on-request.
  • New config TAPIR_AUTO_SUMMARIZE_WINDOW (default 168h), parsed in internal/config like the other durations. 0 = no window (current behaviour) for escape hatch.
  • The on-demand /v/{id}/summarize path already bypasses any window (explicit user request).
  • TDD: scenario for "old video not auto-summarized but summarizable on request" + "recent video auto-summarized".

Decisions/docs

  • Amends ADR-018 (auto-summarize scope: all → recent-only). Add/update the ADR + requirements/architecture docs (docs-currency gate). Consider a docs/use-cases/*.feature scenario.

Refs: ADR-018, ADR-014, VISION Stage 0.

## Problem Scheduled discovery auto-summarizes **every** discovered video when `auto_summarize` is on (default ON, ADR-018). For a real subscription backlog this means hundreds of old videos get queued — e.g. a freshly-onboarded user shows `15 summarized · 256 fetching soon`. That hammers the captions path (YouTube timedtext 429s, 4h backoff, ADR-014) processing content nobody asked for, and makes the pilot's load unbounded. ## Desired behaviour - **Auto-summarize only videos published within a recency window** (~last 7 days, configurable) when `auto_summarize` is on. - **Older discovered videos are still listed**, but NOT auto-summarized — they carry the existing **"Summarize" button** for on-demand processing (already built). - Manual mode unchanged. ## Why - Bounds load to what's current → fewer 429s, no wasted compute on stale backlog. - A **proper, defensible pilot scope**: "summaries of this week's uploads, on tap for older." - Directly de-risks the open captions-viability question (ADR-014 / VISION Stage 0) by making the auto path tractable. ## Implementation sketch - In the scheduler/runner auto path (`internal/runner`, `cmd/tapir/scheduler.go`): when auto-summarize is on, only queue/summarize videos with `published_at >= now - window`. Older videos: discovered + stored, left for on-request. - New config `TAPIR_AUTO_SUMMARIZE_WINDOW` (default `168h`), parsed in `internal/config` like the other durations. `0` = no window (current behaviour) for escape hatch. - The on-demand `/v/{id}/summarize` path already bypasses any window (explicit user request). - TDD: scenario for "old video not auto-summarized but summarizable on request" + "recent video auto-summarized". ## Decisions/docs - **Amends ADR-018** (auto-summarize scope: all → recent-only). Add/update the ADR + requirements/architecture docs (docs-currency gate). Consider a `docs/use-cases/*.feature` scenario. Refs: ADR-018, ADR-014, VISION Stage 0.
Author
Owner

Shipped in v0.9.0 (deployed via infra ff0269f, image tapir:c5f556d). Recency-bounded auto-summarize is live (ADR-020). Closing.

Shipped in v0.9.0 (deployed via infra ff0269f, image tapir:c5f556d). Recency-bounded auto-summarize is live (ADR-020). Closing.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/tapir#2