Skip to content

fix(rbi): drop invalid overload sigs from Workflow.upsert_memo - #689

Merged
chris-olszewski merged 1 commit into
temporalio:mainfrom
pcbeingused33:fix-upsert-memo-rbi-overload
Nov 23, 2026
Merged

chris-olszewski merged 1 commit into
temporalio:mainfrom
pcbeingused33:fix-upsert-memo-rbi-overload

Conversation

@pcbeingused33

Copy link
Copy Markdown
Contributor

Fixes #683

Cause: Workflow.upsert_memo in temporalio/rbi/temporalio/workflow.rbi declared two overload.params(...) sigs plus a plain sig. Sorbet rejects overload in this context, and it rejects every overload on a method that has keyword arguments (event_groups and **memo), including the implementation sig while those overloads are present. srb tc fails with Malformed sig (https://srb.help/5003). No other overload shape typechecks: the keyword split lives in the RBS file, which already has the two forms.

Fix: remove the two overload sigs and keep the plain sig, which is the change requested on the issue. It accepts the positional hash, event_groups: and **memo, matching upsert_memo(hash = nil, event_groups: nil, **memo). A call that passes both a hash and keywords still typechecks and still raises ArgumentError at runtime; Sorbet cannot express that split. Added a changelog fragment.

Test: Sorbet 0.6.13715 on temporalio/rbi/temporalio/workflow.rbi reports 7 srb.help/5003 errors before the change and 0 after. The check exits 0 only when that count is 0.

Disclosure: this change was prepared with AI assistance.

Sorbet rejects overload sigs that use keyword arguments (srb.help/5003), which broke srb tc for consumers. The remaining sig already covers the hash and **memo forms.

Signed-off-by: Alex <[email protected]>
@pcbeingused33
pcbeingused33 requested a review from a team as a code owner November 23, 2026 06:30
@chris-olszewski
chris-olszewski merged commit 172e722 into temporalio:main Nov 23, 2026
12 checks passed
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.

[Bug] 1.11.0 RBI: Workflow.upsert_memo sigs fail srb tc (overload and keyword args are not valid Sorbet)

2 participants