From 3efe7cb4fc8a29431e09ba90b856a3d9c2274fe2 Mon Sep 17 00:00:00 2001 From: Aaron Erickson Date: Mon, 13 Apr 2026 19:45:30 -0700 Subject: [PATCH 1/2] fix(ci): set NEMOCLAW_POLICY_TIER=open for messaging-providers E2E The tier-based policy selector (#1753) defaults non-interactive onboard to the "balanced" tier, which excludes messaging presets (telegram, discord, slack). The messaging-providers E2E test needs the "open" tier to allow egress to api.telegram.org and discord.com. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/nightly-e2e.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightly-e2e.yaml b/.github/workflows/nightly-e2e.yaml index 16dc2edde60..f6195f4d09d 100644 --- a/.github/workflows/nightly-e2e.yaml +++ b/.github/workflows/nightly-e2e.yaml @@ -187,6 +187,7 @@ jobs: NVIDIA_API_KEY: ${{ secrets.NVIDIA_API_KEY }} NEMOCLAW_NON_INTERACTIVE: "1" NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1" + NEMOCLAW_POLICY_TIER: "open" NEMOCLAW_SANDBOX_NAME: "e2e-msg-provider" NEMOCLAW_RECREATE_SANDBOX: "1" GITHUB_TOKEN: ${{ github.token }} From 10c0b635237743c8bcc6cfdc2dda5e092c1fafe0 Mon Sep 17 00:00:00 2001 From: Aaron Erickson Date: Mon, 13 Apr 2026 19:59:24 -0700 Subject: [PATCH 2/2] fix(e2e): add SSH retry after gateway restart and preserve config on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes for the sandbox-survival E2E: 1. Add retry loop (up to 30s) for SSH connectivity after gateway restart. The sandbox SSH agent may not be ready immediately after the gateway reports healthy, especially with OpenClaw 2026.4.2 which does more startup work. 2. Remove cleanup_ssh() from the Phase 8 failure path. Deleting the SSH config file caused all subsequent phases (9, 10) to fail with "Can't open user config file" — masking whether data actually persisted. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/e2e/test-sandbox-survival.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/e2e/test-sandbox-survival.sh b/test/e2e/test-sandbox-survival.sh index b84473faf32..d84a68910cc 100755 --- a/test/e2e/test-sandbox-survival.sh +++ b/test/e2e/test-sandbox-survival.sh @@ -552,13 +552,25 @@ fi pass "SSH config available after restart" # 8a: Raw SSH connectivity — the #888/#1086 handshake test -if ssh "${SSH_OPTS[@]}" "$SSH_TARGET" "echo alive" >/dev/null 2>&1; then - pass "SSH into sandbox works after restart (no handshake failure — #888/#1086)" +# The sandbox SSH agent may take a few seconds to become reachable after +# the gateway reports healthy (especially with newer OpenClaw versions that +# do more startup work). Retry up to 30 seconds before declaring failure. +SSH_OK=0 +for ssh_attempt in $(seq 1 6); do + if ssh "${SSH_OPTS[@]}" "$SSH_TARGET" "echo alive" >/dev/null 2>&1; then + SSH_OK=1 + break + fi + [ "$ssh_attempt" -lt 6 ] && sleep 5 +done + +if [ "$SSH_OK" -eq 1 ]; then + pass "SSH into sandbox works after restart (attempt $ssh_attempt, no handshake failure — #888/#1086)" else fail "SSH into sandbox FAILED after restart — handshake verification likely failed (#888/#1086)" info "This is the core bug: gateway regenerated secrets, sandbox has stale ones" - cleanup_ssh - # Still try to get logs for diagnosis + # Do NOT call cleanup_ssh here — subsequent phases need the config file + # to attempt marker reads and produce meaningful diagnostics. nemoclaw "$SANDBOX_NAME" logs 2>&1 | grep -i "handshake" | head -5 || true fi