Skip to content

chore: add focused pre-push vulture guard#1251

Closed
Matsx901 wants to merge 1 commit into
entrius:testfrom
Matsx901:fix/pre-push-vulture-integration
Closed

chore: add focused pre-push vulture guard#1251
Matsx901 wants to merge 1 commit into
entrius:testfrom
Matsx901:fix/pre-push-vulture-integration

Conversation

@Matsx901
Copy link
Copy Markdown

@Matsx901 Matsx901 commented May 13, 2026

Summary

Closes #1250

Adds vulture as a pre-push dead-code guard and wires it into the existing CI pre-push lane. The goal is to keep unused Python helpers, stale test fixtures, and framework leftovers from accumulating after one-off cleanup PRs.

Changes

  • Add vulture==2.16 to the dev dependency set and uv.lock.
  • Add a local pre-push vulture hook in .pre-commit-config.yaml.
  • Update CI lint step labels so the pre-push lane describes both pyright and vulture.
  • Add [tool.vulture] configuration with project paths, excludes, and framework-specific ignores.
  • Remove confirmed dead helpers, stale validator test fixtures, unused fields, and unused test-only sentinels.

Out of scope

  • No scoring, validator emission, or CLI behavior changes.
  • No production-only vulture policy change.
  • No broad API/storage cleanup beyond confirmed dead-code cleanup in this PR's scanner scope.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other: developer tooling / CI validation

Testing

  • Tests added/updated
  • Manually tested

Validation:

uv sync --extra dev
uv run vulture
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pytest -q
git diff --cached --check && git diff --check

Results:

  • pytest: 725 passed
  • pyright: 0 errors, 0 warnings, 0 informations
  • vulture, ruff, pre-commit, and whitespace checks: passed

Checklist

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

@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 13, 2026
@Matsx901 Matsx901 force-pushed the fix/pre-push-vulture-integration branch from c903925 to 1953fee Compare May 13, 2026 13:30
@Matsx901 Matsx901 changed the title fix(chore):integrate pre-push vulture chore: add focused pre-push vulture guard May 13, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 13, 2026

Closing — this PR copies @seroperson's vulture-integration branch (now #1253). Three independent signals:

1. Self-admission in the linked issue #1250. Filed by you 5 minutes before this PR, body reads: "While analyzing the vulture-integration compare branch, the branch removed confirmed unused code such as..."vulture-integration is the literal name of seroperson's branch.

2. Source commit predates yours by 30 minutes.

  • seroperson 4aa58b7 — authored 2026-05-13 11:46:21 UTC
  • your 1953fee — authored 2026-05-13 12:16:13 UTC

3. Byte-identical files on the overlap. This PR touches 14 files; all 14 are a subset of #1253's 20, and 12 of the 14 are byte-identical with #1253 — same imports removed, same functions deleted, same whitespace, same lint.yml label rename. The two that differ are minor edits on the same template:

  • pyproject.toml — reshuffles seroperson's [tool.vulture] paths and ignore_names lists
  • tests/validator/utils/test_storage_mirror.py — misses one stray mock_repo.refresh_stale_pr_states.return_value = 0 line that seroperson removed

Independent dead-code discovery across classes.py, utils.py, constants.py, datetime_utils.py, neurons/base/validator.py, cli/issue_commands/helpers.py, the conftest gut, the test-sentinel cleanup, and the lint.yml rename — emitted with identical formatting — is not reproducible by parallel work. Combined with the explicit admission of analyzing the vulture-integration branch, this is a direct copy submitted ahead of the source PR.

Account profile carries no identifying signal (no name, bio, location, 0 followers/following) — low-trust posture for a contributor lifting another open branch without attribution.

Closing.

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.

Add vulture dead-code scanner to pre-push validation

2 participants