logos-blockchain-testing/scripts/run/check-boundaries.sh
2026-02-16 11:38:31 +01:00

31 lines
874 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "${ROOT_DIR}"
echo "==> boundary check: lb-topology must stay local/topology-focused"
violations=0
topology_dir="${ROOT_DIR}/../nomos-node/tests/testing_framework/lb-topology"
if [ ! -d "${topology_dir}" ]; then
echo "Boundary check failed: expected lb-topology at ${topology_dir}"
exit 1
fi
echo "==> checking ${topology_dir}"
if rg -n "cfgsync|ComposeDeployEnv|K8sDeployEnv|runner-compose|runner-k8s|DEFAULT_CFGSYNC_PORT|DEFAULT_ASSETS_STACK_DIR" \
"${topology_dir}/src" "${topology_dir}/Cargo.toml" >/tmp/lb-topology-boundary.out 2>&1; then
echo "Boundary violation: extension-specific references found in lb-topology:"
cat /tmp/lb-topology-boundary.out
violations=1
fi
if [ "${violations}" -ne 0 ]; then
exit 1
fi
echo "Boundary check passed."