Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Installer: name the sandbox checks that failed

milind-soni1b3931fa6290
diff --git a/deploy/e2e/run.sh b/deploy/e2e/run.sh
index 5698917e19..3c6512ba5d 100755
--- a/deploy/e2e/run.sh
+++ b/deploy/e2e/run.sh
@@ -26,6 +26,11 @@ step() { printf '\n== %s\n' "$*"; }
fail() {
printf 'FAILED: %s\n' "$*" >&2
as_root docker compose --project-directory "$DIR" logs --tail 80 >"$OUT/compose.log" 2>&1 || true
+ if [ -f "$DIR/compose.box.yaml" ]; then
+ echo "the sandbox self-check, as it is now:"
+ (cd "$DIR" && sudo docker compose exec -T omb node dist-server/bot-box/box-check.js --public=none 2>&1 | tee "$OUT/box-check-failed.txt" | head -c 6000) || true
+ (cd "$DIR" && sudo docker compose logs omb 2>&1 | grep -E "bot box|server profile|local requests" | tail -n 10) || true
+ fi
exit 1
}
contains() { # file words what
diff --git a/deploy/install.sh b/deploy/install.sh
index c5881def60..ea8d614f13 100755
--- a/deploy/install.sh
+++ b/deploy/install.sh
@@ -749,7 +749,10 @@ check_sandbox_runs() {
*) fail "MausBot is running, but its sandbox self-check did not test that a bot cannot read the server's settings. Send us this line." ;;
esac
;;
- *) fail "MausBot is running, but its bots' sandbox failed its self-check, so bots are not safely separated from the server. See it with: cd $INSTALL_DIR && sudo docker compose exec omb node dist-server/bot-box/box-check.js --public=none and send us what it prints." ;;
+ *)
+ failed=$(printf '%s' "$report" | sed -n 's/.*"failed":\[\([^]]*\)\].*/\1/p' | tr -d '"' | tr ',' ' ')
+ fail "MausBot is running, but its bots' sandbox failed its self-check${failed:+ ($failed)}, so bots are not safely separated from the server. See it with: cd $INSTALL_DIR && sudo docker compose exec omb node dist-server/bot-box/box-check.js --public=none and send us what it prints."
+ ;;
esac
}
diff --git a/scripts/server-installer.test.ts b/scripts/server-installer.test.ts
index d724d33b36..66af1f3b8c 100644
--- a/scripts/server-installer.test.ts
+++ b/scripts/server-installer.test.ts
@@ -417,7 +417,7 @@ describe.skipIf(!posix)("deploy/install.sh", () => {
it("says so, and does not finish, when the sandbox does not hold or the server cannot be prepared", () => {
const failed = run(["--domain", "maus.example.com"], { env: { FAKE_BOX_CHECK: BOX_FAILED } });
expect(failed.status).toBe(1);
- expect(failed.stderr).toContain("MausBot is running, but its bots' sandbox failed its self-check, so bots are not safely separated from the server.");
+ expect(failed.stderr).toContain("MausBot is running, but its bots' sandbox failed its self-check (config-hidden), so bots are not safely separated from the server.");
expect(failed.all).not.toContain("MausBot is running at");
const untested = run(["--domain", "maus.example.com"], { env: { FAKE_BOX_CHECK: '{"box":"bwrap","failed":[],"results":[]}' } });
expect(untested.stderr).toContain("its sandbox self-check did not test that a bot cannot read the server's settings");