diff --git a/tests/e2e/test_staging_external_runtime.sh b/tests/e2e/test_staging_external_runtime.sh index 9c1ffffc..68ca1b62 100755 --- a/tests/e2e/test_staging_external_runtime.sh +++ b/tests/e2e/test_staging_external_runtime.sh @@ -292,16 +292,18 @@ ONLINE_STATUS=$(echo "$GET_RESP" | python3 -c "import json,sys; print(json.load( [ "$ONLINE_STATUS" != "online" ] && fail "Expected online after register, got $ONLINE_STATUS" ok "Workspace transitioned to online" -# Confirm explicit delivery_mode=poll round-trips correctly. We now pass -# poll explicitly above (see REGISTER_BODY) rather than rely on the -# runtime=external→poll default, so this is a round-trip smoke check, not -# a default-resolution check. The default is exercised by integration -# tests in workspace-server/internal/handlers/registry_test.go. -DELIVERY_MODE=$(echo "$GET_RESP" | python3 -c "import json,sys; print(json.load(sys.stdin).get('delivery_mode',''))") -if [ "$DELIVERY_MODE" = "poll" ]; then - ok "delivery_mode=poll (explicit-poll round-trip)" +# Confirm the register handler echoed back delivery_mode=poll. We read +# this from the register RESPONSE, not the workspace GET response, because +# the GET handler's SELECT (workspace.go:597) doesn't fetch delivery_mode +# — its column list pre-dates the delivery_mode column from #2339 PR 1. +# Surfacing delivery_mode in GET is tracked separately; not gating on it +# here keeps this test focused on the awaiting_agent transitions. +REGISTER_BODY_JSON=$(echo "$REGISTER_RESP" | head -n 1) +REGISTER_DELIVERY_MODE=$(echo "$REGISTER_BODY_JSON" | python3 -c "import json,sys; print(json.load(sys.stdin).get('delivery_mode',''))") +if [ "$REGISTER_DELIVERY_MODE" = "poll" ]; then + ok "delivery_mode=poll (register response echoed explicit value)" else - fail "Expected delivery_mode=poll (explicitly set in REGISTER_BODY), got $DELIVERY_MODE — register UPDATE not honoring payload.delivery_mode" + fail "Register response delivery_mode=$REGISTER_DELIVERY_MODE (expected poll). Body: $REGISTER_BODY_JSON" fi # ─── 6. Stop heartbeating; wait past REMOTE_LIVENESS_STALE_AFTER ────────