mirror of
https://github.com/Comfy-Org/comfy-swift-sdk.git
synced 2026-11-04 23:47:26 +00:00
[PR #13] [CLOSED] feat(jobs): JobDetailDTO foundation for /api/jobs migration #17
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#17
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/13
Author: @mattmillerai
Created: 6/21/2026
Status: ❌ Closed
Base:
main← Head:feat/api-jobs-migration-foundation📝 Commits (1)
223c35dfeat(jobs): add JobDetailDTO foundation for /api/jobs migration📊 Changes
3 files changed (+208 additions, -0 deletions)
View changed files
➕
MIGRATION.md(+47 -0)➕
Sources/ComfySwiftSDK/Internal/DTOs/JobDetailDTO.swift(+71 -0)➕
Tests/ComfySwiftSDKTests/JobDetailDTOTests.swift(+90 -0)📄 Description
Draft — first, conflict-free step of #12.
Adds the well-specified, fully-testable foundation for migrating the SDK's job-status read and cancel off the deprecated/legacy endpoints onto
/api/jobs:JobDetailDTO(GET /api/jobs/{job_id}) — decodes theJobDetailResponseshape and remaps itspending | in_progress | completed | failed | cancelledstatus onto the legacyqueued/running/success/error/cancelledvocabulary the SDK's state machine already uses (legacyEquivalentStatus), so the cutover is a drop-in.JobCancelDTO(POST /api/jobs/{job_id}/cancel) — the{ "cancelled": boolean }response body.MIGRATION.md— the plan, status remap table, and what's gated on a staging smoke test.Why scoped this way
prompt_id==job_id, soJobHandle.idis already the correct path param — no id mapping needed.outputsis unchanged ("Full outputs object from ComfyUI"), so the/api/viewbyte path doesn't move; this DTO reuses the existingNodeOutputPayload.Transport, updatingPollingFallback/ReattachCoordinator/WebSocketSession+ tests, moving the contract-manifest entries) rides on top once #10 lands, and is gated on a staging smoke test — the one acceptance criterion the unit suite can't prove. That's why this is a draft.Verification
swift buildcleanswift test— 140 tests (+6: decode of completed/failed/pending, the full status remap, the conservative-unknown fallback, and the cancel body)Closes part of #12.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.