Commit 4137158
test: gate field.uri + field.inet write-roundtrip in the AllTypes corpus (all 5 ports) (#135)
* test(persistence): gate field.uri + field.inet write-roundtrip in AllTypes 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
* test(persistence-cs): wire field.uri + field.inet into the AllTypes roundtrip 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
* test(integration): wire uri/inet into JVM AllTypes roundtrip harness
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.
---------
Co-authored-by: Doug Mealing <noreply@anthropic.com>1 parent 97e5574 commit 4137158
14 files changed
Lines changed: 188 additions & 2 deletions
File tree
- fixtures
- persistence-conformance
- canonical
- queries
- registry-conformance
- server
- csharp/MetaObjects.IntegrationTests
- Generated
- Runner
- java
- integration-tests-kotlin/src/test/kotlin/com/metaobjects/integration/kotlin
- tables
- integration-tests/src/test/java/com/metaobjects/integration
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
62 | 74 | | |
63 | 75 | | |
64 | 76 | | |
| |||
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
78 | 93 | | |
79 | 94 | | |
80 | 95 | | |
| |||
95 | 110 | | |
96 | 111 | | |
97 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
98 | 116 | | |
99 | 117 | | |
100 | 118 | | |
| |||
111 | 129 | | |
112 | 130 | | |
113 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
114 | 135 | | |
115 | 136 | | |
116 | 137 | | |
| |||
143 | 164 | | |
144 | 165 | | |
145 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
146 | 172 | | |
147 | 173 | | |
148 | 174 | | |
| |||
159 | 185 | | |
160 | 186 | | |
161 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
162 | 191 | | |
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
| 516 | + | |
515 | 517 | | |
516 | 518 | | |
517 | 519 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
0 commit comments