Conversation
WalkthroughThis PR updates XML documentation across multiple components in the caching, HTTP client factory, logging, and validation frameworks. Changes include refined class/method summaries, added value tags describing defaults, and minor validation logic adjustments to enforce stricter constraints in batching and file logging options. One constructor signature is extended to include a timestamp parameter. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs (1)
41-58: RetainedFileCountLimit semantics don’t match docs/exceptions.
Docs and exception text say “strictly positive,” but the setter now allows 0. With currentFileLoggerProvider.RollFilesusing> 0, a value of 0 effectively disables retention, which contradicts both the docs and error text. Consider either reverting to strict positivity or explicitly defining 0 semantics and updating docs/roll logic.✅ Option A: keep “strictly positive” behavior
- if (value < 0) + if (value <= 0) { throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(RetainedFileCountLimit)} must be positive."); }
🤖 Fix all issues with AI agents
In `@src/Logging.AzureAppServices/src/BatchingLoggerOptions.cs`:
- Around line 47-50: The setter for BackgroundQueueSize currently throws
ArgumentOutOfRangeException when value <= 0 but the message says "non-negative";
update the exception message to match the validation (e.g., change the message
to say $"{nameof(BackgroundQueueSize)} must be positive.") so diagnostics align
with the check in the BackgroundQueueSize setter/validation code.
🧹 Nitpick comments (1)
src/Validation/src/ValidationOptions.cs (1)
66-77: Minor formatting inconsistency.The opening brace placement differs between the two
TryGetmethods:
TryGetValidatableTypeInfo(Line 45): brace on new lineTryGetValidatableParameterInfo(Line 66): brace on same lineConsider aligning the formatting for consistency.
♻️ Suggested fix
[Experimental("ASP0029", UrlFormat = "https://aka.ms/aspnet/analyzer/{0}")] -public bool TryGetValidatableParameterInfo(ParameterInfo parameterInfo, [NotNullWhen(true)] out IValidatableInfo? validatableInfo) { +public bool TryGetValidatableParameterInfo(ParameterInfo parameterInfo, [NotNullWhen(true)] out IValidatableInfo? validatableInfo) +{ foreach (var resolver in Resolvers)
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
src/Caching/SqlServer/src/SqlServerCacheOptions.cssrc/HttpClientFactory/Polly/src/DependencyInjection/PollyHttpClientBuilderExtensions.cssrc/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cssrc/Logging.AzureAppServices/src/AzureBlobLoggerContext.cssrc/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cssrc/Logging.AzureAppServices/src/AzureFileLoggerOptions.cssrc/Logging.AzureAppServices/src/BatchingLoggerOptions.cssrc/Logging.AzureAppServices/src/BatchingLoggerProvider.cssrc/Logging.AzureAppServices/src/FileLoggerProvider.cssrc/Validation/src/IValidatableInfoResolver.cssrc/Validation/src/SkipValidationAttribute.cssrc/Validation/src/ValidateContext.cssrc/Validation/src/ValidationOptions.cs
🧰 Additional context used
🧬 Code graph analysis (2)
src/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cs (1)
src/Logging.AzureAppServices/src/BatchingLoggerOptions.cs (1)
BatchingLoggerOptions(11-86)
src/Validation/src/ValidationOptions.cs (3)
src/Validation/src/SkipValidationAttribute.cs (1)
Experimental(17-21)src/Validation/src/IValidatableInfoResolver.cs (2)
TryGetValidatableTypeInfo(24-24)TryGetValidatableParameterInfo(32-32)src/Validation/src/RuntimeValidatableParameterInfoResolver.cs (2)
TryGetValidatableTypeInfo(18-22)TryGetValidatableParameterInfo(24-58)
🔇 Additional comments (24)
src/Validation/src/IValidatableInfoResolver.cs (1)
20-24: LGTM!The XML documentation updates are consistent and follow .NET conventions. Using
<see langword="true" />and<see langword="false" />for return value documentation is idiomatic and improves generated API documentation.Also applies to: 29-32
src/Validation/src/SkipValidationAttribute.cs (1)
8-16: LGTM!Good documentation restructuring. Moving the detailed behavior descriptions from the summary into a dedicated
<remarks>section follows .NET XML documentation best practices, keeping the summary concise while preserving the full behavioral details.src/Validation/src/ValidateContext.cs (2)
25-35: LGTM!Adding
language="csharp"to the code block enables proper syntax highlighting in generated API documentation.
41-43: LGTM!The documentation improvements properly separate concerns by moving implementation details into
<remarks>sections. This keeps summaries concise while providing valuable context about property usage (path construction, error dictionary initialization, and circular reference protection).Also applies to: 52-58, 61-67
src/Validation/src/ValidationOptions.cs (2)
10-10: LGTM!Documentation improvements are well-structured:
- The
<value>tag properly documents the default forMaxDepth- The
<remarks>section explains the purpose of the depth limit- Resolver processing order is now explicitly documented
Also applies to: 14-34
44-56: LGTM!Initializing
validatableTypeInfo = nullat the start of the method is a good defensive coding practice. It ensures the out parameter is always in a known state regardless of the code path taken.src/Logging.AzureAppServices/src/FileLoggerProvider.cs (1)
14-28: Doc wording improvements look good.
The summary and parameter phrasing are clearer while preserving intent.src/HttpClientFactory/Polly/src/DependencyInjection/PollyHttpClientBuilderExtensions.cs (8)
13-16: Class summary phrasing is clear.
19-22: AddPolicyHandler summary refinement looks good.
47-50: AddPolicyHandler (policy selector) summary reads well.
79-82: AddPolicyHandler (service provider selector) summary looks good.
114-117: AddPolicyHandlerFromRegistry summary improvement is clear.
151-154: Registry selector summary is clear and consistent.
187-213: Transient error policy docs are clearer now.
238-240: Policy factory/key selector summary reads well.src/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cs (1)
9-38: Doc defaults and value tags are helpful.src/Logging.AzureAppServices/src/AzureBlobLoggerContext.cs (2)
26-38: Property doc wording looks good.
13-23: No breaking change detected.
The codebase currently has only the 3-arg constructorAzureBlobLoggerContext(string appName, string identifier, DateTimeOffset timestamp), and all existing call sites (ConfigureOptionsTests.cs and BlobLoggerProvider.cs) already pass the timestamp parameter. There is no evidence of a prior 2-arg overload in the git history, so no breaking change has occurred.Likely an incorrect or invalid review comment.
src/Caching/SqlServer/src/SqlServerCacheOptions.cs (1)
10-49: Doc clarifications and default values are clear.src/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs (2)
9-28: File size limit docs are clear and precise.
61-69: File name prefix docs read well.src/Logging.AzureAppServices/src/BatchingLoggerOptions.cs (1)
8-10: Doc clarifications look good.
The expanded summaries and<value>/<remarks>blocks improve intent and defaults.Also applies to: 33-41, 55-60, 74-85
src/Logging.AzureAppServices/src/BatchingLoggerProvider.cs (1)
13-15: Doc-only refinements look good.
Clearer phrasing and grammar without behavioral changes.Also applies to: 61-63, 126-132
src/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs (1)
15-17: Doc wording tweaks look good.
Minor polish improves readability.Also applies to: 23-23
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| if (value <= 0) | ||
| { | ||
| throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be non-negative."); | ||
| } |
There was a problem hiding this comment.
Align the exception message with the positive-only validation.
The check rejects 0, but the message says “non-negative.” Either allow 0 or update the message to “positive” so behavior and diagnostics are consistent.
🛠️ Suggested fix
- throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be non-negative.");
+ throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be positive.");📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (value <= 0) | |
| { | |
| throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be non-negative."); | |
| } | |
| if (value <= 0) | |
| { | |
| throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be positive."); | |
| } |
🤖 Prompt for AI Agents
In `@src/Logging.AzureAppServices/src/BatchingLoggerOptions.cs` around lines 47 -
50, The setter for BackgroundQueueSize currently throws
ArgumentOutOfRangeException when value <= 0 but the message says "non-negative";
update the exception message to match the validation (e.g., change the message
to say $"{nameof(BackgroundQueueSize)} must be positive.") so diagnostics align
with the check in the BackgroundQueueSize setter/validation code.
Benchmark PR from agentic-review-benchmarks#10
Summary by CodeRabbit
Release Notes
Documentation
Bug Fixes
Breaking Changes
AzureBlobLoggerContextconstructor now requires a timestamp parameter.✏️ Tip: You can customize this high-level summary in your review settings.