annotate mrjunejune/test/inference_stack_config_test.sh @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents 13d61401c57d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
1 #!/usr/bin/env bash
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
2 set -euo pipefail
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
3
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
4 source_script="$(realpath "$1")"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
5 root="$(mktemp -d)"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
6 trap 'rm -rf "$root"' EXIT
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
7 mkdir -p "$root/mrjunejune"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
8 for file in server launcher sidecar copilot litellm config python mock; do
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
9 touch "$root/$file"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
10 done
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
11
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
12 cat > "$root/mrjunejune/.config" <<EOF
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
13 AUTH_COOKIE_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
14 AUTH_BOOTSTRAP_USERNAME=admin
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
15 AUTH_BOOTSTRAP_PASSWORD_HASH=zenbu-scrypt\$v=1\$N=32768\$r=8\$p=1\$salt\$hash
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
16 LITELLM_MASTER_KEY=sk-test-only-value
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
17 GITHUB_COPILOT_TOKEN_DIR=$root/token-dir
271
13d61401c57d redirect Copilot cache to service state
MrJuneJune <me@mrjunejune.com>
parents: 265
diff changeset
18 MRJUNEJUNE_INFERENCE_STATE=$root
265
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
19 MRJUNEJUNE_ALLOW_GUEST_INFERENCE=true
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
20 SERVER_HOST=127.0.0.1
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
21 EOF
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
22
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
23 output="$(
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
24 MRJUNEJUNE_ALLOW_GUEST_INFERENCE=false \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
25 BUILD_WORKSPACE_DIRECTORY="$root" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
26 "$source_script" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
27 "$root/server" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
28 "$root/launcher" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
29 "$root/sidecar" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
30 "$root/copilot" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
31 "$root/litellm" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
32 "$root/config" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
33 "$root/python" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
34 "$root/mock" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
35 --check-config
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
36 )"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
37 grep -q "config=$root/mrjunejune/.config" <<<"$output"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
38 grep -q '^litellm_master_key=set$' <<<"$output"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
39 grep -q "copilot_token_dir=$root/token-dir" <<<"$output"
271
13d61401c57d redirect Copilot cache to service state
MrJuneJune <me@mrjunejune.com>
parents: 265
diff changeset
40 grep -q "copilot_cache_dir=$root/cache" <<<"$output"
265
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
41 grep -q '^guest_inference=true$' <<<"$output"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
42 if grep -q 'sk-test-only-value' <<<"$output"; then
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
43 echo "Config check leaked the LiteLLM master key" >&2
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
44 exit 1
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
45 fi
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
46
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
47 echo 'UNSUPPORTED_SETTING=value' >> "$root/mrjunejune/.config"
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
48 if BUILD_WORKSPACE_DIRECTORY="$root" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
49 "$source_script" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
50 "$root/server" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
51 "$root/launcher" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
52 "$root/sidecar" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
53 "$root/copilot" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
54 "$root/litellm" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
55 "$root/config" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
56 "$root/python" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
57 "$root/mock" \
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
58 --check-config >/dev/null 2>&1; then
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
59 echo "Unsupported config key was accepted" >&2
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
60 exit 1
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
61 fi
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
62
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
63 if grep -Eq '(^|[[:space:]])(source|eval)[[:space:]]' "$source_script"; then
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
64 echo "Inference config parser must not source or eval config files" >&2
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
65 exit 1
056790c4fb0d add role-aware Epi assistant prompts
MrJuneJune <me@mrjunejune.com>
parents:
diff changeset
66 fi