diff --git a/.github/workflows/code_changes.yaml b/.github/workflows/code_changes.yaml index 6a0008f2e..6cef7d63e 100644 --- a/.github/workflows/code_changes.yaml +++ b/.github/workflows/code_changes.yaml @@ -54,6 +54,13 @@ jobs: # Only export token if non-empty (defensive against missing secrets) if [ -n "$HF_TOKEN_VALUE" ]; then export HUGGING_FACE_TOKEN="$HF_TOKEN_VALUE" + # policyengine-core only passes a token to hf_hub_download when + # the repo reports private=True. policyengine-uk-data-private + # has been public + gated since 31 July 2026, so core sends the + # request anonymously and the gate returns 401. HF_TOKEN is + # huggingface_hub's implicit-token variable, used when the + # explicit token is None, which restores authentication. + export HF_TOKEN="$HF_TOKEN_VALUE" fi make test env: diff --git a/.github/workflows/pr_code_changes.yaml b/.github/workflows/pr_code_changes.yaml index 17c973b5e..769ff3501 100644 --- a/.github/workflows/pr_code_changes.yaml +++ b/.github/workflows/pr_code_changes.yaml @@ -73,6 +73,13 @@ jobs: # Only export token if non-empty (avoids 'Bearer ' error for Dependabot PRs) if [ -n "$HF_TOKEN_VALUE" ]; then export HUGGING_FACE_TOKEN="$HF_TOKEN_VALUE" + # policyengine-core only passes a token to hf_hub_download when + # the repo reports private=True. policyengine-uk-data-private + # has been public + gated since 31 July 2026, so core sends the + # request anonymously and the gate returns 401. HF_TOKEN is + # huggingface_hub's implicit-token variable, used when the + # explicit token is None, which restores authentication. + export HF_TOKEN="$HF_TOKEN_VALUE" fi make test env: