Skip to content

Feature/extraction reconciliation worker#35

Merged
asiniscalchi merged 8 commits into
mainfrom
feature/extraction-reconciliation-worker
May 1, 2026
Merged

Feature/extraction reconciliation worker#35
asiniscalchi merged 8 commits into
mainfrom
feature/extraction-reconciliation-worker

Conversation

@asiniscalchi

Copy link
Copy Markdown
Owner

No description provided.

asiniscalchi and others added 8 commits May 1, 2026 13:18
Introduces JournalEntryExtractionCandidate, find_entries_missing_or_failed_extraction,
and delete_failed_if_present on JournalEntryExtractionRepository to support the
upcoming reconciliation worker.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Finds entries missing an extraction record or with status=failed, clears any
failed row, then delegates to the runner. Continues processing remaining
candidates on per-entry errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Supports FROID_EXTRACTION_WORKER_ENABLED, FROID_EXTRACTION_WORKER_BATCH_SIZE,
and FROID_EXTRACTION_WORKER_INTERVAL_SECONDS. Defaults to disabled, batch=20,
interval=300s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
run_once() drives one backfill cycle; run_forever() loops with a configurable
interval. Logs cycle outcomes and handles repository errors gracefully.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds FROID_EXTRACTION_WORKER_ENABLED/BATCH_SIZE/INTERVAL_SECONDS env vars and
CLI flags. Spawns the worker at startup when enabled; logs a warning if
OPENAI_API_KEY is missing. Updates .env.example with the new variables.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds model() and prompt_version() to JournalEntryExtractionRunner and
delegates through ExtractionBackfillService to the worker startup log,
matching the pattern used by EmbeddingReconciliationWorker.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pattern

run_once now returns Result, with run_forever handling the error — matching
the structure of EmbeddingReconciliationWorker.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@asiniscalchi asiniscalchi merged commit 40802d5 into main May 1, 2026
3 checks passed
@asiniscalchi asiniscalchi deleted the feature/extraction-reconciliation-worker branch May 1, 2026 13: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