Skip to content

fix(config): reject malformed YAML before saving configuration - #745

Open
rudycelekli wants to merge 1 commit into
Panniantong:mainfrom
rudycelekli:fix/agent-reach-config-shape-20261002
Open

rudycelekli wants to merge 1 commit into
Panniantong:mainfrom
rudycelekli:fix/agent-reach-config-shape-20261002

Conversation

@rudycelekli

Copy link
Copy Markdown

Problem

Reject falsy non-mapping YAML and non-string keys before they can be treated as writable configuration. Empty and null documents remain supported.

Changes

  • Reject list, boolean, numeric and string documents instead of silently replacing them on the next save.
  • Reject non-string mapping keys before downstream key normalization can crash.

Verification

  • Reproduced against unchanged main: focused regression tests 7 failed, 4 passed.
  • Fixed branch: focused tests 11 passed; full suite 618 passed in 20.81s.
  • Ruff check and git diff --check pass.
  • MyPy still reports the same three pre-existing MCP SDK incompatibility errors as unchanged main; this patch adds none.

AI-assisted implementation and tests, independently reviewed before submission.

Formatting baseline: unchanged main already fails ruff format --check in 54 files; this PR does not reformat unrelated code.

Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
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