Skip to content

feat(dummies): extend Combine to arity 8 - #178

Merged
Reefact merged 2 commits into
mainfrom
claude/dummies-combine-arity
Jul 18, 2026
Merged

feat(dummies): extend Combine to arity 8#178
Reefact merged 2 commits into
mainfrom
claude/dummies-combine-arity

Conversation

@Reefact

@Reefact Reefact commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

Extends Any.Combine from two/three parts up to eight, so a value object or aggregate built from many constrained generators composes in one flat, reflection-free call instead of nested Combine calls or positional tuple access.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Analyzer / diagnostic change
  • Tests
  • Documentation

Changes

  • Any.Combine overloads for four through eight generators, each mirroring the existing pattern: null-check every argument, resolve the random context from the first operand that carries one, and wrap a composer failure in an AnyGenerationException naming the generated parts. Caller-named lambda parameters keep the call site readable (Combine(a, b, c, d, (w, x, y, z) => new Thing(w, x, y, z))).
  • Eight is the ceiling (past it, intermediate value objects are the healthier design). The arity-7 and arity-8 overloads have eight and nine parameters, so they carry a justified inline S107 suppression pointing at ADR-0015.
  • Tests exercise arities 4–8 (every part passed through, constraints honoured), argument validation, and composer-failure wrapping.
  • Docs: NuGet readme notes "two up to eight parts"; ADR-0015 drafted (EN + FR) and indexed.

The tuple sugar PairOf/TripleOf deliberately stays at 2/3 — raw tuples past three (Item4…) are unreadable; the value of higher arity is in Combine's named-constructor lambda.

Testing

  • dotnet build FirstClassErrors.sln — succeeded, 0 warnings (both netstandard2.0 and net8.0 legs), re-verified after rebase onto main.
  • dotnet test FirstClassErrors.sln — all green (Dummies 152; FCE 423; Analyzers 85; GenDoc 155; PropertyTests 21; Binder 76; Cli 64).
  • Analyzer tests pass (FirstClassErrors.Analyzers.UnitTests) — ran as part of the full suite above.

Documentation

  • Public API / error documentation updated — full XML docs on the five new overloads.
  • README / doc/ updated — Dummies/README.nuget.md and ADR-0015.
  • French translation (doc/handwritten/for-users/README.fr.md) updated if user-facing behavior changed
  • No documentation change required

The handwritten EN/FR user guides stay deferred until the V1 surface stabilizes (ADR-0011 follow-up); only the packaged NuGet readme is kept current.

Architecture decisions

  • No architectural decision in this pull request
  • New decision recorded — ADR drafted as Proposed: ADR-0015
  • Supersedes an existing ADR — successor proposed, status not flipped: ADR-____
  • ⚠️ Conflicts with an existing ADR — flagged for the maintainer: ADR-____

ADR-0015 records the arity-8 ceiling and the accepted parameter/generic-count smell (the inline S107 suppressions) as the irreducible cost of heterogeneous, reflection-free composition.

Rebased onto main and renumbered the ADR 0014 → 0015 (and its two in-code references) after ADR-0014 (binder required-list presence, #177) landed on main.

🤖 Generated with Claude Code

claude added 2 commits July 18, 2026 11:15
Add Combine overloads for four through eight generators, so a value
object or aggregate built from many constrained parts composes in one
flat, reflection-free call with caller-named lambda parameters, instead
of nested Combine calls or positional tuple access. Each overload mirrors
the existing source-resolution and failure-wrapping pattern.

Eight is the ceiling: past it, intermediate value objects are the
healthier design. The arity-7 and arity-8 overloads exceed seven
parameters, so they carry a justified S107 suppression (see ADR-0015).

Tests exercise arities 4 to 8, argument validation and composer-failure
wrapping. Full suite green on both target legs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhPrBqngpiSwdsF4DWvNPw
Record, as Proposed, the decision to cap Any.Combine at eight parts and
to accept the parameter- and generic-count code smell of the two largest
overloads (the inline S107 suppressions) as the irreducible cost of
heterogeneous, reflection-free composition. Includes the French
translation and the index entry.

Numbered 0015: ADR-0014 was taken by the binder required-list-presence
decision merged to main in the meantime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhPrBqngpiSwdsF4DWvNPw
@Reefact
Reefact force-pushed the claude/dummies-combine-arity branch from 51b7c45 to a5de0ba Compare July 18, 2026 11:16
@Reefact
Reefact merged commit 4db74a2 into main Jul 18, 2026
13 checks passed
@Reefact
Reefact deleted the claude/dummies-combine-arity branch July 18, 2026 11:19
Reefact pushed a commit that referenced this pull request Jul 18, 2026
Renumber ADR-0015 -> ADR-0016 (main took 0015 for the Combine arity
ceiling, #178) and resolve the ADR index.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants