Initial Commit

This commit is contained in:
2026-02-12 16:50:29 -05:00
commit a1da041f14
74 changed files with 6140 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
## 1. CLI Command Foundation
- [x] 1.1 Create `backend/cli.py` with command parsing for force-fetch execution
- [x] 1.2 Add a force-fetch command entrypoint that can be invoked via Python module execution
- [x] 1.3 Ensure command initializes required runtime context (env + database readiness)
## 2. Force-Fetch Execution Path
- [x] 2.1 Wire command to existing news aggregation execution path (`process_and_store_news` or sync wrapper)
- [x] 2.2 Ensure command runs as a one-off operation without changing scheduler job configuration
- [x] 2.3 Preserve existing deduplication, retry, fallback, and image processing behavior during manual runs
## 3. Operator Reporting and Exit Semantics
- [x] 3.1 Add success output that includes stored item count for the forced run
- [x] 3.2 Add failure output with actionable error details when fatal execution errors occur
- [x] 3.3 Return exit code `0` on success and non-zero on fatal failures
## 4. Recovery Workflow and Validation
- [x] 4.1 Validate bootstrap workflow: force-fetch on a fresh deployment with no current items
- [x] 4.2 Validate recovery workflow: force-fetch after simulated failed scheduled cycle
- [x] 4.3 Validate repeated same-day manual runs do not create duplicate records under dedup policy
## 5. Documentation
- [x] 5.1 Update `README.md` with force-fetch command usage for first-time setup
- [x] 5.2 Document recovery-run usage and expected command output/exit behavior