Skip to content

Validate codec-only batch envelopes before fallback decoding #38

Description

@rmcdaniel

Status Summary

At commit , singular envelope decoding validates any explicit codec tag before handling an absent blob. The optimized batch path only recognizes a mapping as an envelope when both and are present. As a result, groups the mapping under the fallback Avro codec and reports instead of the stable diagnostic. The slow path used when external storage is configured does validate the same input, so behavior also depends on decoder configuration.

How to fix

Validate explicit item-level codec tags before batch grouping, including codec-only mappings, and preserve item-level codec precedence over the batch fallback. Keep optimized grouping for valid Avro envelopes and raw blobs.

Acceptance Criteria

  • Codec-only batch items tagged or with an unknown codec fail with whether the batch fallback is absent or .
  • The optimized and external-storage batch paths classify the same malformed envelope consistently.
  • Valid Avro batch envelopes, untagged no-payload sentinels, and Avro null values retain their existing behavior.
  • Focused regressions cover absent and null blobs with item-level and fallback codecs.

Delete when

Delete when batch decoding validates every explicit item-level codec before fallback grouping and the focused regressions are landed on .

Metadata

Metadata

Assignees

No one assigned

    Labels

    authority:githubGitHub is the authoritative lifecycle record for this workbeta:compatibleMay be completed without changing the frozen beta contractkind:defectA public product behavior is incorrectpriority:P2Normal-priority product workrepo:sdk-pythonOwned by the Python SDK repositorystatus:readyReady for implementation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions