[Dynamic Control] Phase 3b: Add PolicyStore - #5017
Conversation
88cb549 to
0234a76
Compare
|
Regarding the codecov. The missing line is technically unreachable but required to satisfy CS8509. Three options:
Do you have a preference @martincostello? |
Pull request dashboard statusWaiting on reviewers · refreshed 2026-08-21 15:41 UTC Review the latest changes. Status above doesn't look right?
|
|
It's fine to not have 100% coverage, particularly for stuff that can't be reasonably covered or is just to hit a number. It's just for new code, particularly when you're using an agent, I figured aiming for higher coverage is reasonable. In the previous PR I think there was a number of non-trivial paths that didn't have coverage even though it was still 90%+. Also even though it's an ❌, it's just to draw attention to it - it's not a hard requirement we enforce. |
| { | ||
| snapshot = null; | ||
| error = "The metadata must not be a default PolicySourceMetadata instance. " + | ||
| "A default value bypasses constructor validation and would assign this snapshot top precedence."; |
There was a problem hiding this comment.
That's not a security boundary though, is it? I would have thought it enough to tell the caller they're "holding it wrong" and not have to explain why (the internal design reasons).
It's a correctness boundary, |
Contributes to: #4742
Changes
Continues the Dynamic Control component implementation with the policy store layer.
ITelemetryPolicyinterface with an abstractTelemetryPolicybase class, enabling shared behaviour and a cleaner extension point for concrete immutable policy types.PolicySourceKindto match the provider-priority order defined in the Telemetry Policy OTEP.PolicySourceVersionfor sequence-based versioning of per-source policy data.PolicyStorebuilt on immutable snapshots with:PolicyKeyComparerMerge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)