← Back to Pull requests

frontend: AuthChooser: Ignore stale authentication results #8885

Open
unknown opened this pull request with 225 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 29, 2026 09:51 UTC
Author

Summary

An authentication check can complete after a mounted AuthChooser changes context and still redirect to its old destination or update stale configuration. Give each check its own cancellation state and ignore superseded results.

Manual reproduction (component-level)

Runnable browser demo and setup instructions. It uses the real AuthChooser, Redux, React Router and HTTP auth check with a local API simulator.

1. Check out this PR, install the frontend dependencies, and run the linked script in auth mode.
2. Open Original and click Start Alpha, switch to Beta, release Alpha then Beta. This starts Alpha's auth check, changes the mounted component's cluster/return destination to Beta, then releases Alpha's delayed success. It incorrectly finishes at /target/alpha.
3. Open PR version and repeat. The log shows both probes; Alpha's obsolete completion is ignored and the final route is /target/beta.

The demo deliberately keeps AuthChooser mounted. The full app's Layout/RouteSwitcher keys can remount it during navigation; a live-cluster reproduction through the full app has not been established. No real cluster/identity provider is used, and this does not demonstrate a token being accepted by the wrong cluster.

Validation

Regressions also cover stale failure, pending logout and StrictMode replay. All 19 CI checks and EasyCLA pass. Related to #5401; this does not resolve the whole tracker or change authentication-error classification.

PR #8885 revision range. Code, tests, reproducer and description used AI assistance.

Diff: 225 lines (+168 / -57) across 2 files Reviewer: illume Review duration: 2334m
All Vouch review confidence checks passed
Residual risk 0.34 = Change Risk (0.60) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 225 lines diff across 2 files
0.60
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
44%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.324
Sensitive Paths sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #8885"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 44.2% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 60.1% (MEDIUM) · Higher = larger blast radius
60.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 44.2% · Lower = rushed or shallow review
44.2%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 33.5% · Safe to merge
33.5%