fix(summarizer): stamp ticker and map urls from the article, not the model #58
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_b564e062"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
GET /api/news/tickerwas 20/20url: "". The reduce prompt asks the model for"url": ""andsave_batchpersistedrow.get("url"). The model returns blank, so every headline and map pin was an unsourced claim.What
On insert,
news_items.urlis the selected article'sarticles.url, matched by headline to title (article_url_for_row). The model'surlfield is ignored.""so two stories cannot cross-wire."". Nothing is invented.Score threshold, dedupe, and model id are unchanged. No backfill, no deploy.
Test
PYTHONPATH=news/summerizer pytest news/summerizer/tests -q→ 111 passed.Fixture: two articles (
https://ex.com/1,https://ex.com/2) plus one withurl=None. Model JSONurlis""or a decoy. Headlines are swapped vs article order. Stored ticker and map urls arehttps://ex.com/2,https://ex.com/1,""— not the model url, not cross-wired.Insert path is
article_url_for_row(row, articles), notrow.get("url").Known-red CI
docker login 127.0.0.1:3000is pre-existing and not this change.