Skip to content

Improve evaluate performance, throttling resilience, and add build to… - #1

Merged
RobinpZA merged 1 commit into
mainfrom
enhancements/perf-and-build
Jun 12, 2026
Merged

Improve evaluate performance, throttling resilience, and add build to…#1
RobinpZA merged 1 commit into
mainfrom
enhancements/perf-and-build

Conversation

@RobinpZA

Copy link
Copy Markdown
Owner

…oling

Performance and correctness:

  • Cache phishing-resistant auth-strength classification at module scope via Get-PhishingResistantStrengthId so comprehensive runs make one Graph call instead of one per scenario
  • Replace O(n^2) array += accumulation in Get-CATenantUsers and Get-CAPolicy with List[object].AddRange, and trim MaxUsers in place
  • Honor the server Retry-After header with a bounded retry loop on 429 so throttled evaluations are retried rather than recorded as permanent errors (new Get-RetryAfterSeconds helper, -MaxThrottleRetries parameter)
  • Fix verbose paging log that fired almost every page instead of every ~1000
  • Rename $pId to $policyId to avoid the readonly automatic variable

Tooling and conventions:

  • Add build.ps1 (Analyze/Test/Build/CI/Clean) and PSScriptAnalyzerSettings.psd1
  • Add GitHub Actions CI workflow running Analyze -> Test -> Build
  • Define module-scope EvaluateUri constant for the beta endpoint
  • Align manifest CompanyName with workspace convention
  • Add Pester coverage for the two new helpers; document build flow in README

…oling

Performance and correctness:
- Cache phishing-resistant auth-strength classification at module scope via
  Get-PhishingResistantStrengthId so comprehensive runs make one Graph call
  instead of one per scenario
- Replace O(n^2) array += accumulation in Get-CATenantUsers and Get-CAPolicy
  with List[object].AddRange, and trim MaxUsers in place
- Honor the server Retry-After header with a bounded retry loop on 429 so
  throttled evaluations are retried rather than recorded as permanent errors
  (new Get-RetryAfterSeconds helper, -MaxThrottleRetries parameter)
- Fix verbose paging log that fired almost every page instead of every ~1000
- Rename $pId to $policyId to avoid the readonly automatic variable

Tooling and conventions:
- Add build.ps1 (Analyze/Test/Build/CI/Clean) and PSScriptAnalyzerSettings.psd1
- Add GitHub Actions CI workflow running Analyze -> Test -> Build
- Define module-scope EvaluateUri constant for the beta endpoint
- Align manifest CompanyName with workspace convention
- Add Pester coverage for the two new helpers; document build flow in README

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@RobinpZA
RobinpZA merged commit cfce5d0 into main Jun 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant