news: get_news degrades softly on topic miss (news-13) — any-term ranked fallback, recent+note, language hint in schema; idle-impulse default varies form
This commit is contained in:
@@ -98,3 +98,14 @@ Each `get_news` call increments a per-user daily counter; over
|
||||
`news-daily-per-user` (default 30) the tool refuses with an error
|
||||
result without touching the store. The budget gate (SAF-04) still
|
||||
applies to the surrounding model calls.
|
||||
|
||||
### NEWS-13 — Topic misses degrade softly, never empty-handed (coverage: test)
|
||||
|
||||
A `topic` whose AND-match (NEWS-11) finds nothing falls back to an
|
||||
any-term match, ranked by how many keywords hit (ties: newest first);
|
||||
if that too is empty, the newest stored items are returned instead.
|
||||
Both fallbacks set a `note` field naming the degradation so the model
|
||||
can answer honestly ("nothing on that exactly, but…"). A model
|
||||
passing a multi-word or wrong-language topic (the live
|
||||
`"Nordland road accident"` → `[]` case) thus still gets usable
|
||||
context. Exact matches return no `note`.
|
||||
|
||||
Reference in New Issue
Block a user