Skip to content

Preserve bounded JSON resource semantics - #575

Merged
GraciousGazelles merged 14 commits into
mainfrom
fix/json-resource-boundary
Aug 2, 2026
Merged

GraciousGazelles merged 14 commits into
mainfrom
fix/json-resource-boundary

Conversation

@GraciousGazelles

@GraciousGazelles GraciousGazelles commented Aug 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • fail closed for model-visible application/json and application/*+json MCP resources that exceed the output bound
  • emit a fixed, deterministic bounded error that cannot be inflated by server or URI input
  • retain complete serialized resource payloads for code mode while keeping model history bounded
  • preserve the existing generic truncation behavior for untyped resources, plain text, and Markdown
  • keep code-mode lifecycle, hook, telemetry, MCP event, and rollout status truthful when only the model projection is bounded
  • prove the model, history, code-mode, hook, and cross-platform boundaries with focused regressions

Exact candidate

  • Base: d6719d41d437ae99d7ae6d7d259368b5ac326b8f
  • Head: de291f9998351bad01dfb9e9acf327d25d209717

Validation

No local Cargo, Just, formatter, build, test, or code-generation command was used. All execution validation ran on GitHub-hosted compute.

Contract boundary

Small JSON-family resources retain their existing successful response. When a declared JSON-family resource exceeds the model-output budget, the model and history receive a complete fixed JSON failure rather than a successful envelope whose nested JSON has been cut mid-value. Code mode retains the complete original serialized resource and records a successful lifecycle. Untyped resources and textual media keep the existing generic truncation semantics.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@GraciousGazelles

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@GraciousGazelles
GraciousGazelles marked this pull request as ready for review August 2, 2026 14:32
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit fe12873 Aug 2, 2026
75 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/json-resource-boundary branch August 2, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant