Skip to content

test: a second calendar seed for the refusals, and a join on a period (#451) - #456

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
test/451-calendar-seed-and-join
Oct 25, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
test/451-calendar-seed-and-join

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #451

Stacked on #455 (#450): both edit claim E76, on adjacent lines. Merge #455 first.

Problem

  1. CalendarFactoryParityTests had one seed, and it proves only the extremes half. Nothing proved the refusal half, CalendarFactories_OverAnArgumentMemoryRefuses_RaiseInPostgres. That half is the one most likely to go vacuous: it accepts three SQLSTATEs, and its Where form passes if any row raises.
  2. docs/efcore.md#what-runs-where says "filter, join and sort by it", but no test covered a join.
  3. The existing seed repeated its diff --git line.

Change

  • New seed test/oracles/seeds/calendar-iso-week-53-of-a-52-week-year-rolls-over.patch (Oracles: CalendarFactoryParityTests). It changes week <= weeks to week <= weeks + 1 in the ISO week check, so IsoWeek(2025, 53) rolls over to 2026-W01.
  • New test CalendarFactories_AsAJoinKey_PairTheRowsMemoryPairs. It joins Month(x.Day) with Month(y.Year, y.Month), and does the same for Quarter and Year. The pairs must equal memory's, and the rows at DateOnly.MinValue and MaxValue must find a partner. E76's claim now names the join.
  • The existing seed has one header line. Its Fails: line now names the join, which it also fails.

Tests

On PostgreSQL 16, with main's RC2 SDK:

  • The new seed fails CalendarFactories_OverAnArgumentMemoryRefuses_RaiseInPostgres and nothing else (1 of 4).
  • The old seed fails InEveryQueryForm and the new join test (2 of 4); the join gives 42 pairs where memory gives 67.
  • dotnet run tools/oracles.cs seeds calendar reports every seed is caught.
  • Without a seed, the class passes (4 of 4), and so do the conventions tests (417).

🤖 Generated with Claude Code

…#451)

- calendar-iso-week-53-of-a-52-week-year-rolls-over.patch lets the week check accept
  one week too many, so IsoWeek(2025, 53) rolls over to 2026-W01. It fails
  CalendarFactories_OverAnArgumentMemoryRefuses_RaiseInPostgres alone: the half of
  CalendarFactoryParityTests no seed proved.
- CalendarFactories_AsAJoinKey_PairTheRowsMemoryPairs joins a date form against an
  integer form (Month, Quarter, Year) and requires the first and last periods to
  find a partner. E76's claim names the join; the docs already promised it.
- The existing seed lost its doubled diff --git line, and its Fails line names the
  join, which it now also fails.

`dotnet run tools/oracles.cs seeds calendar`: every seed is caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CaffeinatedCoder CaffeinatedCoder added this to the 10.3.0 milestone Oct 25, 2026
@CaffeinatedCoder CaffeinatedCoder added tests Adds or changes tests only (oracles, harnesses); no library code area/ranges Range unions, variants and the shape engines package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL stacked Base is another open PR; merge in order, CI does not run until it targets main labels Oct 25, 2026
Base automatically changed from docs/450-calendar-factory-wording to main October 25, 2026 19:59
@CaffeinatedCoder
CaffeinatedCoder merged commit d69a7e5 into main Oct 25, 2026
11 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the test/451-calendar-seed-and-join branch October 25, 2026 20:03
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 package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL stacked Base is another open PR; merge in order, CI does not run until it targets main tests Adds or changes tests only (oracles, harnesses); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: a second seed for the calendar factories' refusals, and a join case for E76

1 participant