lewtun HF Staff OpenAI Codex commited on
Commit
fd6002a
·
2 Parent(s): 91fa071e152e8b

Deploy 2026-05-05

Browse files

Co-authored-by: OpenAI Codex <codex@openai.com>

Files changed (1) hide show
  1. AGENTS.md +5 -0
AGENTS.md CHANGED
@@ -24,11 +24,16 @@ Notes:
24
 
25
  - For multiline PR descriptions, prefer `gh pr edit <number> --body-file <file>` over inline `--body` so shell quoting, `$` env-var names, backticks, and newlines are preserved correctly.
26
 
 
 
 
 
27
  ## Hugging Face Space Deploys
28
 
29
  - The Space remote is `space` and points to `https://huggingface.co/spaces/smolagents/ml-intern`.
30
  - Deploy GitHub `main` to the Space from the local `space-main` branch by merging `origin/main` into `space-main` with a single merge commit, then pushing `space-main:main` to the `space` remote.
31
  - Keep the Space-only README frontmatter on `space-main`; `.gitattributes` should contain `README.md merge=ours` and the local repo config should include `merge.ours.driver=true`.
 
32
  - Recommended deploy flow:
33
 
34
  ```bash
 
24
 
25
  - For multiline PR descriptions, prefer `gh pr edit <number> --body-file <file>` over inline `--body` so shell quoting, `$` env-var names, backticks, and newlines are preserved correctly.
26
 
27
+ ## GitHub PRs
28
+
29
+ - Open code changes as GitHub PRs first. Do not push code changes directly to the Hugging Face Space deployment branch or Space remote before the PR has been opened, reviewed, and merged, unless the user explicitly asks to bypass the PR flow.
30
+
31
  ## Hugging Face Space Deploys
32
 
33
  - The Space remote is `space` and points to `https://huggingface.co/spaces/smolagents/ml-intern`.
34
  - Deploy GitHub `main` to the Space from the local `space-main` branch by merging `origin/main` into `space-main` with a single merge commit, then pushing `space-main:main` to the `space` remote.
35
  - Keep the Space-only README frontmatter on `space-main`; `.gitattributes` should contain `README.md merge=ours` and the local repo config should include `merge.ours.driver=true`.
36
+ - Local dev commonly uses a personal `HF_TOKEN`, but the deployed Space uses HF OAuth tokens. When adding Hub features, make sure the Space README `hf_oauth_scopes` frontmatter and the backend OAuth request in `backend/routes/auth.py` include the scopes required by the Hub APIs being called. A feature can work locally with a broad PAT and still fail in production with 403s if OAuth scopes are missing; after changing scopes, users may need to log out and log in again to receive a fresh token.
37
  - Recommended deploy flow:
38
 
39
  ```bash