comparison mrjunejune/test/inference_stack_config_test.sh @ 271:13d61401c57d

redirect Copilot cache to service state Set XDG_CACHE_HOME from the configured inference state so the systemd service can extract Copilot outside its protected home directory. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Fri, 07 Aug 2026 13:24:05 -0700
parents 056790c4fb0d
children
comparison
equal deleted inserted replaced
270:358dd5950985 271:13d61401c57d
13 AUTH_COOKIE_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 13 AUTH_COOKIE_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
14 AUTH_BOOTSTRAP_USERNAME=admin 14 AUTH_BOOTSTRAP_USERNAME=admin
15 AUTH_BOOTSTRAP_PASSWORD_HASH=zenbu-scrypt\$v=1\$N=32768\$r=8\$p=1\$salt\$hash 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 16 LITELLM_MASTER_KEY=sk-test-only-value
17 GITHUB_COPILOT_TOKEN_DIR=$root/token-dir 17 GITHUB_COPILOT_TOKEN_DIR=$root/token-dir
18 MRJUNEJUNE_INFERENCE_STATE=$root
18 MRJUNEJUNE_ALLOW_GUEST_INFERENCE=true 19 MRJUNEJUNE_ALLOW_GUEST_INFERENCE=true
19 SERVER_HOST=127.0.0.1 20 SERVER_HOST=127.0.0.1
20 EOF 21 EOF
21 22
22 output="$( 23 output="$(
34 --check-config 35 --check-config
35 )" 36 )"
36 grep -q "config=$root/mrjunejune/.config" <<<"$output" 37 grep -q "config=$root/mrjunejune/.config" <<<"$output"
37 grep -q '^litellm_master_key=set$' <<<"$output" 38 grep -q '^litellm_master_key=set$' <<<"$output"
38 grep -q "copilot_token_dir=$root/token-dir" <<<"$output" 39 grep -q "copilot_token_dir=$root/token-dir" <<<"$output"
40 grep -q "copilot_cache_dir=$root/cache" <<<"$output"
39 grep -q '^guest_inference=true$' <<<"$output" 41 grep -q '^guest_inference=true$' <<<"$output"
40 if grep -q 'sk-test-only-value' <<<"$output"; then 42 if grep -q 'sk-test-only-value' <<<"$output"; then
41 echo "Config check leaked the LiteLLM master key" >&2 43 echo "Config check leaked the LiteLLM master key" >&2
42 exit 1 44 exit 1
43 fi 45 fi