Repository navigation
fix: plan a oneof case that names a proto-bound record as that record - #310
Merged
Merged
Conversation
1 of 3 tasks
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 27, 2026 18:35
8069188 to
4c71190
Compare
This was referenced Oct 27, 2026
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
2 times, most recently
from
October 28, 2026 16:37
93197c3 to
f2210ce
Compare
This was referenced Oct 28, 2026
This was referenced Oct 28, 2026
1 of 3 tasks
moetemp
marked this pull request as ready for review
October 28, 2026 23:34
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 28, 2026 23:59
f2210ce to
7d98eab
Compare
moetemp
force-pushed
the
moe/up/brook-wits
branch
from
October 28, 2026 23:59
d212587 to
3d85326
Compare
tconley1428
approved these changes
Oct 29, 2026
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 29, 2026 00:53
7d98eab to
a892bd7
Compare
moetemp
force-pushed
the
moe/up/brook-wits
branch
2 times, most recently
from
October 29, 2026 06:28
2dc6f65 to
accc4c0
Compare
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 29, 2026 06:28
a892bd7 to
5ae1c19
Compare
moetemp
force-pushed
the
moe/up/brook-wits
branch
from
October 29, 2026 07:00
accc4c0 to
98c9e47
Compare
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 29, 2026 07:00
5ae1c19 to
2f6b64b
Compare
moetemp
force-pushed
the
moe/up/brook-wits
branch
from
October 29, 2026 07:35
98c9e47 to
ef11a26
Compare
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 29, 2026 07:35
2f6b64b to
4391281
Compare
moetemp
force-pushed
the
moe/up/brook-wits
branch
from
October 29, 2026 09:29
ef11a26 to
dd2a166
Compare
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 29, 2026 09:29
4391281 to
3ff91ac
Compare
Variant planning kept such a case as the raw proto message. Python and TypeScript then panicked on a message conversion that wasn't model-shaped, and .NET typed the case as the proto class. The case plans as the record, as a record field does. A .NET case record names its payload's model in full, since it hides a model of its own name. Brook's stream service generates for TypeScript, and its .NET read item holds the records.
nexgen maps every temporal/... proto to a temporalio module. The Stream protos aren't in temporalio yet, so the service's imports don't resolve, and basedpyright skips it.
moetemp
force-pushed
the
moe/up/oneof-record-case
branch
from
October 29, 2026 17:03
3ff91ac to
54da5a5
Compare
moetemp
enabled auto-merge (squash)
October 29, 2026 17:07
moetemp
disabled auto-merge
October 29, 2026 17:12
moetemp
enabled auto-merge (squash)
October 29, 2026 17:13
moetemp
disabled auto-merge
October 29, 2026 17:13
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.
What changed?
This PR plans a protobuf
oneofcase that names a proto-bound WIT record as that record, as nexgen already does for a record field.optionaround the payload stays.record Superseded(Superseded Value)doesn't compile. Brook's next WIT names a case like that.tscskips the service until fix(typescript): type a resource's 64-bit values as Long #296.In the stream sample's .NET output, the read item now holds the records, not the proto classes.
It's based on #308.
Why?
Brook's read item,
variant stream-item, binds aoneofof three proto-bound records. Before the fix, Python and TypeScript generation panicked on it, and .NET typed each case as the proto class.How did you test it?
Link to a test plan if any -
New TypeScript and .NET tests round-trip the read item's cases, and the .NET test leaves out the data case. A unit test covers the full name of a case payload.