Commit 49324c4
committed
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_01GF9xLEQZaPus5Y6opk398n1 parent 29b3d7f commit 49324c4
5 files changed
Lines changed: 33 additions & 0 deletions
File tree
- server/csharp/MetaObjects.IntegrationTests
- Generated
- Runner
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