chore(scripts): use generic python3 in glasspane check (Sam & Pi)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled

This commit is contained in:
Sam & Pi 2026-06-17 14:58:26 +02:00
parent 80bda58cc4
commit 36f67a9e60

View file

@ -1,6 +1,6 @@
#!/bin/sh
# Glasspane stress test — concurrent agent spawn + state tracking.
# Requires: colibri-daemon running, python3.11, root (for nc to socket)
# Requires: colibri-daemon running, python3, root (for nc to socket)
set -eu
SOCKET="${COLIBRI_SOCKET:-/var/run/colibri/colibri.sock}"
@ -11,7 +11,7 @@ NC="mdo -u root nc -U $SOCKET -w 5"
assert_pane_count() {
_desc="$1"; _expected="$2"
_json=$(printf '{"cmd":"glasspane-snapshot"}\n' | timeout 5 $NC 2>/dev/null | tail -1)
_count=$(echo "$_json" | python3.11 -c "import json,sys;print(len(json.load(sys.stdin)['data']['panes']))" 2>/dev/null || echo "0")
_count=$(echo "$_json" | python3 -c "import json,sys;print(len(json.load(sys.stdin)['data']['panes']))" 2>/dev/null || echo "0")
if [ "$_count" -ge "$_expected" ]; then
echo " PASS: $_desc$_count panes"
PASS=$((PASS + 1))
@ -24,7 +24,7 @@ assert_pane_count() {
assert_states_contain() {
_desc="$1"; shift
_json=$(printf '{"cmd":"glasspane-snapshot"}\n' | timeout 5 $NC 2>/dev/null | tail -1)
_states=$(echo "$_json" | python3.11 -c "import json,sys;d=json.load(sys.stdin)['data'];print(','.join(p['state'] for p in d['panes']))" 2>/dev/null || echo "ERROR")
_states=$(echo "$_json" | python3 -c "import json,sys;d=json.load(sys.stdin)['data'];print(','.join(p['state'] for p in d['panes']))" 2>/dev/null || echo "ERROR")
for _exp in "$@"; do
case "$_states" in
*"$_exp"*)