From ea3ac194f49deb5d4ef35bbb4904b247cc49106b Mon Sep 17 00:00:00 2001
From: Alix-007
Date: Thu, 16 Jul 2026 16:50:22 +0800
Subject: [PATCH] fix(ci): bound Mantis runner IP discovery (#108699)
---
.github/workflows/mantis-slack-desktop-smoke.yml | 2 +-
test/scripts/ci-workflow-guards.test.ts | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/mantis-slack-desktop-smoke.yml b/.github/workflows/mantis-slack-desktop-smoke.yml
index b35f6ff21609..67cae05c35cc 100644
--- a/.github/workflows/mantis-slack-desktop-smoke.yml
+++ b/.github/workflows/mantis-slack-desktop-smoke.yml
@@ -266,7 +266,7 @@ jobs:
require_var OPENCLAW_QA_CONVEX_SECRET_CI
require_var CRABBOX_COORDINATOR_TOKEN
if [[ -z "${CRABBOX_LEASE_ID:-}" && "$CRABBOX_PROVIDER" == "aws" ]]; then
- runner_ip="$(curl -fsS https://checkip.amazonaws.com | tr -d '[:space:]')"
+ runner_ip="$(curl -fsS --connect-timeout 5 --max-time 15 --retry 2 https://checkip.amazonaws.com | tr -d '[:space:]')"
if [[ -z "$runner_ip" ]]; then
echo "Could not resolve GitHub runner public IPv4 for AWS SSH ingress." >&2
exit 1
diff --git a/test/scripts/ci-workflow-guards.test.ts b/test/scripts/ci-workflow-guards.test.ts
index e9c3954176f8..a825e71f7c84 100644
--- a/test/scripts/ci-workflow-guards.test.ts
+++ b/test/scripts/ci-workflow-guards.test.ts
@@ -2089,6 +2089,19 @@ describe("ci workflow guards", () => {
);
});
+ it("bounds Mantis Slack runner IP discovery", () => {
+ const workflow = parse(
+ readFileSync(".github/workflows/mantis-slack-desktop-smoke.yml", "utf8"),
+ ) as { jobs: { run_slack_desktop: { steps: WorkflowStep[] } } };
+ const runStep = workflow.jobs.run_slack_desktop.steps.find(
+ (step) => step.name === "Run Slack desktop scenario",
+ );
+
+ expect(runStep?.run).toContain(
+ "curl -fsS --connect-timeout 5 --max-time 15 --retry 2 https://checkip.amazonaws.com",
+ );
+ });
+
it("fails Windows Testbox setup when Blacksmith phone-home is not accepted", () => {
const workflow = readFileSync(".github/workflows/windows-blacksmith-testbox.yml", "utf8");