Skip to content

test: check the nested-empty array rows as the PostgreSQL 16/17 split, by server version - #217

Merged
CaffeinatedCoder merged 1 commit into
mainfrom
test/corpus-nested-empty-version-split
Oct 18, 2026
Merged

CaffeinatedCoder merged 1 commit into
mainfrom
test/corpus-nested-empty-version-split

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #216

Problem

On PostgreSQL 16, LiteralCorpusProbeTests failed for all 28 value set types, all on the five nested-empty rows #128 added: {{}}, {{},{}}, { {} }, {{{},{}}}, {{{}},{{}}}. The sets read these as {}, as PostgreSQL 17 and later do. PostgreSQL 16 rejects them. That's the difference #128 decided and docs/value-sets.md states (claim S21). The probe asked for parity against whatever server the shared container ran. CI runs 17, so CI never saw the failure.

Change

test/CodoMetis.ValueRanges.EFCore.PostgreSQL.IntegrationTests/LiteralCorpusProbeTests.cs:

  • The probe reads the server's version once per sweep (current_setting('server_version_num')), never the image name.
  • Below 17, the five rows are checked as the documented difference. The server must reject the literal and the library must read it as the empty set; such a row counts as documented. Anything else fails, with its own message. That includes a library that rejects the literal too. Before this change, that case counted as both sides agreeing on 16, so a defect in nested-empty reading would have passed there.
  • From 17 on, the rows are ordinary parity, as before.
  • No candidates.json entry: this is a decided difference, not an unfixed defect.
  • New seed: test/oracles/seeds/nested-empty-array-refused.patch, which stops the sets reading nested empties.

Tests

The probe, run with the shared container on each version (swapped locally, not committed; #215 makes the version configurable):

Server Before After After, seeded
16.15 28 of 49 fail (#216) 49 pass 28 fail: "…which the documented split says reads as {} although PostgreSQL 160015 rejects it"
17 49 pass 49 pass 28 fail: "library refused, PostgreSQL reads {}"
18 49 pass 49 pass 28 fail, as on 17
  • dotnet run tools/oracles.cs seeds nested-empty: CAUGHT by LiteralCorpusProbeTests (28 of 49) and LiteralGrammarParityTests (NestedEmptyArrays_…).
  • Conventions 393 passed. StringOverloadConventionTests caught my first version, a generic TSelf.Parse(string) that would have bound to the span overload; it now goes through StringOverloads.Parse.

🤖 Generated with Claude Code

…, by server version

LiteralCorpusProbeTests failed on PostgreSQL 16 for all 28 value set types: its five nested-empty
rows ({{}}, {{},{}}, { {} }, {{{},{}}}, {{{}},{{}}}) asked for parity, while the sets read them as
{} as 17 and later do and 16 rejects them, the difference #128 decided and docs/value-sets.md states
(S21). Below 17, read from server_version_num, those rows now require exactly that: the server
rejects, the library reads {}, counted as documented. Anything else fails, including a library that
rejects them too, which on 16 used to count as both sides agreeing.

Measured with the shared container on 16.15, 17 and 18: the probe passes on each (on 16 it failed
28 rows before). Seeded with nested-empty reading removed (kept as
nested-empty-array-refused.patch), it fails 28 rows on each: on 16 as the documented split, on 17
and 18 as parity; `oracles.cs seeds nested-empty` reports it CAUGHT by LiteralCorpusProbeTests and
LiteralGrammarParityTests.

Closes #216

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 10.0.0 milestone Oct 18, 2026
@CaffeinatedCoder CaffeinatedCoder added tests Adds or changes tests only (oracles, harnesses); no library code area/value-sets Value set families and wrapper arities area/literals Parse, TryParse and formatting package/core Affects CodoMetis.ValueRanges labels Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder merged commit 2e19947 into main Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the test/corpus-nested-empty-version-split branch October 18, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/literals Parse, TryParse and formatting area/value-sets Value set families and wrapper arities package/core Affects CodoMetis.ValueRanges tests Adds or changes tests only (oracles, harnesses); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LiteralCorpusProbeTests fails on PostgreSQL 16: the nested-empty array rows ignore the 16/17 split

1 participant