Skip to content

fix(search): hashes and commit trailers are not identifiers - #111

Merged
ManSio merged 1 commit into
mainfrom
fix/identifier-hashes
Nov 10, 2026
Merged

ManSio merged 1 commit into
mainfrom
fix/identifier-hashes

Conversation

@ManSio

@ManSio ManSio commented Nov 10, 2026

Copy link
Copy Markdown
Owner

fix(search): hashes and commit trailers are not identifiers

Found by the external benchmark on sqlalchemy: the tool scored 0/40 at hit@5
while the same tool with neighbours shown scored 18. Not a ranking problem -
_identifiers took the Gerrit Change-Id (a 40-char hash) as the first
identifier, the gate counted Iaf8be... = 0 occurrences in the source, and every
commit carrying one abstained.

Before: identifiers: Iaf8be4a9..., _ConnectionRecord.__close, run_scenario, Fixed
verdict: abstain (0.00)
After: identifiers: _ConnectionRecord.__close, run_scenario, AnyIO, ...
verdict: answer (0.75), gold at row 2

The fix drops hashes (32+ hex, with or without the Gerrit I prefix) and commit
trailers (fixed, fixes, issue, issues, closes, resolves, changelog) from
_identifiers. close is deliberately kept: it is a real method name.

Measured:

sqlalchemy, 40 commits        hit@5 before -> after
tool                              0  ->  11
neighbours                       18  ->  19
search                           18  ->  18
grep                             20  ->  20

B1 dev (71 solvable)      19 / 38 / 22 / 2  ->  identical

The tool is still below grep on that external repo after the fix, so the
small/medium-repo conclusion stands; what changed is that the abstain is no
longer systematic.

Found by the external benchmark on sqlalchemy: the tool scored 0/40 at hit@5
while the same tool with neighbours shown scored 18. Not a ranking problem -
`_identifiers` took the Gerrit `Change-Id` (a 40-char hash) as the first
identifier, the gate counted `Iaf8be... = 0` occurrences in the source, and every
commit carrying one abstained.

Before: identifiers: Iaf8be4a9..., _ConnectionRecord.__close, run_scenario, Fixed
        verdict: abstain (0.00)
After:  identifiers: _ConnectionRecord.__close, run_scenario, AnyIO, ...
        verdict: answer (0.75), gold at row 2

The fix drops hashes (32+ hex, with or without the Gerrit `I` prefix) and commit
trailers (fixed, fixes, issue, issues, closes, resolves, changelog) from
`_identifiers`. `close` is deliberately kept: it is a real method name.

Measured:

    sqlalchemy, 40 commits        hit@5 before -> after
    tool                              0  ->  11
    neighbours                       18  ->  19
    search                           18  ->  18
    grep                             20  ->  20

    B1 dev (71 solvable)      19 / 38 / 22 / 2  ->  identical

The tool is still below grep on that external repo after the fix, so the
small/medium-repo conclusion stands; what changed is that the abstain is no
longer systematic.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6a3cccc4-256b-461c-8e38-9133c5da68b3
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ManSio
ManSio merged commit 7abaf6b into main Nov 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant