Skip to content

Forfeited by #89 revert: union defaultImpl fix + UpdateListen return-type shim + 2 regression tests #93

Description

@GregHolmes

The revert of #89 (PR #91) removed three hand-applied patches and two regression tests that are not carried forward on the re-land branch gh/sdk-gen-2026-08-11 (#92) and are not among #92's 17 reconciled patches. Filing so the next person to hit the symptom doesn't rediscover it from scratch. (Surfaced by review of #91.)

Forfeited patches

Verified on gh/sdk-gen-2026-08-11 — all three unions read defaultImpl = _UnknownValue.class, both tests absent:

  1. Union default-variant fix (defaultImpl = V2Value.class) on AgentV1UpdateListenListenProvider, AgentV1SettingsAgentListenProvider, AgentV1SettingsAgentContextListenProvider.
  2. AgentV1UpdateListenListen.getProvider() additive return-type shim (kept DeepgramListenProviderV2 read/write working over the union).
  3. Regression guards: AgentV1UpdateListenShimTest.java, AgentSettingsProviderDefaultTest.java.

Symptom the fix addressed

The three agent listen-provider unions declare version as an optional discriminator, so a provider object with no version is a valid payload (exactly what 0.7.x emits). Fern points @JsonTypeInfo defaultImpl at _UnknownValue, whose @JsonCreator has an empty body, so the incoming value is discarded: getProvider() returns null, re-serialization emits {"provider":null} (silent provider drop on the wire), and _getUnknown()/equals() throw NullPointerException.

Calibration

The two Settings unions carry this bug in released 0.7.1 — pre-existing, not a regression. So the revert restores the released behavior; it does not make anything worse for installed users. What is forfeited is the unreleased fix.

Decision needed

Whether to re-apply the defaultImpl = V2Value fix on #92 before it merges — #92 regenerates with the same generator (4.16.0) that produces the defect. Declining is defensible (status quo for the Settings unions), but should be a deliberate decision. Owner: @GregHolmes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions