mirror of
https://github.com/Comfy-Org/comfy-swift-sdk.git
synced 2026-11-04 23:47:26 +00:00
[PR #1] [MERGED] feat: X-Comfy-Client traceability header (+ fix source-level test after extraction) #6
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#6
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/1
Author: @mattmillerai
Created: 6/18/2026
Status: ✅ Merged
Merged: 6/18/2026
Merged by: @mattmillerai
Base:
main← Head:feat/client-traceability-header📝 Commits (2)
69ff980feat: stamp X-Comfy-Client header on every request for log traceability6dd1933fix(test): point source-level reattach test at the standalone package root📊 Changes
4 files changed (+73 additions, -8 deletions)
View changed files
➕
Sources/ComfySwiftSDK/Internal/ComfySDKInfo.swift(+38 -0)📝
Sources/ComfySwiftSDK/Public/ComfyCloudClient.swift(+2 -2)➕
Tests/ComfySwiftSDKTests/ComfySDKInfoTests.swift(+26 -0)📝
Tests/ComfySwiftSDKTests/ReattachCoordinatorTests.swift(+7 -6)📄 Description
Adds lightweight request traceability to the SDK so Comfy Cloud can attribute SDK / Comfy Go traffic in logs — and repairs a test that broke when the package was extracted to its own repo.
Traceability header
X-Comfy-Client: comfyswiftsdk/<version>, set via the session'shttpAdditionalHeadersin a newComfySDKInfo.sessionConfiguration().URLSessionconstruction sites route through it, so the header rides every path: REST, the WebSocket upgrade handshake, and the OAuth token exchange.ComfySDKInfoholds the version (the SDK had no version constant) + header name/value.client_idclaim. Per-requestAuthorization/Content-Typeheaders are untouched and take precedence.ComfySDKInfoTests).Drive-by test fix
ReattachCoordinatorTestsreadsComfyCloudClient.swiftoff disk for a source-level assertion, walking five dirs up from#filePathto the oldComfy-iOS/Packages/ComfySwiftSDK/…nested layout. After extraction the package root is three up — it was failing on every fresh clone (NSFileReadNoSuchFile). Fixed the path math.Verification
swift build— clean.swift test— 96/96 pass (was 94, 1 failing pre-PR due to the path bug; +2 new header tests).Notes: there's a stale
--package-path Packages/ComfySwiftSDKreference in anOAuthMetadataIntegrationTestsdoc comment (non-functional) — left for a later sweep.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.