Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(t1): exclude the CI-only stress suite by name, and print the log when a suite fails
Alfredo Lopezf47be8ca212c
diff --git a/scripts/e2e/minikube-real-postgres.sh b/scripts/e2e/minikube-real-postgres.shindex 796628bbe..ca45eaa26 100755--- a/scripts/e2e/minikube-real-postgres.sh+++ b/scripts/e2e/minikube-real-postgres.sh@@ -280,16 +280,43 @@ path.write_text(text)PY}+# Stress suites open hundreds of concurrent connections against a single+# throwaway Docker PostgreSQL. CI's service containers handle that load;+# local Docker networking on macOS resets some connections (ECONNRESET)+# before the rate limiter or the test assertions can run. They stay in CI+# (ci-public.yml lists each one) and are excluded from the local T1 lane only.+# The list names files, not a filename pattern: a pattern would also hide a+# future suite the reporter's exact-file check could never notice was missing.+LOCAL_T1_EXCLUDED_REAL_PG_SUITES=(+ 'control-api/test/routes.externalGfsRateLimitStress.realPostgres.integration.test.ts'+)+list_real_pg_files() {- local package="$1"- # Stress suites open hundreds of concurrent connections against a single- # throwaway Docker PostgreSQL. CI's service containers handle that load;- # local Docker networking on macOS resets some connections (ECONNRESET)- # before the rate limiter or the test assertions can run. They stay in CI- # and are excluded from the local T1 lane only.- find "$PROJECT_DIR/$package" -type f -name '*realPostgres*.test.ts' \- ! -name 'realPostgres.requirement.ts' \- ! -name '*Stress.realPostgres*' -print | sort+ local package="$1" path suite excluded+ while IFS= read -r path; do+ excluded=false+ for suite in "${LOCAL_T1_EXCLUDED_REAL_PG_SUITES[@]}"; do+ if [ "$path" = "$PROJECT_DIR/$suite" ]; then+ excluded=true+ fi+ done+ if [ "$excluded" = false ]; then+ printf '%s\n' "$path"+ fi+ done < <(find "$PROJECT_DIR/$package" -type f -name '*realPostgres*.test.ts' \+ ! -name 'realPostgres.requirement.ts' -print | sort)+}++# A listed suite that was renamed or deleted must fail the lane: an exclusion+# that matches nothing would go on looking like a deliberate CI-only carve-out.+require_excluded_real_pg_suites() {+ local suite+ for suite in "${LOCAL_T1_EXCLUDED_REAL_PG_SUITES[@]}"; do+ [ -f "$PROJECT_DIR/$suite" ] || {+ T1_NEXT_COMMAND='update LOCAL_T1_EXCLUDED_REAL_PG_SUITES in scripts/e2e/minikube-real-postgres.sh to the current suite path, then re-run T1'+ die_t1 ZERO_TESTS_EXECUTED "excluded CI-only suite no longer exists: $suite"+ }+ done}is_isolated_control_api_file() {@@ -479,6 +506,8 @@ PYif [ "$success" -ne 1 ] || [ "$total_suites" -le 0 ] || \[ "$passed_suites" -ne "$total_suites" ] || [ "$failed_suites" -ne 0 ] || \[ "$failed_tests" -ne 0 ]; then+ cat "$log_file" >&2 || true+ cat "$json_file" >&2 || trueT1_NEXT_COMMAND='repair the failed or incomplete Real PostgreSQL lane, then re-run T1'die_t1 REAL_PG_SUITE_FAILED "Real PostgreSQL reporter did not pass every suite in $package ($lane)"fi@@ -587,6 +616,7 @@ user, password, port = sys.stdin.buffer.read().split(b"\0")[:3]print("postgresql://" + quote(user.decode(), safe="") + ":" + quote(password.decode(), safe="") + "@127.0.0.1:" + port.decode() + "/postgres", end="")')"require_isolated_control_api_files+ require_excluded_real_pg_suitesstart_isolated_postgresT1_GFS_RESTORE_REQUIRED=truerun_suite control-api isolated "$ISOLATED_DSN"diff --git a/scripts/tests/test-minikube-t2-contract.sh b/scripts/tests/test-minikube-t2-contract.shindex 24cb4921e..3bb55635e 100755--- a/scripts/tests/test-minikube-t2-contract.sh+++ b/scripts/tests/test-minikube-t2-contract.sh@@ -587,6 +587,62 @@ if grep -Fq "$redaction_secret" "$redaction_file"; thenexit 1fi+# The local T1 lane skips a named list of CI-only suites. It must remove+# exactly those files, never a filename pattern: a future *Stress* suite stays+# in the lane, and a listed suite that no longer exists fails the lane instead+# of leaving an exclusion that matches nothing.+t1_excl_root="$tmp/t1-excluded-suites"+t1_excl_name='routes.externalGfsRateLimitStress.realPostgres.integration.test.ts'+mkdir -p "$t1_excl_root/control-api/test"+for name in keep.realPostgres.integration.test.ts other.newStress.realPostgres.integration.test.ts "$t1_excl_name"; do+ printf 'fixture\n' >"$t1_excl_root/control-api/test/$name"+done+t1_excl_listing="$(bash -c '+ set -euo pipefail+ source "$1"+ PROJECT_DIR="$2"+ list_real_pg_files control-api+' bash "$T1" "$t1_excl_root")"+if ! grep -Fq 'keep.realPostgres.integration.test.ts' <<<"$t1_excl_listing"; then+ echo 'FAIL: the local T1 listing dropped an ordinary Real PostgreSQL suite' >&2+ exit 1+fi+if ! grep -Fq 'other.newStress.realPostgres.integration.test.ts' <<<"$t1_excl_listing"; then+ echo 'FAIL: the local T1 exclusion is a filename pattern and hid an unlisted *Stress* suite' >&2+ exit 1+fi+if grep -Fq "$t1_excl_name" <<<"$t1_excl_listing"; then+ echo 'FAIL: the local T1 listing still includes the excluded CI-only stress suite' >&2+ exit 1+fi+if ! T1_EXCL_ROOT="$t1_excl_root" bash -c '+ set -euo pipefail+ source "$1"+ PROJECT_DIR="$T1_EXCL_ROOT"+ require_excluded_real_pg_suites+' bash "$T1" 2>"$tmp/t1-excl-present.err"; then+ echo 'FAIL: the excluded-suite check refused a tree where the listed suite exists' >&2+ cat "$tmp/t1-excl-present.err" >&2+ exit 1+fi+rm "$t1_excl_root/control-api/test/$t1_excl_name"+if T1_EXCL_ROOT="$t1_excl_root" bash -c '+ set -euo pipefail+ source "$1"+ PROJECT_DIR="$T1_EXCL_ROOT"+ T1_TMP_DIR="$(mktemp -d)"+ trap '\''rm -rf "$T1_TMP_DIR"'\'' EXIT+ require_excluded_real_pg_suites+' bash "$T1" 2>"$tmp/t1-excl-missing.err"; then+ echo 'FAIL: the excluded-suite check accepted a listed suite that no longer exists' >&2+ exit 1+fi+if ! grep -Fq "$t1_excl_name" "$tmp/t1-excl-missing.err"; then+ echo 'FAIL: the excluded-suite refusal does not name the missing suite' >&2+ cat "$tmp/t1-excl-missing.err" >&2+ exit 1+fi+# A complete green reporter is not sufficient evidence when npm/Vitest exits# non-zero during teardown, worker shutdown, OOM handling, or signal cleanup.# Exercise the adjudicator with representative failure statuses without Docker