perf(tui): count duplicate names once during resource completion #4191
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 179 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.311
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4191"
general
weight: 0.35
openrig-review
What a user gets
Pressing Tab after
agentscanned the entire fleet once per name to decide which names needed a host/rig/pod qualifier. Count the names in one pass and reuse the counts when building the choices.How you verified it
On Node 22, completing
agent seat-against a demo snapshot with 5,000 generated seats took 85 ms on main and 1.8 ms with this change (median of seven calls after a warmup). The duplicate-seat test now mixes a shared name and a unique name and dispatches the returned choices.At
45fdb9aa1,vitest run --project @openrig/tui: 1407 passed, 9 skipped. The workspace build and typecheck passed with the five changes together. I did not run the fullnpm testlocally.Anything you were unsure about
The timings are for the named operation on a local fixture.
CHANGELOG.mdedit<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Resource completion now distinguishes duplicate names across hosts while keeping unique names concise.
* Improved coverage for completion results when hosts contain matching rigs and pods.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->