Skip to content

Dummies: run the test suite on the .NET Framework 4.7.2 floor and assert cross-TFM seed equality #215

Description

@Reefact

Problem

Dummies.UnitTests targets net10.0 only, so Dummies' own contract suite (regex oracle, conflict detection, distinctness gating, seed reproducibility) never runs on the netstandard2.0 assembly that .NET Framework consumers load. The netstandard2.0 build is exercised on the net472 floor, but only transitively: the FirstClassErrors floor job (ci.yml:98-115) runs FirstClassErrors.UnitTests on net472, which arranges with Dummies.Any via project reference — so Dummies loads and generates on the real .NET Framework CLR, but its own behavioral contract is not verified there.

Separately, same-seed-same-values across the two packaged assets (netstandard2.0 vs net8.0) is asserted nowhere. new Random(seed) keeps the legacy algorithm on modern .NET for compatibility, so the common surface should agree — but nothing proves it, and Random's documentation reserves the right for implementations to differ across framework versions.

This is a follow-up to the already-closed #191 (which added the packaged-asset guard dummies-check / dummies.yml, validating asset selection and conditional API surface through a net6.0 consumer). That guard does not run the behavioral suite on .NET Framework, nor compare seeded sequences across assets.

Impact

ADR-0022's rationale is that a documented floor must be continuously verified, not merely asserted. For Dummies that verification is partial: a regression specific to the netstandard2.0 behavioral contract, or a seed-sequence divergence between the two shipped assets, could reach NuGet while every suite stays green.

Direction

  • Import build/Net472TestFloor.props into Dummies.UnitTests (as FirstClassErrors.UnitTests does) and add it to the ci.yml floor loop, so Dummies' own suite runs on net472. Condition out the net8-only surface (AnyModernTypeTests and any DateOnly/TimeOnly/Int128/UInt128/Half usage) with an MSBuild Compile condition or #if !NET472, mirroring how RequestBinder.UnitTests handles the same split.
  • Add a cross-TFM golden-sequence assertion to dummies-check: extend SeedBatch with a fixed seed and compare the produced sequence across the net8.0 and net6.0 consumer legs; extend the smoke to cover OrNull, SequenceOf/ArrayOf, PairOf/TripleOf, StringMatching and enum draws, which the packaged-asset guard currently never touches.
  • State the .NET Framework 4.7.2 floor in Dummies/README.nuget.md (ADR-0022 follow-up).

Acceptance criteria

  • Dummies' behavioral suite (minus net8-only tests) runs on the net472 floor in CI and is green.
  • The floor loop's enumerating comment lists Dummies.UnitTests.
  • A golden-sequence check proves the common surface produces identical seeded values on the net8.0 and netstandard2.0 assets, and fails if they diverge.
  • dummies-check's smoke covers OrNull, sequence/array/tuple generators, StringMatching, and enum draws.
  • The package README states the .NET Framework floor.

Context

Surfaced by the 2026-07-20 architecture & design audit of the standalone Dummies library (doc/handwritten/for-maintainers/audit/2026-07-20-dummies-architecture-and-design-audit.md, §4.6 and §6 (ADR-0022 compliance); branch claude/dummies-architecture-audit-cru5aq). Follow-up to #191.


Filed from the Claude Code session that produced the 2026-07-20 Dummies architecture & design audit: https://claude.ai/code/session_01GvrWFVoG74xiys3oyEft1G

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions