Repository navigation
test(effect): pin empty structuredOutputText in json generate - #392
Conversation
A JSON generate call whose result sets structuredOutputText to "" must parse "" (a deliberate selection), not fall back to the text parts. The new unit test gives valid JSON in the text parts and an empty structuredOutputText, and expects a StructuredOutputError whose responseText is "". A truthiness check in the bridge fails the test. Signed-off-by: Thomas Kosiewski <tk@coder.com> --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ Change-Id: Ibba7c5785a9482416e0173d0b49495ee469599c4
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Follow-up F49 from #388. Test-only: no
srcchange.What
One unit test in
packages/effect/test/language-model.test.ts, next to the existingstructuredOutputTexttest. A JSON generate call (generateObject) throughfromModelgets a result with valid JSON in its text parts andstructuredOutputText: "". The test expects aStructuredOutputErrorwhoseresponseTextis"". That proves the bridge passed the empty string and did not fall back to the text parts.Validation
result.structuredOutputText || undefined(treats""as unset). The new test failed. I reverted the change before committing.pnpm install --frozen-lockfile,pnpm -r build,pnpm check(exit 0),pnpm -r test(exit 0; effect 100 passed, live e2e skipped).Verification tier: verified against source (unit test with a fake model). No live e2e (test-only change).
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high