From 8c2e11201ecb5a1f2dd098143ad22cdbe7667ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Sun, 16 Aug 2026 01:21:09 +0800 Subject: [PATCH] fix(guanghu-os): accept healthy code projection responses --- .../guanghu-os/scripts/guanghu-master-init.sh | 4 ++-- .../guanghu-os/scripts/test-guanghu-master-init.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh b/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh index 40c852cca..3fcea3e19 100644 --- a/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh +++ b/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh @@ -62,7 +62,7 @@ wait_http() { local code for ((i=0; i/dev/null || true) - [[ $code == "$expected" ]] && { log "READY ${name} http=${code}"; return 0; } + [[ ",$expected," == *",$code,"* ]] && { log "READY ${name} http=${code}"; return 0; } sleep 1 done fatal "service_not_ready:${name}:last_http_${code:-none}" @@ -136,7 +136,7 @@ start_bridge() { CODE_CHANNEL_PORT=3340 CODE_RATE_LIMIT_MAX=600 CODE_BROWSE_RATE_LIMIT_MAX=120 \ /usr/bin/node "$APP_HUB" wait_http app-hub http://127.0.0.1:8088/api/status 200 30 - wait_http code-projection http://127.0.0.1:8088/code/ 303 30 + wait_http code-projection http://127.0.0.1:8088/code/ 200,303 30 start_guanghu navigation-bridge /usr/bin/env GUANGHU_AI_HOST=127.0.0.1 \ GUANGHU_AI_PORT=3922 GUANGHU_REPOSITORY_MAP=/opt/guanghu/ai-discovery/repository-route-map.json \ diff --git a/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh b/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh index 0c765d9af..d43cdd115 100644 --- a/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh +++ b/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh @@ -18,7 +18,8 @@ grep -Fq 'mount -o remount,rw /' "$subject" grep -Fq 'start_guanghu repository-bridge' "$subject" grep -Fq 'start_guanghu app-hub' "$subject" grep -Fq 'start_guanghu navigation-bridge' "$subject" -grep -Fq 'wait_http code-projection http://127.0.0.1:8088/code/ 303' "$subject" +grep -Fq '[[ ",$expected," == *",$code,"* ]]' "$subject" +grep -Fq 'wait_http code-projection http://127.0.0.1:8088/code/ 200,303' "$subject" grep -Fq 'wait_http navigation-bridge http://127.0.0.1:3922/v1/anchor 200' "$subject" if grep -Eq '(^|[[:space:]])(systemd|/sbin/init)([[:space:]]|$)' "$subject"; then echo 'full Linux init must remain dormant' >&2