A bot we cannot reach is paused, and a full disk makes fetching wait (#926) - #929
Merged
Merged
Conversation
…926) - Three active connect failures in a row pause a bot: its requests wait, "Paused", with a Resume button. A finished transfer resets the count; a passive offer nobody connects back to does not count. - Any bot can be paused and resumed (POST /api/fetch/pause, /resume); pauses are saved beside the fetch history and survive a restart. - Under 200 MB free where fetched files go, no new fetch starts, and a transfer that fills the disk goes back to pending. Both carry on by themselves once there is space. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AP6LSxkr4n9dMFNSNMogmW
On Linux and macOS socket.socketpair() is AF_UNIX, whose getpeername() is '' - _run_transfer() reads [0] of it, which only a TCP address has. Six CI jobs failed there; Windows' pair is TCP and passed. Real fetches are always TCP, so the test wraps its end instead of changing the code. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AP6LSxkr4n9dMFNSNMogmW
This was referenced Sep 24, 2026
Ninja-FSE
changed the base branch from
feat/926-the-fetch-queue-waits-and-paces
to
main
September 24, 2026 16:17
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 4 of #926. Stacked on #928 (→ #927). Merges cleanly with #925.
CONNECT_FAILURES_TO_PAUSE) pause a bot. This is AutoGet's "disable after 3 unable to connect".POST /api/fetch/pauseand/api/fetch/resume,GET /api/fetch/paused.fetch_paused_bots.jsonbeside the fetch history, with the path derived fromdb.FETCH_HISTORY_FILE. That means it follows every existing redirect, the test harness included.FETCHED_FILES_DIR(MIN_FREE_BYTES):Tests:
tests/test_a_failing_bot_is_paused.py(14)._run_transfer()over asocket.socketpair(): a successful transfer resetting the count, and a write raising ENOSPC sending the row back to pending.tests/support.pyresets the pause state between tests.What's left in #926 is the list items, 5–8.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AP6LSxkr4n9dMFNSNMogmW