bulk commit changes!
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Unified admin command surface
|
||||
The system SHALL provide a single admin CLI command family exposing maintenance subcommands.
|
||||
|
||||
#### Scenario: Subcommand discovery
|
||||
- **WHEN** an operator runs the admin command help output
|
||||
- **THEN** available subcommands include refetch-images, clean-archive, clear-cache, clear-news, rebuild-site, regenerate-translations, and fetch
|
||||
|
||||
### Requirement: Fetch command supports configurable article count
|
||||
The admin fetch command SHALL support an operator-provided article count parameter.
|
||||
|
||||
#### Scenario: Fetch with explicit count
|
||||
- **WHEN** an operator invokes fetch with `n=25`
|
||||
- **THEN** the command executes ingestion targeting the requested count
|
||||
- **AND** prints completion summary including processed/stored counts
|
||||
|
||||
### Requirement: Translation regeneration command
|
||||
The system SHALL provide a command to regenerate translations for existing articles.
|
||||
|
||||
#### Scenario: Regenerate translations run
|
||||
- **WHEN** an operator runs regenerate-translations
|
||||
- **THEN** the system attempts translation regeneration for supported languages
|
||||
- **AND** outputs success/failure totals
|
||||
|
||||
### Requirement: Rebuild site command
|
||||
The system SHALL provide a rebuild-site command that executes the defined rebuild workflow.
|
||||
|
||||
#### Scenario: Rebuild execution
|
||||
- **WHEN** an operator runs rebuild-site
|
||||
- **THEN** the system executes the documented rebuild steps in deterministic order
|
||||
- **AND** prints a final success/failure summary
|
||||
@@ -0,0 +1,23 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Context-aware image query generation
|
||||
Image refetch SHALL construct provider queries from article context including keywords and mood/sentiment cues.
|
||||
|
||||
#### Scenario: Context-enriched query
|
||||
- **WHEN** a queued article is processed for image refetch
|
||||
- **THEN** the system derives query terms from article headline/summary content
|
||||
- **AND** includes mood/sentiment-informed cues to improve relevance
|
||||
|
||||
### Requirement: AI-domain fallback keywords
|
||||
When context extraction is insufficient, the system SHALL use AI-domain fallback keywords.
|
||||
|
||||
#### Scenario: Empty or weak context extraction
|
||||
- **WHEN** extracted context terms are empty or below quality threshold
|
||||
- **THEN** the system applies fallback terms such as `ai`, `machine learning`, `deep learning`
|
||||
|
||||
### Requirement: Generic AI fallback image on terminal failure
|
||||
If no usable provider image is returned, the system SHALL assign a generic AI fallback image.
|
||||
|
||||
#### Scenario: Provider chain exhaustion
|
||||
- **WHEN** all provider attempts fail or return unusable images
|
||||
- **THEN** the system stores a generic AI fallback image for the article
|
||||
@@ -0,0 +1,33 @@
|
||||
## 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
|
||||
@@ -0,0 +1,25 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Confirmation guard for destructive commands
|
||||
Destructive admin commands SHALL require explicit confirmation before execution.
|
||||
|
||||
#### Scenario: Missing confirmation flag
|
||||
- **WHEN** an operator runs clear-news or clean-archive without required confirmation
|
||||
- **THEN** the command exits without applying destructive changes
|
||||
- **AND** prints guidance for explicit confirmation usage
|
||||
|
||||
### Requirement: Dry-run support where applicable
|
||||
Maintenance commands SHALL provide dry-run mode for previewing effects where feasible.
|
||||
|
||||
#### Scenario: Dry-run preview
|
||||
- **WHEN** an operator invokes a command with dry-run mode
|
||||
- **THEN** the command reports intended actions and affected counts
|
||||
- **AND** persists no data changes
|
||||
|
||||
### Requirement: Actionable failure summaries
|
||||
Admin commands SHALL output actionable errors and final status summaries.
|
||||
|
||||
#### Scenario: Partial failure reporting
|
||||
- **WHEN** a maintenance command partially fails
|
||||
- **THEN** output includes succeeded/failed counts
|
||||
- **AND** includes actionable next-step guidance
|
||||
Reference in New Issue
Block a user