mirror of
https://github.com/Comfy-Org/comfy-swift-sdk.git
synced 2026-11-04 23:47:26 +00:00
[PR #45] [MERGED] refactor: remove dead JobHandle.reconnectToken scaffolding #49
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-swift-sdk#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-swift-sdk/pull/45
Author: @mattmillerai
Created: 7/11/2026
Status: ✅ Merged
Merged: 7/16/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-2863-remove-reconnecttoken📝 Commits (1)
f94f346refactor: remove dead JobHandle.reconnectToken scaffolding📊 Changes
3 files changed (+3 additions, -6 deletions)
View changed files
📝
Sources/ComfySwiftSDK/Internal/Transport.swift(+1 -1)📝
Sources/ComfySwiftSDK/Public/ComfyCloudClient.swift(+1 -1)📝
Sources/ComfySwiftSDK/Public/JobHandle.swift(+1 -4)📄 Description
ELI-5
JobHandlecarried areconnectTokenfield that was scaffolding for a reconnect feature that never got built. It was only ever set toniland never read anywhere in the SDK, so it did nothing. This deletes it and the tworeconnectToken: nilarguments that fed it — pure dead-code cleanup, no behavior change.What changed
Public/JobHandle.swift: removed theinternal let reconnectToken: String?field, thereconnectToken:init parameter, and its assignment. The init is nowinternal init(id: String) { self.id = id }.Internal/Transport.swift:JobHandle(id: dto.promptId, reconnectToken: nil)→JobHandle(id: dto.promptId).Public/ComfyCloudClient.swift:JobHandle(id: promptId, reconnectToken: nil)→JobHandle(id: promptId).Why it's safe
reconnectTokenhad zero reads — only the declaration and the twonilwrites. Nothing consumed it.internal; the public API surface (public let id) is unchanged, so this is not a public API break.JobHandle'sHashable/Sendableconformances are compiler-synthesized. BecausereconnectTokenwasnilat every construction site, equality/hashing overidalone is behaviorally identical to the oldid+reconnectTokensynthesis.JobHandle(id: "job-1")(no token arg), and the source-substring assertion forJobHandle(id: promptIdstill holds.Testing
swift build— clean.swift test— 226 tests in 28 suites pass.grep -rn reconnectToken Sources Tests— returns nothing.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.