fix(policy): validate standalone constraints - #101
Merged
Benoît Cortier (CBenoit) merged 1 commit intoSep 3, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Benoît Cortier (CBenoit)
September 3, 2026 16:13
View session
There was a problem hiding this comment.
🟢 Approval recommended
The focused change correctly closes the validation gap with comprehensive boundary coverage.
Pull request overview
Adds standalone PolicyConstraints validation consistent with nested policy rules.
Changes:
- Reuses bounded-string validation for standalone constraints.
- Adds boundary tests across generic helpers and public serializer options.
File summaries
| File | Description |
|---|---|
PolicySerializer.cs |
Validates standalone constraint collections. |
PolicyTests.cs |
Tests empty, maximum, and over-limit values. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Benoît Cortier (CBenoit)
enabled auto-merge (squash)
September 3, 2026 16:16
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Sep 3, 2026
Benoît Cortier (CBenoit)
deleted the
cbenoit-fix-policy-constraints-validation
branch
September 3, 2026 17:56
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.
PolicyConstraintsvalues throughPolicySerializer.Serialize<T>andDeserializeStrict<T>JsonSerializeruse with publicPolicySerializer.OptionsandStrictOptionsThis is an immediate follow-up to merged #99 for the late Copilot review and its specific finding.
BrokerSerializerneeds no additional change: its supported generic APIs expose broker DTO roots, whose embedded policy documents already traversePolicySerializervalidation. It does not expose standalonePolicyConstraintsthrough its generic helper surface.Changelog: ignore