Repository navigation
Description
id(petname): skeleton look-alike map misses capital I (vs l) and 8 (vs B) — "PayPaI" and "8ob" pass the anti-spoof guard that refuses "PayPa1" and "B0b"
Summary
Petnames::set refuses a petname that is confusable with another contact's
petname or alleged name, comparing skeleton() forms (pkgs/id/src/petname.rs:120
and :128). The skeleton's look-alike table (petname.rs:240-256) maps
0→o, 1→l, |→l, 3→e, 5→s, $→s, @→a, plus rn→m and vv→w — but
two classic look-alikes are missing:
- Capital
Iforl.fold()lowercases first, soIbecomesi,
notl. In most sans-serif UI fontsI,l, and1are near-identical,
yet only two of the three are mapped. 8forB. The digit look-alikes0,1,3,5are all mapped;
8is not.
Evidence (verified this run, main 0fda29d1)
Verbatim-copy probe of fold/skeleton (petname.rs:233-256), compiled and
run on the laptop in ~/git/fleet/probe-2026-10-28-laneA-skeleton/:
skeleton("PayPa1")="paypal" skeleton("PayPal")="paypal" equal=true (refused today)
skeleton("PayPaI")="paypai" skeleton("PayPal")="paypal" equal=false (accepted today)
skeleton("AIice") ="aiice" skeleton("Alice") ="alice" equal=false (accepted today)
skeleton("8ob") ="8ob" skeleton("Bob") ="bob" equal=false (accepted today)
skeleton("B0b") ="bob" skeleton("Bob") ="bob" equal=true (refused today)
controls: "M0m"/"Mom", "vvill"/"will", "Rnoon"/"moon" all equal, as designed
set(other, "PayPa1") vs alleged "PayPal": refused_by_guard=true
set(other, "PayPaI") vs alleged "PayPal": refused_by_guard=false
set(other, "8ob") vs alleged "Bob": refused_by_guard=false
So an owner can be talked into (or a crafted flow can set) a petname for one
contact that reads as another contact's name — exactly the spoof the module
exists to prevent ("Account names are alleged, so the store refuses a petname
that could be taken for someone else's name", petname.rs:1-6).
Display does not rescue it: labels() (petname.rs:311-321) only adds a
disambiguating fingerprint when two petnames collide after fold(), not
after skeleton() — "PayPal" and "PayPaI" petnames on two contacts would
both render bare, with no fingerprint.
Distinct from #1674 (format characters / Cf bypassing the same guards): this
is plain ASCII, no invisible characters involved.
Why it matters
The petname store is a trust surface: its one job is that a name the owner
sees cannot be mistaken for a different contact. An incomplete look-alike
table that maps 1 and | to l but not I leaves the most common
font-level l spoof open, and petnames are shown in contact lists where
the wrong identity can steer messages/payments to the wrong account key.
Acceptance criteria
-
skeleton("PayPaI") == skeleton("PayPal")and
skeleton("AIice") == skeleton("Alice"): capitalImaps to the
same class asl/1/|. -
skeleton("8ob") == skeleton("Bob"):8maps to thebclass (or
triage pins, with a test, why8is deliberately excluded while
0/1/3/5are included). -
Petnames::setrefuses "PayPaI" against an alleged/petname "PayPal"
and "8ob" against "Bob", with regression tests beside
a_confusable_name_is_refusedinpetname.rs. - Existing skeleton tests still pass (
PayPa1,Rnoon/moon,
Carol≠Bob) and no legitimate distinct name in the current test
corpus becomes refused. - Consider (or explicitly defer with a note) whether
labels()should
fingerprint on skeleton collisions as well as fold collisions.
🤖 Filed by new-issue-creator-code-a (Lane A), 2026-10-28 run.
Activity
developing-today commentedon Oct 29, 2026
CODE-988
dezren39 commentedon Oct 29, 2026
🤖 Agent note · filed
10 remaining items
dezren39 commentedon Nov 1, 2026
🤖 Agent note · parked
gh pr createoutput initially displayed a wrong PR number; the verified PR for this branch is 3360.)dezren39 commentedon Nov 1, 2026
🤖 Agent note · parked
gh pr createoutput initially displayed a wrong PR number; the verified PR for this branch is 3360.)test(id): prefix new petname tests with test_ per pkgs/id AGENTS.md n…
Merge pull request #3360 from developing-today/queue/5073-2069-petnam…
dezren39 commentedon Nov 1, 2026
🤖 Agent note · done — fixed and merged
test_prefix required by pkgs/id/AGENTS.md) was fixed in d04b8f7 (4 name-only renames), replied on the thread, thread resolved; Codex re-review of d04b8f7 came back clean (no findings).cargo test --lib petnamethis shift was blocked by a laptop infra failure — /home at 100% (5.6M free, os error 28) — not by any test failure. Repo CI runs on main per fleet policy.