Skip to content

test(runtime): lock structured output schemas - #27

Closed
kristoffersodersten wants to merge 1 commit into
codex/sod-396-explicit-context-windowfrom
codex/sod-394-structured-output-contract
Closed

test(runtime): lock structured output schemas#27
kristoffersodersten wants to merge 1 commit into
codex/sod-396-explicit-context-windowfrom
codex/sod-394-structured-output-contract

Conversation

@kristoffersodersten

Copy link
Copy Markdown
Owner

Summary

  • lock the existing Ollama constrained-decoding behavior with a request-level regression test
  • prove summarize, agent, and extract each send an object JSON schema
  • prove all three schemas reject unknown properties

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 to main.

Verification

Exact SHA: 2312739372d8e1b8775e5bcee8324be5bb643717

Hetzner:

  • frozen install
  • lint and manifest lint
  • typecheck
  • unit suite: 5 panel + 33 server tests
  • privacy suite
  • build
  • bridge-backed E2E: 6 passed, 1 unpacked-Chrome test skipped because no Chrome executable was declared
  • clean exact-SHA worktree

Local bounded:

  • 11 targeted runtime tests
  • diff check
  • SSH commit signature verification

Capture summarize, agent, and extract requests and require object JSON schemas with unknown properties rejected.
Copilot AI lite review requested due to automatic review settings August 18, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.type to "object".
  • Assert all generation request payloads set format.additionalProperties to False.

💡 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))
@kristoffersodersten

Copy link
Copy Markdown
Owner Author

Superseded by protected main PR #22. SOD-394 schema and fail-closed regression coverage are integrated and reverified on exact head fe5f79d.

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.

2 participants