Skip to content

refactor: remove unused MAX_FILES_PER_GRAPHQL_BATCH constant#1277

Open
ebios-star wants to merge 1 commit into
entrius:testfrom
ebios-star:refactor/remove-unused-max-files-per-graphql-batch
Open

refactor: remove unused MAX_FILES_PER_GRAPHQL_BATCH constant#1277
ebios-star wants to merge 1 commit into
entrius:testfrom
ebios-star:refactor/remove-unused-max-files-per-graphql-batch

Conversation

@ebios-star
Copy link
Copy Markdown
Contributor

Summary

MAX_FILES_PER_GRAPHQL_BATCH = 50 in gittensor/constants.py:29 gated the legacy GraphQL file-content batched fetch — files were split into batches of 50 to avoid 502 errors on large PRs (see #331's reasoning, preserved in the inline comment).

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, which doesn't batch — the mirror itself handles the size limit on the response side.

grep -rn MAX_FILES_PER_GRAPHQL_BATCH --include='*.py' . across gittensor/, neurons/, and tests/ returns only the definition line — no remaining call sites.

Dropping the constant also drops the explanatory comment that only made sense in the context of the removed batching code.

Net: -2 lines, single file. Same shape as #1187 (drop orphaned get_github_id), #437, #448, #466.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • pytest tests/ — all 753 tests pass.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

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 entrius#331's reasoning). That fetch path was removed in entrius#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.
@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 14, 2026
@ebios-star
Copy link
Copy Markdown
Contributor Author

@anderdc whenever you have a moment, this is a small dead-code removal — the constant was orphaned by the legacy scoring strip in #1202. Happy to revise scope if you'd prefer. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant