Skip to content

Match type case to the parser in the purl generator - #167

Merged
maennchen merged 1 commit into
mainfrom
fix-generator-type-case
Oct 19, 2026
Merged

maennchen merged 1 commit into
mainfrom
fix-generator-type-case

Conversation

@maennchen

Copy link
Copy Markdown
Member

The fuzzer intermittently failed because the generator resolved a type's spec with an exact registry lookup, while the parser downcases the type first. A random "unknown" type that spells a registered one, such as pUB, therefore got the permissive default spec when generated and pub's strict spec when reparsed, so the generated purl was rejected.

Both lookups now downcase first, and the unknown-types branch reuses type_has_permitted_characters?/1 as a filter so it cannot emit a case variant of a strict type. The known-types branch already excluded those.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@maennchen
maennchen merged commit 6897564 into main Oct 19, 2026
20 checks passed
@maennchen
maennchen deleted the fix-generator-type-case branch October 19, 2026 14:26
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