From 1103fac9bac71cb769a4b75c6b91a0bebf8d3744 Mon Sep 17 00:00:00 2001 From: Terry Tipton Date: Thu, 14 May 2026 14:33:42 -0400 Subject: [PATCH] refactor: remove unused MAX_FILES_PER_GRAPHQL_BATCH constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MAX_FILES_PER_GRAPHQL_BATCH gated the legacy GraphQL file-content batched fetch (split into batches of 50 to avoid 502 errors on large PRs — see #331's reasoning). That fetch path was removed in #1202 when the legacy scoring pipeline was stripped; mirror-only scoring pulls file contents one PR at a time via MirrorClient.get_pr_files. grep -rn MAX_FILES_PER_GRAPHQL_BATCH across gittensor/, neurons/, and tests/ returns only the definition line. Dropping it also drops the explanatory comment that only made sense in the context of the removed batching code. --- gittensor/constants.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gittensor/constants.py b/gittensor/constants.py index 5edbf679..7e233c7e 100644 --- a/gittensor/constants.py +++ b/gittensor/constants.py @@ -25,8 +25,6 @@ GRAPHQL_VIEWER_QUERY = '{ viewer { login } }' # 1MB max file size for github api file fetches. Files exceeding this get no score. MAX_FILE_SIZE_BYTES = 1_000_000 -# Too many object lookups in one GraphQL query can trigger 502 errors and lose all results. -MAX_FILES_PER_GRAPHQL_BATCH = 50 # ============================================================================= # das-github-mirror (https://mirror.gittensor.io)