Repository navigation
chore: delete dead features (channel hits, Wrapped, chat agent, inline, VK crosspost) - #369
Merged
Merged
Conversation
ohld
force-pushed
the
chore/delete-dead-features
branch
from
October 30, 2026 17:44
6d10e1e to
d95420a
Compare
…e search, VK crosspost) Occam's razor pass over code with no live traffic or permanently-off flags: - channel-hits + membership sync stack, lifecycle collector, scripts, flags - Wrapped (April 2026): handlers, commands, popup, redis helpers, script - group chat agent (DeepSeek/openai-agents), explain_meme, agent Sentry filters - inline search mode + inline-share canary (share button is URL-only) - VK crossposting, post_share_max manual flows + share-max picker/query (score_version=3) - /prefect/* proxy endpoints, commented handlers, # @flow stubs, unregistered broadcast flow, broken upload_promo_day1 popup split - ghost-user monitor cron: every minute -> every 10 minutes - drop openai-agents dependency, empty uv.lock and poetry stub Tables are kept in src/database.py (no migration); drop them later.
ohld
force-pushed
the
chore/delete-dead-features
branch
from
October 30, 2026 17:49
d95420a to
157c195
Compare
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.
Occam's razor pass: delete code with no live traffic or permanently-off flags. Net −6,918 lines (68 files, +32 / −6,950). No migrations, no table drops.
What was deleted
recommendations/channel_hits.py,tgbot/channel_workers.py,tgbot/channel_membership.py,tgbot/repo/channel_membership.py,handlers/chat/channel_membership.py, hooks innext_message.py, channel-hit exclusion clauses inbroadcast_pick.py(channel-viral pick is off anyway), lifecycle collector instats_collector.py, 3 scripts,CHANNEL_HITS_ENABLED/CHANNEL_MEMBERSHIP_SYNC_ENABLED, 5 test filesFalse;channel_hits_v1killed;channel_lifecycle_event0 rows/30dhandlers/stats/wrapped*.py,/wrapped,/wrapped_clear,wrapped_*callbacks,?start=wrappedbranch, auto-trigger popup,redis.get/set_user_wrapped,stats.get_meme_descriptions_for_wrapped,scripts/broadcast_wrapped.pyuser_wrappedhas 0 rows ever; one-off seasonal featurehandlers/chat/agent/,chat/ai.py,chat/explain_meme.py, mention-trigger and fallback inchat/chat.py, agent-gated group onboarding inchat_member.py, chat-agent Sentry filters,CHAT_AGENT_ENABLED,DEEPSEEK_*CHAT_AGENT_ENABLED=False;chat_agent_usage0 rows/30d (last 2026-09-14)handlers/inline.py,repo/inline_search.py, inline handlers,popup.inline_search,inline.yml; share-button variant/assignment,TELEGRAM_INLINE_SHARE_*flags. The share button is now always the URL sharecrossposting/vk.py, VK branch in the RU post flow,VK_USER_TOKEN,VK_GROUP_IDpost_share_max_*manual flows (owner)upload_promo_day1popup split (owner)/prefect/*proxy endpoints (#11)/prefect/flow-runs,/prefect/deployments,PREFECT_AUTH_STRINGsetting (the compose env var is still used by Prefect itself)explain_memehandlers,# @flowinrewards/daily.py, unregisteredbroadcast_next_meme_to_active_more_than_days_ago+ its query, stubuv.lock, empty[tool.poetry.dependencies]openai-agentsOps (#18): ghost-user monitor cron changes from
* * * * *to*/10 * * * *. Its 25-minute trailing window still overlaps between runs, so ghosts are still reported.Kept on purpose:
src/database.py, so autogenerate does not emit drops.Channel.VK_GROUP_RUandTrxType.BOT_REPLY_PAYMENT.+Nburger sends, random reactions, and the group like/dislike callback, which still serves old buttons.Tables now unused (drop later in a separate migration)
user_channel_membership,channel_lifecycle_event,user_wrapped,chat_agent_usage,inline_search_logs,inline_search_chosen_result_logs.Not done here (left for follow-ups)
openaiandmatplotlibstay.src/comms/(audit PR-B) still imports them.OPENAI_API_KEYis kept for the same reason.get_next_share_max_meme_for_*,_SHARE_MAX_QUERY,SCORE_VERSION_SHARE_MAX) insrc/crossposting/service.pyand their tests intests/test_crossposting_meme.pyare left alone, because the crossposting ranker is out of scope (Crosspost v5 shadow score + stop catch-up bursts #365 edits it). They no longer have a caller.start.pyloses only the 4-linewrappedbranch, to minimise conflicts with Friend challenge "Пять мемов для друга" (H12) behind flag #364.Expected merge conflicts
They are trivial and all in import blocks or adjacent lines:
config.py,app.pydelivery.py,keyboards.py,next_message.py,popups.py,popups.yml, and a few tgbot testsflows/crossposting/meme.pyVerification
src scripts tests static alembic docker-compose*.yml justfile .env.example requirementsfinds no hits (PREFECT_AUTH_STRINGremains only as a compose env var).requirements/dev.txtinstalled and noopenai-agents,import scripts.serve_flows,import src.mainandsrc.tgbot.app.setup_application()all succeed (52 handlers registered).pytest -x -q: 726 passed, 2 skipped, run against a throwaway local Postgres 14 + Redis, with migrations run from scratch.ruff check src/ tests/andruff format --checkare clean.