Skip to content

test(fqn): guard against Unicode project-name collisions - #2950

Merged
DeusData merged 1 commit into
mainfrom
distill/2219-fqn-unicode-collision-guard
Nov 11, 2026
Merged

DeusData merged 1 commit into
mainfrom
distill/2219-fqn-unicode-collision-guard

Conversation

@DeusData

Copy link
Copy Markdown
Owner

What this guards

Two repositories whose paths differ only in a non-ASCII segment (for example two
CJK folder names under the same parent directory) must get distinct project names.
Before the #571 fix every non-ASCII byte was mapped to '-', so such repositories
collapsed to the same project name and shared one index. The existing #571 test
pins one exact string; this test pins the property itself: two different non-ASCII
segments yield two different, validator-safe project names.

Hardening

On top of the original test, each name must also contain the hex image of its own
segment (e5bc80e58f91 and e5908ee7abaf). Distinct names alone would still pass if
a future mapping replaced the segment with some other unique token; this keeps the
segment itself preserved in the name.

How it was verified

Tests only; no production code changes. clang-format is clean on the touched hunk.

Distilled from #2219 by @lorenzozanee (Co-authored-by on the commit); the original could not merge because its commit has no DCO sign-off, which only the author can add. Thank you for writing this guard!

Refs #571

Two repositories whose paths differ only in a non-ASCII segment (for
example /Users/dev/<CJK name A> and /Users/dev/<CJK name B>) must derive
distinct project names. Before the #571 fix every non-ASCII byte was
mapped to '-', so both collapsed to the same name and shared one index.
The existing #571 test pins one exact string; this test pins the
property that two different segments stay distinct and validator-safe.

Hardening on top of the original test: each name must also contain the
hex image of its own segment (e5bc80e58f91 / e5908ee7abaf), so a future
mapping that keeps the names distinct without preserving the segment is
caught as well.

Refs #571

Distilled from #2219.

Co-authored-by: lorenzozanee <[email protected]>
Signed-off-by: Martin Vogel <[email protected]>
@DeusData
DeusData merged commit 0640103 into main Nov 11, 2026
27 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