[PR #22] [MERGED] fix(transport): fail fast on multiple image inputs (interim guard for #16) #24

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

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-swift-sdk/pull/22
Author: @mattmillerai
Created: 6/21/2026
Status: ✅ Merged
Merged: 6/21/2026
Merged by: @mattmillerai

Base: main ← Head: fix/guard-multiple-image-inputs


📝 Commits (1)

  • ff6a91b fix(transport): fail fast on multiple image inputs instead of silent last-wins

📊 Changes

2 files changed (+78 additions, -0 deletions)

View changed files

📝 Sources/ComfySwiftSDK/Internal/Transport.swift (+9 -0)
➕ Tests/ComfySwiftSDKTests/MultipleImageInputGuardTests.swift (+69 -0)

📄 Description

Interim fix for #16 — does not close it. The real fix (keyed input→node mapping) stays tracked there.

submitJob patches every LoadImage node per image input, so >1 image silently collapsed to "last image wins" with no error. This adds a fail-fast guard that rejects more than one image input up front:

ComfyError.serverRejected(reason: .other("multiple_image_inputs_unsupported"))

Silent wrong output → clear, descriptive failure. Single- and zero-image requests are unaffected.

Tests: two-image request throws the specific error, and short-circuits before any network call (asserts zero outbound requests).

Leaving #16 open for the keyed-mapping feature (a 0.2.0 item).

🤖 Generated with Claude Code


🔄 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/comfy-swift-sdk/pull/22 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 6/21/2026 **Status:** ✅ Merged **Merged:** 6/21/2026 **Merged by:** [@mattmillerai](https://github.com/mattmillerai) **Base:** `main` ← **Head:** `fix/guard-multiple-image-inputs` --- ### 📝 Commits (1) - [`ff6a91b`](https://github.com/Comfy-Org/comfy-swift-sdk/commit/ff6a91b0b98a5582760cf2c16e74fed73812cc20) fix(transport): fail fast on multiple image inputs instead of silent last-wins ### 📊 Changes **2 files changed** (+78 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Sources/ComfySwiftSDK/Internal/Transport.swift` (+9 -0) ➕ `Tests/ComfySwiftSDKTests/MultipleImageInputGuardTests.swift` (+69 -0) </details> ### 📄 Description Interim fix for #16 — **does not close it.** The real fix (keyed input→node mapping) stays tracked there. `submitJob` patches *every* `LoadImage` node per image input, so >1 image silently collapsed to "last image wins" with no error. This adds a fail-fast guard that rejects more than one image input up front: ```swift ComfyError.serverRejected(reason: .other("multiple_image_inputs_unsupported")) ``` Silent wrong output → clear, descriptive failure. Single- and zero-image requests are unaffected. Tests: two-image request throws the specific error, and short-circuits **before any network call** (asserts zero outbound requests). Leaving #16 open for the keyed-mapping feature (a 0.2.0 item). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:34:03 +00:00
Sign in to join this conversation.
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/comfy-swift-sdk#24
No description provided.