@@ -141,6 +141,10 @@ case "$relay_src" in
141141 * " TARGET_HOST = '127.0.0.1'" * ) ok " relay forwards to loopback only" ;;
142142 * ) bad " relay does not forward to loopback only" ;;
143143esac
144+ case " $relay_src " in
145+ * ' localAddress: TARGET_HOST' * ) ok " relay originates upstream connections from loopback" ;;
146+ * ) bad " relay does not originate upstream connections from loopback" ;;
147+ esac
144148case " $relay_src " in
145149 * ' entry.internal' * ) ok " relay skips loopback interfaces so it cannot collide with the daemon" ;;
146150 * ) bad " relay does not skip loopback interfaces" ;;
@@ -341,21 +345,34 @@ for line in sys.stdin:
341345 break
342346' ) "
343347if [ -n " $host_url " ]; then
344- if curl -fsS " $host_url /" > /dev/null 2>&1 && curl -fsS " $host_url /api/daemon/status" > /dev/null 2>&1 ; then
348+ host_status_body=" $WORK /daemon-status-host.json"
349+ if curl -fsS " $host_url /" > /dev/null 2>&1 && curl -fsS " $host_url /api/daemon/status" -o " $host_status_body " > /dev/null 2>&1 ; then
345350 ok " published host-loopback URL is reachable: $host_url "
351+ sed ' s/^/ | daemon-status: /' " $host_status_body " 2> /dev/null || true
346352 else
347353 bad " published host-loopback URL is not reachable: $host_url "
348354 fi
349- # Regression gate for the 0.0.0.0 bind bug: this is the exact request the
350- # browser's Settings -> About -> Export diagnostics button makes. It returned
351- # 403 FORBIDDEN ("request peer must be a loopback address") whenever the daemon
352- # bound 0.0.0.0, because acq/msb publishing dials the guest network IP.
353- export_code=" $( curl -s -o /dev/null -w ' %{http_code}' --max-time 120 \
355+ # Regression gates for the loopback-peer bug: these are browser-visible routes
356+ # guarded by requireLocalDaemonRequest. They returned 403 whenever the daemon
357+ # observed a non-loopback peer through create-time port publishing.
358+ rollout_body=" $WORK /od-next-rollout.json"
359+ rollout_code=" $( curl -s -o " $rollout_body " -w ' %{http_code}' --max-time 30 \
360+ -H " Origin: $host_url " " $host_url /api/strategies/od-next/rollout" 2> /dev/null || true) "
361+ if [ " $rollout_code " = " 200" ]; then
362+ ok " OD Next rollout route is reachable from the host browser path (HTTP 200)"
363+ else
364+ bad " OD Next rollout route returned HTTP ${rollout_code:- none} from the host"
365+ sed ' s/^/ | /' " $rollout_body " 2> /dev/null || true
366+ fi
367+
368+ export_body=" $WORK /diagnostics-export.body"
369+ export_code=" $( curl -s -o " $export_body " -w ' %{http_code}' --max-time 120 \
354370 -H " Origin: $host_url " " $host_url /api/diagnostics/export" 2> /dev/null || true) "
355371 if [ " $export_code " = " 200" ]; then
356372 ok " diagnostics export is reachable from the host browser path (HTTP 200)"
357373 else
358- bad " diagnostics export returned HTTP ${export_code:- none} from the host (expected 200; 403 means the daemon saw a non-loopback peer)"
374+ bad " diagnostics export returned HTTP ${export_code:- none} from the host"
375+ sed ' s/^/ | /' " $export_body " 2> /dev/null || true
359376 fi
360377else
361378 bad " could not parse host-loopback URL from acq ports output"
0 commit comments