Files
clawfort/openspec/changes/p02-force-fetch-command/specs/force-fetch-command/spec.md
2026-02-12 16:50:29 -05:00

1.4 KiB

ADDED Requirements

Requirement: Operator can trigger immediate news fetch via Python command

The system SHALL provide a Python command that triggers one immediate news aggregation run outside of the hourly scheduler.

Scenario: Successful forced fetch invocation

  • WHEN an operator runs the documented force-fetch command with valid runtime configuration
  • THEN the system executes one full fetch cycle using the existing aggregation pipeline
  • AND the command terminates after the run completes

Scenario: Command does not reconfigure scheduler

  • WHEN an operator runs the force-fetch command while the service scheduler exists
  • THEN the command performs a one-off run only
  • AND scheduler job definitions and cadence remain unchanged

Requirement: Forced fetch reuses existing aggregation behavior

The system SHALL use the same retry, fallback, deduplication, image processing, and persistence logic as scheduled fetch runs.

Scenario: Retry and fallback parity

  • WHEN the primary news provider request fails during a forced run
  • THEN the system applies the configured retry behavior
  • AND uses the configured fallback provider path if available

Scenario: Deduplication parity

  • WHEN fetched headlines match existing duplicate rules
  • THEN duplicate items are skipped according to existing deduplication policy
  • AND only eligible items are persisted