comparison mrjunejune/test/production_inference_bundle_test.sh @ 267:a78f5986011f

discover bundled production runtimes Locate Bazel-packaged Copilot and Python binaries by stable suffix instead of hardcoding an external repository prefix. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 12:58:55 -0700
parents 056790c4fb0d
children f7b1188d5fb1
comparison
equal deleted inserted replaced
266:efaf4c63cc94 267:a78f5986011f
39 fi 39 fi
40 40
41 entrypoint="$(find -L "$bundle" -type f -name production_entrypoint.sh -print -quit)" 41 entrypoint="$(find -L "$bundle" -type f -name production_entrypoint.sh -print -quit)"
42 bash -n "$entrypoint" 42 bash -n "$entrypoint"
43 grep -q 'mrjunejune_server_binary' "$entrypoint" 43 grep -q 'mrjunejune_server_binary' "$entrypoint"
44 grep -q "copilot_cli_linux_x86_64/copilot" "$entrypoint"
45 grep -q "rules_python++python+python_3_11_x86_64-unknown-linux-gnu/bin/python3" "$entrypoint"
46 if grep -q '+http_archive+copilot_cli_linux_x86_64' "$entrypoint"; then
47 echo "Production entrypoint hardcodes one Bazel repository prefix" >&2
48 exit 1
49 fi
44 if grep -q 'MRJUNEJUNE_ALLOW_.*INFERENCE' "$entrypoint"; then 50 if grep -q 'MRJUNEJUNE_ALLOW_.*INFERENCE' "$entrypoint"; then
45 echo "Production entrypoint must not override guest policy from .config" >&2 51 echo "Production entrypoint must not override guest policy from .config" >&2
46 exit 1 52 exit 1
47 fi 53 fi
48 54