Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ OPENROUTER_API_KEY_SECONDARY=

# Friend challenge (H12): apply migration first; 90/10 treatment/holdout.
FRIEND_CHALLENGE_ENABLED=false
# Retention broadcasts: HQ pick by default (channel-viral disabled 2026-10-30, H3c).
BROADCAST_CHANNEL_VIRAL_PICK_ENABLED=false

# Telethon (for channel stats collection)
TELEGRAM_API_ID=
Expand Down
6 changes: 3 additions & 3 deletions specs/recommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ Removed engines: `fast_dopamine`, `classic`, `multiply_all_scores`, `selected_so
| Stage | Trigger | Engines | Source |
|-------|---------|---------|--------|
| Cold start | nmemes_sent < 30 | 3-phase adaptive with text-light guards: explore/adapt/fallback avoid OCR text above 30 words | [`pipeline.py`](../src/recommendations/pipeline.py) |
| Growing | 30-100 | Control uses `lr_smoothed`; the text-light overlay is disabled unless explicitly enabled by a registered experiment | [`pipeline.py`](../src/recommendations/pipeline.py) |
| Mature | 100+ | Recently-liked blender v2; the text-light overlay is disabled unless explicitly enabled by a registered experiment | [`pipeline.py`](../src/recommendations/pipeline.py) |
| Growing | 30-100 | `lr_smoothed`-led blend (see `src/feed_turn/planner.py`) | [`pipeline.py`](../src/recommendations/pipeline.py) |
| Mature | 100+ | `MATURE_BLEND_WEIGHTS` blend (`src/feed_turn/planner.py`); `explore_budget_v1` adds `fresh_viral` for treatment | [`pipeline.py`](../src/recommendations/pipeline.py) |
| Moderator/Admin | user_type check | 75% low_sent_pool + 25% regular (by maturity) | [`pipeline.py`](../src/recommendations/pipeline.py) |

`fixed_pos={0: "lr_smoothed"}` forces first position to `lr_smoothed` in blended mode. If the `text_light_blender_v1` overlay is explicitly enabled, its treatment slot becomes `text_light_lr_smoothed`.
`fixed_pos={0: "lr_smoothed"}` forces first position to `lr_smoothed` in blended mode.

## Diagnostics Refactor

Expand Down
18 changes: 0 additions & 18 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,18 @@ class Config(BaseSettings):
# FFM-1882: narrow true-new cold-start positions 2-10 experiment.
# Roll back by setting this to false in production env.
COLD_START_CANDIDATE_GUARDRAILS_ENABLED: bool = True
# H10 cold_start_fresh_viral_v1: KILLED 2026-10-30 (first tap and 1h block
# rate both worse in treatment). Off = no new assignment, everyone is control.
COLD_START_FRESH_VIRAL_EXPERIMENT_ENABLED: bool = False
# explore_budget_v1: 50/50 non-cold-start users get the labeling budget,
# fresh-viral blend slot and idle-return first slot. Kill switch = all control.
EXPLORE_BUDGET_V1_ENABLED: bool = True

# Recommendation batch diagnostics are realtime operational data, not
# durable product facts. Keep compact logs/spans always on and sample full
# payloads so future Prometheus/Grafana adapters can reuse the same seam.
RECOMMENDATION_DIAGNOSTICS_SAMPLE_RATE: float = 0.01
RECOMMENDATION_SOURCE_DIVERSITY_ENABLED: bool = False
RECOMMENDATION_SHADOW_SCORING_ENABLED: bool = True
# Source affinity policies (skip/dislike ≈ "next", not "ban channel").
# Soft demote majority-dislike sources in ranking (default ON).
RECOMMENDATION_DEMOTE_DISLIKED_SOURCES: bool = True
RECOMMENDATION_DEMOTE_DISLIKED_MIN_REACTIONS: int = 5
RECOMMENDATION_DEMOTE_DISLIKED_MULTIPLIER: float = 0.15
# Hard exclude only strong hate (default OFF — empty-queue risk).
RECOMMENDATION_BLOCK_DISLIKED_SOURCES: bool = False
RECOMMENDATION_BLOCK_DISLIKED_MIN_REACTIONS: int = 15
RECOMMENDATION_BLOCK_DISLIKED_RATIO: float = 3.0 # ndislikes >= 3 * nlikes
# Retention broadcasts: pick high-confidence meme (affinity + LR) instead of
# blind Redis queue pop. Kill switch rolls back to queue path.
BROADCAST_HIGH_QUALITY_PICK_ENABLED: bool = True
# Prefer last-7-day channel posts ranked by forwards (community-verified).
# Falls back to HQ/queue. Skips known channel members.
# Off since 2026-10-30 (H3c disable rule): viral LR 5-20 pp below HQ with
# equal/worse reactions; HQ is the default push pick.
BROADCAST_CHANNEL_VIRAL_PICK_ENABLED: bool = False
# broadcast_cadence_holdout_v1: no-push holdout per cadence step (15m/24h
# 15%, 1w/2w/4w 20%). See experiments/active/2026-10-30-*.
BROADCAST_CADENCE_HOLDOUT_ENABLED: bool = True
Expand Down
Loading
Loading