First deployment
Some checks failed
quality-gates / lint-and-test (push) Has been cancelled
quality-gates / security-scan (push) Has been cancelled

This commit is contained in:
2026-02-13 09:14:04 -05:00
parent 0e21e035f5
commit 679561bcdb
128 changed files with 3479 additions and 120 deletions

View File

@@ -19,9 +19,24 @@ If provider lookups fail to return a usable summary image, the system SHALL use
- **THEN** the system assigns a generic AI fallback image URL/path for summary image
### Requirement: Fallback behavior remains context-aware first
The system SHALL attempt context-aware keyword retrieval before any generic fallback image is selected.
The system SHALL evaluate context-aware candidates before fallback and require refetched summary images to be relevant, non-redundant alternatives.
#### Scenario: Context-aware attempt precedes fallback
- **WHEN** summary image selection runs for a news item
- **THEN** the system first attempts provider queries from extracted context-aware keywords
- **AND** only falls back to generic AI image if these attempts fail
- **AND** only falls back to generic AI image if candidate evaluation fails
#### Scenario: Finance-story relevance guard
- **WHEN** article topic contains finance/market terms (for example stocks, shares, plunge, earnings)
- **THEN** image selection rejects obviously unrelated animal/portrait outcomes
- **AND** system retries with finance-safe query refinements before final fallback
#### Scenario: Guarded fallback remains deterministic
- **WHEN** provider chain cannot return a relevant finance-safe image
- **THEN** system uses deterministic generic fallback that is topic-safe
- **AND** avoids unrelated imagery classes flagged by guardrails
#### Scenario: Refetch rejects unrelated and duplicate outcomes
- **WHEN** candidate images are evaluated during refetch
- **THEN** the system rejects candidates matching current image identity for the same article
- **AND** rejects clearly unrelated animal/pet imagery classes before final selection