-
Notifications
You must be signed in to change notification settings - Fork 0
Expose auto-fix via MCP and improve settings #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
aandersen2323
merged 1 commit into
main
from
codex/expose-auto-fix-endpoint-via-mcp-bridge
Oct 24, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| """Lightweight fallback implementation of :mod:`pydantic_settings`. | ||
|
|
||
| This module provides a minimal subset of the interface used by FlowDex so | ||
| that the application can run in environments where the optional dependency | ||
| isn't available. It loads environment variables (and optionally a ``.env`` | ||
| file) before initialising the underlying Pydantic model, ensuring values are | ||
| cast according to the declared field types. | ||
| """ | ||
| from __future__ import annotations | ||
|
|
||
| import os | ||
| from pathlib import Path | ||
| from typing import Any, Dict | ||
|
|
||
| from dotenv import dotenv_values | ||
| from pydantic import BaseModel, ConfigDict | ||
|
|
||
|
|
||
| class SettingsConfigDict(dict): | ||
| """Simple mapping used to describe configuration options.""" | ||
|
|
||
| def __init__(self, **kwargs: Any) -> None: | ||
| super().__init__(**kwargs) | ||
|
|
||
|
|
||
| class BaseSettings(BaseModel): | ||
| """Minimal ``BaseSettings`` replacement built on :class:`BaseModel`.""" | ||
|
|
||
| model_config = ConfigDict(extra="ignore") | ||
|
|
||
| def __init__(self, **data: Any) -> None: # type: ignore[override] | ||
| config = dict(getattr(type(self), "model_config", {}) or {}) | ||
| env_file = config.get("env_file") | ||
| encoding = config.get("env_file_encoding") | ||
|
|
||
| file_values: Dict[str, Any] = {} | ||
| if env_file: | ||
| env_path = Path(env_file) | ||
| if env_path.exists(): | ||
| file_values = { | ||
| key: value | ||
| for key, value in dotenv_values(env_path, encoding=encoding).items() | ||
| if value is not None | ||
| } | ||
|
|
||
| values: Dict[str, Any] = {} | ||
| for field_name in type(self).model_fields: | ||
| env_key = field_name.upper() | ||
| if env_key in os.environ: | ||
| values[field_name] = os.environ[env_key] | ||
| elif env_key in file_values: | ||
| values[field_name] = file_values[env_key] | ||
|
|
||
| values.update(data) | ||
| super().__init__(**values) | ||
|
|
||
|
|
||
| __all__ = ["BaseSettings", "SettingsConfigDict"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ python-dotenv | |
| redis | ||
| requests | ||
| tiktoken | ||
| pydantic-settings | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new auto‑fix loop only executes the fix step when the analysis result explicitly sets
statusto"apply_fix". Previously, a fix run was triggered whenever the analysis suppliedfix_instructions, even if the status string could not be parsed. LLM outputs often include valid instructions while returning an unexpected status, so this regression will cause the workflow to stop after the analysis phase and never apply the suggested repair. Consider running the fix whenever actionable instructions are present, regardless of whether the status is recognized.Useful? React with 👍 / 👎.