Fix FFM-1689: enable cold-start session gate by default#322
Merged
Conversation
Member
Author
|
STAFF ENGINEER REVIEW: APPROVED — Manual structural review clean. Codex review clean. Targeted verification passed: tests/recommendations/test_meme_queue.py + tests/feed_turn/test_planner.py, 57 passed. CI lint/test are green; proceeding with squash auto-merge. |
Member
Author
|
✅ Approved + merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
COLD_START_NSESSIONS_GATE_ENABLEDby default so low-sent dormant returners (nsessions >= 2) fall through to the growing-user blender instead ofcold_start_adapt/cold_start_explore.Root cause
FFM-1161 implemented the
nsessions <= 1cold-start gate behindCOLD_START_NSESSIONS_GATE_ENABLED, but the config default stayedFalse. If production does not explicitly set the env var, the gate is present but inert, matching the observed 7-day dormant-returner leak in FFM-1689.Guardrail decision
I did not add a new positions 6-10
cold_start_adaptquality guardrail in this PR. The current report says adapt weakness is spread across 21 sources and direct/meme-link cohorts, while existing code already applies a text-light content guard. A source/content quality rule needs a follow-up experiment or Analyst isolation; this PR fixes the obvious routing/config bug first.Verification
DATABASE_URL=postgresql+asyncpg://app:app@localhost:65432/app REDIS_URL=redis://localhost:36379/0 CORS_ORIGINS='["http://localhost"]' CORS_HEADERS='["*"]' TELEGRAM_BOT_TOKEN=test TELEGRAM_BOT_USERNAME=test_bot TELEGRAM_BOT_WEBHOOK_SECRET=test MEME_STORAGE_TELEGRAM_CHAT_ID=-1 UPLOADED_MEMES_REVIEW_CHAT_ID=-2 ADMIN_LOGS_CHAT_ID=-3 ENVIRONMENT=TESTING python3 -m pytest tests/recommendations/test_meme_queue.py tests/feed_turn/test_planner.py -q→ 57 passedruff check --fix src/ tests/ruff format src/ tests/Fixes FFM-1689.