Sort must-read hits ahead of all other candidates, then by score.
(paper_with_score: PaperWithScore)
| 497 | 1 if paper_with_score.category == "must_read" else 0, |
| 498 | float(paper_with_score.score), |
| 499 | float(paper_with_score.relevance_signal), |
| 500 | ) |
| 501 | |
| 502 | |
| 503 | def resolve_chat_id_for_user(user_id: str, profile: Dict = None) -> str: |
| 504 | """Resolve the Feishu chat target for a role user.""" |
| 505 | if profile and profile.get("feishu_chat_id"): |
| 506 | return profile["feishu_chat_id"] |
| 507 | |
| 508 | if os.path.exists(ROLE_META_PATH): |
nothing calls this directly
no outgoing calls
no test coverage detected