Skip to content

feat(api): add wake-triggered feed auto-refresh - #13

Merged
sommio merged 1 commit into
developfrom
feat/feed-auto-refresh-on-wake
Apr 20, 2026
Merged

feat(api): add wake-triggered feed auto-refresh#13
sommio merged 1 commit into
developfrom
feat/feed-auto-refresh-on-wake

Conversation

@sommio

@sommio sommio commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Summary

Add same-process wake-triggered feed auto-refresh so stale feeds can be
refreshed after sleep or freeze without changing bootstrap ingestion
semantics.

What changed

  • Adds FEED_AUTO_REFRESH_INTERVAL_HOURS with a 6 hour default and a
    new durable FeedAutoRefreshState record for the last successful wake
    refresh.
  • Extends feed ingestion to return structured run results and enforce a
    per-feed retry cap for transient failures.
  • Introduces FeedAutoRefreshService and its repository to detect
    resume-like wall-clock gaps, skip overlapping runs, and persist the
    success timestamp only after a successful refresh wave.
  • Keeps bootstrap behavior unchanged and reuses the existing ingestion,
    content enrichment, and summary refresh pipeline for wake-triggered
    runs.
  • Adds e2e coverage and updates API docs plus the example environment
    file.
flowchart TB
    Resume[Same-process resume] --> Gap{Gap > interval?}
    Gap -- no --> Skip[Skip refresh]
    Gap -- yes --> Run[Background refresh]
    Run --> Ingest[FeedIngestionService]
    Ingest --> Content[ArticleContentService]
    Ingest --> Summary[ArticleSummaryService]
    Run --> State{Any feed succeeded?}
    State -- yes --> Mark[Persist new success timestamp]
    State -- no --> Keep[Keep previous timestamp]
Loading

Verification

  • Repository typecheck passed during push.
  • Added unit and e2e coverage for the new wake-refresh path.

Compound Engineering
Codex

Add a same-process wake detector, durable refresh state, and bounded
retry support so the API can refresh stale feeds after sleep without
changing bootstrap ingestion semantics.
@sommio
sommio merged commit feaec80 into develop Apr 20, 2026
5 checks passed
@sommio
sommio deleted the feat/feed-auto-refresh-on-wake branch April 20, 2026 08:45
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