Lists are grabbed automatically, on AutoGet's rules (#926) - #934
Merged
Merged
Conversation
Item 5 of #926. With AUTO_GRAB_LISTS on (off by default), the list of a bot that advertises one and whose list is not held is asked for: one at a time, at most one every AUTO_GRAB_EVERY_MINUTES, after a random 5-360 second wait, dropped if someone else asks that bot meanwhile, and at most 3 tries 30 minutes apart. Small, slow and servers-only bots are skipped, and a list removed by hand is not grabbed back. Tries survive a restart. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AP6LSxkr4n9dMFNSNMogmW
Ninja-FSE
changed the base branch from
feat/926-list-expiry-and-seen
to
main
September 24, 2026 17:03
This was referenced Sep 24, 2026
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.
Item 5 of #926, which is the last item. Stacked on #933 because they touch the same changelog heads. Retarget it to
mainonce the stack below it merges.New
list_grab.py. WhenAUTO_GRAB_LISTSis on (it is off by default), DCCore asks for the list of any bot that advertises one and whose list we don't hold yet. It follows AutoGet's rules:AUTO_GRAB_EVERY_MINUTES(10), biggest list first.@Botin a channel, a grab waiting on that bot is dropped and the bot is left alone for 10 minutes, because it's busy sending that user's list. This doesn't count as a try.AUTO_GRAB_MIN_FILES, bots advertising less thanAUTO_GRAB_MIN_SPEED_KB(a bot that shows no speed isn't skipped), bots in "servers only" mode, and bots whose list the operator removed by hand.purge_fetched_list()records that. The bulk purge of offline bots doesn't, because that is tidying up, not a decision about the bot.Each ask goes through
build_list_fetch_enqueue_result(), the same path as the List Browser button, so all the slot limits and duplicate guards still apply. Each grab also writes a console line.State: the current wait, the time of the last grab and the start guard live in runtime.py, so a rehash doesn't forget a wait or start a second worker. The per-bot tries and the removed-by-hand list are saved in
data/list_grabs.json, so a restart doesn't reset the three tries.list_grab_others_askedis bound in defaults.py and listed inPRESERVE_RUNTIME. The worker starts from boot and from rehash, the same way the list refresh does.Settings: the four settings have their own Grabbing lists category, placed just above Fetching from bots. It sits there so it doesn't collide with #928's Fetch queue, which is added just below that category. They have help text and en/es/fr labels, and
settings.conf.sampleis regenerated.Tests:
tests/test_lists_are_grabbed_automatically_on_autogets_rules.pyhas 26 tests. I mutation-checked them: 13 mutations, one per rule, and each one fails a test. The full suite passes on this branch, and also with #925, #929 and #930 merged in.🤖 Generated with Claude Code
https://claude.ai/code/session_01AP6LSxkr4n9dMFNSNMogmW