Skip to content

fix(sdk): give subscribe-presence its own request type - #1408

Merged
rmyndharis merged 1 commit into
mainfrom
fix/gate-subscribe-presence-body
Aug 19, 2026
Merged

fix(sdk): give subscribe-presence its own request type#1408
rmyndharis merged 1 commit into
mainfrom
fix/gate-subscribe-presence-body

Conversation

@rmyndharis

Copy link
Copy Markdown
Owner

SubscribePresenceDto had no contract-shape coverage at all, and nothing said so. Four typed clients declared one MarkChatRequest for both subscribePresence and markUnread, and the gate mapped that type to MarkChatUnreadDto, so the pair being compared was not the pair that exists. The two DTOs are identical today, which is the only reason nothing failed; a field added to either would have gone unnoticed on every typed client, and the schema is not in the gate's EXCLUDED list either.

What changed

  • The JavaScript, Python, Go and Java clients each declare SubscribePresenceRequest, and subscribePresence takes it. MarkChatRequest now serves markUnread alone, which is what the gate already claimed.
  • check-contract-shapes maps the new type in all four tables, and each per-client coverage floor rises by one so the pair cannot be dropped again in silence. Comparisons go from 320 to 324.

Impact

⚠️ Breaking for the Go and Java clients: SubscribePresence takes the new type, so a caller passing MarkChatRequest no longer compiles. Swap the type at the call site. JavaScript and Python are structurally typed and unaffected. The wire body is unchanged on every client, and no server behaviour changes.

Verification

  • check-contract-shapes reports 324 pairs, four more than before, one per typed client. That count is the guard: had the new type not been harvested it would have stayed at 320 and the raised floors would have failed instead.
  • Every SDK CI command run locally: go vet, go test -race, gofmt, mvn -B verify, mypy, pytest, and the JavaScript typecheck, tests and build.
  • Repo gates: lint, tsc --noEmit, format, openapi, the four check:sdk-* gates, and the unit suite.

`SubscribePresenceDto` had no contract-shape coverage at all. Four clients
declared one `MarkChatRequest` for both `subscribePresence` and
`markUnread`, and the gate mapped that type to `MarkChatUnreadDto`, so the
pair being compared was not the pair that exists. The two DTOs are
identical today, which is the only reason nothing failed; a field added to
either would have gone unnoticed on every typed client.

Each of the four typed clients now declares `SubscribePresenceRequest`,
the gate maps it to `SubscribePresenceDto`, and the per-client coverage
floors rise by one so the pair cannot be dropped again in silence.
Comparisons go from 320 to 324.

BREAKING for the Go and Java clients: `SubscribePresence` takes the new
type. The wire body is unchanged.
@rmyndharis
rmyndharis merged commit 50e2cd8 into main Aug 19, 2026
16 checks passed
@rmyndharis
rmyndharis deleted the fix/gate-subscribe-presence-body branch August 19, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant