[PR #12] [MERGED] Add local build/serve tooling to test environments without publishing #15

Closed
opened 2026-10-26 22:22:58 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/ComfyUI-Standalone-Environments/pull/12
Author: @Kosinkadink
Created: 7/26/2026
Status: ✅ Merged
Merged: 7/27/2026
Merged by: @Kosinkadink

Base: main ← Head: feat/local-build-tooling


📝 Commits (3)

  • 655a7b5 Add local build/serve tooling to test environments without publishing
  • b4e3703 Merge remote-tracking branch 'origin/main' into feat/local-build-tooling
  • b6e4121 Sync local tooling with post-ROCm-7.14 matrix: no python_version overrides

📊 Changes

6 files changed (+857 additions, -0 deletions)

View changed files

➕ .github/workflows/test-local-tooling.yml (+41 -0)
📝 .gitignore (+4 -0)
📝 README.md (+37 -0)
➕ scripts/build_local.py (+362 -0)
➕ scripts/serve_local.py (+163 -0)
➕ scripts/test_local_tooling.py (+250 -0)

📄 Description

Summary

Developer tooling to build and test standalone-environment artifacts locally, without publishing anything. Pairs with the dev-only COMFY_STANDALONE_BASE_URL override in Comfy-Org/Comfy-Desktop#1248 (honored only by unpackaged pnpm dev builds).

  • scripts/build_local.py reproduces the Build Standalone Environment workflow for one host-native variant: same PBS Python (incl. the win-amd 3.12 matrix override), requirements concatenation, uv bundling, strip step, smoke test, manifest shape, and exact 7z parameters. Output lands in dist/<variant>/<tag>/.
  • scripts/serve_local.py generates the R2 URL layout (latest.json, <variant>/releases.json, <variant>/<tag>/<file>, plus the working-tree torch-index-stacks.json) and serves it on loopback (127.0.0.1) only. Entries are checked against the same allowlists the desktop's r2Catalog validator enforces, so a bad tag fails here instead of silently vanishing from the install wizard.
  • scripts/test_local_tooling.py (20 tests, no network): metadata generation, validator-rejection behavior, and CI-parity contract tests that fail when build-standalone-env.yml changes (python/PBS versions, matrix ids, vendor requirements, per-variant python overrides, 7z args) without updating the tooling. New test-local-tooling.yml workflow runs them on relevant path changes.

Safety

  • No upload path, no R2/AWS credentials anywhere in the new scripts; outbound traffic is limited to downloads (PBS, uv, ComfyUI clone).
  • Local tags default to <ref>-local1 and unsafe tags (e.g. branch refs with /, traversal) are rejected before the multi-GB build starts.
  • HTTP server binds loopback only.

Workflow

python scripts/build_local.py win-nvidia --comfyui-ref v0.4.61
python scripts/serve_local.py
# in the desktop repo:
$env:COMFY_STANDALONE_BASE_URL = 'http://127.0.0.1:8000'; pnpm dev

Testing

  • python -m unittest scripts.test_local_tooling -v - 20/20 pass
  • python -m unittest scripts.test_torch_index_scripts - unaffected, still green
  • End-to-end smoke: generated metadata + archive + stacks manifest served and fetched over HTTP with correct sizes (the desktop's exact byte-size integrity check reads the same file the server serves)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/ComfyUI-Standalone-Environments/pull/12 **Author:** [@Kosinkadink](https://github.com/Kosinkadink) **Created:** 7/26/2026 **Status:** ✅ Merged **Merged:** 7/27/2026 **Merged by:** [@Kosinkadink](https://github.com/Kosinkadink) **Base:** `main` ← **Head:** `feat/local-build-tooling` --- ### 📝 Commits (3) - [`655a7b5`](https://github.com/Comfy-Org/ComfyUI-Standalone-Environments/commit/655a7b51abf7c5515e0bf54882976550f1379fea) Add local build/serve tooling to test environments without publishing - [`b4e3703`](https://github.com/Comfy-Org/ComfyUI-Standalone-Environments/commit/b4e3703a870aaa3e6fc5187d0c06b546825fee05) Merge remote-tracking branch 'origin/main' into feat/local-build-tooling - [`b6e4121`](https://github.com/Comfy-Org/ComfyUI-Standalone-Environments/commit/b6e41215c0942b510bb596e519c43109b4d1d82c) Sync local tooling with post-ROCm-7.14 matrix: no python_version overrides ### 📊 Changes **6 files changed** (+857 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/test-local-tooling.yml` (+41 -0) 📝 `.gitignore` (+4 -0) 📝 `README.md` (+37 -0) ➕ `scripts/build_local.py` (+362 -0) ➕ `scripts/serve_local.py` (+163 -0) ➕ `scripts/test_local_tooling.py` (+250 -0) </details> ### 📄 Description ## Summary Developer tooling to build and test standalone-environment artifacts locally, without publishing anything. Pairs with the dev-only `COMFY_STANDALONE_BASE_URL` override in Comfy-Org/Comfy-Desktop#1248 (honored only by unpackaged `pnpm dev` builds). - `scripts/build_local.py` reproduces the `Build Standalone Environment` workflow for one host-native variant: same PBS Python (incl. the win-amd 3.12 matrix override), requirements concatenation, uv bundling, strip step, smoke test, manifest shape, and exact 7z parameters. Output lands in `dist/<variant>/<tag>/`. - `scripts/serve_local.py` generates the R2 URL layout (`latest.json`, `<variant>/releases.json`, `<variant>/<tag>/<file>`, plus the working-tree `torch-index-stacks.json`) and serves it on loopback (`127.0.0.1`) only. Entries are checked against the same allowlists the desktop's `r2Catalog` validator enforces, so a bad tag fails here instead of silently vanishing from the install wizard. - `scripts/test_local_tooling.py` (20 tests, no network): metadata generation, validator-rejection behavior, and CI-parity contract tests that fail when `build-standalone-env.yml` changes (python/PBS versions, matrix ids, vendor requirements, per-variant python overrides, 7z args) without updating the tooling. New `test-local-tooling.yml` workflow runs them on relevant path changes. ## Safety - No upload path, no R2/AWS credentials anywhere in the new scripts; outbound traffic is limited to downloads (PBS, uv, ComfyUI clone). - Local tags default to `<ref>-local1` and unsafe tags (e.g. branch refs with `/`, traversal) are rejected before the multi-GB build starts. - HTTP server binds loopback only. ## Workflow ```powershell python scripts/build_local.py win-nvidia --comfyui-ref v0.4.61 python scripts/serve_local.py # in the desktop repo: $env:COMFY_STANDALONE_BASE_URL = 'http://127.0.0.1:8000'; pnpm dev ``` ## Testing - `python -m unittest scripts.test_local_tooling -v` - 20/20 pass - `python -m unittest scripts.test_torch_index_scripts` - unaffected, still green - End-to-end smoke: generated metadata + archive + stacks manifest served and fetched over HTTP with correct sizes (the desktop's exact byte-size integrity check reads the same file the server serves) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:22:58 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Standalone-Environments#15
No description provided.