You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mcp): black formatting violation in mcp_bridge.py blocks CI #833
src/gaia/mcp/mcp_bridge.py:631 has a long dict literal on a single line that black wants to split across 4 lines. The file is in the repo's black-check scope (util/lint.py step 1/9), so every PR currently fails the Run Code Quality Checks CI job until this is fixed on main.
Surfaced while preparing release PR #831 (v0.17.3) — that PR doesn't touch mcp_bridge.py but inherits the failing check from main.
Reproduction
uv pip install black --quiet
uv run python -m black --check src/gaia/mcp/mcp_bridge.py
# → would reformat src/gaia/mcp/mcp_bridge.py# → exit 1
Introduced by #803 (fix(mcp): guard JSON-RPC handler against non-dict body). CI presumably passed at merge time with an older black version; the current pinned version flags it.
Fix
One command:
uv run python -m black src/gaia/mcp/mcp_bridge.py
Commit as style(mcp): apply black formatting to mcp_bridge.py. No behavior change.
Impact
Blocks all PRs on the Run Code Quality Checks status, including release PR Release v0.17.3 #831.
python -m black --check --diff src/gaia/mcp/mcp_bridge.py produces exactly the diff in the report (line 631 → 4-line split).
util/lint.py:113 runs black --check over LINT_DIRS = [src/, tests/] (util/lint.py:47), so src/gaia/mcp/mcp_bridge.py:631 is in scope and python util/lint.py --black fails on main.
Origin tracks to fix(mcp): guard JSON-RPC handler against non-dict body #803 as suspected — the 1-line error dict was added there (src/gaia/mcp/mcp_bridge.py:631), and the surrounding send_json(...) call already spans multiple lines, so black splitting the inner dict for consistency makes sense.
Fix is a one-liner and the proposed commit message (style(mcp): apply black formatting to mcp_bridge.py) matches the repo's conventional-commits style. The same spot at src/gaia/mcp/mcp_bridge.py:642 uses a shorter message and stays on one line, so only the one call site needs to change.
Suggested approach (per CLAUDE.md → "Commit Only When Bulletproof"):
python -m black src/gaia/mcp/mcp_bridge.py
python util/lint.py --black # should now pass
python -m pytest tests/mcp/ -xvs # sanity-check nothing else in mcp/ regressed
Happy to open a PR with this fix if a maintainer gives the go-ahead — it's a pure-formatting change with no behavior delta, so it shouldn't conflict with release PR #831 and could land ahead of it to unblock CI.
Verified fixed on origin/main: the dict literal at src/gaia/mcp/mcp_bridge.py:631 is now properly multi-line (introduced by PR #803 'guard JSON-RPC handler against non-dict body'). The black violation no longer exists.
Activity
github-actions commentedon Apr 20, 2026
Thanks @itomek — reproduced and confirmed. 🟡
Verification:
python -m black --check --diff src/gaia/mcp/mcp_bridge.pyproduces exactly the diff in the report (line 631 → 4-line split).util/lint.py:113runsblack --checkoverLINT_DIRS = [src/, tests/](util/lint.py:47), sosrc/gaia/mcp/mcp_bridge.py:631is in scope andpython util/lint.py --blackfails onmain.errordict was added there (src/gaia/mcp/mcp_bridge.py:631), and the surroundingsend_json(...)call already spans multiple lines, so black splitting the inner dict for consistency makes sense.Fix is a one-liner and the proposed commit message (
style(mcp): apply black formatting to mcp_bridge.py) matches the repo's conventional-commits style. The same spot atsrc/gaia/mcp/mcp_bridge.py:642uses a shorter message and stays on one line, so only the one call site needs to change.Suggested approach (per
CLAUDE.md→ "Commit Only When Bulletproof"):Happy to open a PR with this fix if a maintainer gives the go-ahead — it's a pure-formatting change with no behavior delta, so it shouldn't conflict with release PR #831 and could land ahead of it to unblock CI.
kovtcharov commentedon Apr 26, 2026
Verified fixed on
origin/main: the dict literal atsrc/gaia/mcp/mcp_bridge.py:631is now properly multi-line (introduced by PR #803 'guard JSON-RPC handler against non-dict body'). The black violation no longer exists.v0.13.0 (amd#113)