Skip to content

test: captured collection probe sweep over every range and set type - #138

Merged
CaffeinatedCoder merged 1 commit into
mainfrom
test/captured-collection-probe
Oct 17, 2026
Merged

CaffeinatedCoder merged 1 commit into
mainfrom
test/captured-collection-probe

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #136

Problem

No oracle sends a range or value set as a captured collection. DifferentialFuzzParityTests binds operands only as a column, a constant or a single parameter. The oracle check on #105 found that three bugs in this position would pass every registered oracle:

For #46 and #71 I reverted the fix and ran every oracle, and they stayed green.

Change

CapturedCollectionProbeTests, in the integration project against live PostgreSQL, sweeps this product:

  • every discovered range type (11) and value set type (30)
  • × a captured array, List, HashSet and IEnumerable
  • × six lists that tell a list from its multirange: empty, overlapping, adjacent, with an empty value, duplicate, every shape
  • × Contains, Any(==), Any(Overlaps), Any(IsEmpty), Count(Overlaps | IsAdjacentTo | IsSubsetOf) and Count()
  • × two query shapes: alone, or beside a Contains that reads the same collection, which decides how the plugin binds a range collection

The oracle is the same projection compiled and run over the rows as loaded. The lists hold loaded values, so the store's microsecond truncation doesn't count as a disagreement. The sweep reuses FuzzTypes discovery and links RangeProbes/SetProbes from the conventions project. It runs in about 5 s.

Wiring: registered in oracles.json, named in the heldBy of E36 and E37, seeded with set-collection-sent-as-one-parameter, and the value is added to axes.md. docs/oracles.md, docs/testing.md and AGENTS.md describe it.

Findings, registered in candidates.json:

Tests

  • The sweep is green on this branch with both families reported as SKIPPED [known candidate …].
  • dotnet run tools/oracles.cs seeds set-collection-sent-as-one-parameter reports CAUGHT: 5,760 failing value-set lines, and the range method stays green.
  • Reverting feat: translate Contains over a captured collection of ranges #77's src/ diff on this branch fails the range method: 42809 on every Contains beside-shape row.
  • Conventions 217/217, integration 153/153, unit 923/923, EF translation 242/242, AspNetCore 84/84.

🤖 Generated with Claude Code

CapturedCollectionProbeTests (integration) adds the captured collection to
the EF Core operand-position axis. It reads every discovered range and value
set type through:

- a captured array, List, HashSet and IEnumerable
- six lists that tell a list from the multirange it would collapse into
  (empty, overlapping, adjacent, with an empty value, duplicate, every shape)
- Contains, Any and Count, alone and beside a Contains that reads the same
  collection

The oracle is the same projection compiled and run over the rows as loaded.
The lists hold loaded values, so the store's microsecond truncation does not
count as a disagreement.

Two families, registered as candidates:

- #76, measured wider: a range collection that no Contains reads also fails
  loudly. Any(==) is rewritten to = ANY and fails with 42809, and timerange
  cannot be written at all.
- #137 (new): Any/Count with a predicate over an empty collection throws
  "Empty collections are not supported as inline query roots". It affects
  every value set type, and ranges beside Contains.

The sweep is registered in oracles.json and named in the heldBy of E36 and
E37. It is seeded with set-collection-sent-as-one-parameter (the #46 defect),
which tools/oracles.cs reports CAUGHT. Reverting #77 fails it too (42809 on
every Contains). axes.md gains the value. It runs in about 5 seconds.

Closes #136

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CaffeinatedCoder
CaffeinatedCoder force-pushed the test/captured-collection-probe branch from afc3e8f to 4943e68 Compare October 17, 2026 23:28
@CaffeinatedCoder
CaffeinatedCoder merged commit 802da3f into main Oct 17, 2026
9 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the test/captured-collection-probe branch October 17, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ranges Range unions, variants and the shape engines area/value-sets Value set families and wrapper arities package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL tests Adds or changes tests only (oracles, harnesses); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Probe sweep: captured collection × every range and set type (EF Core operand axis)

1 participant