Repository navigation
Sibling parity sweeps: wrapper arity vs primitive, range vs one-element RangeSet, literal entry points #139
Description
The claim-driven oracles hold each document's promise per type, so they find a bug where a promise is checked and miss it at the sibling site that makes the same promise implicitly. The changelog shows the pattern repeatedly: IsAdjacentTo (6.2.1) → IsStrictlyLeftOf / Except (7.0.0) → RangeSet.Except(TRange) (8.0.0); wrapper arities lagging their primitive set ("as DecimalSet does"); ==/!= untested on 18 of 20 set types until the Stryker run.
A differential sweep between two things that must agree needs no ground truth: whichever side disagrees is the bug.
Scope
Three sweeps in test/CodoMetis.ValueRanges.Conventions.Tests/, one [DynamicData] row per discovered type, each registered in test/oracles/oracles.json with a seed patch it is shown to catch:
- Primitive set vs its wrapper arity over an identity wrapper (
Int32SetvsInt32Set<Same<int>>): every public operation (Contains/Add/Remove/Union/Intersect/Except/IsSubsetOf/…, equality and the operators),Parse/TryParse(string and span),ToString, JSON write and read,TypeConverter— same value, or the same exception type on the same bad input. The input grid includes whitespace-padded quoted elements, duplicates, out-of-order, empty and the family's extremes. - A range vs the one-element
RangeSetholding it: every binary operation over the shape matrix (the spec enumerationDomainParityOracleTestsuses, plus bounds at the domain's extremes) — a set operation on one-element sets equals the set built from the range operation's result, and every predicate answers alike. - One literal through the five entry points: string
Parse, spanParse, JSON,TypeConverter,IConfigurationbinding — an equal value, or all refuse it.
A disagreement found goes through Candidates.Verdict into candidates.json with its own issue.
Done
- the sweeps pass, or every disagreement is a candidate with an issue
- a seed per sweep, and
dotnet run tools/oracles.cs seedsis green docs/testing.mdanddocs/oracles.mddescribe the sweeps
Activity
CaffeinatedCoder commentedon Oct 18, 2026
Implemented in #143. All three sweeps are registered and seeded, and
tools/oracles.cs seedsis green. Disagreements found: #141 (new: wrapper JSON element reads accept tokens the primitive refuses) and #109 (known: re-found between a range and its own multirange). The harness trap found on the way, where genericTSet.Parse(string)binds to the span overload, is #142.