From 2fe1aa9f9c1eb92355fcc8e846d8161823fc68f0 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Fri, 21 Aug 2026 21:12:43 -0500 Subject: [PATCH] Stop the memory probe from being able to fail the run The probe line runs before the tests and its exit status is grep's, so a run where adb returned nothing would have exited 1 on the first line and reded the job before Gradle started -- on all five levels, four of them currently green. The action passes no ignoreReturnCode, so exec throws straight into setFailed. A diagnostic must never be the thing that turns a run red. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/status_check.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/status_check.yml b/.github/workflows/status_check.yml index da75647..099267f 100644 --- a/.github/workflows/status_check.yml +++ b/.github/workflows/status_check.yml @@ -197,9 +197,12 @@ jobs: # the result; the rest runs only on failure, so a green run is unchanged. # # Each line here is a separate `sh -c` -- the action splits the script on - # newlines -- so the failure handler has to stay on one line. + # newlines -- so the failure handler has to stay on one line. The action does + # not pass ignoreReturnCode, so a non-zero line fails the job outright: the + # probe ends in `|| true` because a grep that matches nothing exits 1, and a + # diagnostic must never be the thing that turns a run red. script: | - adb shell cat /proc/meminfo | grep -E 'MemTotal|MemAvailable|SwapTotal' + adb shell cat /proc/meminfo | grep -E 'MemTotal|MemAvailable|SwapTotal' || true ./gradlew :app:connectedDebugAndroidTest -PabiFilters=x86_64 || { echo "=== guest memory at failure ==="; adb shell cat /proc/meminfo | grep -E 'MemTotal|MemAvailable|SwapTotal'; echo "=== kernel OOM kills ==="; adb shell dmesg | grep -iE 'oom|lowmemory|killed process' | tail -20; echo "=== native crashes ==="; adb logcat -d -b crash | tail -40; exit 1; } - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1