feat(summary): send complete articles within user budget (#39)

This commit is contained in:
2026-11-24 17:39:26 +01:00
parent d0c7cb7cae
commit 79953ce49f
73 changed files with 1688 additions and 288 deletions

View File

@ -125,7 +125,7 @@ func TestTicket29WholeWatchlistFitsOneJudgmentAndPreservesListing(t *testing.T)
}))
defer srv.Close()
ranker, _ := NewLayaHTTPRanker(LayaHTTPConfig{BaseURL: srv.URL})
got, err := ranker.Rank(context.Background(), "title_content", assets, []generation.Candidate{{ID: "original-id", Article: scraper.Article{Title: "headline", Content: "Entire short content"}}})
got, err := ranker.Rank(context.Background(), "title_content", assets, []generation.Candidate{{ID: "original-id", Article: scraper.Article{Title: "headline", ContentState: scraper.ContentComplete, Content: "Entire short content"}}})
if err != nil || calls != 1 || states != 1 || len(got) != 1 || got[0].ID != "original-id" {
t.Fatalf("calls=%d states=%d err=%v", calls, states, err)
}