chore: hardening pass and 0.7.21 release prep#106
Merged
Conversation
- Fix potential AD0001 crash: defensive operation handling and a guarded configSectionPath lookup in BindConfiguration registration parsing - Enable the CI analyzer gate (CI/publish/CodeQL now pass ContinuousIntegrationBuild=true) and triage every build warning so CI-mode builds are genuinely zero-warning - Memoize OptionsTypeMetadata per compilation (ConditionalWeakTable) and collapse the CFG009 provenance scan to a single traversal - Bound the appsettings JSON parser nesting depth (64) to avoid an uncatchable stack overflow on pathological input - Remove dead code and unify four duplicate traversal predicates into a shared ExecutionScope.ShouldDescend guard - Complete the showcase to cover all nine rules; regenerate its schema - Bump to 0.7.21; no diagnostic behavior changes (930 tests green)
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
Hardening pass from a full code review, plus 0.7.21 release prep. No diagnostic behavior changes (no diagnostic IDs, severities, messages, or code fixes changed).
Changes
Reliability
BindConfiguration(...)registration parsing now handles error-tolerant operations defensively and resolves theconfigSectionPathargument with a guarded named lookup instead of an unchecked cast and.First()(ConfigContrabandAnalyzer.Registration.cs).CI honesty
ContinuousIntegrationBuild=true, so the .NET analyzers actually run asDirectory.Build.propsalways claimed. Triaged every resulting warning (fixed CA1305/CA1822/CA1826/CA1859/CA1861 in src, enabledGenerateDocumentationFileand corrected the latent CS1734/CS0419 it surfaced, suppressed CA1707/IDE0005 for idiomatic test naming). CI-mode builds are now genuinely zero-warning.Performance
OptionsTypeMetadataper compilation via aConditionalWeakTable-backed cache (newOptionsMetadataCache.cs), so one registration builds the same options graph once across the validation, nested-validation, and unknown-key passes. Cache is collected with its compilation; thread-safe underEnableConcurrentExecution.HasUnsafeConfigurationUseprovenance scan from seven full block traversals to a single document-order walk (ConfigContrabandAnalyzer.ReceiverSemantics.cs).Robustness
System.Text.Json) so a pathologically nested additional file is treated as malformed instead of causing an uncatchableStackOverflowException(ConfigurationModel.cs).Cleanup
ExecutionScope.ShouldDescendguard.Showcase
appsettings.schema.json.Release
Verification