Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Co-authored-by: célina <hanouticelina@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 47d616a. Configure here.
| local_path = local_file | ||
| filename = local_file if filename is None else filename | ||
| local_path = str(local_file) | ||
| filename = local_path if filename is None else filename |
There was a problem hiding this comment.
Path type change breaks path_in_repo on Windows
Low Severity
Changing local_file from str | None to Path | None means str(local_file) uses OS-specific path separators. On Windows, str(Path('src/app.py')) produces 'src\\app.py'. When filename is not provided, local_path (with backslashes) is assigned to filename and used as path_in_repo in upload_file. The downstream _validate_path_in_repo only normalizes forward slashes, so backslashes pass through to the Hub API, potentially creating a file with a malformed repo path. Previously, local_file was a raw str preserving the user's forward slashes.
Reviewed by Cursor Bugbot for commit 47d616a. Configure here.


Main fix
Space backend webhook handler is sometimes (very rarely) lagging behind the "synchronous limit" defined internally in moon-landing. Let's make hot-reload still work in this case
Misc
See cursor summary
Note
Medium Risk
Moderate risk: changes affect the
hf spaces hot-reloadupload flow and add polling/strict SHA validation, which could cause new CLI failures or waits if backend propagation differs orshais unavailable.Overview
Improves
hf spaces hot-reloadreliability by capturing the Space’s current running SHA, passing it asparent_commitduring the upload, and pollingspace_infountil the reported SHA advances to the new hot-reload commit (failing fast if it never matches).Enhances CLI ergonomics:
--local-fileis now aPATH/Pathoption, adds a non-interactive fallback when no TTY is available (persist temp checkout + instructions), and prints a short post-commit sync hint when hot-reloading from a local path.Adds a small hot-reload client tweak by setting a default
httpxclient timeout, and updates the generated CLI docs accordingly.Reviewed by Cursor Bugbot for commit 47d616a. Bugbot is set up for automated code reviews on this repo. Configure here.