Fix live grouped chains role-trust batching#106
Merged
Conversation
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.
What changed
chainsartifact-first fallback and restored fresh live runs as the default execution path$batchsupport in the AzureFox Graph clientrole-trustsfast-mode collection to batch seeded application lookups, application edge collection, and service-principal edge collection, while keeping serial fallback for non-batch callersrole-trustspath and for live groupeddeployment-pathandescalation-pathoutput emissionWhy
Admin grouped
chains deployment-pathandchains escalation-pathwere stalling in live environments because the Pythonrole-trustscollector still did a large serial Graph callback fanout. The earlier artifact-backed workaround helped reruns, but it did not fix a fresh live environment. This PR fixes the live root cause instead of assuming prior data exists.Impact
chains deployment-pathruns no longer depend on nearby static artifactschains escalation-pathruns no longer depend on nearby static artifactsrole-trustskeeps the same operator-facing contract, but reaches it with substantially fewer Graph round-trips in the admin pathValidation
python3 -m ruff check src/azurefox/cli.py src/azurefox/clients/graph.py src/azurefox/collectors/provider.py tests/test_collectors.py tests/test_cli_smoke.pyPYTHONPATH=src pytest -q tests/test_collectors.py -k 'role_trusts' tests/test_cli_smoke.py -k 'chains_family_live_provider_writes_outputs_with_batched_role_trusts or chains_family_keeps_emitting_when_supporting_collector_fails or chains_deployment_path_json or chains_escalation_path_json'420 passed, 2 deselected