Repository navigation
release: 0.4.1 — stop downloading the browser runtime from a private release - #13
Merged
Merged
Conversation
0.4.0 pinned a download URL to this repository's GitHub releases, but the repository is private, so a fresh install could not obtain the browser runtime and every `botlab run` / `build --site` failed after 404s. The browser runtime belongs to the BotLab frontend: it is built from a BotLab checkout and published there. The Python package now only consumes it and never hosts or downloads it by default: - `browser_runtime_url()` reads `BOTLAB_RUNTIME_URL` and returns None when it is unset, so there is no compiled-in fallback address. - A missing runtime stops the command with the two local installs (`ui sync --botlab <checkout>`, `ui fetch --archive <zip>`) instead of an opaque download error; `ensure_browser_runtime()` no longer wraps that message in a second layer. - A configured mirror still works through `BOTLAB_RUNTIME_URL` or `ui fetch --url`, and download failures suggest the local paths. - README states the ownership boundary and stops pinning a version in the examples. Version 0.4.1.
carlvon17
added a commit
that referenced
this pull request
Nov 5, 2026
release/0.4.0 was squash-merged as #12 (62 files, 14418+/526-); the remaining tree delta vs this branch is exactly #13 (68+/46-) plus the v3 SDK sync (1034+/217-), i.e. 1102+/263- with zero drift. Recorded with -s ours so the branch history is reachable from main and the ref can be retired; also covers merge/local-wip-20261028 and feat/localized-labels (both ancestors of this branch). Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
修掉 PyPI 0.4.0 的一个致命问题:
_browser_runtime.py把浏览器运行时的下载地址硬编码成https://github.com/OpenLegged/botlab-python/releases/download/v<version>/botlab-browser-runtime-<version>.zip,而本仓库是 private,于是干净安装后第一次botlab run/ 带预览的run --out/build --site全部 404,用户没有任何本地绕法(0.4.0 的文案只提ui fetch --archive,但 archive 本身只有 GitHub Release 上有)。浏览器运行时归前端:它由 BotLab checkout 构建并发布,Python 包只做消费方。0.4.1 把这条边界落到代码里,并去掉编译进 wheel 的私有地址:
browser_runtime_url()改为读BOTLAB_RUNTIME_URL,未设置时返回None;包里不再有任何写死的下载地址。fetch_browser_runtime()无源时直接报错,一次说清两条本地安装路径(botlab ui sync --botlab <checkout>/botlab ui fetch --archive <zip>)和镜像开关;ensure_browser_runtime()不再把这条消息包第二层。BOTLAB_RUNTIME_URL或ui fetch --url)仍可自动下载;下载失败文案也改指向本地两条路径。ui fetch --url的帮助文本、README 的运行时章节与命令表同步到新边界,示例里的版本号改成<version>,不再随发版过期。0.4.1(pyproject.toml、src/botlab/__init__.py、uv.lock)。不受影响:
--native、--headless、validate、普通build(release.zip)从不需要浏览器运行时;已验证的运行时缓存照旧复用。验证
uv run ruff check .→ All checks passeduv run pytest(3.12)→ 1289 tests, 0 failed, 10 skipped;3.13 全新 venv 重跑同样全绿test_missing_runtime_without_a_source_names_both_local_installs固定住「无源时报错必须同时给出ui sync --botlab、ui fetch --archive、BOTLAB_RUNTIME_URL」;test_ensure_downloads_once_and_reuses_verified_cache改成断言镜像 URL 就是BOTLAB_RUNTIME_URLbotlab_python-0.4.1-py3-none-any.whl(sha25660ba1216…)过scripts/verify_wheel.py:PASS,含docs、ui status、validate、真实run --headless、build、--nativeviewer、ui fetch --archive、build --siteBOTLAB_RUNTIME_URL→botlab run退出码 2,报错给出上面三条出路BOTLAB_RUNTIME_URL=file://…/botlab-browser-runtime-0.4.1.zip→ 真实下载并装进缓存后正常起服务build --site产物,嵌套 URL、无跨源隔离头、crossOriginIsolated:false):画面在动、拖拽生效、0 console error,证据在tmp/pypi-0.4.1-acceptance/风险
botlab run不再「自己想办法下载」,而是要求先ui sync/ui fetch --archive。这是有意的,但属于用户可见的默认路径改变,README 与报错文案都写明了。botlab.__version__,所以botlab-browser-runtime-0.4.1.zip需用 0.4.1 代码重新ui sync+ui export;0.4.0 的 zip 会被版本校验拒收(前端字节未变,仅 manifest 版本不同)。botlab.enkeebot.com、/d/宿主)本次不动,运行时仍由前端自己分发。