Spread defaults under any caller-provided overrides. Mirrors the merge
pattern documented in the SDK's CLAUDE.md (mergeLabels-style helpers).
Important: a plain { ...defaults, ...user } spread is NOT enough,
because React-style consumers commonly pass props through after a
destructure — props that weren't supplied come through as the literal
value undefined, and { ...{ a: 1 }, ...{ a: undefined } } produces
{ a: undefined }, not { a: 1 }. We backfill any defaultable field
that came through nullish so the SDK never operates on undefined
tunables.
Spread defaults under any caller-provided overrides. Mirrors the merge pattern documented in the SDK's CLAUDE.md (
mergeLabels-style helpers).Important: a plain
{ ...defaults, ...user }spread is NOT enough, because React-style consumers commonly pass props through after a destructure — props that weren't supplied come through as the literal valueundefined, and{ ...{ a: 1 }, ...{ a: undefined } }produces{ a: undefined }, not{ a: 1 }. We backfill any defaultable field that came through nullish so the SDK never operates on undefined tunables.