Skip to content

Evaluate Pydantic Settings for runtime configuration parsing #95

Description

@mark-e-deyoung

Summary

Evaluate replacing WineBot's custom environment/config parsing with Pydantic Settings or an equivalent widely used configuration library.

Candidate scope

  • api/utils/config.py
  • api/core/config_guard.py
  • profile/config validation helpers and tests
  • generated or documented config metadata for winebotctl config describe

Acceptance criteria

  • Runtime configuration has typed settings, defaults, validation, and clear error messages.
  • Environment variable names and backward compatibility are preserved.
  • Required dependency is added to runtime requirements and image build paths.
  • Existing strict config tests pass and new tests cover invalid values and compatibility aliases.
  • If Pydantic Settings is rejected, document why the custom implementation remains preferable.

Recommendation

Defer until after the current release gate unless config metadata is release-critical. Implement in a separate PR because config parsing affects boot behavior.

Trade-offs

Pydantic Settings reduces custom validation code and improves maintainability, but it adds a runtime dependency and can change parsing semantics if migrated carelessly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions