Repository navigation
Disk, Key Vault, storage and SQL Managed Instance fetchers: an unread list gives null counts, not 0 - #366
Merged
Conversation
… null counts, not 0 When a list could not be read (403, throttling, timeout), every total, count and percentage built from it is now null instead of 0. Sub-lists a count is built from (diagnostic settings, containers, replication status, protectors, databases, failover groups) null their counts the same way. The runs still fail as partial_failure. Descriptions say so; versions bumped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e counts; tests for empty lists Each account records whether its blob and file service properties were collected, not supported or failed; a failed read nulls the counts built from it. Key Vault total_access_policies is documented as null when the vault list is unread. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bruceweygandt
approved these changes
Nov 16, 2026
bruceweygandt
left a comment
Contributor
There was a problem hiding this comment.
Approved. Each unread list, and each failed per-item read, now gives null counts, not 0; a read empty list still gives 0. Text, versions and CHANGELOG match the code, and each failed read has a test.
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.
Fixes FDE-1199
Part of FDE-1190
Summary
When a fetcher cannot read a list (403, throttling, timeout), every total, count and percentage built from it is now null, not 0. The run still fails as
partial_failure. Same rule as #335, #336 and #339.azure_disk_encryption_status0.3.0: an unread disk list nulls every count and percentage,total_disksincluded (it read 0).azure_key_vault_configuration0.5.0: an unread vault list nulls every count (fix(azure): resource exclusions report no unmatched patterns when a resource list was not read #316 had already nulled the in-scope and excluded counts). Unread diagnostic settings for any vault null the diagnostic-settings and audit-logging counts andaudit_logging_percentage;vaults_audit_logging_unknownstill says how many.azure_storage_encryption_status0.5.0: an unread account list nulls every count. An unread container list for any account nulls the container counts,in_scope_containersandexcluded_containers. An unread blob or file service properties read nullsblob_versioning_accounts,container_soft_delete_accountsandshare_soft_delete_accounts(each account now recordsblob_properties_statusandfile_service_properties_status: collected, not_supported or failed). An unread replication status nullsgeo_replication_live_accountsandgeo_failover_ready_accounts.azure_sql_managed_instance_encryption0.4.0: an unread instance list nulls every count,total_managed_instancesandin_scope_managed_instancesincluded. Unread protectors null the key counts; unread database lists null the TDE counts.azure_sql_managed_instance_backups0.5.0: an unread instance list nulls every instance, database and failover group count. Unread database lists null the retention counts; unknown failover group membership nullsinstances_in_failover_group.The shared
list_instanceshelper takes an optionalunreadvalue so the two SQL MI fetchers can tell an unread list from no instances; its default is unchanged, soazure_sql_managed_instance_configurationis unaffected.The plain-text evidence set descriptions say each count is null when its list cannot be read. Minor version bumps, since the values change.
Tests
tests/test_azure_unread_lists_give_null_counts_data.py: each test refuses the top-level list (and each sub-list a count is built from) and asserts null for every count; the summary-documented checks still pass. All 12 refusal tests fail against the old fetchers. Ran the changed fetchers' tests plus the contract tests (1714 passed); no full suite.Validator check
No validator on
mainreads these evidence sets. Onadded-validators, the ones that read a changed summary field areazure_kv_network_fields_present(total_key_vaults) andstorage_accounts_all_geo_redundant(total_storage_accounts). Both already fail on an unread list (partial_failuretrue, and the total must be above 0); with null the regex no longer matches, which fails the same rule. Verdict unchanged. The other Key Vault, storage and SQL MI validators read per-resource fields, which this change leaves as they were.🤖 Generated with Claude Code