Files

1.3 KiB

ADDED Requirements

Requirement: Latest-30 queue construction

The refetch-images command SHALL enqueue up to the latest 30 news items for processing.

Scenario: Queue population

  • WHEN refetch-images is started
  • THEN the command loads recent news items
  • AND enqueues at most 30 items ordered from newest to oldest

Requirement: Sequential processing

The image refetch queue SHALL be processed one item at a time.

Scenario: Single-item worker behavior

  • WHEN queue processing runs
  • THEN only one queued item is processed concurrently
  • AND next item starts only after current item completes/fails

Requirement: Exponential backoff on transient failures

The queue processor SHALL retry transient image-provider failures using exponential backoff.

Scenario: Rate-limited provider response

  • WHEN provider call returns rate-limit or transient error
  • THEN command retries with exponential delay between attempts
  • AND stops retrying after configured max attempts

Requirement: Progress and completion reporting

The command SHALL emit operator-readable progress and final summary output.

Scenario: Queue progress output

  • WHEN queue processing is in progress
  • THEN the command prints per-item progress (processed/succeeded/failed)
  • AND prints final totals on completion