Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(minikube): run the GFS real-Postgres suite in local T1 again
Alfredo Lopez7cd72ae06092
diff --git a/.cursor/skills/minikube-t0-t1-t2/reference.md b/.cursor/skills/minikube-t0-t1-t2/reference.mdindex 239ce976b..ece373a4e 100644--- a/.cursor/skills/minikube-t0-t1-t2/reference.md+++ b/.cursor/skills/minikube-t0-t1-t2/reference.md@@ -97,7 +97,7 @@ Companion to `SKILL.md`. Source of truth: `scripts/minikube/t2.sh`,| `ZERO_TESTS_EXECUTED` | A lane was configured off or executed nothing (including a required-but-missing Playwright journey). | Re-run with the lane enabled, or supply the required `T2_PLAYWRIGHT_COMMAND`. || `REAL_PG_REQUIRED_BUT_UNAVAILABLE` | The explicit context, isolated PostgreSQL, DSN route, or exact-head database precondition is unavailable. | Re-enter `make minikube-t2` or `make minikube-t2-real-postgres` on the owned profile. Do not `docker run`, restart Docker Desktop, or probe published ports. || `REAL_PG_REPORT_INCOMPLETE` | Vitest JSON did not prove the exact expected physical files. | Repair test selection/reporter output; do not accept suite counters as file identity. |-| `REAL_PG_SUITE_FAILED` | Reporter, test assertions, process exit, or parent result contract failed. | Iterate with standalone T1; once green, run full T2 for final exact-head lane evidence. If Darwin 27 reports `ECONNRESET` in `routes.externalGfsRateLimitStress.realPostgres.integration.test.ts`, check the suite's shared `http.Agent`: it must cap `maxSockets` below macOS `kern.ipc.somaxconn` (the proven value is 64). An unbounded 481-request burst is reset before Express accepts it; this is a test-socket defect, not a PostgreSQL or Minikube failure. |+| `REAL_PG_SUITE_FAILED` | Reporter, test assertions, process exit, or parent result contract failed. | Iterate with standalone T1; once green, run full T2 for final exact-head lane evidence. If Darwin 27 reports `ECONNRESET` in `routes.externalGfsRateLimitStress.realPostgres.integration.test.ts`, check the suite's shared `http.Agent`: it must cap `maxSockets` below macOS `kern.ipc.somaxconn` (default 128; the suite uses 100, proven 0 resets). An unbounded 481-request burst is reset before Express accepts it; this is a test-socket defect, not a PostgreSQL or Minikube failure. || `POSTGRES_NOT_READY` | PostgreSQL precondition failed, or a PVC reset was requested without the exact expected UID. | Fix DB readiness; never guess a PVC UID. || `PROFILE_UNHEALTHY` | A required deployment is unready in a fail-loud check (`T2_PLAN_MODE=false`: standalone preflight or the final exact-head T2), the mandatory targeted-sync health command is missing, or a supplied user-facing health command failed or timed out. The orchestrator planner never emits this merely for an unready deployment — it selects `full-reconcile` instead. | For a targeted sync, supply the affected service's profile-owned `T2_HEALTHCHECK_COMMAND`; otherwise repair the reported health failure. Re-run on the same HEAD and profile. Do not run manual repair scripts between runs. || `NP08_HCC_AUTHORIZATION_FAILED` | The deployed Host-to-HCC authorization journey or cleanup failed after T0/T1 passed. | Repair the first NP08 failure, then use `minikube-t2-runtime` on the exact same profile/HEAD; never refresh/reissue in the test. |diff --git a/scripts/e2e/minikube-real-postgres.sh b/scripts/e2e/minikube-real-postgres.shindex fcd47282b..580dc0a2b 100755--- a/scripts/e2e/minikube-real-postgres.sh+++ b/scripts/e2e/minikube-real-postgres.sh@@ -317,43 +317,10 @@ 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" 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+ local package="$1"+ find "$PROJECT_DIR/$package" -type f -name '*realPostgres*.test.ts' \+ ! -name 'realPostgres.requirement.ts' -print | sort}is_isolated_control_api_file() {@@ -700,7 +667,6 @@ 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 c2784d3d7..ad3d01812 100755--- a/scripts/tests/test-minikube-t2-contract.sh+++ b/scripts/tests/test-minikube-t2-contract.sh@@ -607,62 +607,6 @@ 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