Skip to content

Distinguish ancestor OOM-kill from genuine test failure in merge-to-integration.sh - #131

Open
laird wants to merge 1 commit into
masterfrom
fix/merge-to-integration-oom-ancestor
Open

Distinguish ancestor OOM-kill from genuine test failure in merge-to-integration.sh#131
laird wants to merge 1 commit into
masterfrom
fix/merge-to-integration-oom-ancestor

Conversation

@laird

@laird laird commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Problem

scripts/run-changed-tests-gate.sh in the athena2 app repo (fixed by its own
#1250/#1534) already distinguishes a SIGKILL'd vitest subshell from a genuine
test failure. That detection lives inside the subshell that owns the log
file — it cannot fire if the kernel OOM-killer instead hits an ancestor:
merge-to-integration.sh's own bash -c "$TEST_CMD" invocation. In that
case the process just returns a nonzero/signal exit status and this script
reported the generic "tests fail after integrating" message, indistinguishable
from a real regression.

Surfaced while triaging athena2 issue ey-org/athena2#1540 (1 of 6 observed
merge attempts died silently mid-run with no error message, consistent with
an ancestor OOM-kill).

Fix

Capture bash -c "$TEST_CMD"'s exit status explicitly instead of branching on
it directly, and treat an exit code >=128 (killed by signal) as an infra
kill — printing a distinct ::error:: message that says so, matching the
messaging style athena2 already uses for the subshell case. A genuine
(non-signal) test failure still gets the original generic message.

Testing

  • New tests/test_merge_to_integration_oom.sh: builds a real throwaway git
    repo and drives the script with a self-SIGKILLing --test-cmd, asserting
    the ancestor-kill message appears and the generic message does not (and
    the inverse for a genuine exit 1 failure).
  • bash tests/run-shell-suite.sh — 26/26 passing.
  • bash -n plugins/autocoder/scripts/*.sh && python3 -m py_compile plugins/autocoder/scripts/*.py — clean.

…re in merge-to-integration.sh

merge-to-integration.sh's own `bash -c "$TEST_CMD"` invocation can be an
ancestor of the vitest subshell that #1250 already knows how to detect an
OOM-kill for. When the kernel OOM-killer hits this ancestor process instead
of the subshell, the in-process detection never runs and the script reports
the generic "tests fail after integrating" message -- indistinguishable from
a real regression. Capture the exit code explicitly and treat >=128 (killed
by signal) as an infra kill, matching the messaging style already used by
athena2's scripts/run-changed-tests-gate.sh for the subshell case.

Cross-repo issue: ey-org/athena2#1540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant