docs: add ADR-0035 on structural vs value-dependent Any conflicts#296
Merged
Conversation
Record the rule that Any.Uri() and AnyString jointly establish: an illegal
constraint combination is made unrepresentable at compile time through a
typed progression when the illegality is structural (a mailto has no port),
and is left to the run-time ConflictingAnyConstraintException /
AnyGenerationException path when it depends on a generated value
(Numeric().StartingWith("ORD-") versus the valid "123").
Capture the decision, its rationale, the three rejected alternatives
(all-flat, all-typed, analyzer-over-flat) and the consequences in English
(canonical) with the French translation alongside, and add it to the index.
Refs: #226
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FPAdCRsiaVo2orjJwCaDnb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Record, as ADR-0035, the design rule that the
Anysurface enforces constraint conflicts at two different points depending on the nature of the error: a structural (category) conflict is made unrepresentable at compile time through a typed progression, while a value-dependent conflict stays on the run-time exception path.Any.Uri()(PR #295) is the rule's first typed-progression application; the existingAnyStringsurface is its run-time counterpart. This records a decision that was established but not yet written down.Type of change
Changes
Anysurface, its rationale, three rejected alternatives (all-flat, all-typed, analyzer-over-flat), consequences and follow-up.doc/handwritten/for-maintainers/adr/README.md.Testing
Docs-only change — no source, project or build file is touched — so the solution build and tests were not run for this branch (they are unaffected by it).
dotnet build FirstClassErrors.slndotnet test FirstClassErrors.slnFirstClassErrors.Analyzers.UnitTests)Documentation
doc/updatedThe ADR is the change; it ships with its French translation alongside the English canonical file, per the bilingual ADR convention. (The
README.fr.mdline from the template refers to the for-users guide, which this PR does not touch.)Architecture decisions
Acceptedper the maintainer's decision (the merge tomainis the acceptance), rather than the defaultProposed.Related issues
Refs #226
🤖 Generated with Claude Code
https://claude.ai/code/session_01FPAdCRsiaVo2orjJwCaDnb
Generated by Claude Code