Repository navigation
[backport core/1.54] feat: use generated ToolCallSummary type for persisted tool-call schema (#19585) - #19608
Conversation
…ma (#19585) 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. `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. - **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** (`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 ``` - 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
|
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 1960 passed, 0 failed📊 Browser Reports
🌐 Website E2ETip All tests passed.
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-30T10:17:26.793Z",
"gitSha": "3339d81c13ee325d75d20433679c615d09670e9f",
"branch": "backport-19585-to-core-1.54",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2042.8980000000365,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.537,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 389.593,
"heapDeltaBytes": -7701204,
"heapUsedBytes": 63477412,
"domNodes": -280,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 6.141999999999999,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2003.01300000001,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.168000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.625,
"heapDeltaBytes": 2333840,
"heapUsedBytes": 72468980,
"domNodes": -278,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 5.768999999999998,
"eventListeners": -162,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1727.9019999999718,
"styleRecalcs": 73,
"styleRecalcDurationMs": 15.115000000000002,
"layouts": 14,
"layoutDurationMs": 1.9820000000000002,
"taskDurationMs": 597.41,
"heapDeltaBytes": -6877872,
"heapUsedBytes": 63508848,
"domNodes": -280,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 85.739,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1719.255999999973,
"styleRecalcs": 73,
"styleRecalcDurationMs": 14.402999999999999,
"layouts": 14,
"layoutDurationMs": 1.9620000000000002,
"taskDurationMs": 547.18,
"heapDeltaBytes": -6240172,
"heapUsedBytes": 65171544,
"domNodes": -280,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 80.83200000000001,
"eventListeners": -192,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1671.2640000000647,
"styleRecalcs": 32,
"styleRecalcDurationMs": 10.065999999999999,
"layouts": 6,
"layoutDurationMs": 0.8610000000000001,
"taskDurationMs": 261.969,
"heapDeltaBytes": 4546804,
"heapUsedBytes": 75407780,
"domNodes": 78,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 7.835000000000002,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1671.4179999999033,
"styleRecalcs": 32,
"styleRecalcDurationMs": 10.478000000000002,
"layouts": 6,
"layoutDurationMs": 0.899,
"taskDurationMs": 269.40200000000004,
"heapDeltaBytes": 4246652,
"heapUsedBytes": 74313800,
"domNodes": 78,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 8.2,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 481.37000000008356,
"styleRecalcs": 13,
"styleRecalcDurationMs": 4.796999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 284.249,
"heapDeltaBytes": -7854784,
"heapUsedBytes": 63027504,
"domNodes": 22,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 92.78999999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 508.21799999994255,
"styleRecalcs": 13,
"styleRecalcDurationMs": 5.22,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 287.68399999999997,
"heapDeltaBytes": -7845140,
"heapUsedBytes": 63214368,
"domNodes": 22,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 92.71799999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 1992.0170000000326,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.513000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 454.61600000000004,
"heapDeltaBytes": -13492996,
"heapUsedBytes": 77229068,
"domNodes": -280,
"jsHeapTotalBytes": 2695168,
"scriptDurationMs": 22.344999999999995,
"eventListeners": -194,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2009.635000000003,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.293999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 433.983,
"heapDeltaBytes": 5061596,
"heapUsedBytes": 80998608,
"domNodes": -274,
"jsHeapTotalBytes": -1937408,
"scriptDurationMs": 18.673000000000002,
"eventListeners": -190,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2079.542999999944,
"styleRecalcs": 67,
"styleRecalcDurationMs": 6.997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 966.6179999999999,
"heapDeltaBytes": 18281888,
"heapUsedBytes": 85085712,
"domNodes": -268,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 459.07800000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2121.364999999969,
"styleRecalcs": 67,
"styleRecalcDurationMs": 7.667,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1086.071,
"heapDeltaBytes": 18604980,
"heapUsedBytes": 85138788,
"domNodes": -266,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 513.001,
"eventListeners": -160,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3050.059000000033,
"styleRecalcs": 63,
"styleRecalcDurationMs": 8.001,
"layouts": 60,
"layoutDurationMs": 7.773,
"taskDurationMs": 1087.99,
"heapDeltaBytes": 8087708,
"heapUsedBytes": 76136580,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 455.25200000000007,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3068.5470000000805,
"styleRecalcs": 64,
"styleRecalcDurationMs": 7.564999999999999,
"layouts": 60,
"layoutDurationMs": 7.224000000000001,
"taskDurationMs": 1120.914,
"heapDeltaBytes": 10387760,
"heapUsedBytes": 75998280,
"domNodes": -278,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 465.059,
"eventListeners": -188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2128.282000000013,
"styleRecalcs": 44,
"styleRecalcDurationMs": 4.024999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1133.7860000000003,
"heapDeltaBytes": 14276452,
"heapUsedBytes": 82254260,
"domNodes": -272,
"jsHeapTotalBytes": 1990656,
"scriptDurationMs": 520.706,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2213.0339999998796,
"styleRecalcs": 46,
"styleRecalcDurationMs": 6.505000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1245.9260000000002,
"heapDeltaBytes": -8595344,
"heapUsedBytes": 72055848,
"domNodes": -250,
"jsHeapTotalBytes": 421888,
"scriptDurationMs": 562.2729999999999,
"eventListeners": -10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2012.632999999937,
"styleRecalcs": 6,
"styleRecalcDurationMs": 2.9639999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.47099999999995,
"heapDeltaBytes": 10407328,
"heapUsedBytes": 87732564,
"domNodes": -270,
"jsHeapTotalBytes": -1413120,
"scriptDurationMs": 18.617999999999995,
"eventListeners": -162,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2013.200999999981,
"styleRecalcs": 7,
"styleRecalcDurationMs": 3.19,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 457.42800000000005,
"heapDeltaBytes": -4199080,
"heapUsedBytes": 73420724,
"domNodes": -287,
"jsHeapTotalBytes": -1150976,
"scriptDurationMs": 21.196999999999992,
"eventListeners": -162,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 395.5919999999651,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.691,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 261.985,
"heapDeltaBytes": 14658484,
"heapUsedBytes": 88279656,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 82.607,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 403.3870000000661,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.394,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 253.239,
"heapDeltaBytes": 15048244,
"heapUsedBytes": 88241096,
"domNodes": 20,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 81.46300000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2010.7869999999366,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.699,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.74799999999993,
"heapDeltaBytes": 3645740,
"heapUsedBytes": 76229916,
"domNodes": -296,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 5.349000000000001,
"eventListeners": -238,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1990.0470000000041,
"styleRecalcs": 12,
"styleRecalcDurationMs": 5.734,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.213,
"heapDeltaBytes": -8728440,
"heapUsedBytes": 63492384,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 5.4,
"eventListeners": -240,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1674.9730000000227,
"styleRecalcs": 79,
"styleRecalcDurationMs": 14.99,
"layouts": 18,
"layoutDurationMs": 2.2700000000000005,
"taskDurationMs": 528.734,
"heapDeltaBytes": 2101268,
"heapUsedBytes": 74121892,
"domNodes": -294,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 57.87500000000001,
"eventListeners": -208,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.300000000022,
"styleRecalcs": 78,
"styleRecalcDurationMs": 15.575999999999999,
"layouts": 18,
"layoutDurationMs": 2.32,
"taskDurationMs": 551.036,
"heapDeltaBytes": -8310844,
"heapUsedBytes": 64271072,
"domNodes": -296,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 60.2,
"eventListeners": -238,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 833.2420000000411,
"styleRecalcs": 20,
"styleRecalcDurationMs": 20.320999999999998,
"layouts": 16,
"layoutDurationMs": 8.846,
"taskDurationMs": 593.202,
"heapDeltaBytes": 20920572,
"heapUsedBytes": 104298988,
"domNodes": 13831,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 17.166,
"eventListeners": 2385,
"totalBlockingTimeMs": 94,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8119.6109999999635,
"styleRecalcs": 248,
"styleRecalcDurationMs": 18.471,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3534.809,
"heapDeltaBytes": 13963816,
"heapUsedBytes": 90713404,
"domNodes": -270,
"jsHeapTotalBytes": -1187840,
"scriptDurationMs": 1573.735,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8135.674999999992,
"styleRecalcs": 250,
"styleRecalcDurationMs": 21.322,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3583.604,
"heapDeltaBytes": -13252544,
"heapUsedBytes": 89600016,
"domNodes": -264,
"jsHeapTotalBytes": -1937408,
"scriptDurationMs": 1555.9950000000001,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 9217.509000000064,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8513.971,
"heapDeltaBytes": -38964244,
"heapUsedBytes": 179411136,
"domNodes": -8068,
"jsHeapTotalBytes": -12857344,
"scriptDurationMs": 89.991,
"eventListeners": -14935,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 9509.608999999955,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8817.498,
"heapDeltaBytes": -34232556,
"heapUsedBytes": 184189056,
"domNodes": -8068,
"jsHeapTotalBytes": -4714496,
"scriptDurationMs": 97.36399999999999,
"eventListeners": -14935,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 12324.145999999928,
"styleRecalcs": 67,
"styleRecalcDurationMs": 11.770999999999976,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11502.568,
"heapDeltaBytes": -46997188,
"heapUsedBytes": 191799176,
"domNodes": -8068,
"jsHeapTotalBytes": -18554880,
"scriptDurationMs": 605.844,
"eventListeners": -14931,
"totalBlockingTimeMs": 37,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 11923.559000000068,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.067999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11027.953,
"heapDeltaBytes": -21564348,
"heapUsedBytes": 196944316,
"domNodes": -8068,
"jsHeapTotalBytes": -6868992,
"scriptDurationMs": 528.665,
"eventListeners": -14931,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000073,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 3497.5149999999076,
"styleRecalcs": 20,
"styleRecalcDurationMs": 52.373000000000005,
"layouts": 20,
"layoutDurationMs": 17.921999999999993,
"taskDurationMs": 3356.3150000000005,
"heapDeltaBytes": -54383736,
"heapUsedBytes": 186069080,
"domNodes": -8068,
"jsHeapTotalBytes": 16601088,
"scriptDurationMs": 52.299000000000014,
"eventListeners": -14931,
"totalBlockingTimeMs": 51,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 3304.3199999999615,
"styleRecalcs": 20,
"styleRecalcDurationMs": 50.06099999999999,
"layouts": 20,
"layoutDurationMs": 15.473,
"taskDurationMs": 3152.299,
"heapDeltaBytes": -49109060,
"heapUsedBytes": 184914728,
"domNodes": -8068,
"jsHeapTotalBytes": 14741504,
"scriptDurationMs": 41.528999999999996,
"eventListeners": -14931,
"totalBlockingTimeMs": 67,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5130.526000000032,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.11899999999998023,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4633.0560000000005,
"heapDeltaBytes": 6686428,
"heapUsedBytes": 183559796,
"domNodes": 0,
"jsHeapTotalBytes": -10223616,
"scriptDurationMs": 54.03399999999997,
"eventListeners": -6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 4695.7760000000235,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4367.069,
"heapDeltaBytes": 9774136,
"heapUsedBytes": 183788720,
"domNodes": 0,
"jsHeapTotalBytes": -13369344,
"scriptDurationMs": 43.033000000000044,
"eventListeners": -6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 449.196000000029,
"styleRecalcs": 21,
"styleRecalcDurationMs": 17.706000000000003,
"layouts": 6,
"layoutDurationMs": 2.1790000000000003,
"taskDurationMs": 97.485,
"heapDeltaBytes": 5077628,
"heapUsedBytes": 74235132,
"domNodes": 149,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 9.838000000000001,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 84.77700000003097,
"styleRecalcs": 6,
"styleRecalcDurationMs": 7.823,
"layouts": 1,
"layoutDurationMs": 0.628,
"taskDurationMs": 46.89600000000001,
"heapDeltaBytes": 2961844,
"heapUsedBytes": 67834804,
"domNodes": 123,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 3.4479999999999995,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
}
]
}🔬 E2E CoverageNote Shard completeness could not be verified for this run, so these totals may not be comparable with a whole merge.
Top 10 files by uncovered lines
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.54 #19608 +/- ##
=============================================
- Coverage 84.18% 82.67% -1.51%
=============================================
Files 2112 2542 +430
Lines 126486 134170 +7684
Branches 34027 34024 -3
=============================================
+ Hits 106478 110923 +4445
- Misses 19822 22726 +2904
- Partials 186 521 +335
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 436 files with indirect coverage changes 🚀 New features to boost your workflow:
|
4abee95 to
29f94ce
Compare
ryan-di
left a comment
There was a problem hiding this comment.
The core backport preserves the implementation and tests from merged #19585; differences are limited to generated documentation context. 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.
…s in agent history load (#19626) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://Comfy-Org.slack.com/archives/C0BGH348Z0C/p1789885354111069)_ Backport of #19621 to `core/1.54`. This branch's `zToolCallSummary` / `zPersistedToolCallSummary` / `parseToolCallEntry` code is byte-identical to `main` at the time #19621 was branched (both descend from #19608's `[backport core/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/core/1.54` applied with zero conflicts. - `pnpm typecheck` — clean. - `pnpm exec vitest run agentTranscript.test.ts agentApiSchema.test.ts agentRestClient.test.ts` — 98/98 passed. Original PR: #19621 Depends on: #19608 (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>
Requested by Christian Byrne · Slack thread
Backport of #19585 to
core/1.54.Conflict resolution note
The automated
pr-backport.yamlbot attempted this backport and failed with cherry-pick conflicts in two generated OpenAPI files:packages/ingest-types/src/types.gen.tsandpackages/ingest-types/src/zod.gen.ts.The conflicts were not logical conflicts with this PR's change.
core/1.54'spackages/ingest-typeswas generated from an older spec snapshot that predates an unrelatedRenewalInvoicebilling type present onmain. A naive cherry-pick would have spliced that unrelated type into this branch's generated client alongside the actual fix.Resolution: kept only #19585's actual change (the
ToolCallSummarytype/schema addition and theAgentMessage.content.tool_callsfield + docstring update), dropped the unrelatedRenewalInvoicehunk that doesn't belong on this branch. Verified the resulting diff againstorigin/core/1.54is minimal and matches exactly what #19585 needs (git diff --stat: 2 files, +50/-2).Verification
pnpm typecheck— cleanpnpm test:uniton the 4 changed/affected test files (agentApiSchema.test.ts,agentTranscript.test.ts,agentEventTransport.test.ts,agentConversationStore.test.ts) — 163 passed🤖 Generated with Claude Code
https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
Generated by Claude Code