Repository navigation
Make IAssertionContainer public, as an experimental extension point - #693
Merged
Merged
Conversation
Custom building blocks can be defined outside this library, and a container-like one must be able to implement IAssertionContainer, or schema rewriters (such as the advisor framework's) silently cannot descend into it. This is also why the set of containers is not a fixed list. AssertionStepKind, AssertionStep, IAssertionContainer and AssertionContainerExtensions become public, marked [Experimental]/EditorBrowsable(Never) like IValidatable and IGroupValidatable, so the contract can still change while the advisor rework (phase 3) lands. The OSS implementations stay explicit. The remarks on the interface now spell out the obligation for custom building blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
AssertionStep publicly permits malformed kind/name combinations that can violate traversal invariants.
Review effort: Balanced
Findings: 1
What changed in this PR
Exposes assertion-container traversal as an experimental extension point for custom assertions.
Changes:
- Makes container contracts and helpers public.
- Adds experimental annotations, documentation, and API declarations.
| File | Description |
|---|---|
Schema/IAssertionContainer.cs |
Publishes the traversal contract and supporting types. |
PublicAPI.Unshipped.txt |
Records the new public API surface. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Now that AssertionStep is public, its positional constructor and init accessors let callers build malformed steps (a Child without a name, a Member with one). The constructor is now private and the properties get-only, and the factories that need a name reject null. default(AssertionStep) is a nameless Member step, which is valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ewoutkramer
enabled auto-merge
September 30, 2026 21:50
andrzejskowronski
approved these changes
Oct 1, 2026
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.

Follow-up to #685, which added
IAssertionContaineras internal.Why
Users can write their own building blocks. If one of those holds nested assertions, it has to be able to implement
IAssertionContainer. Otherwise a schema rewriter, such as the enterprise advisor framework's, cannot descend into it and leaves everything nested inside unchanged without any warning. That is also why the containers are not a fixed list.Changes
AssertionStepKind,AssertionStep,IAssertionContainerandAssertionContainerExtensionsbecomepublic.IValidatable/IGroupValidatable:[Experimental("ExperimentalApi")]([Obsolete]on netstandard2.1) andEditorBrowsable(Never). The contract can still change while phase 3 of the advisor rework lands.PublicAPI.Unshipped.txt. They are identical for net8.0 and netstandard2.1.This also lets the enterprise tests use the interface directly, instead of through the reflection adapter they use now.
Verification
Release build of the whole solution is clean.
Firely.Fhir.Validation.Tests: 311 passed.🤖 Generated with Claude Code