fix(mcp): wrapper aggregate_ops.layer_query propaga dry_run al backend - #458
Merged
Conversation
Regressione della #457: dry_run aggiunto a domain.layer (layer_sql) e al tool server.py, ma non al wrapper intermedio aggregate_ops.layer_query — il percorso reale del tool toolkit_layer crashava con TypeError: layer_query() got an unexpected keyword argument 'dry_run'. Fix: parametro dry_run nella firma del wrapper + propagazione a _layer_query_core (= domain.layer.layer_query). Test: regression TestMCPWrapperDryRun (verifica che il wrapper accetti e propaghi dry_run) — fallisce senza fix, passa con fix. 1324 verdi.
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.
Tipo
fix (hotfix su regressione della #457) — il wrapper MCP
aggregate_ops.layer_querynon propagavadry_runal backend.Problema reale
La PR #457 ha aggiunto
dry_runin due punti della catena MCP ma non nel terzo:toolkit/domain/layer.py(layer_sql+layer_query)toolkit/mcp/server.py(toolkit_layerpassadry_run=dry_run)toolkit/mcp/aggregate_ops.py(layer_query— che èlayer_query_implusato dal tool)Risultato:
toolkit_layercondry_run=Truecrashava sul percorso reale con:Verificato simulando il codice di main pulito (stash del wrapper).
Contratto riusato/sostituito
_layer_query_core(=domain.layer.layer_query, già con dry_run dalla feat(layer): dry_run su mode=sql — EXPLAIN senza eseguire (contratto clean-query) #457).dry_runnella firma del wrapper + propagazione al core.Implementazione
toolkit/mcp/aggregate_ops.pydry_run: bool = False+ propagazione a_layer_query_core(+ docstring)tests/test_query_cross_dataset.pyTestMCPWrapperDryRun.test_wrapper_propagates_dry_run(regression: il wrapper accetta e propaga dry_run)Verifica
valid: True+ piano; colonna inesistente →valid: False+ Binder ErrorRischio residuo
Nessuno — fix minimo (2 righe + docstring) sul punto intermedio mancante.
Follow-up