Skip to content

fix: slugify wolt names to handle spaces and special chars#213

Open
woltspace-jerpint[bot] wants to merge 1 commit intomainfrom
nw/wolt-name-validation
Open

fix: slugify wolt names to handle spaces and special chars#213
woltspace-jerpint[bot] wants to merge 1 commit intomainfrom
nw/wolt-name-validation

Conversation

@woltspace-jerpint
Copy link
Contributor

@woltspace-jerpint woltspace-jerpint bot commented Mar 20, 2026

Summary

  • Adds slugify_wolt_name() in wolts.py — auto-sanitizes names instead of rejecting them
  • "Wolter White""wolter-white", "MyWolt""mywolt", "123bad""bad"
  • create_creature_wolt() now slugifies the name and returns it in the result dict
  • Only rejects names that are completely unsalvageable (empty, all special chars)

Test plan

  • 9 unit tests for slugify_wolt_name() (spaces, uppercase, numbers, special chars, empty, truncation)
  • 7 new tests for create_creature_wolt() name handling (slugify + reject unsalvageable)
  • All 23 name-related tests pass
  • Full core test suite green (same 3 pre-existing litellm failures)

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
woltspace Ready Ready Preview, Comment Mar 20, 2026 11:29pm

Names like "Wolter White" are now auto-sanitized to "wolter-white"
instead of being rejected. Adds slugify_wolt_name() in wolts.py
which lowercases, replaces non-alphanumeric with hyphens, strips
leading numbers, and truncates to 20 chars.

create_creature_wolt() now returns the sanitized name in the result
dict so callers know what was actually created.

9 slugify unit tests + 7 create_creature_wolt tests (23 total passing).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@woltspace-jerpint woltspace-jerpint bot force-pushed the nw/wolt-name-validation branch from 4b20c8e to 0657129 Compare March 20, 2026 23:29
@woltspace-jerpint woltspace-jerpint bot changed the title fix: validate wolt names to prevent spaces and special chars fix: slugify wolt names to handle spaces and special chars Mar 20, 2026
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.

0 participants