Skip to content

fix: accept non-hyphenated UUIDs and correct install instructions#9

Merged
notque merged 2 commits into
mainfrom
fix/uuid-validation-and-install-docs
May 7, 2026
Merged

fix: accept non-hyphenated UUIDs and correct install instructions#9
notque merged 2 commits into
mainfrom
fix/uuid-validation-and-install-docs

Conversation

@notque
Copy link
Copy Markdown
Owner

@notque notque commented May 7, 2026

Summary

  • UUID validation fix: OpenStack Keystone returns project/domain IDs as 32-char hex without hyphens (e.g., 2bac466eed364d8a92e477459e908736). Our validator only accepted the 8-4-4-4-12 format, causing Limes domain_id/project_id params to be rejected. Regex now uses -? to make hyphens optional while preserving hex-only security.
  • README install instructions: Corrected from ~/.claude/settings.json (which Claude Code doesn't read for MCP) to claude mcp add CLI command. Added separate section for Cursor/other MCP clients.
  • Test coverage: Added non-hyphenated UUID test cases using synthetic (non-real) values.

Test plan

  • go test ./... passes
  • Live validation: Limes limes_get_project_quota succeeds with non-hyphenated domain/project IDs from Keystone
  • All 16/18 services validated working end-to-end against qa-de-1/cc-demo
  • No real infrastructure UUIDs in test code (replaced with synthetic)
  • README examples use consistent placeholder values

notque added 2 commits May 7, 2026 07:36
OpenStack Keystone returns project/domain IDs as 32-char hex strings
without hyphens (e.g., "2bac466eed364d8a92e477459e908736"). Our UUID
validator only accepted the hyphenated format, causing Limes and other
tools that take domain_id/project_id to reject valid OpenStack IDs.

Also updates README configuration section: Claude Code reads MCP server
config from ~/.claude.json (via `claude mcp add`), not from
~/.claude/settings.json which doesn't support mcpServers.
The -? approach allowed mixed-hyphenation (e.g., "550e8400-e29b41d4...")
which would pass validation but confuse users with 404s from OpenStack.

Now uses alternation: either fully hyphenated (8-4-4-4-12) OR fully
non-hyphenated (32 hex chars). Adds negative test cases for partial
hyphenation to document this as explicitly rejected.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/notque/openstack-mcp-server/internal/tools/shared 68.52% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/notque/openstack-mcp-server/internal/tools/shared/helpers.go 50.00% (ø) 64 32 32

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/notque/openstack-mcp-server/internal/tools/shared/helpers_test.go

@notque notque merged commit 3e74c95 into main May 7, 2026
4 checks passed
@notque notque deleted the fix/uuid-validation-and-install-docs branch May 7, 2026 14:43
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