Repository navigation
fix(mecatui): give a clear error for an invalid custom provider name - #1628
Merged
Merged
Conversation
`mecatui providers add`/`setup` accepted any provider name and let it fall through to permconfig's internal settings-update guard, which failed with the opaque "invalid or reserved provider" error and no indication of what was actually wrong (e.g. an uppercase name). Add permconfig.ValidateProviderID as the single source of truth for the naming rule, use it to produce a descriptive error at the settings layer, and validate at the CLI entry points (runAdd, and eagerly right after the "Custom provider name" prompt in the interactive wizard) so the mistake is caught before the rest of the wizard runs. Co-Authored-By: mecatl <[email protected]>
JAORMX
approved these changes
Sep 16, 2026
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mecatui providers add/setupaccepted any provider name and let itfall through to permconfig's internal settings-update guard, which
failed with the opaque "invalid or reserved provider" error and no
indication of what was actually wrong (e.g. an uppercase name).
Add permconfig.ValidateProviderID as the single source of truth for
the naming rule, use it to produce a descriptive error at the settings
layer, and validate at the CLI entry points (runAdd, and eagerly right
after the "Custom provider name" prompt in the interactive wizard) so
the mistake is caught before the rest of the wizard runs.
Co-Authored-By: mecatl [email protected]
Summary
Development stage
and the in-PR plan declares
**Expected tasks:** 1, a non-placeholder**Combined rationale:**, and no runtime/public/operator/persistence/trust-boundaryinterface change (
None — rationale; workflow-only meta-changes may review processdocs/skills here)
Contract linkage
Interface conformance
Issue relationship
Relates to #
Type of change
Test plan
Baseline checks
task lint)task test)go run ./cmd/mecademo)task docs)task site:build)task api:check)task api:update+engine/CHANGELOG.mdtask ac-trace-strict)/panel-reviewChanges
User-facing change
Special notes for reviewers