Conversation
args (v0.9)
wrenj
requested review from
gspencergoog,
josemontespg and
nan-yu
and removed request for
josemontespg
September 11, 2026 19:11
Contributor
There was a problem hiding this comment.
Code Review
This pull request makes the args field optional in FunctionCallSchema to align with the specification. It updates DataContext to handle omitted arguments using nullish coalescing (call.args ?? {}) when resolving dynamic values and signals, and adds corresponding unit tests to verify this behavior. There are no review comments, so I have no feedback to provide.
wrenj
enabled auto-merge (squash)
September 11, 2026 19:13
gspencergoog
approved these changes
Sep 14, 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.
Problem
common_types.json#/$defs/FunctionCallrequires onlycall, but the Zodschema marked
argsas required. So a spec-valid{"call": "now"}:DataContextwith a rawTypeErrorfromObject.entries(undefined)on both the sync and reactive resolve paths.Swift already models
argsas optional, so web_core was the outlier.Fix
FunctionCallSchema:argsis now.optional(), matching the JSON schema.DataContext: default to{}inresolveDynamicValueandresolveSignal.The optional type makes removing either guard a compile error.
Tests
Four added, each confirmed to fail before the fix:
data-context.test.ts: argument-less calls resolve on the sync andreactive paths, and the invoker receives
{}.verify-schema.test.ts:FunctionCall.requiredmatches the spec JSON, andan argument-less call parses. The existing parity suite only compares
server_to_clientdefinitions, which is why this drift went unnoticed.