Repository navigation
fix(android): propagate typed boot readiness and request cancellation - #4610
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
|
Validation receipt at
Native evidence remains at 57217458 / API 35: actual candidate polling observed9 offline failures and15 not-ready reads, then success in 24.98 s with 60 s / 10 s / 1 s limits unchanged. A separate later candidate HTTP Settings snapshot used matching helper 0.21.38-dev. Full HTTP cold-boot/native cancellation remains unproven. Native owner source is unchanged by the rebase. Owned resources were stopped; evidence and stopped AVD metadata retained. Historical helper/guard/WebOS/API36 causes remain unproven. Old failed/inconclusive receipts are retained. Earlier mutation experiments used the implementation checkout under a mistaken coordinator constraint; this was not a user override. Verified restorations and the later exact gate remain evidence with that process limitation. The original co-stamped timeout-arm-only mutant survivor is disclosed. Unclassified This PR remains blocked draft under #4512, with CI pending and no merge authorization. Publication does not close #4426 or #4512. See the linked issue's Current state for the full evidence and limits. |
Apex Sentinel · ✅ ApproveSince the last review: 0 new · 0 still open · 0 no longer raised No open findings. 1 finding below 💬 Talking to SentinelIn a finding's thread, reply with:
On this conversation, comment Earlier reviewsReview of
|
|
I reviewed 3c1cb56. The code looks sound from the diff, but the daemon readiness route has no live run yet, so it needs one before merge. CI is green (18 checks, 0 failing), but the draft platform replay lanes are skipped, so the Android replay route has no CI pass credit. No conflicts. This change is device-facing: device-ready.ts:29 now hands the request signal to the live adb getprop child and kills it on client cancel or deadline. It also changes which real adb outcomes retry. The only native run (57217458) polled waitForAndroidBoot directly and took a snapshot on an already-booted device. Nothing has reached the daemon readiness route on a booting device or cancelled it mid-poll, so cancellation and no-cache-publication are proven only with a mocked runCmd. A real adb child that ignores the abort, or a getprop that returns after the kill, would go unseen. Please run two checks at head on a booting Android emulator (sys.boot_completed=0, adb state device or offline) with no session, using Not blocking, so take or leave these: (1) emulator-lifecycle.ts:88 dropped allowFailure, so any non-zero getprop exit now throws and only adb-failure.ts-stamped retriable failures retry. adbd restarts during boot often print Could the design be smaller? Carry only the AbortSignal to readiness: ensureDeviceReady(device, services, signal) calls signal.throwIfAborted() before the cache read and after the wait, and EnsureLocalDeviceReady forwards it to waitForAndroidBoot and ensureBootedSimulator. That would drop PlatformRequestScope.checkDeadline, throwIfRequestExecutionDeadlineExceeded, the recovery-authority checkDeadline wrapper and the parent-chain and same-request deadline-set rework in request-cancel.ts. The deadline timer already aborts the signal, and a boot_completed=1 observation cached in the same tick as the cutoff is still true. The signal could come from the readiness owner (one new readinessScope field set from createPlatformRequestScope(req) where From the diff, the HTTP cancellation tests would fail on base, since base never passed a signal to waitForAndroidBoot, and the typed-retry tests would fail on base, since base treated offline as terminal and closed as retried. Does Before merge, this needs the live daemon-route run above and a maintainer answer on the checkDeadline and requestScope question, ideally before more fixture changes. |
|
The correction is implemented and locally validated at The live daemon route now has separate readiness-success and cancellation evidence at7f380954's production, which is byte-identical in Native identity is stronger than the unchanged entry wrapper hash: an independent pinned rebuild of7f380954 matched all529relative-import closure modules byte-for-byte. The daemon ran from that isolated rebuild. It was candidate0.21.38-dev; the T3-pinned client was installed0.21.36. Boots/shutdown used T3; owned config restored byte-identically, daemon/session/child cleanup verified. No shared adb server/foreign device was signaled. Limits: inventory excludes offline devices before route readiness; no route-level offline transition is claimed. The original5721direct boot-owner proof retains its own offline authority. Native request logs omit details.reason and SIGINT ends the client without a body: the structured native evidence is executor reason abort and SIGKILL, not a directly observed request_canceled response. The real-HTTP regression tests separately assert typed request_canceled; no behavior is inferred by matching message text. Delayed-timer cutoffs remain deterministic HTTP/recovery evidence. No other platform, second poller, provider or candidate-client coverage is implied. The earlier cache timeout-spawn counts are corrected to10/9/10 without changing the cache conclusion. Optional items: (1)untyped closed stays terminal under6876280645; (2)Apple/physical/app-lifecycle forwarding and(3)second Android poller remain explicit residuals; (4)unused Android classifier branches are removed after private-package/consumer checks; (5)relay retained because the parent link has no immediate subscription; (6)owner AppError reason is preserved, generic/reason-less abort remains typed request_canceled with cause; (7)readiness-only fixture plumbing removed without deleting semantic assertions. Exact The maintainer has now authorized readiness and closure of the historical diagnosis. #4512 is closed as not planned under #4512 (comment); #4426 (comment) removes the current7a3c draft block. Historical causes remain unproven and old failed/inconclusive receipts remain unchanged: no fixed-defect claim or gate weakening follows. Human comment6950247930 confirms code/live-evidence readiness. #4610 is now ready for review; ready-triggeredCIisnowcomplete:18SUCCESS/5historicalSKIPPED/1NEUTRAL,MERGEABLE/CLEAN, including newAndroid/iOS/macOS/Linux smoke successes. Sentinel approval remains. CubicNEUTRAL is a monthly review-line quota,0annotations, not a finding or approval; no retry/config change is selected. The round watch was stopped for human inbox handoff; the single published-only backstop continues. Optional shared abort-helper cleanup is nonblocking/deferred without an open placeholder. Earlier mutation-isolation/shared-metadata/validation-overlap disclosures remain, without contention or historical-cause inference. No merge is authorized. |
…sites Move createPlatformRequestScope from server to core and build the ordinary readiness scope where the admitted request is already in hand (sessionless snapshot/diff, selector get/is, wait, clipboard, keyboard/app-event, alert, settings). Drop the readiness-only requestScope pass-through fields from interaction, find, generic settle, snapshot routes, session open and the handler chain, and the fixture plumbing they required. Request-free admission/binding seams, SessionCommandInput's resource scope and recording recovery keep their explicit scopes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aborts waitForAndroidBoot now rethrows the abort reason when the owner aborted with a typed AppError (for example its deadline details) and wraps a reason-less abort as request_canceled with the reason as cause. Remove the classifyBootFailure Android branches: every caller passes ios, and the Android boot loop classifies with its own typed predicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cancellation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The code at 7a3c272 is ready, and the live receipts now cover the Android boot route that the draft-skipped lanes leave unchecked. Thanks for the fixes since the earlier review. CI shows 18 checks and none failing. The 5 draft-skipped native and replay lanes, including Android replay, give no pass credit for the device route, so the API 35 receipts carry it. The process-table cleanup, poll counts and REPLAY_DIVERGENCE body are from those receipts. The structured deadline response came through a replay step, so a plain There are no conflicts. The PR stays a draft until the maintainer records the #4512 readiness-policy decision and marks it ready. Not blocking, and fine to take or leave: |
|
The #4512 readiness decision is already recorded: closure of the historical diagnosis and current-head readiness. #4512 is closed and its hold on |
…nce (#4426) The second Android boot poller (waitForBoot in the readiness runtime behind ensureReady/bootTarget) still made retry/stop decisions from raw probe output: a terminal device_unauthorized or host refusal was polled until the deadline and then misreported as boot_timeout, and a probe-level exec timeout escaped untyped. It now stamps each observation through the existing typed evidence owner (androidAdbResultError/attachAdbFailureHint classification) and applies the same shared verdicts as the #4610 lifecycle poller (isTransientAndroidBootFailure/androidBootFailureReason, now exported from emulator-lifecycle.ts): transient not-ready/offline observations retry inside the existing deadline budget, terminal unauthorized/host-refusal/unclassified outcomes stay terminal with typed adbFailure/reason details, probe timeouts report ANDROID_BOOT_TIMEOUT, cancellation keeps the abort owner's typed reason, and deadline expiry keeps the boot_timeout typed outcome. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
* fix(android): route the readiness boot poller through typed adb evidence (#4426) The second Android boot poller (waitForBoot in the readiness runtime behind ensureReady/bootTarget) still made retry/stop decisions from raw probe output: a terminal device_unauthorized or host refusal was polled until the deadline and then misreported as boot_timeout, and a probe-level exec timeout escaped untyped. It now stamps each observation through the existing typed evidence owner (androidAdbResultError/attachAdbFailureHint classification) and applies the same shared verdicts as the #4610 lifecycle poller (isTransientAndroidBootFailure/androidBootFailureReason, now exported from emulator-lifecycle.ts): transient not-ready/offline observations retry inside the existing deadline budget, terminal unauthorized/host-refusal/unclassified outcomes stay terminal with typed adbFailure/reason details, probe timeouts report ANDROID_BOOT_TIMEOUT, cancellation keeps the abort owner's typed reason, and deadline expiry keeps the boot_timeout typed outcome. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai> * test(android): pin the typed boot-probe verdict with identical failure text * test(android): fold the typed boot-probe verdict pair into one regression --------- Co-authored-by: Mistral Vibe <vibe@mistral.ai>
Summary
Use typed Android boot observations and effective request cancellation/cutoffs for readiness. Refuse expired dispatch/cache publication and preserve recording recovery's own scope. Construct ordinary scopes in daemon core; retain explicit lower/resource/recovery scopes and the replay relay. Preserve typed abort reasons; remove unused Android classifier branches.
This coherent change touches 46 files. Unclassified
error: closedstays terminal; typed offline retains its retry exception. Refs #4426. #4512 is closed under the readiness Decision; this PR is ready for review.Validation
Head
7a3c272df8fb785c7155c427ee30c87757f0fb72: exactcheck:affected --run --base fdf595127a756647dd211dcdd19deeaa9968a468 --head 7a3c272df8fb785c7155c427ee30c87757f0fb72 --jsonpassed; exactCommit=true, checkoutChanged=false. Full selection (failOpen=true): 42 checks passed/25 skipped, 415 related, 20,197 unit passed/10 skipped; #4050 retained. Skips receive no pass credit.Independent source/smaller-design and live-child evidence reviews accepted production at
7f380954, byte-identical here. Settings-write controls:20passed; isolated write-only mutant:1failed/19passed; restore:20passed. Eleven earlier mutants retain7f attribution.API35 actual daemon-route readiness/SIGINT proof and replay deadline response ran with candidate0.21.38-dev/client0.21.36. The latter returned
REPLAY_DIVERGENCE,reason=daemon_request_timeout,causeReason=request_canceled,timeoutMs=2500, and killed an unpaused live adb child. Nodispatchedfield was emitted. Fresh polling was observed; after-abort cache-guard proof remains deterministic tests.Evidence and limits. CI:13success/5draftskips; Sentinel approves7a3c. Ready CI:18success/5historicalskips/1Cubicneutral(quota),no failures. Historical causes stay unproven. Do not merge.