Skip to content

Document the add-a-type procedure: copy the nearest sibling, let the sweeps list what is left #174

Closed

Description

@CaffeinatedCoder

Every concrete range union and value set is a hand-written copy of its siblings: measured today, Int32Range and Int64Range differ in about 25 of 254 lines once the type names are normalized, Int32Set and Int64Set in 20 of 258. Across an axis the copy is only half: discrete vs continuous changes the Finite constructor, both unbounded records, CreateFinite, Length and Values; temporal vs numeric changes ParseValue, FormatValue and the ISO grammar. The lines that differ are mostly the shipped doc comments and the per-type semantics.

A scaffolding script or template was considered and rejected: it would be a twelfth sibling that no sweep reads, it rots as soon as the live files take a fix, and it scaffolds the hundred lines that take ten minutes while leaving the hundred that take thought. The repository already took the other side of this trade with the clone-divergence sweep (#145): the siblings are the template, and CloneDivergenceTests keeps them in step.

What is missing is the procedure itself. docs/architecture.md says what every type must carry (attributes, converters, registry entries) but not how a contributor adds one, in which order, and which discovered tests will tell them what is left. Write that section:

  • pick the nearest sibling on both axes (discrete/continuous, temporal/numeric, primitive set/wrapper arity) and copy it; the clone sweep's family rules name the siblings
  • the wiring sites outside the type's own file, by project (core aggregates and set bridge, closed JSON converters, EF registry definition and translator operands, NodaTime satellite registration)
  • the discovered tests and catalogues that fail until the type is complete, so the contributor runs them instead of a checklist: CloneDivergenceTests, JsonDefaultContractTests, TypeConverterContractTests, OracleSurfaceCoverageTests, MappingParityTests, ShapeMatrixParityTests (integration), the smoke test; claims.json, clone-waivers.json, postgres-surface.json
  • what the sweeps cannot tell them: the PostgreSQL semantics of the new domain (canonical form, extremes, Length), measured against a live server before the doc comments are written

#153 (DoubleRange) is the first type addition that will follow it.

Activity

  1. added
    documentationImprovements or additions to documentation
    area/rangesRange unions, variants and the shape engines
    area/value-setsValue set families and wrapper arities
    package/nodatimeAffects CodoMetis.ValueRanges.NodaTime
    on Oct 18, 2026
  2. added this to the 10.0.0 milestone on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/rangesRange unions, variants and the shape enginesarea/value-setsValue set families and wrapper aritiesdocumentationImprovements or additions to documentationpackage/coreAffects CodoMetis.ValueRangespackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQLpackage/efcore-nodatimeAffects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTimepackage/nodatimeAffects CodoMetis.ValueRanges.NodaTime

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions