Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

revert: drop two speculative T2 harness patches (operator-error, not real defects)

Alfredo Lopez69435e55da00
diff --git a/scripts/e2e/minikube-real-postgres.sh b/scripts/e2e/minikube-real-postgres.sh
index ac3b580c1..7d627fade 100755
--- a/scripts/e2e/minikube-real-postgres.sh
+++ b/scripts/e2e/minikube-real-postgres.sh
@@ -16,7 +16,6 @@ T1_TMP_ROOT="$T2_TMP_ROOT"
if [ -z "$T1_TMP_ROOT" ]; then T1_TMP_ROOT=/tmp; fi
T1_TMP_DIR=""
PORT_FORWARD_PID=""
-T1_PF_PID_FILE=""
LOCAL_PORT=""
ADMIN_DSN=""
PG_USER=""
@@ -46,18 +45,11 @@ cleanup_t1() {
if [ -n "$PORT_FORWARD_PID" ] && kill -0 "$PORT_FORWARD_PID" >/dev/null 2>&1; then
local command_line
command_line="$(ps -p "$PORT_FORWARD_PID" -o command= 2>/dev/null || true)"
- # PORT_FORWARD_PID is this lane's own kubectl port-forward child; it cannot
- # be reused by another process until we wait/reap it, so matching just
- # "port-forward" is a sufficient and truncation-robust guard. The previous
- # "svc/control-postgres" substring appears late in a long command line and
- # could be dropped by ps command-column truncation, skipping the kill and
- # leaking the forward past T1 into the T2 final preflight (PORT_FORWARD_CONFLICT).
- if [[ "$command_line" == *port-forward* ]]; then
+ if [[ "$command_line" == *port-forward* && "$command_line" == *svc/control-postgres* ]]; then
kill "$PORT_FORWARD_PID" >/dev/null 2>&1 || true
wait "$PORT_FORWARD_PID" >/dev/null 2>&1 || true
fi
fi
- if [ -n "$T1_PF_PID_FILE" ]; then rm -f "$T1_PF_PID_FILE" >/dev/null 2>&1 || true; fi
if [ "$T1_GFS_RESTORE_REQUIRED" = true ] && \
! GFS_RESTORE_ACTIVE_NOLOGIN=true CONTEXT="$T2_CONTEXT" \
bash "$PROJECT_DIR/deploy/scripts/reconcile-gfs-deploy-credentials.sh"; then
@@ -244,12 +236,6 @@ main() {
t2_kc -n "$PG_NAMESPACE" port-forward --address=127.0.0.1 svc/"$PG_SERVICE" "$LOCAL_PORT:5432" \
>"$T1_TMP_DIR/port-forward.log" 2>&1 &
PORT_FORWARD_PID=$!
- # Record the forward as profile-owned so the T2 final preflight's
- # t2_process_check (which accepts PIDs recorded under /tmp/pf-<profile>-*.pid)
- # recognises it and never misreads a still-terminating T1 forward as an
- # unrelated process. cleanup_t1 removes this file after tearing the forward down.
- T1_PF_PID_FILE="/tmp/pf-${T2_PROFILE//[^A-Za-z0-9_.-]/_}-t1-real-postgres.pid"
- printf '%s\n' "$PORT_FORWARD_PID" >"$T1_PF_PID_FILE" 2>/dev/null || T1_PF_PID_FILE=""
if ! wait_for_tcp "$LOCAL_PORT"; then
sanitize_file "$T1_TMP_DIR/port-forward.log"
cat "$T1_TMP_DIR/port-forward.log" >&2 || true
diff --git a/scripts/minikube/t2-common.sh b/scripts/minikube/t2-common.sh
index 72446fb6f..fa13d1541 100755
--- a/scripts/minikube/t2-common.sh
+++ b/scripts/minikube/t2-common.sh
@@ -500,16 +500,6 @@ t2_process_check() {
while IFS= read -r command_line; do
[ -z "$command_line" ] && continue
[[ "$command_line" == *"$T2_PROFILE"* || "$command_line" == *"$T2_CONTEXT"* ]] || continue
- # The T1 Real PostgreSQL lane and GFS provisioning open a short-lived,
- # loopback-only control-postgres port-forward on a private random port using
- # this profile's own context. It is inherently profile-owned and transient
- # (never a cross-worktree conflict), but pf-all-stack.sh does not record its
- # PID and it can outlive T1 by a teardown window (or an orphaned cleanup),
- # which would fail the exact-head final preflight even though T1 passed.
- # Every other (persistent, shareable) service forward is still enforced.
- if [[ "$command_line" == *"port-forward"* && "$command_line" == *"svc/control-postgres"* ]]; then
- continue
- fi
allowed=false
for pid_file in "$T2_PROFILE_ROOT/$T2_PROFILE"/pids/*.pid; do
[ -f "$pid_file" ] || continue