Repository navigation
fix(clippy): allow result_large_err on client_or_connect (unblocks CI on main) - #111
Merged
avelino merged 1 commit intoSep 17, 2026
Conversation
`cargo clippy -- -D warnings` fails on main, so CI has been red since 2026-08-26 (run 33011293588) and every PR inherits a red check. The lint is `clippy::result_large_err` on `client_or_connect`: `Result<Arc<McpClient>, JsonRpcResponse>` has an Err variant of at least 152 bytes, past the 128-byte default threshold. `JsonRpcResponse` is the error type across this module by design — a failure here IS the reply the caller relays — so the same `#[allow]` that `ProxyServer::resolve_tool_call` already carries applies, for the same reason. Boxing `JsonRpcResponse` is the other answer and arguably the better one, but it changes the error type on every dispatch path at once; that belongs in its own change, not in a CI unblock. Verified in a rust:1-slim container, on this branch off main: cargo fmt --all --check clean cargo clippy -- -D warnings clean cargo test 812 passed; 0 failed Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
avelino
added a commit
that referenced
this pull request
Sep 17, 2026
main has been red on this lint since dcd75dc and the branch inherits it, so CI here failed at the clippy step and skipped cargo test entirely. The 839 tests on this branch had never actually run in CI. Same allow the module already carries on resolve_tool_call, for the same reason: JsonRpcResponse is the error type across dispatch by design, because a failure here is the reply the caller relays. Boxing it is the other answer and it changes the error type on every dispatch path at once, which does not belong in this branch. The hunk is byte for byte identical to the one in PR #111, so whichever of the two lands first the other still merges clean. Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
avelino
added a commit
that referenced
this pull request
Sep 17, 2026
main has been red on this lint since dcd75dc and the branch inherits it, so CI here failed at the clippy step and skipped cargo test entirely. The 839 tests on this branch had never actually run in CI. Same allow the module already carries on resolve_tool_call, for the same reason: JsonRpcResponse is the error type across dispatch by design, because a failure here is the reply the caller relays. Boxing it is the other answer and it changes the error type on every dispatch path at once, which does not belong in this branch. The hunk is byte for byte identical to the one in PR #111, so whichever of the two lands first the other still merges clean. Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
O que está acontecendo
cargo clippy -- -D warningsfalha namain. O CI está vermelho desde 26/08 (run 33011293588) e toda PR herda esse check vermelho — foi assim que descobri, investigando por que o CI da #110 falhou.O log da
mainmostra exatamente um erro:A correção
clippy::result_large_erremclient_or_connect:Result<Arc<McpClient>, JsonRpcResponse>passa do limite default de 128 bytes.JsonRpcResponseé o tipo de erro deste módulo por desenho — uma falha aqui é a resposta que o caller repassa. Então vale o mesmo#[allow]queProxyServer::resolve_tool_calljá carrega, pelo mesmo motivo. Uma linha, mais o comentário dizendo por quê.Boxar
JsonRpcResponseé a outra resposta, e provavelmente a melhor. Mas muda o tipo de erro em todos os caminhos de dispatch de uma vez — isso merece mudança própria, não um desbloqueio de CI. Se você preferir por esse caminho, eu faço.Verificação
Em container
rust:1-slim, nesta branch saindo damain:cargo fmt --all --checkcargo clippy -- -D warningscargo testPor que separado da #110
A #110 é feature. Isto é bug de CI que já existia antes dela e afeta todo mundo. Misturar os dois esconderia o desbloqueio dentro de um diff de 400 linhas, e você não conseguiria reverter um sem o outro.
Com esta mergeada, o CI da #110 fica verde — o outro erro que aparecia lá era meu (um
#[allow]deslocado) e já está corrigido no commit41cd99c.🤖 Generated with Claude Code