Skip to content

test(android): report USB state when the first order-event watch does not arrive - #1047

Merged
egerev merged 1 commit into
mainfrom
bb/usb-initial-watch-diagnosis-thr_ngb3g9karf
Nov 18, 2026
Merged

egerev merged 1 commit into
mainfrom
bb/usb-initial-watch-diagnosis-thr_ngb3g9karf

Conversation

@egerev

@egerev egerev commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

PR #1043's queue run 44295461478 (group 80ac4eb, Android tree = c06f8b5), job 134771439982, failed test_foreign_forward_is_never_adopted_removed_or_used_to_revive_collection[watch] at the first wait in first_life(rig, 'watch'): until(lambda: rig.phone.packages), line 199. After the only request finished, the phone received no package watch within 5 s. This happened before any foreign-forward setup and is separate from the exact-row waits fixed in #1042/#1045.

Cause: UNKNOWN. A healthy trace shows the request's single USB entry binding during the run. The first watch is sent only after retention. Three bounded experiments forced specific interleavings through the real lifecycle with fake ADB and listener, and all three passed:

  • First watch connection held until the run is fully released (gone from runs, device lock free): admission attached the retained handle and the watch was sent.
  • No USB refresh while the run is live: acquisition came from the retained handle after release, and the watch was sent.
  • First connection held for a running-run/completed-turn window: the window never occurred; the run left running before the session turn changed.

Not distinguished without CI state: the run ending in a state other than succeeded, retention being refused, the supervision loop stopping, or an earlier connector end. No blind repeats.

Change (this test file only). When the initial-watch wait in first_life(..., 'watch') times out, the message now carries bounded synthetic state:

  • the request's view state, usb_source and native_supervision;
  • forward rows, USB entries, ended requests, retained handles, the retention refusal and runs, with ids reduced to "this request";
  • whether the supervision loop is running;
  • fake ADB call counts and the watch count.

The wait, its deadline, every assertion, test names and parameters, and the foreign-forward guards are unchanged.

Validation. A forced no-refresh run shows the message. In that case: run succeeded, handle retained, USB source unavailable/no_live_authority, no entries or forwards, loop running. The 58 USB tests pass and Ruff is clean. Source and synthetic only.

Spec: ANYM-997
Change path: AUTO (test failure observability; no product code)
Review record: none (owner 11-11: no reviews)

🤖 Generated with Claude Code

… not arrive

PR #1043 queue run 44295461478 timed out at first_life(rig, 'watch')'s first wait
for a phone package watch. Three bounded experiments through the real
lifecycle did not reproduce it, so its cause is unknown. The wait's timeout
message now carries bounded synthetic state: the request's view, USB entries,
forward rows, ended requests, retained handles, retention refusal, runs, the
supervision loop and fake ADB counts. No assertion, deadline or name changes.

Spec: ANYM-997

Signed-off-by: egerev <egor@gosync.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@egerev egerev added the ship Small-fix rule: orchestrator Diff read at head; merge-keeper may enqueue label Nov 18, 2026
@egerev
egerev added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 5a5b931 Nov 18, 2026
31 checks passed
@egerev
egerev deleted the bb/usb-initial-watch-diagnosis-thr_ngb3g9karf branch November 18, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship Small-fix rule: orchestrator Diff read at head; merge-keeper may enqueue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant