Skip to content

test: report a divergence a minority of siblings shares - #205

Merged
CaffeinatedCoder merged 3 commits into
mainfrom
fix/clone-sweep-shared-divergence
Oct 18, 2026
Merged

CaffeinatedCoder merged 3 commits into
mainfrom
fix/clone-sweep-shared-divergence

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #200

Problem

The clone sweep reported a member only when exactly one sibling differed from the family. Two siblings that drifted together — a pair added in one change, or a defect copied into two files — were invisible. When Float32Range/Float32Set (#199) joined Float64Range/Float64Set (#198), 24 divergences that had been waived for Float64 vanished and their waivers went stale.

Change

  • test/oracles/CloneSweep.cs: the extra and lone body rules fire for a minority — one sibling, or a group smaller than a third of the family (MinorityDivisor = 3). A lone body must sit near a cluster larger than the group, so neither side can pose as the consensus. A group divergence is reported once, its unit the names joined with + in ordinal order (Int16Set + Int32Set + Int64Set), and waived once under that name. A single sibling is reported exactly as before, so every existing waiver still matches (0 stale).
  • test/oracles/clone-waivers.json: 11 group divergences surfaced on main, all legitimate sub-families, each waived with its reason: the integer families' IntegerLiteral parsing and number element converter, the temporal arities' O format, the NodaTime store helpers and literals, the timestamp/calendar normalizeValue, the overflow-checked FiniteLength of DecimalRange and Int64Range, and the ISO pair RequireIso/ToIso.
  • docs/oracles.md and the CloneDivergenceTests remarks describe the rule and its new limit (a sub-family of a third or more still looks like a consensus).

The float families' shared divergences become reportable once #198/#199 are updated from main; each is then waived once as Float32… + Float64….

Tests

  • Seed hash-by-reference-copied-into-two-sets.patch: copies a reference-based GetHashCode into both Int32Set and Int64Set. With this change, CloneDivergenceTests fails on core value sets · Int32Set + Int64Set · GetHashCode() · lone body. With the old CloneSweep.cs and the same defect, it passed. dotnet run tools/oracles.cs seeds two-sets → CAUGHT. The existing single-sibling seed sibling-drops-input-function-trim.patch is still caught.
  • dotnet run tools/oracles.cs clones: 76 divergences, 76 waived, 0 unwaived, 0 stale.
  • Conventions: 324 passed.

🤖 Generated with Claude Code

The clone sweep reported a member only when exactly one sibling differed,
so two siblings that drifted together - a pair added in one change, or a
defect copied into two files - went quiet. When Float32 joined Float64,
24 waived divergences vanished.

The extra and lone-body rules now fire for a group smaller than a third of
the family, reported once under the group's names joined with " + " and
waived once under that name. Eleven sub-family divergences surfaced on
main, each legitimate and waived with its reason. The seed copies a
reference-based GetHashCode into Int32Set and Int64Set; the old sweep
passed it, the new one catches it.

Closes #200

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 the tests Adds or changes tests only (oracles, harnesses); no library code label Oct 18, 2026
CaffeinatedCoder and others added 2 commits October 18, 2026 20:15
The minority sweep (#200) reports Values($T) on Int32Range and Int64Range
as present in 2 of 7 core ranges. Every discrete range has Values(step);
only on the integers is the step the element type, so the date and
month ranges' overloads normalize to a different signature.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder
CaffeinatedCoder merged commit a6e3f08 into main Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the fix/clone-sweep-shared-divergence branch October 18, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Adds or changes tests only (oracles, harnesses); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clone sweep goes quiet when two new siblings share a divergence

1 participant