Skip to content

fix: score removed source files with tree diff#1271

Open
volcano303 wants to merge 1 commit into
entrius:testfrom
volcano303:fix/issue-1268-removed-file-tree-diff
Open

fix: score removed source files with tree diff#1271
volcano303 wants to merge 1 commit into
entrius:testfrom
volcano303:fix/issue-1268-removed-file-tree-diff

Conversation

@volcano303
Copy link
Copy Markdown

Summary

  • Route removed source files with available base content through tree-diff scoring instead of skipping before content lookup.
  • Preserve skip behavior for removed non-code files, missing base content, oversized files, and unsupported extensions.
  • Add pipeline-level regression coverage for removed source files with and without old content.

Related Issues

Fixes #1268

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested

Commands run:

.venv312/bin/python -m pytest tests/validator/test_token_scoring_integration.py -q
.venv312/bin/python -m ruff check gittensor/validator/utils/tree_sitter_scoring.py tests/validator/test_token_scoring_integration.py
.venv312/bin/python -m ruff format --check gittensor/validator/utils/tree_sitter_scoring.py tests/validator/test_token_scoring_integration.py

Note: uv run pytest tests/validator/test_token_scoring_integration.py -q could not complete in this workspace because uv selected Python 3.14 and failed building bittensor-wallet while bootstrapping Rust/cargo.

Checklist

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

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Removed source files are skipped before tree-diff can score deletions

1 participant