[8] Reliable ingestion operations #43

Open
opened 2026-06-14 05:24:40 +02:00 by dernbu · 0 comments
Owner

Objective

Make ingestion reliable enough to run continuously without manual babysitting.

This issue hardens the operational substrate after the main product ingestion paths exist, rather than making queue infrastructure the first product milestone.

Dependencies

Depends on #42.

Scope

  • Implement durable job insertion, atomic claiming, completion, retry, and dead-job state.
  • Use leases with expiry recovery so interrupted workers do not strand work forever.
  • Ensure one worker processes one job at a time unless future scope explicitly changes that.
  • Add scheduler behavior for daily discovery and four-week artifact refresh TTLs.
  • Make discovery continuation bounded and restart-safe.
  • Add operator CLI commands for enqueueing discovery, forcing refreshes, inspecting queue state, and requeueing dead jobs.
  • Add token-protected internal endpoints for reconciliation issues and dead jobs if useful for operations.
  • Add structured logging and enough metadata to diagnose failed source jobs.

Out of scope

  • Multi-worker concurrency.
  • Administrator UI.
  • Backup/restore automation.
  • Live source access in CI.

Done when

  • Jobs survive service and database restarts.
  • Expired leases are reclaimed.
  • Repeated failures produce dead jobs with inspectable error context.
  • Restarts do not create duplicate recurring jobs or force discovery immediately.
  • Operators can inspect and requeue failed work through documented commands.
  • The existing LawNet, eLitigation, artifact, and search flows run through the hardened job path.
## Objective Make ingestion reliable enough to run continuously without manual babysitting. This issue hardens the operational substrate after the main product ingestion paths exist, rather than making queue infrastructure the first product milestone. ## Dependencies Depends on #42. ## Scope - Implement durable job insertion, atomic claiming, completion, retry, and dead-job state. - Use leases with expiry recovery so interrupted workers do not strand work forever. - Ensure one worker processes one job at a time unless future scope explicitly changes that. - Add scheduler behavior for daily discovery and four-week artifact refresh TTLs. - Make discovery continuation bounded and restart-safe. - Add operator CLI commands for enqueueing discovery, forcing refreshes, inspecting queue state, and requeueing dead jobs. - Add token-protected internal endpoints for reconciliation issues and dead jobs if useful for operations. - Add structured logging and enough metadata to diagnose failed source jobs. ## Out of scope - Multi-worker concurrency. - Administrator UI. - Backup/restore automation. - Live source access in CI. ## Done when - Jobs survive service and database restarts. - Expired leases are reclaimed. - Repeated failures produce dead jobs with inspectable error context. - Restarts do not create duplicate recurring jobs or force discovery immediately. - Operators can inspect and requeue failed work through documented commands. - The existing LawNet, eLitigation, artifact, and search flows run through the hardened job path.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dernbu/lawnet-scraper#43
No description provided.