Repository navigation
[backport cloud/1.54] feat: use generated ToolCallSummary type for persisted tool-call schema - #19606
Conversation
…ma (#19585) ## Summary Replaces the interim hand-written `zPersistedToolCallSummary` zod schema in `agentApiSchema.ts` with the generated `zToolCallSummary` from `@comfyorg/ingest-types/zod`, now that [Comfy-Org/cloud#10360](Comfy-Org/cloud#10360) added the `ToolCallSummary` OpenAPI schema for persisted tool-call history. ## Base branch note `main` does not yet have `ToolCallSummary` in `packages/ingest-types` — the automated type-update PR that adds it, #19526, is still open (unmerged) at the time of this PR. Its single commit (`c819ad46`) is a pure, isolated `packages/ingest-types` regen with no conflicts against `main`'s tip, so I cherry-picked just that commit onto a fresh branch off `main` rather than basing on #19526's own branch, to keep this PR's history clean and independent of that bot-managed branch's future churn. If #19526 merges first, this PR's first commit becomes a no-op on rebase; if this merges first, #19526 will need a trivial rebase. ## Changes - **What**: - `zPersistedToolCallSummary` now aliases the generated `zToolCallSummary` directly instead of a hand-rolled permissive schema. - Fixed a codegen gap this surfaced: `AgentMessage.content`'s generated **TS type** keeps a `[key: string]: unknown` index signature, but its generated **zod schema** dropped `z.record(z.unknown())` for a bare `{ tool_calls }` object with no `.passthrough()` — which would otherwise reject every other `content` field (`text`, `attachments`, `workflow_references`, ...) this file relies on. Added a local `zAgentMessageContent` (tool_calls typed via `zToolCallSummary`, `.passthrough()` for the rest) to bridge it. - Updated `agentTranscript.ts`'s `parseToolCallEntry`/`toolCallPartState`/`toolCallOk` now that `tool_call_id` is guaranteed present and `status` is closed to `'success' | 'error'` (previously `z.string().optional()` with an `id`-fallback for pre-`tool_call_id` rows). - Updated test fixtures in `agentTranscript.test.ts`, `agentEventTransport.test.ts`, and `agentConversationStore.test.ts` to match the tightened contract (valid fixtures now include `tool_call_id` + `'success'/'error'` status; fixtures deliberately testing malformed/legacy shapes now assert the entry is **dropped** rather than rendered with a broadened status vocabulary, matching the generated schema's own docstring: "a row a dead turn left in pending/running ... is dropped rather than shown as a perpetual-progress chip"). - **Breaking**: None externally — this is FE-internal parsing of already-persisted rows. Behavior only changes for the never-before-possible edge cases the interim schema was defensively permissive about (a persisted row missing `tool_call_id`, or carrying a non-terminal/unrecognized `status`): those are now dropped instead of rendered, matching what the finalized backend contract guarantees can no longer occur. - **Dependencies**: None new — `@comfyorg/ingest-types` is an existing workspace dependency; only its generated content changed (via cherry-picked commit). ## Before / After **Before** (`agentApiSchema.ts`): ```ts export const zPersistedToolCallSummary = z .object({ id: z.string(), tool_call_id: z.string().optional(), tool_name: z.string(), status: z.string().optional(), duration_ms: z.unknown().optional() }) .passthrough() ``` **After**: ```ts import { zToolCallSummary } from '@comfyorg/ingest-types/zod' // ... export const zPersistedToolCallSummary = zToolCallSummary ``` ## Review Focus - The codegen-gap fix (`zAgentMessageContent`) is the part most worth a second look — it's necessary for anything to compile/parse once `content`'s zod schema tightened, but it's patching a mismatch between the OpenAPI-generated TS type and its zod counterpart rather than something this PR set out to change. Cloud/codegen maintainers may want to fix this upstream (route `additionalProperties`/index-signature cases through `.passthrough()` in the zod plugin) so future consumers don't need this kind of local patch. - `tool_call_id` is now required and `status` is a closed `'success' | 'error'` enum — I removed the old `id`-fallback and broadened-status-vocabulary handling in `agentTranscript.ts` accordingly, trusting the backend's own docstring that only terminal, `tool_call_id`-bearing rows are ever persisted. Worth a sanity check against how `services/agent/internal/persist.ToolCallSummary` actually writes these rows. - Verification: `pnpm typecheck` (repo-wide, clean) and `pnpm test:unit` for every changed/affected file — `agentApiSchema.test.ts`, `agentTranscript.test.ts` (34 tests), `agentEventTransport.test.ts`, `agentConversationStore.test.ts` — all green. Did not run the full unit suite; a large, pre-existing and unrelated set of `.vue`-component test files fail in this environment with `Cannot find package '@vue/compiler-sfc'` even on unmodified `main` (verified via `git stash`), so that failure is not from this change. --- _Requested by **Christian Byrne** · #comfy-agent-user-feedback_ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
🎨 Storybook: ✅ Built — View Storybook🌐 Website E2ETip All tests passed.
🎭 Playwright: ✅ 1962 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-30T10:17:54.748Z",
"gitSha": "3547088a3c761691c31b1ec170a170b8409d531c",
"branch": "backport-19585-to-cloud-1.54",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2042.6199999999994,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.925000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 382.77700000000004,
"heapDeltaBytes": -3507876,
"heapUsedBytes": 67090460,
"domNodes": -281,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.921,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2033.2720000000108,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.864999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.332,
"heapDeltaBytes": -1510668,
"heapUsedBytes": 68131112,
"domNodes": -280,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 13.185999999999998,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1773.271999999963,
"styleRecalcs": 75,
"styleRecalcDurationMs": 26.438000000000002,
"layouts": 14,
"layoutDurationMs": 4.043,
"taskDurationMs": 695.167,
"heapDeltaBytes": 4985328,
"heapUsedBytes": 75407544,
"domNodes": -280,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 125.774,
"eventListeners": -162,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1740.5499999999847,
"styleRecalcs": 74,
"styleRecalcDurationMs": 25.625999999999998,
"layouts": 14,
"layoutDurationMs": 4.002999999999999,
"taskDurationMs": 652.039,
"heapDeltaBytes": -9350376,
"heapUsedBytes": 60596924,
"domNodes": -281,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 109.08800000000001,
"eventListeners": -192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1659.1080000000602,
"styleRecalcs": 30,
"styleRecalcDurationMs": 14.008999999999999,
"layouts": 6,
"layoutDurationMs": 1.1689999999999998,
"taskDurationMs": 285.847,
"heapDeltaBytes": 4307040,
"heapUsedBytes": 74708024,
"domNodes": 77,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 13.184000000000001,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1673.3239999999796,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.449,
"layouts": 6,
"layoutDurationMs": 1.1640000000000001,
"taskDurationMs": 311.722,
"heapDeltaBytes": 4606432,
"heapUsedBytes": 75743284,
"domNodes": 77,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 14.128000000000002,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 509.2140000000427,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.038999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 328.05,
"heapDeltaBytes": -6573584,
"heapUsedBytes": 64811364,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 110.235,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 520.1060000000552,
"styleRecalcs": 13,
"styleRecalcDurationMs": 8.096999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 337.845,
"heapDeltaBytes": -6617584,
"heapUsedBytes": 64870304,
"domNodes": 22,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 109.85,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2019.7279999999864,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.788999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.609,
"heapDeltaBytes": 10961540,
"heapUsedBytes": 86951368,
"domNodes": -269,
"jsHeapTotalBytes": -1413120,
"scriptDurationMs": 27.447999999999993,
"eventListeners": -192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2071.6879999999946,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.018,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 593.151,
"heapDeltaBytes": 8921288,
"heapUsedBytes": 85556260,
"domNodes": -270,
"jsHeapTotalBytes": -1150976,
"scriptDurationMs": 33.605,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2752.7919999999995,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.363000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1233.7830000000001,
"heapDeltaBytes": 16192,
"heapUsedBytes": 66547728,
"domNodes": -274,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 585.2120000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 3038.5350000000244,
"styleRecalcs": 67,
"styleRecalcDurationMs": 14.119999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1314.3290000000002,
"heapDeltaBytes": -10697220,
"heapUsedBytes": 67060836,
"domNodes": -274,
"jsHeapTotalBytes": -1675264,
"scriptDurationMs": 602.4000000000001,
"eventListeners": -158,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3520.9539999999606,
"styleRecalcs": 66,
"styleRecalcDurationMs": 15.805,
"layouts": 60,
"layoutDurationMs": 14.107000000000001,
"taskDurationMs": 1312.183,
"heapDeltaBytes": -11296176,
"heapUsedBytes": 67837976,
"domNodes": -286,
"jsHeapTotalBytes": 4091904,
"scriptDurationMs": 554.6669999999999,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3790.144000000055,
"styleRecalcs": 62,
"styleRecalcDurationMs": 13.245999999999997,
"layouts": 60,
"layoutDurationMs": 14.307,
"taskDurationMs": 1308.219,
"heapDeltaBytes": 8076772,
"heapUsedBytes": 76145352,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 552.411,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2864.541000000031,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.8309999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1576.329,
"heapDeltaBytes": 3044692,
"heapUsedBytes": 84305220,
"domNodes": -284,
"jsHeapTotalBytes": 53248,
"scriptDurationMs": 759.09,
"eventListeners": -12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3028.2860000000937,
"styleRecalcs": 45,
"styleRecalcDurationMs": 10.372,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1588.129,
"heapDeltaBytes": 3765224,
"heapUsedBytes": 84318624,
"domNodes": -253,
"jsHeapTotalBytes": 53248,
"scriptDurationMs": 751.4929999999999,
"eventListeners": -8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2027.6910000000044,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.5380000000000011,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.3669999999999,
"heapDeltaBytes": 9236688,
"heapUsedBytes": 87925052,
"domNodes": -278,
"jsHeapTotalBytes": -2723840,
"scriptDurationMs": 27.854999999999997,
"eventListeners": -162,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2008.6689999999408,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.885000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 444.87799999999993,
"heapDeltaBytes": 21826228,
"heapUsedBytes": 87924708,
"domNodes": -270,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 32.303,
"eventListeners": -192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 514.7690000000011,
"styleRecalcs": 47,
"styleRecalcDurationMs": 14.534,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 311.34700000000004,
"heapDeltaBytes": 15199120,
"heapUsedBytes": 88606824,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 101.053,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 531.3220000000456,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.841,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 320.245,
"heapDeltaBytes": 14872776,
"heapUsedBytes": 88310460,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 102.89,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1992.3319999999762,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.62,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.70300000000003,
"heapDeltaBytes": -6306936,
"heapUsedBytes": 67102444,
"domNodes": -296,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 9.219,
"eventListeners": -242,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2004.9340000000484,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.206,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 368.73,
"heapDeltaBytes": -5143248,
"heapUsedBytes": 68046536,
"domNodes": -294,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.129,
"eventListeners": -240,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1690.1359999999954,
"styleRecalcs": 78,
"styleRecalcDurationMs": 25.323,
"layouts": 18,
"layoutDurationMs": 4.822,
"taskDurationMs": 625.0559999999999,
"heapDeltaBytes": -8443128,
"heapUsedBytes": 64304000,
"domNodes": -294,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 88.10799999999999,
"eventListeners": -238,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1709.897000000069,
"styleRecalcs": 77,
"styleRecalcDurationMs": 26.330000000000002,
"layouts": 18,
"layoutDurationMs": 5.002,
"taskDurationMs": 664.3380000000001,
"heapDeltaBytes": -7879376,
"heapUsedBytes": 65482292,
"domNodes": -296,
"jsHeapTotalBytes": 7069696,
"scriptDurationMs": 93.605,
"eventListeners": -240,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 901.1260000000902,
"styleRecalcs": 19,
"styleRecalcDurationMs": 23.542999999999996,
"layouts": 15,
"layoutDurationMs": 11.442,
"taskDurationMs": 679.106,
"heapDeltaBytes": 22092276,
"heapUsedBytes": 106679496,
"domNodes": 13831,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 22.761000000000003,
"eventListeners": 2385,
"totalBlockingTimeMs": 78,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9711.499000000003,
"styleRecalcs": 249,
"styleRecalcDurationMs": 44.126,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4540.444,
"heapDeltaBytes": -36111968,
"heapUsedBytes": 67056328,
"domNodes": -266,
"jsHeapTotalBytes": -1638400,
"scriptDurationMs": 2004.448,
"eventListeners": -172,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 10599.598000000015,
"styleRecalcs": 249,
"styleRecalcDurationMs": 46.147999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4663.6230000000005,
"heapDeltaBytes": 17692372,
"heapUsedBytes": 93386868,
"domNodes": -274,
"jsHeapTotalBytes": 90112,
"scriptDurationMs": 2033.703,
"eventListeners": -170,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12641.925000000014,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12254.889000000001,
"heapDeltaBytes": -61854424,
"heapUsedBytes": 165599692,
"domNodes": -8068,
"jsHeapTotalBytes": -12099584,
"scriptDurationMs": 186.85799999999998,
"eventListeners": -14933,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12817.586000000007,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12358.112000000001,
"heapDeltaBytes": -33303108,
"heapUsedBytes": 180241008,
"domNodes": -8068,
"jsHeapTotalBytes": -21671936,
"scriptDurationMs": 195.55500000000004,
"eventListeners": -14933,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15894.805000000018,
"styleRecalcs": 88,
"styleRecalcDurationMs": 17.07700000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15438.888,
"heapDeltaBytes": -53252004,
"heapUsedBytes": 187132252,
"domNodes": -8068,
"jsHeapTotalBytes": -12193792,
"scriptDurationMs": 697.12,
"eventListeners": -14931,
"totalBlockingTimeMs": 11,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 15045.671999999968,
"styleRecalcs": 73,
"styleRecalcDurationMs": 14.75499999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14621.846000000001,
"heapDeltaBytes": -27000164,
"heapUsedBytes": 198232112,
"domNodes": -8068,
"jsHeapTotalBytes": -14168064,
"scriptDurationMs": 652.883,
"eventListeners": -14931,
"totalBlockingTimeMs": 2,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 4648.791999999958,
"styleRecalcs": 20,
"styleRecalcDurationMs": 57.43800000000002,
"layouts": 20,
"layoutDurationMs": 24.062,
"taskDurationMs": 4547.911,
"heapDeltaBytes": 695716,
"heapUsedBytes": 210681772,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 83.404,
"eventListeners": 12,
"totalBlockingTimeMs": 112,
"frameDurationMs": 17.223333333333297,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 4592.286999999942,
"styleRecalcs": 20,
"styleRecalcDurationMs": 53.201,
"layouts": 20,
"layoutDurationMs": 22.073000000000008,
"taskDurationMs": 4480.5740000000005,
"heapDeltaBytes": -17687268,
"heapUsedBytes": 183966848,
"domNodes": -8068,
"jsHeapTotalBytes": 20746240,
"scriptDurationMs": 72.129,
"eventListeners": -14933,
"totalBlockingTimeMs": 41,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6525.757999999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6296.965,
"heapDeltaBytes": -6965440,
"heapUsedBytes": 178183048,
"domNodes": 0,
"jsHeapTotalBytes": -26476544,
"scriptDurationMs": 95.10600000000002,
"eventListeners": -8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6362.092000000075,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6194.929,
"heapDeltaBytes": 7390752,
"heapUsedBytes": 185459808,
"domNodes": 0,
"jsHeapTotalBytes": -26476544,
"scriptDurationMs": 107.94000000000004,
"eventListeners": -8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 88.08699999997316,
"styleRecalcs": 6,
"styleRecalcDurationMs": 11.422999999999998,
"layouts": 2,
"layoutDurationMs": 1.1849999999999998,
"taskDurationMs": 62.56599999999998,
"heapDeltaBytes": 3177752,
"heapUsedBytes": 71750008,
"domNodes": 127,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.106,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 74.15000000003147,
"styleRecalcs": 6,
"styleRecalcDurationMs": 10.294999999999998,
"layouts": 3,
"layoutDurationMs": 0.8699999999999999,
"taskDurationMs": 51.59300000000001,
"heapDeltaBytes": 3021016,
"heapUsedBytes": 72060652,
"domNodes": 104,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 3.603,
"eventListeners": 35,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.54 #19606 +/- ##
=============================================
Coverage ? 82.51%
=============================================
Files ? 2551
Lines ? 134642
Branches ? 34059
=============================================
Hits ? 111101
Misses ? 23027
Partials ? 514
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
ba05923 to
2632f20
Compare
ryan-di
left a comment
There was a problem hiding this comment.
The cloud backport matches merged #19585. Reviewed the generated schema, message-content passthrough, transcript parsing, and updated coverage. The attribution cleanup preserves the exact code tree and parent. Code checks passed before that message-only rewrite, and the repaired attribution check now passes. Fresh CI reruns are still in progress.
…ws in agent history load (#19624) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://Comfy-Org.slack.com/archives/C0BGH348Z0C/p1789885354111069)_ Backport of #19621 to `cloud/1.54`. This branch's `zToolCallSummary` / `zPersistedToolCallSummary` / `parseToolCallEntry` code is byte-identical to `main` at the time #19621 was branched (both descend from #19606's `[backport cloud/1.54] feat: use generated ToolCallSummary type for persisted tool-call schema`), so the cherry-pick applied cleanly with no conflicts. ## Before `agentRestClient.ts`'s `getMessages()` calls `zAgentMessages.parse()` (throws, not `safeParse`). Because `zAgentMessage.content.tool_calls` was typed as `z.array(zToolCallSummary)` — the generated schema, which requires `tool_call_id`, closes `status` to `'success' | 'error'`, and requires an integer `duration_ms` — a single non-conforming historical tool-call row threw during `.parse()` and failed the entire array/message/response parse, surfacing as `agent_history_load_failed` instead of gracefully degrading just that one entry. ## After - `agentApiSchema.ts`: the message-parse boundary's `content.tool_calls` is now `z.array(z.unknown())`, so a malformed entry can never throw at `zAgentMessages.parse()`. `zPersistedToolCallSummary` (used only by `parseToolCallEntry`'s own `safeParse`) relaxes the generated schema: `tool_call_id` optional, `status` a bare string, `duration_ms` not required to be an integer. - `agentTranscript.ts`: `parseToolCallEntry` validates only the fields it reads (`.pick()`), restores the `tool_call_id ?? id` fallback for rows predating `tool_call_id`, and `toolCallOk` treats the older `'ok'` status alias the same as `'success'`. - `agentTranscript.test.ts`: restores the pre-tightening fixtures/tests this broke, and adds a regression test that exercises the actual `zAgentMessages.parse()` boundary with a malformed row, confirming the whole history still loads and only that one tool-call entry degrades. ## Verification - Cherry-pick of `f8424cad75` onto `origin/cloud/1.54` applied with zero conflicts. - `pnpm typecheck` — clean. - `pnpm exec vitest run agentTranscript.test.ts agentApiSchema.test.ts agentRestClient.test.ts` — 126/126 passed. Original PR: #19621 Depends on: #19606 (already on this branch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb --- _Generated by [Claude Code](https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb)_ Co-authored-by: Claude <noreply@anthropic.com>
Backport of #19585 to
cloud/1.54Automatically created by backport workflow.