fix(secret-approvals): recompute bulk review conflicts on retry #8881
All Vouch review confidence checks passed
Residual risk 0.39 = Change Risk (0.67) × (1 − Review Confidence (0.42)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.67 · 237 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.327
Sensitive Paths
sensitive_paths
0.067
Real PR Conversation Timeline
1 comments
"Review active on #8881"
general
weight: 0.35
shafiktanbir
Context
Fixes #8879 (follow-up to #8657).
In
BulkReviewChangeRequestsSheet.tsx,conflictsByIdpreviously depended on[requests, isLoadingDetails]whereisLoadingDetailsonly checkedisPending. When one of the selected change request detail queries failed initially (isPending: false, isError: true) and was retried viadetailQuery.refetch(), TanStack Query v5 keptisPending: falseduring and after the retry, soconflictsByIdnever recomputed once the retry succeeded. MemoizingdetailsByIdon[requests, detailQueries]and depending on[requests, detailsById]keepsconflictsByIdin sync whenever query data resolves.Also clears
failedRequestErrorsfor unselected page rows intogglePageSelection(SecretApprovalRequest.tsx) to matchtoggleRequestSelectionandclearSelection.Steps to verify the change
1. Select two open change requests that modify the same secret key in the same environment/folder and open
Review & Merge.2. Retry a failed detail query and verify the
Overlaps on <secret>conflict badge updates once the detail query resolves.3. Deselect the page via the header checkbox after a bulk action error and verify
failedRequestErrorsis cleared for those rows.Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).<img width="960" height="460" alt="Image" src="https://github.com/user-attachments/assets/44605434-7d90-4663-9d9a-66a9a2c3b9ba" />