feat(setup): refuse an output_format_spec at or over 4096 characters - #219
Open
Ekyoz wants to merge 1 commit into
Open
feat(setup): refuse an output_format_spec at or over 4096 characters#219Ekyoz wants to merge 1 commit into
Ekyoz wants to merge 1 commit into
Conversation
Past that length the write still succeeds but the setup is unusable, and nothing in the failure points back at the field. Reject up front instead, naming the path and the actual size. The rule lives in SetupContentValidator, beside reject_unsafe_keys, but it is not wired the same way. SetupContentValidator.validate reaches content only through the agno registry toolkit, where it is best-effort: a no-op when no ModuleContext is wired or the schema fetch fails, and CreateServiceAction never calls it at all — so a create would slip through. This check needs neither context nor a schema fetch, so it is called unconditionally from create_setup and update_setup on both DefaultSetup and GrpcSetup, the one choke point every write crosses. On GrpcSetup it sits outside handle_grpc_errors so it stays a ValueError rather than being swallowed into SetupServiceError by the catch-all, and it raises before any RPC is issued. The boundary is exclusive (4096 itself is refused) and the walk recurses through nested objects and arrays; non-string values are left to the schema check, which owns typing. Carries a uv.lock refresh as a prerequisite: dev and main both pin agentic-mesh-protocol==1.0.1 in pyproject while locking 1.0.1.dev4, which lacks set_as_current, ListSetupVersionsRequest and SetCurrentSetupVersionRequest. mypy fails on the existing grpc_setup and grpc_storage code until the lock resolves to the real 1.0.1.
GuillaumeSachet
approved these changes
Sep 3, 2026
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.
Past that length the write still succeeds but the setup is unusable, and nothing in the failure points back at the field. Reject up front instead, naming the path and the actual size.
The rule lives in SetupContentValidator, beside reject_unsafe_keys, but it is not wired the same way. SetupContentValidator.validate reaches content only through the agno registry toolkit, where it is best-effort: a no-op when no ModuleContext is wired or the schema fetch fails, and CreateServiceAction never calls it at all — so a create would slip through. This check needs neither context nor a schema fetch, so it is called unconditionally from create_setup and update_setup on both DefaultSetup and GrpcSetup, the one choke point every write crosses.
On GrpcSetup it sits outside handle_grpc_errors so it stays a ValueError rather than being swallowed into SetupServiceError by the catch-all, and it raises before any RPC is issued.
The boundary is exclusive (4096 itself is refused) and the walk recurses through nested objects and arrays; non-string values are left to the schema check, which owns typing.
Carries a uv.lock refresh as a prerequisite: dev and main both pin agentic-mesh-protocol==1.0.1 in pyproject while locking 1.0.1.dev4, which lacks set_as_current, ListSetupVersionsRequest and SetCurrentSetupVersionRequest. mypy fails on the existing grpc_setup and grpc_storage code until the lock resolves to the real 1.0.1.