Skip to content

Commit c5b4270

Browse files
fix(hf): wait for Router Space runtime convergence before parity proof (#54)
Treat null or stale Hugging Face runtime metadata as a bounded provider transition, preserve terminal fail-closed behavior, and emit a separate convergence receipt before exact source and runtime parity verification. Signed-off-by: Stephen P. Lutar Jr. <stephenlutar2@gmail.com>
1 parent 72240dd commit c5b4270

3 files changed

Lines changed: 596 additions & 0 deletions

File tree

.github/workflows/hf-space-deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
- "scripts/hf_space_bootstrap.py"
1313
- "scripts/hf_space_deploy.py"
1414
- "scripts/hf_space_drift_check.py"
15+
- "scripts/wait_hf_space_runtime.py"
16+
- "test_hf_runtime_convergence.py"
1517

1618
permissions:
1719
contents: read
@@ -56,9 +58,12 @@ jobs:
5658
scripts/hf_space_bootstrap.py \
5759
scripts/hf_space_deploy.py \
5860
scripts/hf_space_drift_check.py \
61+
scripts/wait_hf_space_runtime.py \
62+
test_hf_runtime_convergence.py \
5963
space/server.py \
6064
space/szl_source_attestation.py
6165
python -m unittest discover -s space/tests -p 'test_*.py'
66+
python -m unittest test_hf_runtime_convergence.py
6267
git diff --check
6368
6469
- name: Install exact Hub client
@@ -94,6 +99,21 @@ jobs:
9499
--token "$HF_TOKEN" \
95100
> router-flagship-publication.json
96101
102+
- name: Wait for coherent provider runtime metadata
103+
env:
104+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
105+
shell: bash
106+
run: |
107+
set -euo pipefail
108+
test -n "$HF_TOKEN"
109+
python scripts/wait_hf_space_runtime.py \
110+
--repo-id "$HF_SPACE_REPO_ID" \
111+
--token "$HF_TOKEN" \
112+
--timeout-seconds 900 \
113+
--poll-interval-seconds 10 \
114+
--request-timeout-seconds 15 \
115+
--receipt hf-runtime-convergence.json
116+
97117
- name: Verify publication, deployment, runtime, and source parity
98118
env:
99119
HF_TOKEN: ${{ secrets.HF_TOKEN }}
@@ -118,6 +138,7 @@ jobs:
118138
path: |
119139
router-space-bootstrap.json
120140
router-flagship-publication.json
141+
hf-runtime-convergence.json
121142
hf-space-parity-evidence.json
122143
if-no-files-found: warn
123144
retention-days: 90

0 commit comments

Comments
 (0)