Skip to content

style(mcp): fix black failure in mcp_bridge.py#814

Closed
kovtcharov wants to merge 1 commit intomainfrom
fix/black-mcp-bridge
Closed

style(mcp): fix black failure in mcp_bridge.py#814
kovtcharov wants to merge 1 commit intomainfrom
fix/black-mcp-bridge

Conversation

@kovtcharov
Copy link
Copy Markdown
Collaborator

Summary

python util/lint.py --black is currently failing on main because a line in mcp_bridge.py exceeds black's 88-char limit. Pure formatting fix — wraps the error dict onto multiple lines. No behaviour change.

The regression slipped in with #803 (merged a few hours ago) where the new "Invalid Request: expected JSON object" message pushed the line over.

Why merge this

A red baseline hides real new lint failures. Fixing this makes util/lint.py --black green again so the next contributor's PR doesn't inherit a pre-existing failure.

Test plan

  • python util/lint.py --black passes on main after merge

Fixes `python util/lint.py --black` failure on main. Pure formatting — no
behaviour change. Line width regression was introduced in #803 where the
error dict exceeded black's 88-char limit.
@github-actions github-actions bot added the mcp MCP integration changes label Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Summary

Tiny pure-formatting fix that wraps an over-length error dict in src/gaia/mcp/mcp_bridge.py:631-634 so python util/lint.py --black is green again on main. The long line slipped in with #803, and fixing it now prevents the next PR author from inheriting a red baseline. Verified locally with python -m black --check src/gaia/mcp/mcp_bridge.py"1 file would be left unchanged".

Issues Found

None. Diff is +4/-1, no behaviour change, matches the formatting of the sibling error dict in the same method (mcp_bridge.py:645 is a short single-line form because it still fits under 88 chars, so no consistency concern).

Strengths

  • 🟢 Scope-clean — touches only the 4 lines needed to pass black; no drive-by edits, no unrelated refactors. Exactly what a style(mcp): commit should be.
  • 🟢 Clear why — PR description names the offending commit (fix(mcp): guard JSON-RPC handler against non-dict body #803) and the exact failure mode (python util/lint.py --black), which is useful context for anyone auditing the lint history.
  • 🟢 Conventional-commits titlestyle(mcp): fix black failure in mcp_bridge.py is accurate, scoped, and under the length budget.

Verdict

Approve — ready to merge. A red lint baseline hides real regressions, so this should land quickly. After merge, consider confirming python util/lint.py --all is also clean on main in case other formatters (isort, etc.) regressed in the same window.

@kovtcharov kovtcharov enabled auto-merge April 20, 2026 02:04
@kovtcharov
Copy link
Copy Markdown
Collaborator Author

Superseded — folded the same one-line black fix into #813 to unblock its CI. Will land together with that bundle.

@kovtcharov kovtcharov closed this Apr 20, 2026
auto-merge was automatically disabled April 20, 2026 02:06

Pull request was closed

@kovtcharov kovtcharov deleted the fix/black-mcp-bridge branch April 20, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp MCP integration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant