Skip to content

[Core] Resolve opportunity API nullability mismatches between SDKs and protocol #1192

Open

Description

@SnowboardTechie

Summary

Verify and resolve cases where SDK-backed opportunity APIs emit null for fields that the protocol allows to be omitted but does not allow to be null.

During Hono template verification, SDK 0.7.2 accepted an opportunity with funding.details: null and the API returned it with HTTP 200. Validation against the protocol 0.4.0 schema bundled with CLI 0.4.0 rejected that response. source: null reproduced the same disagreement. Reproduce these cases against current versions before making changes.

Optionality and nullability are separate: a field may be omitted without accepting explicit null. Accepting null inside an SDK is not itself a wire-compatibility defect if serialization omits it before transmission. This issue concerns serialized data that violates the protocol contract, not identical internal representations across languages.

The scope is the opportunity list, detail and search contracts and their shared models. This is not a rollout of nullable optional fields under ADR 0024.

Acceptance criteria

  • Reproduce the reported funding.details and source cases against current protocol and SDK versions, checking serialized responses rather than SDK validation alone. If the disagreements no longer occur, record the evidence and close the issue without implementation changes.
  • For confirmed disagreements, align SDK validation or serialization with the existing protocol contract. Preserve omission for optional fields and do not broaden protocol nullability as part of this fix.
  • Add regression tests covering omitted fields, explicit null and valid values for the affected fields. Serialized output must satisfy the protocol schema; wrong non-null types and missing required fields must still fail.
  • Verify the corresponding TypeScript and Python SDK behavior, including any shared-model effects. Internal handling may differ as long as serialized data conforms.
  • Document compatibility implications, affected packages and any release or migration requirements.

Evidence and scope

Activity

  1. added
    coreIssues related to @common-grants/core library
    sdkIssue or PR related to our SDKs
    fixFix to the published version. Goes straight to main.
    on Sep 10, 2026
  2. changed the title [-][Core] Align opportunity API nullability with ADR 0024[/-] [+][Core] Resolve opportunity API nullability mismatches between SDKs and protocol[/+] on Oct 6, 2026
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

    coreIssues related to @common-grants/core libraryfixFix to the published version. Goes straight to main.sdkIssue or PR related to our SDKs

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions