Skip to content

feat(stdune): add tuple-free record codecs to Conv - #16396

Open
rgrinberg wants to merge 1 commit into
mainfrom
push-vkmvxuwwvlts
Open

rgrinberg wants to merge 1 commit into
mainfrom
push-vkmvxuwwvlts

Conversation

@rgrinberg

@rgrinberg rgrinberg commented Sep 13, 2026

Copy link
Copy Markdown
Member

Record codecs currently require converting records to and from tuples, with arity-specific combinators and repeated positional bookkeeping.

Add Conv.Record, a typed builder pairing a curried constructor with field projections. Completed builders remain composable as field codecs. Port straightforward named-field RPC codecs for calls, initialization, registry entries, locations, current and V1 diagnostics, messages, jobs, promotion requests, and formatting requests. Also use the builder in the versioned add RPC test. Leave conversions with separate validation, inline-variant payloads, and positional wire types unchanged.

Legacy-codec comparisons, captured wire-format snapshots, and round-trip tests check compatibility, including optional fields, styled diagnostics, V1 unit tags, and registry files. The wire formats are unchanged; structural digest snapshots change. Builder tests also cover errors, versions, recursion, empty records, and records beyond eight fields.

Local validation encounters the same two baseline bubblewrap UID-map permission failures in sandbox-actions; the build, formatting, and Stdune/RPC tests pass.

Add a typed record builder using curried constructors for decoding and
field projections for encoding. Completed builders remain composable
as field codecs.

Migrate straightforward RPC records, including calls, initialization,
registry entries, locations, diagnostics, messages, jobs, and promotion
requests. Preserve field parsing order and the existing wire formats,
including V1 diagnostic tags, and update structural digest snapshots.

Add legacy-codec comparisons, wire-format snapshots, and round-trip
tests, plus coverage for versions, errors, recursion, empty records,
and records beyond eight fields.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant