HF_TOKEN was a hard requirement; HfApi() falls back to the
~/.cache/huggingface/token written by 'huggingface-cli login' so the
env var is unnecessary when the user is already authed.
- update_hf_env.sh: HfApi(token=os.environ.get('HF_TOKEN')) — None
routes to cached login.
- redeploy.sh: replace the HF_TOKEN guard with a real auth probe via
HfApi().whoami(); exits early with a clear hint if neither path is
authed.
- runbook: drop the HF_TOKEN= prefix from the quick-redeploy snippet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
scripts: add update_hf_env.sh and redeploy.sh -- close runbook gaps
update_hf_env.sh: sets the 6 HF Space variables (RIPRAP_LLM_PRIMARY,
RIPRAP_LLM_BASE_URL, RIPRAP_LLM_API_KEY, RIPRAP_ML_BACKEND,
RIPRAP_ML_BASE_URL, RIPRAP_ML_API_KEY) via huggingface_hub Python API
(add_space_variable / restart_space -- huggingface-cli space does not
exist in v0.36.x), then polls /api/backend up to 120 s for HTTP 200.
redeploy.sh: thin orchestrator -- generates a fresh token, calls
deploy_droplet.sh, calls update_hf_env.sh, calls probe_addresses.py,
prints a pass/fail summary. Exit 0 only when all three steps pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>