comparison mrjunejune/test/inference_stack_config_test.sh @ 265:056790c4fb0d

add role-aware Epi assistant prompts Add verified June knowledge, guest/member/admin Copilot profiles, profile-isolated session recovery, animated Epi greetings, and a single authoritative runtime config workflow for inference. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 10:50:30 -0700
parents
children 13d61401c57d
comparison
equal deleted inserted replaced
264:04fee26ecce0 265:056790c4fb0d
1 #!/usr/bin/env bash
2 set -euo pipefail
3
4 source_script="$(realpath "$1")"
5 root="$(mktemp -d)"
6 trap 'rm -rf "$root"' EXIT
7 mkdir -p "$root/mrjunejune"
8 for file in server launcher sidecar copilot litellm config python mock; do
9 touch "$root/$file"
10 done
11
12 cat > "$root/mrjunejune/.config" <<EOF
13 AUTH_COOKIE_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
14 AUTH_BOOTSTRAP_USERNAME=admin
15 AUTH_BOOTSTRAP_PASSWORD_HASH=zenbu-scrypt\$v=1\$N=32768\$r=8\$p=1\$salt\$hash
16 LITELLM_MASTER_KEY=sk-test-only-value
17 GITHUB_COPILOT_TOKEN_DIR=$root/token-dir
18 MRJUNEJUNE_ALLOW_GUEST_INFERENCE=true
19 SERVER_HOST=127.0.0.1
20 EOF
21
22 output="$(
23 MRJUNEJUNE_ALLOW_GUEST_INFERENCE=false \
24 BUILD_WORKSPACE_DIRECTORY="$root" \
25 "$source_script" \
26 "$root/server" \
27 "$root/launcher" \
28 "$root/sidecar" \
29 "$root/copilot" \
30 "$root/litellm" \
31 "$root/config" \
32 "$root/python" \
33 "$root/mock" \
34 --check-config
35 )"
36 grep -q "config=$root/mrjunejune/.config" <<<"$output"
37 grep -q '^litellm_master_key=set$' <<<"$output"
38 grep -q "copilot_token_dir=$root/token-dir" <<<"$output"
39 grep -q '^guest_inference=true$' <<<"$output"
40 if grep -q 'sk-test-only-value' <<<"$output"; then
41 echo "Config check leaked the LiteLLM master key" >&2
42 exit 1
43 fi
44
45 echo 'UNSUPPORTED_SETTING=value' >> "$root/mrjunejune/.config"
46 if BUILD_WORKSPACE_DIRECTORY="$root" \
47 "$source_script" \
48 "$root/server" \
49 "$root/launcher" \
50 "$root/sidecar" \
51 "$root/copilot" \
52 "$root/litellm" \
53 "$root/config" \
54 "$root/python" \
55 "$root/mock" \
56 --check-config >/dev/null 2>&1; then
57 echo "Unsupported config key was accepted" >&2
58 exit 1
59 fi
60
61 if grep -Eq '(^|[[:space:]])(source|eval)[[:space:]]' "$source_script"; then
62 echo "Inference config parser must not source or eval config files" >&2
63 exit 1
64 fi