Skip to content

fix(mecatui): give a clear error for an invalid custom provider name - #1628

Merged
jhrozek merged 1 commit into
mainfrom
worktree-fix-provider-name-validation
Sep 16, 2026
Merged

jhrozek merged 1 commit into
mainfrom
worktree-fix-provider-name-validation

Conversation

@jhrozek

@jhrozek jhrozek commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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]

Summary

Development stage

  • Plan / Interface — Bounded/Architectural behavioral and exact-interface contract; no implementation
  • Implementation — based on an approved, merged Plan / Interface PR
  • Combined — compact one-task Bounded/Architectural exception; no separate plan PR,
    and the in-PR plan declares **Expected tasks:** 1, a non-placeholder
    **Combined rationale:**, and no runtime/public/operator/persistence/trust-boundary
    interface change (None — rationale; workflow-only meta-changes may review process
    docs/skills here)
  • Spike / Routine — acceptance-plan spine exempt; Spike evidence does not ship as-is

Contract linkage

  • Work classification: Spike / Routine / Bounded / Architectural
  • Classification rationale:
  • Decision record: ADR link / None with rationale
  • Human waiver of spine: No / Yes —
  • Acceptance plan:
  • Human decisions resolved and recorded: Yes / N/A with rationale
  • Plan / Interface PR:
  • Approved commit baseline:
  • Combined/exemption rationale:

Interface conformance

Issue relationship

Relates to #

Type of change

  • Behavioral/interface plan
  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation/process
  • Other (describe):

Test plan

Baseline checks

  • Acceptance-plan checker
  • Linting (task lint)
  • Offline test suite (task test)
  • Offline demo (go run ./cmd/mecademo)
  • Markdown changed: docs generation/link checks (task docs)
  • User docs/user-facing behavior changed: site build (task site:build)
  • Guarded engine API affected: compatibility check (task api:check)
  • Intentional engine API change: task api:update + engine/CHANGELOG.md
  • Landed plan: strict acceptance trace (task ac-trace-strict)
  • Final implementation review: /panel-review

Changes

File Change

User-facing change

Special notes for reviewers

`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]>
@jhrozek
jhrozek merged commit 47af20b into main Sep 16, 2026
35 checks passed
@jhrozek
jhrozek deleted the worktree-fix-provider-name-validation branch September 16, 2026 18:46
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 21, 2026
2 tasks
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.

2 participants