Context
Surfaced during the review for #685.
Location
Two near-identical fan-outs against the Azure Identity endpoint:
Both do:
await Promise.all(tenants.map(async (tenant) => isSignedIn(tenant.tenantId, tenant.account)));
The shape of the problem
For most users (1-10 tenants), this is fine. For corporate users with many tenants, this is an unbounded parallel burst against Microsoft Entra. It is not currently a known cause of failures, but it is the same anti-pattern that bit us in #685 with estimateDocumentCount.
Proposal
Apply the shared ConcurrencyLimiter from src/utils/concurrencyLimiter.ts (added in #685). Suggested starting point: concurrency: 5, no inter-batch delay (this is a foreground UX path, latency matters). Both call sites should share a single limiter so the total parallelism is bounded across the wizard.
Acceptance criteria
- Both call sites routed through a shared limiter.
- Behavior unchanged for users with a small tenant count.
- No regression in the account-selection / subscription-filtering wizards.
References
Context
Surfaced during the review for #685.
Location
Two near-identical fan-outs against the Azure Identity endpoint:
Both do:
The shape of the problem
For most users (1-10 tenants), this is fine. For corporate users with many tenants, this is an unbounded parallel burst against Microsoft Entra. It is not currently a known cause of failures, but it is the same anti-pattern that bit us in #685 with
estimateDocumentCount.Proposal
Apply the shared
ConcurrencyLimiterfromsrc/utils/concurrencyLimiter.ts(added in #685). Suggested starting point:concurrency: 5, no inter-batch delay (this is a foreground UX path, latency matters). Both call sites should share a single limiter so the total parallelism is bounded across the wizard.Acceptance criteria
References