Parent: #2
Context
TopicEye now has substantial lifecycle/concurrency behavior: APScheduler, per-source sync jobs, DB-backed analysis jobs, recovery dispatch, post-sync work, DuckDB initialization/fallback and background cache warmup. This is a high-regression surface even when individual functions look correct.
WorkOrder
Lead: Backend / Architect
Verifier: independent QA/Backend verifier
This is a reliability-hardening work item, not an assertion that every listed path is currently broken.
Audit and test scope
- Startup/shutdown: migrations, seed steps, DuckDB timeout/degraded mode, scheduler enable/disable, cancellation of background tasks.
- Scheduler ownership: prove jobs are not duplicated across startup/reload/deployment topologies; document supported worker topology.
- Source sync lease: claim → commit → ingest → rollback/self-heal behavior under exception, timeout and process interruption.
- Analysis job recovery: queued/running jobs across restart; idempotency and duplicate-dispatch protection.
- Post-sync/background tasks: task lifetime, exception collection, bounded concurrency and shutdown behavior.
- Health semantics:
/health/live and /health/ready should reflect documented deployability semantics, including scheduler-disabled configuration and DuckDB fallback.
- External I/O: timeouts/retries and test isolation; unit tests must not depend on public network unless explicitly marked integration.
Acceptance criteria
Non-goals
- Replacing APScheduler.
- Rewriting the persistence layer.
- Broad performance optimization without measurements.
Parent: #2
Context
TopicEye now has substantial lifecycle/concurrency behavior: APScheduler, per-source sync jobs, DB-backed analysis jobs, recovery dispatch, post-sync work, DuckDB initialization/fallback and background cache warmup. This is a high-regression surface even when individual functions look correct.
WorkOrder
Lead: Backend / Architect
Verifier: independent QA/Backend verifier
This is a reliability-hardening work item, not an assertion that every listed path is currently broken.
Audit and test scope
/health/liveand/health/readyshould reflect documented deployability semantics, including scheduler-disabled configuration and DuckDB fallback.Acceptance criteria
create_taskpath can silently lose exceptions or outlive shutdown without an explicit lifecycle policy.Non-goals