Skip to content

chore: delete unused features (friend challenge, giveaway, chat economy, stars, extra popups) and dead helpers - #390

Merged
ohld merged 3 commits into
productionfrom
chore/delete-dead-features
Oct 31, 2026
Merged

ohld merged 3 commits into
productionfrom
chore/delete-dead-features

Conversation

@ohld

@ohld ohld commented Oct 31, 2026

Copy link
Copy Markdown
Member

Deletes features the owner decided to kill based on prod usage, plus helpers with no callers outside tests. 47 files, +41 / −3810.

What Evidence (prod) Lines
Friend challenge (H12): handler, repo, /friend + callback registration, fc_ branch in /start, offer after like, FRIEND_CHALLENGE_ENABLED, localization, tests, docs/analyst/friend-challenge-h12.sql, implementation doc. H12 marked KILLED in docs/growth/HYPOTHESES.md 106 assignments, 0 participations ever ~−1,700
Giveaway: treasury/giveaway.py, both giveaway_ branches in /start, test_giveaway.py 0 giveaway transactions ever ~−185
Chat burger +N transfers and +fire N activity rewards (chat/send_tokens.py, transfer_tokens, get_active_chat_users) last send/receive 2024-12-16, last active_in_chat 2025-01-22 ~−280
Stars purchase flow (payments/purchase.py, buy buttons on /balance, pre-checkout/successful-payment//refund handlers, mint_tokens) 3 purchase_token rows ever, last 2025-11-21 ~−150
Chat boost reward (admin/boost.py, ChatBoostHandler) 6 transactions ever −51
Popups except achievements: upload_meme, telegram_channel, github_repo, feedback (+ popups.yml, channel-subscribe check and events) owner decision; note: this removes the live, rarely firing channel-subscribe popup at meme #5 (~3 sends/30d) ~−380
admin/waitlist.py (never registered), get_waitlist_users_registered_before, waitlist.yml no references ~−330
Dead helpers: 4 in stats/service.py, RedisData/set_redis_key/get_by_key, charge_user, get_latest_chat_messages, UserTg, check_openrouter_key_health, get_source_candidate_vote_counts, TREASURY_USER_ID grep: callers only in tests (tests now go through get_usable_openrouter_keys / a direct vote select) ~−200
Crosspost n_sub_likes shadow enrichment not part of v5/v5c/v5f; only its own unit test and an old readout doc used it −90
Table defs with 0 references: meme_raw_ig (+2 SQL joins), user_channel_membership, channel_lifecycle_event, editorial_posts/_snapshots (+ editorial branch in stats_collector.py, crosspost path untouched), inline_search_*, user_wrapped, chat_agent_usage, friend_challenge_* grep −212
Deps: openai (0 imports), pydantic[email] → pydantic (no EmailStr), OPENAI_API_KEY grep −4

Kept on purpose:

  • All DB tables. No drop migration. Note: alembic revision --autogenerate will now propose dropping the tables whose Table defs were removed, so strip those ops from future autogenerated migrations.
  • All TrxType members and PAYOUTS entries, for historical treasury_trx rows.
  • The friend_challenge exclusion in meme stats SQL. It does nothing now but is harmless.
  • specs/burger-tokenomics.md updated to match.

Tests (local): tests/tgbot tests/crossposting tests/stats tests/storage tests/test_crossposting_meme.py 315 passed; tests/flows tests/test_redaction_audit.py 35 passed. tests/admin fails to collect locally because of an unrelated FastAPI version mismatch in my local env. ruff check and ruff format are clean.

ohld added 3 commits October 31, 2026 13:06
…my, stars, extra popups) and dead helpers

Removes features with zero or near-zero prod usage and helpers with no
callers outside tests. DB tables are kept (no drop migration); TrxType
enum members are kept for historical treasury_trx rows.
@ohld
ohld merged commit 86a17d8 into production Oct 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant