Skip to content

test: gate field.uri + field.inet write-roundtrip in the AllTypes corpus (all 5 ports)#135

Merged
dmealing merged 4 commits into
mainfrom
feat/uri-inet-roundtrip
Jun 30, 2026
Merged

test: gate field.uri + field.inet write-roundtrip in the AllTypes corpus (all 5 ports)#135
dmealing merged 4 commits into
mainfrom
feat/uri-inet-roundtrip

Conversation

@dmealing

Copy link
Copy Markdown
Member

Adds uriVal/inetVal/inet6Val to the shared AllTypes op:roundtrip corpus so field.uri/field.inet native binding is gated end-to-end via Testcontainers across all 5 ports. The gate caught real harness gaps (Java insert-coercion, Kotlin Exposed table, C# entity) — fixed. inet reads natively (no ::text cast/mask); IPv6 round-trips as Postgres-compressed. TS 29b3d7f3 · C# 49324c49 · JVM dd290574. Closes the Wave-3 follow-up.

🤖 Generated with Claude Code

claude added 4 commits June 30, 2026 19:08
…Types corpus

Wave-3 subtypes field.uri (native URI / text column) and field.inet
(native IP / Postgres inet column) shipped with per-port codecs but were
not in the persistence-conformance op:roundtrip gate. Add uriVal (field.uri),
inetVal + inet6Val (field.inet, IPv4 + IPv6) to the AllTypes entity so every
port's runtime WRITE codec re-encodes them on INSERT/UPDATE and the read-back
is asserted against the wire-normal form.

- meta.fitness.json: +uriVal/+inetVal/+inet6Val on AllTypes.
- schema.postgres.sql regenerated (bun run gen:schema): uriVal TEXT,
  inetVal/inet6Val INET.
- roundtrip-all-types.yaml + update-delete-all-types.yaml: seed + expect
  for all three rows / the UPDATE+DELETE scenario (raw-SQL seed updated for
  the new NOT NULL columns).
- registry-conformance README: mark uri/inet covered in the write-roundtrip matrix.

inet read-back finding: a HOST address (no CIDR prefix) round-trips WITHOUT a
mask via the inet wire text format (node-pg reads the column directly, not
::text); an explicit ::text cast WOULD append /32 (IPv4) or /128 (IPv6).
IPv6 returns its canonical compressed form (2001:0db8:..:8a2e:0370:7334 ->
2001:db8::8a2e:370:7334). Verified empirically against Postgres 16.

TS persistence roundtrip green against Testcontainers PG (24/24 query
scenarios); schema-artifact drift check + migrate-ts suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GF9xLEQZaPus5Y6opk398n
…oundtrip harness

The shared AllTypes entity gained uriVal (field.uri), inetVal + inet6Val
(field.inet, IPv4 + IPv6). The C# integration harness predated the fixture
change, so the op:roundtrip read-back threw "Entity 'AllTypes' has no property
for metadata field 'uriVal'". The production codecs (CSharpNaming / EntityGenerator
/ DbContextGenerator) already handle uri/inet — only the committed test harness
was stale.

- Regenerated the committed Generated/AllTypes.g.cs + AppDbContext.g.cs via the
  IntegrationFixtureDriftTests mutation harness: +Uri UriVal (text column,
  HasConversion Uri<->string), +IPAddress InetVal / Inet6Val (inet columns,
  Npgsql native IPAddress<->inet binding). Drift gate green.
- WriteCoercion: coerce the YAML authoring string to Uri (new Uri(raw)) and
  IPAddress (IPAddress.Parse) on the INSERT/UPDATE write path.
- EntityRow: pass Uri / IPAddress straight to Normalization (not the owned-POCO
  reflection path).
- Normalization: render Uri -> verbatim absolute string; IPAddress -> bare
  address. The read goes through EF/Npgsql's native inet binding (NO ::text cast,
  so no /32 or /128 mask), and IPAddress.ToString() yields the COMPRESSED IPv6
  form (e.g. 2001:0db8:..:8a2e:0370:7334 -> 2001:db8::8a2e:370:7334), matching the
  fixture's expected wire values.

Shared fixtures (fixtures/persistence-conformance/...) unchanged — matched, not
modified. QueryScenarioTests green (24/24) against Testcontainers Postgres, incl.
the AllTypes uriVal/inetVal/inet6Val roundtrip and update-delete-all-types.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GF9xLEQZaPus5Y6opk398n
Java RoundtripWriter + Kotlin AllTypesTable/QueryScenarioRunner gain
uriVal/inetVal/inet6Val coercion + columns (MetaInetUriColumnType for the
inet/uri Exposed columns). Native inet read (no ::text cast), compressed IPv6.
Test-harness only; production codecs unchanged.
@dmealing
dmealing merged commit 4137158 into main Jun 30, 2026
6 checks passed
@dmealing
dmealing deleted the feat/uri-inet-roundtrip branch June 30, 2026 23:30
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.

2 participants