Add regression tests for null and duplicate type fields in provider-message decoder - #18
Merged
numinousmuses merged 2 commits intoSep 6, 2026
Conversation
Verified tree: d1602cb Policy: c0f26d7da586fda2c72702cf736512909371e691eaef0893b0d9eeea404ccd85
Author
Numinous Forge · Merged into this forkTrigger: Instructed This PR has been merged. The recorded checks passed on its reviewed revision. Next: No further action on this PR. Verification details
Source revision 9d02805008ef. Verification status comes from execution records; agent observations are provisional. This run verifies the PR and does not modify its code. |
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.
Trigger
Requested work to pin the decoded semantics of duplicate and null
typefields in the Darkbloom provider-message decoder. A duplicate or case-varianttypekey pushes decoding off the fast path onto Go'sencoding/jsonrules, and this behavior deserves an explicit regression test rather than relying on the decoder as its own oracle.Behavior under test
The new test file
coordinator/protocol/messages_type_null_duplicate_test.goaddsTestProviderMessageTypeNullAndDuplicateFields, a table test with five cases and explicit expected outcomes:Accepted heartbeat cases assert the decoded
TypeandStatus; rejection cases assert the decode fails. The change is test-only; no production code was modified.Verification
Both configured checks passed on this revision:
The agent additionally reported running the named test and the full protocol suite under the race detector locally, plus
make docs-check; those local results are not independent verification. A pass here establishes these tests passed on this revision, not that the decoder is free of other issues.Review focus
Confirm the expected types and acceptance outcomes match the intended
encoding/jsonsemantics, particularly that JSON null is treated as a no-op and a numeric type rejects even with a later valid duplicate.Before/After
flowchart TD subgraph Before A[Existing protocol tests] --> B[ProviderMessage.UnmarshalJSON] end subgraph After C[TestProviderMessageTypeNullAndDuplicateFields] --> D[ProviderMessage.UnmarshalJSON] D --> E[5 explicit cases: last-match-wins, case-insensitive, null no-op, numeric reject] endCloses #15. The issue's status comment tracks the requested work.
Independent checks configured: Protocol behavior, Documentation.
Source revision a9d9ca55b4dc. Verification status comes from execution records; agent observations are provisional.
The proposed change passed independent verification. PR CI checks its merge with the target branch separately. Maintainers review the behavior and decide what ships.
Verification reference
Source:
a9d9ca55b4dc3236f3c2491b22371396a922c836Verified tree:
d1602cb7555e880fd87d7f209b6f7aee96039646Task:
c0b3ce44f544dcd1a4c2bd4daa506314