Skip to content

test: add a stream-service sample with a resource built from a ref - #273

Merged
moetemp merged 0 commit into
moe/up/dotnet-resource-property-name-2from
moe/up/stream-service-sample
Oct 23, 2026
Merged

moetemp merged 0 commit into
moe/up/dotnet-resource-property-name-2from
moe/up/stream-service-sample

Conversation

@moetemp

@moetemp moetemp commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

This PR adds a stream-service sample for Python, TypeScript and .NET, with today's output. It has a stream resource built from a ref, create-stream, append, read, describe and close, with 64-bit offsets, payloads and durations.

Its records are proto-backed, as a stream service's are. Upstream has no stream protos, so the sample has its own small proto in descriptors/streamsample/v1/, with checked-in bindings. The samples README has the commands that regenerate them. build_examples now loads every *.bin under descriptors/.

Why?

Later fixes show their effect as a golden diff on this sample.

How did you test it?

The goldens. A TypeScript test sends a full ReadRecordsRequest through the converter, so the TypeScript type file can't drift from the proto.

What comes next

These fixes are ready on our fork, in this order. Each one adds its shape to this sample, then the fix.

  • moetemp/nexgen#52: Check required resource fields of a response. Adds create-stream returning the stream resource.
  • moetemp/nexgen#56: Allow a result record to hold a resource. Adds a create-stream-result holder record.
  • moetemp/nexgen#53: Emit @nexus.doc on resources and methods as Python docstrings.
  • moetemp/nexgen#70: Convert 64-bit resource method values to Long for a proto request in TypeScript. Adds 64-bit method parameters. Needs fix(wit): keep the size and sign of WIT integers #265.
  • moetemp/nexgen#54: Generate a Python caller per service over a transport. Turns on the client for the sample.
  • moetemp/nexgen#55: Add @nexus.long-poll to the Python caller. Marks read-records as a long poll.
  • moetemp/nexgen#57: Add Python client classes for resources with methods.
  • moetemp/nexgen#71: Drop the bare keyword marker from a Python signature with no parameters. Adds a stream-writer interface with no endpoint.
  • moetemp/nexgen#60: Indent the docstrings of Python caller methods. Adds a doc on a writer operation.
  • moetemp/nexgen#69: Import record types that an endpoint-less Python client uses in unpacked parameters. Adds open-writer.
  • moetemp/nexgen#72: Plan proto unsigned integers as unsigned. Adds a uint64 writer id.
  • moetemp/nexgen#73: Build a returned proto-wire resource in an endpoint-less TypeScript client. Makes open-writer return the writer resource.

#262 adds a status enum to the holder record once it merges.

This PR is based on #272, since the stream resource has a stream field.

@moetemp
moetemp requested a review from a team as a code owner October 23, 2026 04:04
@moetemp
moetemp force-pushed the moe/up/stream-service-sample branch from 888a889 to a063930 Compare October 23, 2026 04:35
@moetemp
moetemp force-pushed the moe/up/dotnet-resource-property-name-2 branch from bad8742 to 5750cd4 Compare October 23, 2026 04:35
@moetemp moetemp added the skip-changelog No user-facing changelog fragment required label Oct 23, 2026
@moetemp
moetemp force-pushed the moe/up/dotnet-resource-property-name-2 branch from 5750cd4 to 6758b6d Compare October 23, 2026 08:46
@moetemp
moetemp force-pushed the moe/up/stream-service-sample branch from a155a8a to 184dcd5 Compare October 23, 2026 08:46
@moetemp moetemp closed this Oct 23, 2026
@moetemp
moetemp force-pushed the moe/up/stream-service-sample branch from 184dcd5 to e0b693b Compare October 23, 2026 08:54
@moetemp
moetemp merged commit e0b693b into moe/up/dotnet-resource-property-name-2 Oct 23, 2026
@moetemp
moetemp force-pushed the moe/up/dotnet-resource-property-name-2 branch from 6758b6d to c74a58d Compare October 23, 2026 08:54
@moetemp
moetemp deleted the moe/up/stream-service-sample branch October 23, 2026 08:54
@moetemp
moetemp restored the moe/up/stream-service-sample branch October 23, 2026 08:54
@moetemp

moetemp commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Moved to #274. Restacking this under #272 made GitHub mark it merged into #272's branch. main is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No user-facing changelog fragment required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant