[PM-39164] Gate Access Intelligence report reads on new-architecture flag#7825
[PM-39164] Gate Access Intelligence report reads on new-architecture flag#7825Banrion wants to merge 1 commit into
Conversation
…ture flag Re-point GetLatestOrganizationReportAsync and DownloadReportFileAsync from the file-storage flag (AccessIntelligenceVersion2) to AccessIntelligenceNewArchitecture so file-backed reports still load after file storage is toggled off. Write paths remain file-flag-gated.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the re-pointing of the Access Intelligence report read path from the file-storage flag ( Code Review DetailsNo findings. The change is well-scoped, the flag re-pointing matches the PR objective, and the test updates accurately mirror the controller's new gating logic. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7825 +/- ##
==========================================
- Coverage 65.72% 61.24% -4.49%
==========================================
Files 2210 2210
Lines 97820 97820
Branches 8832 8832
==========================================
- Hits 64296 59905 -4391
- Misses 31298 35782 +4484
+ Partials 2226 2133 -93 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



🎟️ Tracking
PM-39164
Related Client PR: bitwarden/clients#21315
📔 Objective
This re-points the Access Intelligence report read path from the file-storage flag (
AccessIntelligenceVersion2) to the new-architecture flag (AccessIntelligenceNewArchitecture). The file-storage flag should govern only the write format, so keying reads off it meant a report written as a file no longer loaded once file storage was toggled off, the read fell back to inline-only logic and returned a stale or broken "last report." This change fixes that so a file-backed report still loads in any valid flag state, while write-format selection remains file-flag-gated.Changes
GetLatestOrganizationReportAsync(read branch + validated-file download-URL block) onAccessIntelligenceNewArchitectureinstead of the file-storage flag.DownloadReportFileAsyncvalidated-file check onAccessIntelligenceNewArchitecture.GetLatestandDownloadReportFileflag-on/flag-off cases inOrganizationReportsControllerTeststo exercise the new-architecture flag.