fix: reject incompatible Managed Build architectures - #1502
benceruleanlu wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change adds ChangesHost Architecture Compatibility
Sequence Diagram(s)sequenceDiagram
participant installEnvironment
participant resolveHost
participant selectArtifactForHost
installEnvironment->>resolveHost: Resolve OS, architecture, and GPU
installEnvironment->>selectArtifactForHost: Validate artifact against host
selectArtifactForHost-->>installEnvironment: Return compatible artifact or null
installEnvironment-->>installEnvironment: Reject incompatible artifact before side effects
Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Managed Builds now reject unsupported host architectures during selection and before installation side effects, while preserving supported x64 Windows and Linux behavior. The change is ready to merge. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Native ARM64 Desktop could offer a Managed Build with the same OS and GPU even though the archive contains x64 Python. This change includes
process.archin host resolution and checks it before treating an artifact as compatible. Catalog targets, default installs, explicit artifact selections, and version changes now reject incompatible architectures, including CPU fallbacks. Saved selections are checked again before an install retry releases terminals or changes the environment.Builder's current API does not expose artifact architecture. This guard follows its verified build contract: Windows and Linux archives use x64 Python, and macOS is not currently a buildable target. See the curated interpreter images and buildable targets. Supporting native ARM64 Managed Builds will require Builder to publish matching artifacts with an architecture contract. The standalone runtime catalog is separate from this check.
Test coverage adds architecture rejection cases, verifies that catalog and all three artifact resolvers reject Windows/Linux ARM64, and checks that retrying an incompatible saved selection does not start downloads or modify the environment. Existing x64 GPU preference and CPU fallback tests continue to pass; fixtures now specify their host architecture explicitly.
Validation:
targets,builds, ComfyBuilder source, and dev-platform IPC handlers).git diff --checkpassed.Change breakdown (added + deleted lines; no merge-only changes):
Product code paths:
src/main/comfybuilder/targets.ts(+17 / -3)src/main/comfybuilder/types.ts(+1 / -0)src/main/devplatform/builds.ts(+3 / -3)src/main/sources/comfybuilder/index.ts(+7 / -1)Test code paths:
src/main/comfybuilder/targets.test.ts(+44 / -12)src/main/devplatform/builds.test.ts(+55 / -1)src/main/lib/ipc/registerDevPlatformHandlers.test.ts(+2 / -2)src/main/sources/comfybuilder/index.test.ts(+22 / -2)Documentation path:
src/main/comfybuilder/index.ts(+1 / -1; updates the inline usage example only)No configuration, generated files, lockfiles, or vendored code changes.