Repository navigation
Document the add-a-type procedure: copy the nearest sibling, let the sweeps list what is left #174
Description
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