Skip to content

android.fallback: Detox adb reverse teardown flake fails a passing scenario and is misclassified as a contract failure #100

Description

@thiagobrez

What happened

On the push run for f3b11c7 (run 34016165910), android.fallback / RN 0.85 failed on the scoped-drop case. The retained artifact shows the scenario reached and recorded its exact public contract outcome correctly:

"scoped-drop": {
  "labels": [
    "Current order: blue, green, yellow",
    "Current selection: blue, yellow",
    "Last committed event: {\"itemIds\":[\"blue\",\"yellow\"],\"destinationId\":\"accepting\"}",
    "Callback count: 1"
  ]
}

The jest failure was Detox's own teardown, not the contract:

Command failed: adb -s emulator-5554 reverse --remove tcp:37184
adb: error: listener 'tcp:37184' not found

(tcp:37184 is the per-case Detox session port from run-device-contract-isolated.mjs: 20000 + (pid % 1000) * 20 + scenarioIndex.)

The identical nightly run 90 minutes later (34020531106) passed android.fallback, so this is a transient Detox/adb race, not a regression.

Why it still failed the job

run-device-contract-isolated.mjs classifies a failed case as infrastructure (exit 75, eligible for the retained whole-job retry) only when the outcome file lacks the scenario entry. Here the outcome was recorded before the teardown threw, so the failure was classified contract (exit 1) and the retained retry never ran — an infrastructure error escalated straight to a red main pipeline.

Possible directions

  • Treat a nonzero Detox exit whose recorded outcome matches the expected contract as retry-eligible (or as a pass with a logged teardown warning) instead of a terminal contract failure.
  • Or make the classifier recognize known Detox teardown signatures (adb reverse listener removal) as infrastructure.

Separate from the deterministic iOS Pods-cache failure fixed in #98 / PR #99.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions