unsloth/studio/backend
Daniel Han 1fcdfb3048 Open the bootstrap file in binary mode and finish the write
Three defects in the in-place normalisation, all on the Windows upgrade path.

os.open does not add O_BINARY on Windows and CPython never changes the CRT
default of _O_TEXT, so the descriptor was in text mode: os.write turned the LF
straight back into CRLF and ftruncate then cut the LF off, leaving
"<secret>\r". That is the bug this PR exists to fix, reintroduced by the
migration itself, and it is a fixed point that never converges. os.read
translates in reverse too, so a genuinely CRLF file failed verification and was
silently skipped.

os.write may return having written fewer bytes than asked; ftruncate would then
NUL-extend the credential so it no longer matched the hash in auth.db.

os.fchmod only reached Windows in 3.13 and AttributeError is not OSError, so on
3.9 to 3.12 it escaped both handlers and aborted the first start after upgrade.
2026-07-29 06:19:37 +00:00
..
assets feat(studio): add DoRA support to studio (#7315) 2026-07-24 03:24:16 -07:00
auth Open the bootstrap file in binary mode and finish the write 2026-07-29 06:19:37 +00:00
core Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
hub Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
loggers Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
models feat(studio): adjustable llama-server parallel slots from the web UI (#7447) 2026-07-28 18:03:28 -07:00
picker Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
plugins Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
requirements Installer: stop requiring a developer toolchain on the consumer path (#7547) 2026-07-28 18:50:38 -07:00
routes Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
state feat(studio): run chats in parallel in the Chat tab (#7455) 2026-07-28 04:40:38 -07:00
storage Studio: add Deep Research (#7219) 2026-07-26 23:36:02 -07:00
tests Open the bootstrap file in binary mode and finish the write 2026-07-29 06:19:37 +00:00
utils Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
cloudflare_tunnel.py Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
colab.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
main.py Show release notes in the update popup, sourced from CHANGELOG.md (#7432) 2026-07-28 21:26:43 -07:00
mcp_server.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
run.py Studio: read model text as utf-8 so umlauts survive on Windows (#7467) 2026-07-28 21:27:27 -07:00
startup_banner.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00