test(runtime): lock structured output schemas - #27
Closed
kristoffersodersten wants to merge 1 commit into
Closed
Conversation
Capture summarize, agent, and extract requests and require object JSON schemas with unknown properties rejected.
There was a problem hiding this comment.
Pull request overview
This PR adds a small regression guard to ensure Ollama constrained-decoding requests are consistently sent with a structured “object” JSON schema and that the schema rejects unknown properties, across summarize, agent, and extract.
Changes:
- Assert all generation request payloads set
format.typeto"object". - Assert all generation request payloads set
format.additionalPropertiestoFalse.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| self.assertEqual([payload["options"]["num_ctx"] for payload in generation_payloads], [32_768] * 3) | ||
| self.assertEqual([payload["options"]["temperature"] for payload in generation_payloads], [0.2, 0.2, 0.1]) | ||
| self.assertEqual([payload["format"]["type"] for payload in generation_payloads], ["object"] * 3) | ||
| self.assertTrue(all(payload["format"]["additionalProperties"] is False for payload in generation_payloads)) |
Owner
Author
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.
Summary
Stack boundary
This PR targets
codex/sod-396-explicit-context-window. Its diff is one SOD-394 test file with two assertions. It does not modify PR #22 or claim delivery tomain.Verification
Exact SHA:
2312739372d8e1b8775e5bcee8324be5bb643717Hetzner:
Local bounded: