← Back to Pull requests

feat(driver): support the adbHost capability #155

Closed
unknown closed this pull request without merging on Nov 23, 2026 16:10 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 03:29 UTC
Author

Addresses appium/appium#9376.

Android sessions can select the ADB server with appium:adbHost. The deprecated appium:remoteAdbHost continues to work and logs a warning when it has a nonempty value. A nonempty adbHost takes precedence when both names are supplied. The session response preserves the capabilities the client sent, and the shared driver uses getAdbHost() for its ADB factory and exposes the same resolver to downstream drivers.

I used OpenAI Codex to implement and test this change. The TypeScript build, repository lint and formatting checks, and all 383 shared Android driver unit tests passed. Eight local checks exercised the real Appium ADB wrapper against a synthetic executable, verifying the selected host, arguments, runtime options and returned capabilities for defaults, aliases, conflicting and empty values, and initial options. Validation was device-free.

Shared host follow-up

The resolver now works when a subclass calls BaseDriver.createSession directly. It leaves session capabilities and runtime options intact. An explicitly empty host capability falls back to the original configured driver options when no nonempty host is available in the session or resolved options. The tests cover both capability names and verify that the ADB factory and accessor agree.

For remote ADB sessions, keep using appium:remoteAdbHost with UiAutomator2 and Espresso until the installed driver uses getAdbHost() for its proxy. The UiAutomator2 and Espresso dependency checks in this PR exercise the published drivers to the synthetic device-discovery boundary and confirm the shared resolution across 12 cases. The TypeScript build, all 387 shared-driver unit tests, repository lint, and formatting passed on this revision.

Diff: 221 lines (+165 / -56) across 2 files Reviewer: carrerasdarren-cell Review duration: 5080m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 221 lines diff across 2 files
0.42
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
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
Diff Size diff_size
0.323
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #155"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
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: 41.8% (MEDIUM) · Higher = larger blast radius
41.8%
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: 56.8% · Lower = rushed or shallow review
56.8%
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: 18.1% · Safe to merge
18.1%