ADR-0031: validate integer extrema inputs within the aggregate statement¶
Status: accepted. Local verification passes all 656 provider units, 222 integration and 81 selected EF checks; eleven original upstream aggregate cases are reconciled by name, and the owned fixture/network is removed. FS-13's documented scope is complete.
FS-13 requests projected scalar/DTO mapping and Count/Any/Min/Max where safe, with grouping staged. DTO construction is accepted under ADR-0030. Add Min/Max on ordinary-node direct unconverted int/long properties, including nullable forms and nullable widening. Keep existing relationship-root and pagination aggregate boundaries.
The scalar minimum/maximum alone can conceal malformed required, mixed-type or out-of-range inputs. Return a same-statement invalid-input count using the model's requiredness and integer width. Decode only after that diagnostic is present and zero; then preserve nullable empty/all-null results or throw for empty required results. Do not coerce returned strings/floats or evaluate a predicate/aggregate in the client.
The integer boundary is semantic: floating-point NaN, string collation, enum/custom conversion and graph identity diagnostics require their own proofs. They remain explicit exclusions, not silently normalized values. Grouping/richer aggregate composition stays staged under FUT-02. This is the concrete safe subset for the strategy, not a claim of general LINQ aggregate compatibility.
Acceptance requires original upstream selector/no-selector, empty and nullable-widening assertions, independent node-control results, exact Cypher and malformed-input tests. A dedicated Northwind aggregate adapter preserves original data/assertions without weakening the existing relationship fixture. See integer aggregate contracts and evidence.