feat(social): add listening activity, shared rooms and modern chat
ci / api / api (push) Canceled after 0s
ci / module boundaries / boundaries (push) Canceled after 0s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Canceled after 11m29s
ci / db / db (push) Canceled after 11m22s
ci / mobile / mobile (Metro-бандл Android) (push) Canceled after 6m43s
ci / recommender / recommender (push) Canceled after 6m47s
ci / ts / ts (packages + web) (push) Canceled after 1s

This commit is contained in:
mrleo1nid committed 2026-10-23 10:45:40 +03:00
1 parent 0a05bfe2cd
commit 11a16cd023
59 files changed
+5022 -542

No files matched your search

+17
View File
@@ -45,6 +45,23 @@ def profile(**kw: object) -> Profile:
return Profile(**base) # type: ignore[arg-type]
def test_friend_signal_is_bounded_and_respects_negative_feedback() -> None:
index = library()
blocked = {"t0-0", "t1-0"}
picks = build_batch(index, profile(disliked=blocked), Session(), [], n=5,
friend_ids=index.ids, rng=np.random.default_rng(8))
assert not blocked.intersection(p.id for p in picks)
assert sum(p.source == "friends" for p in picks) <= 1
assert len(picks) == 5
def test_empty_friend_signal_does_not_change_ranking() -> None:
index = library()
first = build_batch(index, profile(), Session(), [], rng=np.random.default_rng(17))
second = build_batch(index, profile(), Session(), [], friend_ids=[], rng=np.random.default_rng(17))
assert [p.id for p in first] == [p.id for p in second]
def cluster(track_id: str) -> int:
return int(track_id[1])