Files

2.1 KiB

1. Admin CLI Foundation

  • 1.1 Extend backend/cli.py parser with an admin maintenance command group and subcommands.
  • 1.2 Add argument validation for subcommands including fetch --count n.
  • 1.3 Keep existing force-fetch command behavior intact.

2. Queue-Based Image Refetch

  • 2.1 Implement latest-30 article selection query for refetch queue.
  • 2.2 Implement in-process sequential queue worker for refetch-images.
  • 2.3 Add exponential backoff retry logic for transient/rate-limit provider failures.
  • 2.4 Add per-item progress logging and final queue summary output.

3. Context-Aware Image Recovery

  • 3.1 Add context-aware query generation using article keywords plus mood/sentiment cues.
  • 3.2 Add AI-domain fallback keyword set when extracted context is weak.
  • 3.3 Add explicit generic AI fallback image assignment for terminal provider failure.
  • 3.4 Ensure refetched images are optimized and persisted using existing image pipeline contracts.

4. Maintenance Operations

  • 4.1 Implement clean-archive command using existing archival repository helpers.
  • 4.2 Implement clear-cache command for configured cache layers in scope.
  • 4.3 Implement clear-news command for non-archived and/or configured scope items.
  • 4.4 Implement rebuild-site command to execute defined rebuild sequence.
  • 4.5 Implement regenerate-translations command across supported languages.
  • 4.6 Implement fetch command with configurable article count.

5. Safety and Operator UX

  • 5.1 Add explicit confirmation requirement for destructive commands.
  • 5.2 Add dry-run support for commands where preview is feasible.
  • 5.3 Standardize command output format for success/failure totals and next-step hints.

6. Documentation and Validation

  • 6.1 Update README command documentation with examples for each new subcommand.
  • 6.2 Add operational guardrail notes (confirmation, dry-run, backoff behavior).
  • 6.3 Validate command help output and argument handling.
  • 6.4 Run end-to-end manual checks for refetch-images queue behavior and failure recovery output.