Skip to content

fix: nightly hardening - provider normalization#27

Open
mouse-value-add wants to merge 1 commit into
brainsparker:mainfrom
mouse-value-add:chore/nightly-hardening-20260514-provider-name-normalization
Open

fix: nightly hardening - provider normalization#27
mouse-value-add wants to merge 1 commit into
brainsparker:mainfrom
mouse-value-add:chore/nightly-hardening-20260514-provider-name-normalization

Conversation

@mouse-value-add

Copy link
Copy Markdown
Contributor

Problem

Provider lookup currently lowercases but does not trim whitespace. Inputs like fail with a not-supported error, and blank provider strings fail with less-actionable messaging.

Approach

  • Normalize provider names with before registry lookup.
  • Add explicit blank-provider guard with a clear error.
  • Return a stable, sorted provider list in error output for easier debugging.
  • Add regression tests covering whitespace/case normalization and blank provider rejection.

Verification

  • Listing 'promptlens'...
    Listing 'promptlens/exporters'...
    Listing 'promptlens/judges'...
    Listing 'promptlens/loaders'...
    Listing 'promptlens/models'...
    Listing 'promptlens/providers'...
    Listing 'promptlens/runners'...
    Listing 'promptlens/utils'...
    Listing 'tests'...
  • Manual runtime assertions for:
    • resolves to
    • raises with actionable message

Risks

Low risk. Behavior only changes for malformed provider strings and improves compatibility for whitespace-padded values.

Rollback Plan

Revert this PR to restore previous provider lookup behavior in and remove the added hardening tests.

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