Skip to content

Fix callsign index collisions and stale entries#676

Merged
dharmab merged 1 commit into
mainfrom
fix/callsign-index-raw-keys
May 5, 2026
Merged

Fix callsign index collisions and stale entries#676
dharmab merged 1 commit into
mainfrom
fix/callsign-index-raw-keys

Conversation

@dharmab
Copy link
Copy Markdown
Owner

@dharmab dharmab commented May 5, 2026

Summary

Closes #659

  • Index callsignIdx on raw Contact.Name instead of normalized callsigns, preventing collisions when multiple contacts normalize to the same key (e.g. [ABC]Viper 1-1 and [XYZ]Viper 1-1)
  • delete() now correctly removes index entries since it already uses raw names as keys
  • Normalization via ParsePilotCallsign moved to lookup time in getByCallsignAndCoalititon — benchmarked at ~37-47µs with 40 contacts on Apple M4

🤖 Generated with Claude Code

Index on raw contact names instead of normalized callsigns, and normalize
at lookup time. This fixes two bugs: normalized names colliding (e.g.
[ABC]Viper11 and [XYZ]Viper11 overwriting each other) and delete() using
raw names against normalized keys (leaving ghost index entries).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dharmab dharmab enabled auto-merge (squash) May 5, 2026 02:09
@dharmab dharmab merged commit 0fed7d7 into main May 5, 2026
11 checks passed
@dharmab dharmab deleted the fix/callsign-index-raw-keys branch May 5, 2026 02:12
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.

Callsign index uses normalized names as keys, causing collisions and stale entries

1 participant