test: gate field.uri + field.inet write-roundtrip in the AllTypes corpus (all 5 ports)#135
Merged
Conversation
…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.
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.
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· JVMdd290574. Closes the Wave-3 follow-up.🤖 Generated with Claude Code