A community based topic aggregation platform built on atproto

feat(discover): boost hosted-community posts with a keyed deterministic bonus master

Fresh zero-vote posts in Coves-hosted communities ranked below much older bridged posts carrying hundreds of imported votes. A flat boost was rejected because it would stack every fresh hosted post at the top. Discover Hot now adds a per-post numerator bonus of 3.0 x u for posts in hosted communities. u comes from HMAC-SHA256 keyed with the existing CURSOR_SECRET over a domain label plus the post URI, so it is stable across snapshot rebuilds for a post's lifetime and cannot be ground offline by an author choosing rkeys (postv2 URIs are author-chosen). 3.0 was chosen from a read-only production simulation (2026-09-19T00:41Z) recorded in the plan. Changes: - discover: HostedCommunityBonus(secret, uri); DiscoverHotRank takes a trailing hostedBonus, applied only when score >= 0, clamped to 3.0, NaN/Inf/negative treated as 0; bonus 0 is bit-identical to the old rank - postgres: the candidate query selects communities.pds_refresh_token_encrypted IS NOT NULL (presence only, never decrypted, hosted_by_did ignored); the snapshot build passes the bonus keyed with the repository's cursor secret for hosted candidates - discoverHotAlgorithmVersion 1 -> 2: version 1 snapshots are not reused and their cursors return InvalidCursor - tests: keyed reference vectors computed independently, proof the unkeyed digest no longer passes, frozen pre-change ranks, clamp/negative/ monotonicity, the 15h-vs-48h scenario pin, the deliberate downvote cutoff pin; T1 persisted base_rank across snapshots for every hosted-predicate case and across two secrets, version supersession with controls, HTTP acceptance ordering - docs: DISCOVER_HOT_RANKING_PLAN.md amended (no longer source-neutral) with section 3.5, the simulation table, and the post-deploy stored-candidate headroom note The first downvote on a hosted post removes the whole bonus; this hard cutoff is deliberate. Rotating CURSOR_SECRET reshuffles bonuses. Timeline and community Hot and Discover New/Top are unchanged. No new configuration. Reviewed with /second-opinion mini (codex gpt-6-astra + fable); make ci passed on the branch tip. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>