Skip to content

Commit 0afcaa6

Browse files
fix(mantis): bound Crabbox source checkout
1 parent f5bb19e commit 0afcaa6

6 files changed

Lines changed: 22 additions & 5 deletions

.github/workflows/mantis-discord-status-reactions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ jobs:
271271
set -euo pipefail
272272
install_dir="${RUNNER_TEMP}/crabbox"
273273
mkdir -p "$install_dir" "$HOME/.local/bin"
274-
git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
274+
timeout --signal=TERM --kill-after=10s 120s git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
275275
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
276276
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
277277
"$HOME/.local/bin/crabbox" --version

.github/workflows/mantis-discord-thread-attachment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261
set -euo pipefail
262262
install_dir="${RUNNER_TEMP}/crabbox"
263263
mkdir -p "$install_dir" "$HOME/.local/bin"
264-
git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
264+
timeout --signal=TERM --kill-after=10s 120s git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
265265
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
266266
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
267267
"$HOME/.local/bin/crabbox" --version

.github/workflows/mantis-slack-desktop-smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
mkdir -p "$install_dir" "$HOME/.local/bin"
204204
git init "$install_dir/src"
205205
git -C "$install_dir/src" remote add origin https://github.com/openclaw/crabbox.git
206-
git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
206+
timeout --signal=TERM --kill-after=10s 120s git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
207207
git -C "$install_dir/src" checkout --detach FETCH_HEAD
208208
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
209209
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

.github/workflows/mantis-telegram-desktop-proof.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ jobs:
375375
mkdir -p "$install_dir/src"
376376
git init "$install_dir/src"
377377
git -C "$install_dir/src" remote add origin https://github.com/openclaw/crabbox.git
378-
git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
378+
timeout --signal=TERM --kill-after=10s 120s git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
379379
git -C "$install_dir/src" checkout --detach FETCH_HEAD
380380
go build -C "$install_dir/src" -o "$install_dir/crabbox" ./cmd/crabbox
381381
sudo install -m 0755 "$install_dir/crabbox" /usr/local/bin/crabbox

.github/workflows/mantis-telegram-live.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ jobs:
350350
mkdir -p "$install_dir/src" "$HOME/.local/bin"
351351
git init "$install_dir/src"
352352
git -C "$install_dir/src" remote add origin https://github.com/openclaw/crabbox.git
353-
git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
353+
timeout --signal=TERM --kill-after=10s 120s git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
354354
git -C "$install_dir/src" checkout --detach FETCH_HEAD
355355
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
356356
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

test/scripts/package-acceptance-workflow.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,6 +2732,23 @@ describe("package artifact reuse", () => {
27322732
}
27332733
});
27342734

2735+
it("bounds Mantis Crabbox source retrieval", () => {
2736+
const cases = [
2737+
[MANTIS_DISCORD_STATUS_REACTIONS_WORKFLOW, "run_status_reactions"],
2738+
[MANTIS_DISCORD_THREAD_ATTACHMENT_WORKFLOW, "run_thread_attachment"],
2739+
[MANTIS_SLACK_DESKTOP_SMOKE_WORKFLOW, "run_slack_desktop"],
2740+
[MANTIS_TELEGRAM_DESKTOP_PROOF_WORKFLOW, "run_telegram_desktop_proof"],
2741+
[MANTIS_TELEGRAM_LIVE_WORKFLOW, "run_telegram_live"],
2742+
] as const;
2743+
2744+
for (const [workflowPath, jobName] of cases) {
2745+
const installStep = workflowStep(workflowJob(workflowPath, jobName), "Install Crabbox CLI");
2746+
expect(installStep.run, workflowPath).toMatch(
2747+
/timeout --signal=TERM --kill-after=10s 120s git (?:clone|-C .* fetch)/u,
2748+
);
2749+
}
2750+
});
2751+
27352752
it("maps every supported Slack approval checkpoint scenario family", () => {
27362753
const workflow = readFileSync(MANTIS_SLACK_DESKTOP_SMOKE_WORKFLOW, "utf8");
27372754

0 commit comments

Comments
 (0)