fix: contain managed ADB transport to its lease target - #2311
Conversation
Size Report
Startup median (7 runs, lower is better):
|
Code reviewThe containment model reads well: 1.
|
|
Sentinel review at e5f3c7c: Independent sentinel review found no confirmed source defect in the supported managed route. Correction to the earlier review: explicit -P causes ADB to ignore ADB_SERVER_SOCKET (AOSP client/commandline.cpp, https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/client/commandline.cpp). The socket-escape claim is therefore not valid here. Global server verbs are not serial-scoped, but no supported managed operation at this head supplies arbitrary host-ADB argv; lifecycle paths are withheld/delegated, so additional verb filtering is hardening rather than a demonstrated shipped escape. Readiness remains blocked: iOS bridge preparation timed out probing the SDK (xcrun, 10s), prerequisite stack order remains, and the PR explicitly lacks live allocator-owned emulator evidence. Fixtures are not live acceptance. |
e5f3c7c to
a6a9459
Compare
|
Addressed both requests in
As the sentinel correction notes, explicit The exact-head Live allocator-owned emulator verification still depends on the later managed admission/publication path. No merge-readiness claim. The latest-main restack is rooted at |
a6a9459 to
65bcfb1
Compare
|
Sentinel at 65bcfb1: no actionable source findings after coordinator and independent Terra/high review. Managed ADB pins the lease serial/private port and child server environment, rejects foreign selectors/resolvers and blocks server administration; the negative cases would fail against the base implementation. Exact-head CI is green. Still evidence-pending, not merge-ready: allocator-owned managed-emulator proof through the activated admission/publication route is absent. Provide live evidence that operations stay on the leased transport and cannot escape to the host default server or another device. The prerequisite #2308 also has failing iOS CI. No readiness label, fixes or merge. |
|
Fresh review pass at
Independent fresh read-only review agrees: no actionable source findings; the activated allocation/admission/publication path is the remaining live-proof prerequisite. No code changes, new capabilities, or readiness claim. The existing exact-head local gate evidence remains applicable; no redundant push or gate rerun was needed. #2312 will be reviewed next on this unchanged published parent. Nothing merged. |
Summary
Pin managed Android ADB commands and background spawners to the lease's serial and private localhost server. Foreign serials, ports, global selectors, and server-mode overrides now fail before native dispatch; unqualified commands cannot inherit another target.
ADR 0021 prerequisite for reviewed managed automation, based on #2308. Child sockets are explicitly cleared and server administration is denied as defensive hardening. Ordinary and provider transports retain their existing behavior. Scope: 5 files, 268 gross lines.
Validation
Tested commit:
65bcfb1696037872ff2159a19097f18153ea2731.The exact-head
pnpm check:affected --runpassed, including 3,984 tests across 521 files, build, typecheck, lint, layering and Fallow.Independent adversarial review found no concrete issues. Native ADB fixtures cover execution, background spawning, preconstructed executors, concurrent private servers, inherited environment, and parser escape attempts; regression tests were observed red before the fixes.
Managed request admission and publication remain unimplemented in this layer. Live verification requires that later path and an allocator-owned emulator; fixture evidence does not establish merge readiness. GitHub remains authoritative for native, provider, and coverage lanes.
Docs and skills are unchanged because this is an internal transport fix.