Repository navigation
fix(id): petname skeleton — capital-I class and 8->b, labels() skeleton collisions (#2069) - #3360
Conversation
… skeleton collisions (#2069)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0a309b05f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…aming rule (#2069, Codex P1 on PR 3360)
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #2069 (queue task 5073; triage task 2949 pins honored).
What changed
pkgs/id/src/petname.rs:skeleton():fold()lowercasesI→ibefore the map, so mapping post-fold'i' => 'l'(grouped with'1' | '|') closes the capital-I class —PayPaInow skeletons identically toPayPal. Added'8' => 'b', symmetric with the already-mapped digits0/1/3/5—8ob≡Bob.labels(): collision counting key changedfold()→skeleton(), so legacy stored petnames that collide only by look-alike (whichset()now refuses) render with fingerprints instead of identically (defense-in-depth, per triage pin 3).The i/l false-positive cost (a petname differing only by an i/l swap is refused) is the triage-accepted price:
skeletonis a refusal heuristic, and1/|already merge intol.Tests
New tests beside the existing ones:
the_skeleton_maps_capital_i_and_eight_together(PayPaI≡PayPal, AIice≡Alice, 8ob≡Bob),a_capital_i_confusable_name_is_refused,an_eight_confusable_name_is_refused,skeleton_colliding_petnames_both_get_a_fingerprint. Existing corpus (Alice/Bob/Carol, all pkgs/id tests) verified in CI per fleet CI-first policy.Need help on this PR? Tag
@codesmith-botwith what you need.