[PR #146] [CLOSED] fix(models): return the json arm of RunResult from RequestHandle.get() #146

Closed
opened 2026-10-31 22:05:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/146
Author: @mattmillerai
Created: 9/14/2026
Status: ❌ Closed

Base: main ← Head: matt/fix-request-handle-get-kind


📝 Commits (1)

  • 036951d fix(models): return the json arm of RunResult from RequestHandle.get()

📊 Changes

2 files changed (+12 additions, -3 deletions)

View changed files

📝 src/sdk/modelRequests.test.ts (+4 -1)
📝 src/sdk/modelRequests.ts (+8 -2)

📄 Description

ELI-5

Two PRs landed on main in the right order but were never compiled together: #133 added the queued RequestHandle.get() returning { data, requestId }, then #139 changed RunResult into a kind: "json" | "binary" union. The result is that main does not typecheck — the Test and build-check jobs are red on the latest commit (f886e03), and every open PR inherits that failure. This adds the missing kind: "json" tag to the one return, and asserts it in the existing get() test.

What changed

  • src/sdk/modelRequests.ts — RequestHandle.get() returns { kind: "json", data, requestId }. The queued result route is decoded as JSON, so there is no binary arm here the way there is on run.
  • src/sdk/modelRequests.test.ts — the existing "collects the provider payload as a RunResult" test also asserts result.kind === "json".

Not addressed here: the sdk-parity job is also red on main because parity/python-surface.json is stale against the Python SDK's default branch. That is a separate pnpm sync:python-surface + allowlist decision.

Testing

  • pnpm typecheck — clean (was: TS2322 … Property 'kind' is missing at modelRequests.ts:880)
  • pnpm build — clean
  • pnpm test — 25 files, 554 tests pass
  • pnpm lint, pnpm format:check — clean

Provenance

Found while merging main into #138 (the discovery-methods PR), whose typecheck went red on code byte-identical to main. Fix is the one-line union tag; no behaviour change.


🔄 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-typescript-sdk/pull/146 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 9/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `matt/fix-request-handle-get-kind` --- ### 📝 Commits (1) - [`036951d`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/036951da8dbe5aeeb3d817a7cabaa6aa76ec2682) fix(models): return the json arm of RunResult from RequestHandle.get() ### 📊 Changes **2 files changed** (+12 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/sdk/modelRequests.test.ts` (+4 -1) 📝 `src/sdk/modelRequests.ts` (+8 -2) </details> ### 📄 Description ## ELI-5 Two PRs landed on `main` in the right order but were never compiled together: #133 added the queued `RequestHandle.get()` returning `{ data, requestId }`, then #139 changed `RunResult` into a `kind: "json" | "binary"` union. The result is that `main` does not typecheck — the `Test` and `build-check` jobs are red on the latest commit (f886e03), and every open PR inherits that failure. This adds the missing `kind: "json"` tag to the one return, and asserts it in the existing `get()` test. ## What changed - `src/sdk/modelRequests.ts` — `RequestHandle.get()` returns `{ kind: "json", data, requestId }`. The queued result route is decoded as JSON, so there is no binary arm here the way there is on `run`. - `src/sdk/modelRequests.test.ts` — the existing "collects the provider payload as a RunResult" test also asserts `result.kind === "json"`. Not addressed here: the `sdk-parity` job is also red on `main` because `parity/python-surface.json` is stale against the Python SDK's default branch. That is a separate `pnpm sync:python-surface` + allowlist decision. ## Testing - `pnpm typecheck` — clean (was: `TS2322 … Property 'kind' is missing` at modelRequests.ts:880) - `pnpm build` — clean - `pnpm test` — 25 files, 554 tests pass - `pnpm lint`, `pnpm format:check` — clean ## Provenance Found while merging `main` into #138 (the discovery-methods PR), whose typecheck went red on code byte-identical to `main`. Fix is the one-line union tag; no behaviour change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:05:02 +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-typescript-sdk#146
No description provided.