Skip to content

Restore config singleton and fix package declarations - #118

Merged
urajat merged 1 commit into
mainfrom
codex/restore-config-singleton
Aug 2, 2026
Merged

Restore config singleton and fix package declarations#118
urajat merged 1 commit into
mainfrom
codex/restore-config-singleton

Conversation

@skamanbo

Copy link
Copy Markdown
Contributor

Summary

  • restore the thread-safe singleton behavior for Config and AsyncConfig
  • retain warnings when later construction requests conflict with the initialized configuration
  • restore positional argument, region alias, and URL normalization checks
  • remove nonexistent top-level Poetry package declarations while retaining all validation SDK modules under aidefense
  • add an explicit regression test for singleton identity

Root cause

PR #113 removed the singleton implementation from BaseConfig while adding the validation SDK. The existing configuration tests and downstream callers still rely on the singleton contract. The same PR also declared nonexistent top-level packages, which prevented poetry install from installing the project.

Impact

This restores the SDK's previous configuration behavior without removing or modifying the validation SDK. A built wheel contains all 24 modules under aidefense.validation and aidefense.pydantic.validation.

Validation

  • poetry check
  • poetry run pytest aidefense/tests/test_config.py - 15 passed
  • poetry run pytest - 600 passed, 8 skipped
  • built the wheel and verified validation modules are included
  • git diff --check

@urajat
urajat marked this pull request as ready for review August 2, 2026 06:09
@urajat
urajat merged commit 04d7968 into main Aug 2, 2026
8 checks passed
@urajat
urajat deleted the codex/restore-config-singleton branch August 2, 2026 06:09
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.

3 participants