Skip to content

Fix/config 001 validation error signal - #89

Merged
HC-ONLINE merged 2 commits into
mainfrom
fix/config-001-validation-error-signal
Sep 17, 2026
Merged

HC-ONLINE merged 2 commits into
mainfrom
fix/config-001-validation-error-signal

Conversation

@HC-ONLINE

Copy link
Copy Markdown
Owner

Description

Fix CONFIG-001 by propagating configuration validation failures from ConfigLoader through ConfigService to the CLI and API.

Previously, an invalid configuration was rejected by Pydantic and silently replaced with the default configuration, while the CLI reported the configuration as loaded and the API returned no indication that validation had failed.

This change:

  • Adds validation_error to ConfigLoader to expose validation failures.
  • Propagates validation failures as warnings through ConfigService.
  • Displays configuration warnings in the CLI.
  • Adds warnings to APIResponse with Field(default_factory=list).
  • Includes validation warnings in the configuration API response.
  • Preserves the documented fallback-to-defaults behavior.
  • Keeps success=True, since it represents successful completion of the load operation while warnings communicate the fallback.
  • Adds tests covering validation failure, fallback behavior, warning propagation, CLI/API behavior, and regression cases.

The invalid configuration is no longer silently invisible to the user, while the existing fallback behavior remains unchanged.

Related Issue

Fixes # (issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have followed the style guidelines of this project (Ruff & Pyright)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly

Screenshots (if applicable)

Not applicable. The change affects CLI warnings and API response data rather than a graphical interface.

@HC-ONLINE
HC-ONLINE merged commit a0710a0 into main Sep 17, 2026
6 checks passed
@HC-ONLINE
HC-ONLINE deleted the fix/config-001-validation-error-signal branch September 26, 2026 21:38
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