Skip to content

Cover null and duplicate type fields in provider messages #15

Description

@numinousmuses

Add focused regression tests for null and duplicate message-type fields in the provider-message decoder.

The decoder must preserve the behavior of Go's JSON envelope decode when type occurs more than once. A later null value must not erase a previous string; case-variant field names must follow the same rule. An unknown type followed by null must still be rejected, and a wrong JSON type must not become valid merely because a later duplicate contains a known string.

Please add a named table test, TestProviderMessageTypeNullAndDuplicateFields, in a new protocol test file. Use explicit expected types and acceptance outcomes rather than calling the production decoder as its own oracle. Include known type then null, null then known type, a mixed-case null duplicate, unknown type then null, and a numeric duplicate. Check decoded payload content for accepted heartbeat messages.

Keep this test-only. Run the named test and the protocol suite under the race detector. If current behavior disagrees, report the exact input and explain the mismatch before changing production behavior. The PR should explain the regression cases and the checks that actually ran.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    trigger:instructedWork was explicitly requested; generated PRs inherit this trigger.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions