Skip to content

fix: nightly hardening - provider normalization - #27

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

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.

Copy link
Copy Markdown
Owner

Closing: this change has landed on main via the consolidation in #40, which merged the best version of each open hardening PR in one reviewed change set. Thanks - the work itself is merged.

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