raghav-reglobe opened a new pull request, #234:
URL: https://github.com/apache/doris-mcp-server/pull/234

   Fixes #233.
   
   ## What
   
   Add `SchemaLimits.for_result_bytes()`, resolve a `DorisToolsManager`'s 
limits from `configured_result_limits()` (with an explicit `schema_limits` 
override), build the dispatcher's guard from them, let 
`create_doris_mcp_server` follow the manager when no limits are passed, and put 
the validator's reason in the `CHILD_RESULT_INVALID` details.
   
   ## Why
   
   The runtime bounds rows by `max_result_bytes`, but the output guard applied 
its own defaults, so raising the ceiling silently did nothing past 1 MiB: 
results the runtime accepted came back as "did not match the declared schema", 
which sent people hunting through their SQL for a schema problem that was 
really a size cap. Two numbers for one intent, and the tighter one won without 
a word.
   
   ## Behaviour
   
   - Default config: the guard admits the default 1 MiB ceiling plus the 
envelope (instance 2 MiB, nodes follow the bytes, one string up to the 
ceiling). Nothing shrinks below the previous defaults.
   - A larger configured ceiling scales the guard with it.
   - An explicit `schema_limits` on the manager or the server factory still 
wins.
   - `details.reason` distinguishes "exceeds output limits" from "does not 
match output schema".
   
   ## Tests
   
   `test_schema_validation`: the derivation, and a result inside the default 
ceiling that the default guard refuses and the derived guard admits (6,000 
rows; a 300 KiB cell). `test_tools_manager`: resolution from config, the 
default, the explicit override. `test_domain_dispatcher`: the reason on both 
failure kinds. `test_mcp_v2_protocol`: the factory's resolution from the 
manager.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to