Skip to content

Commit 02d8ed6

Browse files
JuliaEdomclaude
andcommitted
docs(deploy): keep tunnel clients out of the Space publish set
HF's abuse-handler paused the Space three minutes after the 2026-07-22 deploy with `rule: Cloudflared`. That deploy was the first to carry the GPU research notebooks, and two of them download the cloudflared binary to expose a Colab session — never the Space itself, but the handler scans contents, not intent. `scripts/autotune/` now stays in the repo and out of the Space, and the deploy scans the bytes of everything it is about to upload for tunnel markers, so the next such helper fails the gate instead of pausing the host. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a789094 commit 02d8ed6

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

‎DEPLOY.md‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,33 @@ and Mistral key by path) and is intentionally not committed. It:
1616

1717
1. computes the file set from `git ls-files` minus a publish-exclude list
1818
(`tests/`, `.github/`, `docs/research/`, `reviews/`, `eval/baselines/`,
19-
`eval/reports/`);
19+
`eval/reports/`, `scripts/autotune/`);
2020
2. drops anything the hygiene detector flags;
21-
3. uploads via `huggingface_hub`, then prunes remote files no longer present;
22-
4. supports `--self-test` (a gate that runs before upload) and `--dry-run`.
21+
3. scans the bytes of the resulting set for tunnel clients and refuses to upload if any
22+
are found (see below);
23+
4. uploads via `huggingface_hub`, then prunes remote files no longer present;
24+
5. supports `--self-test` (a gate that runs before upload) and `--dry-run`.
2325

2426
The Space hosts the **app**, not the research record. Eval reports and baselines are
2527
260 files / 31 MB the app never reads; they stay in this repo, which is public, and are
2628
excluded from the upload set. `--self-test` asserts that exclusion and fails if it is
2729
removed, so the rule is executable rather than a comment.
2830

31+
## No tunnel clients on the Space
32+
33+
The GPU research harness (`scripts/autotune/`, Colab and Kaggle notebooks) downloads the
34+
`cloudflared` binary to expose a fine-tuned model from a Colab session. That is fine in a
35+
repo and wrong on a Space: Hugging Face's abuse-handler scans Space contents, and a tunnel
36+
client shipped on free compute matches an abuse rule regardless of what it is for. This
37+
Space was paused under `rule: Cloudflared` minutes after the first deploy that carried
38+
those notebooks.
39+
40+
So the harness is excluded by path, **and** the deploy scans every file it is about to
41+
upload for tunnel markers (`cloudflared`, `ngrok`, `localtunnel`, …) and aborts on a hit —
42+
the path rule only knows the files that broke once, the content scan covers the rest.
43+
`--self-test` proves the scanner is not vacuous by planting a marker in a throwaway file
44+
and requiring it to be caught.
45+
2946
## What ships to the Space
3047

3148
The Space is **SQLite-only** — `psycopg` is pruned from its `requirements.txt`, so

0 commit comments

Comments
 (0)