feat(generation): select articles in three passes

This commit is contained in:
2026-11-24 00:38:02 +01:00
parent d22f84529f
commit 8022ee0547
27 changed files with 916 additions and 68 deletions

View File

@ -258,3 +258,15 @@ func (f FakeLayaRanker) Rank(ctx context.Context, mode string, assets []models.U
}
return result, nil
}
// Binary test seam: the loopback fixture's selected IDs represent yes decisions.
func (f FakeLayaRanker) DecideMentions(ctx context.Context, mode, pass string, assets []models.UserAsset, candidates []generation.Candidate) ([]generation.Candidate, error) {
return f.Rank(ctx, mode, assets, candidates)
}
func (c FakeCompanyCatalog) MentionNames(id string) ([]string, error) {
company, err := c.ResolveCompany(id)
if err != nil {
return nil, err
}
return []string{company.Name}, nil
}