fix(accounts): return empty results when user search has no matches #21043
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 238 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.328
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #21043"
general
weight: 0.35
miketheman
- IMO this is returning a "list of something" (in this case, accounts), so returning a 404 didn't quite fit.
- There is precedent in warehouse for returning a 200 instead of 404 when a search has no results, eg:
/search/?q=thisdoesnotexist@.Verified manually
<table>
<tr>
<th colspan="2">Setup: typing "alc" shows a bunch of results</th>
</tr>
<tr>
<td colspan="2" align="center"><img width="500" height="274" alt="image" src="https://github.com/user-attachments/assets/ef5b6973-d85f-4598-8c10-1fd8818b5c50" /></td>
</tr>
<tr>
<th>Before (previous results, 404 from <code>/accounts/search/</code>, also console errors)</th>
<th>After (no results, 200 from <code>/accounts/search/</code>, no console errors)</th>
</tr>
<tr>
<th colspan="2">Continue typing "alc@"</th>
</tr>
<tr>
<td><img width="500" height="256" alt="image" src="https://github.com/user-attachments/assets/4e59d509-b52d-4f8e-9609-496a793d332c" /></td>
<td><img width="500" height="366" alt="image" src="https://github.com/user-attachments/assets/63a80f2b-2fcd-4316-8c7f-a8ce54fdacae" /></td>
</tr>
<tr>
<th colspan="2">Continue typing "alcc"</th>
</tr>
<tr>
<td><img width="500" height="306" alt="image" src="https://github.com/user-attachments/assets/fcc96ddb-a411-41ca-891c-4ffeed3bc22e" /></td>
<td><img width="500" height="324" alt="image" src="https://github.com/user-attachments/assets/a06c3ae0-6dfc-4fc7-ac4f-36ea7e155499" /></td>
</tr>
</table>