Add metadata extraction retry queue and scheduled sweeper #27

Closed
opened 2026-04-13 20:13:37 +00:00 by sgcommand · 0 comments
Member

Problem

AMCS appears to have embedding backfill behavior, but metadata extraction retry/sweeper coverage is missing or incomplete. When metadata extraction fails or times out, there should be a reliable background path to retry later.

Impact

  • Thoughts can remain permanently missing metadata
  • Failures may require manual intervention
  • Background enrichment state is inconsistent across records

Expected behavior

Metadata extraction failures should be tracked per thought and retried by a recurring background sweeper with backoff.

Acceptance criteria

  • Metadata extraction attempts persist per-thought status fields such as pending/running/succeeded/failed
  • Failed or timed-out metadata work records retry count, last error, and next retry time
  • A recurring sweeper finds eligible thoughts and retries metadata extraction without duplicate processing
  • Retry behavior uses bounded backoff and stops hammering persistent failures
  • Operators can inspect counts of pending/failed/retried metadata jobs via logs or metrics
## Problem AMCS appears to have embedding backfill behavior, but metadata extraction retry/sweeper coverage is missing or incomplete. When metadata extraction fails or times out, there should be a reliable background path to retry later. ## Impact - Thoughts can remain permanently missing metadata - Failures may require manual intervention - Background enrichment state is inconsistent across records ## Expected behavior Metadata extraction failures should be tracked per thought and retried by a recurring background sweeper with backoff. ## Acceptance criteria - Metadata extraction attempts persist per-thought status fields such as pending/running/succeeded/failed - Failed or timed-out metadata work records retry count, last error, and next retry time - A recurring sweeper finds eligible thoughts and retries metadata extraction without duplicate processing - Retry behavior uses bounded backoff and stops hammering persistent failures - Operators can inspect counts of pending/failed/retried metadata jobs via logs or metrics
Sign in to join this conversation.