Repository navigation
[backport cloud/1.55] feat: use generated ToolCallSummary type for persisted tool-call schema - #19607
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_ 🤖 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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
🎨 Storybook: ✅ Built — View Storybook🌐 Website E2ETip All tests passed.
🎭 Playwright: ✅ 2123 passed, 0 failed📊 Browser Reports
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 7e2d6c9a81dc295270e2a67bcbc2bb6d081f7044
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-30T12:46:12.374Z",
"gitSha": "541ddbc92203d6681d7b2628737ffbd138aa31df",
"branch": "backport-19585-to-cloud-1.55",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2016.5399999999636,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.2730000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 437.506,
"heapDeltaBytes": 4110508,
"heapUsedBytes": 71864252,
"domNodes": -263,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.4289999999999985,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2008.2190000000537,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.463999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 451.3430000000001,
"heapDeltaBytes": -7148484,
"heapUsedBytes": 55329924,
"domNodes": -263,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 7.467000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1752.9930000000604,
"styleRecalcs": 47,
"styleRecalcDurationMs": 14.886999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 800.426,
"heapDeltaBytes": -440400,
"heapUsedBytes": 67254540,
"domNodes": -261,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 163.31699999999998,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1703.2349999999497,
"styleRecalcs": 46,
"styleRecalcDurationMs": 15.149000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 689.394,
"heapDeltaBytes": -5922116,
"heapUsedBytes": 62185800,
"domNodes": -258,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 162.632,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1702.9890000000023,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.075,
"layouts": 6,
"layoutDurationMs": 1.1550000000000002,
"taskDurationMs": 320.681,
"heapDeltaBytes": 2143652,
"heapUsedBytes": 63253556,
"domNodes": 78,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.240999999999996,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1665.9520000000612,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.354,
"layouts": 6,
"layoutDurationMs": 1.135,
"taskDurationMs": 339.21999999999997,
"heapDeltaBytes": 3172548,
"heapUsedBytes": 70547508,
"domNodes": 79,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 11.481999999999996,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 614.039000000048,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.145999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.275,
"heapDeltaBytes": 18880336,
"heapUsedBytes": 86642400,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 171.404,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 642.6920000000109,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.896,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 438.20400000000006,
"heapDeltaBytes": 18913420,
"heapUsedBytes": 86060496,
"domNodes": 22,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 167.84500000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1168.435000000045,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 778.893,
"heapDeltaBytes": 38394608,
"heapUsedBytes": 104830820,
"domNodes": 0,
"jsHeapTotalBytes": 19820544,
"scriptDurationMs": 66.36699999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 558,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1193.4179999999515,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 847.0289999999999,
"heapDeltaBytes": 38809612,
"heapUsedBytes": 106161148,
"domNodes": 0,
"jsHeapTotalBytes": 18247680,
"scriptDurationMs": 83.832,
"eventListeners": 0,
"totalBlockingTimeMs": 581,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 859.1270000000577,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 474.9489999999996,
"heapDeltaBytes": 14650956,
"heapUsedBytes": 91779804,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.64700000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 239,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 843.2430000000295,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 466.1999999999997,
"heapDeltaBytes": 14631096,
"heapUsedBytes": 91583100,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 162.058,
"eventListeners": 0,
"totalBlockingTimeMs": 230,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10236.991999999987,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9325.755000000001,
"heapDeltaBytes": 11125308,
"heapUsedBytes": 93472612,
"domNodes": -16,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 7696.28,
"eventListeners": 0,
"totalBlockingTimeMs": 1079,
"frameDurationMs": 20,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9835.274000000027,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8967.921,
"heapDeltaBytes": -867192,
"heapUsedBytes": 80912096,
"domNodes": -12,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 7444.442999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 879,
"frameDurationMs": 18.886666666666677,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9994.136000000026,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9081.673,
"heapDeltaBytes": -10187016,
"heapUsedBytes": 72656716,
"domNodes": -18,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 7796.2429999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 1317,
"frameDurationMs": 20,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9932.698999999957,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9136.79,
"heapDeltaBytes": -12605596,
"heapUsedBytes": 69631116,
"domNodes": -14,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 7544.778,
"eventListeners": 0,
"totalBlockingTimeMs": 882,
"frameDurationMs": 20,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2056.1660000000757,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.342000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 585,
"heapDeltaBytes": -4048172,
"heapUsedBytes": 83270984,
"domNodes": -239,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 32.87899999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2023.4239999999772,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.509000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 555.5649999999999,
"heapDeltaBytes": -4096196,
"heapUsedBytes": 83253984,
"domNodes": -240,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 31.97799999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2241.6070000000445,
"styleRecalcs": 68,
"styleRecalcDurationMs": 12.032999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1458.233,
"heapDeltaBytes": -11752700,
"heapUsedBytes": 76010904,
"domNodes": -246,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 847.1370000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2248.3170000000428,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.012000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1641.2510000000002,
"heapDeltaBytes": -11066264,
"heapUsedBytes": 76694508,
"domNodes": -218,
"jsHeapTotalBytes": 2351104,
"scriptDurationMs": 863.803,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3516.736000000037,
"styleRecalcs": 64,
"styleRecalcDurationMs": 13.502000000000004,
"layouts": 60,
"layoutDurationMs": 12.753,
"taskDurationMs": 1680.049,
"heapDeltaBytes": -15228488,
"heapUsedBytes": 74169604,
"domNodes": -254,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 781.999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3485.5780000000323,
"styleRecalcs": 63,
"styleRecalcDurationMs": 12.591999999999999,
"layouts": 60,
"layoutDurationMs": 13.047999999999998,
"taskDurationMs": 1530.155,
"heapDeltaBytes": 9829804,
"heapUsedBytes": 74231696,
"domNodes": -252,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 778.498,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "legacy-node-drag",
"durationMs": 3203.710000000001,
"styleRecalcs": 45,
"styleRecalcDurationMs": 8.584999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1962.3110000000001,
"heapDeltaBytes": 991996,
"heapUsedBytes": 91930848,
"domNodes": -252,
"jsHeapTotalBytes": 1232896,
"scriptDurationMs": 1009.854,
"eventListeners": 6,
"totalBlockingTimeMs": 6,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2976.8530000000055,
"styleRecalcs": 44,
"styleRecalcDurationMs": 7.256000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1845.4160000000002,
"heapDeltaBytes": 21046028,
"heapUsedBytes": 87225540,
"domNodes": 8,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 959.4010000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 1994.6510000000899,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.4649999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 500.433,
"heapDeltaBytes": 20187296,
"heapUsedBytes": 84401116,
"domNodes": -250,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 28.415999999999997,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2035.8319999998002,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.457,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 534.099,
"heapDeltaBytes": -4058800,
"heapUsedBytes": 84654068,
"domNodes": -247,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 33.428,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 558.5859999999911,
"styleRecalcs": 49,
"styleRecalcDurationMs": 11.895999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 388.2650000000001,
"heapDeltaBytes": 13778064,
"heapUsedBytes": 83751044,
"domNodes": 24,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 139.22099999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 587.3080000000073,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.308000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.066,
"heapDeltaBytes": 13737924,
"heapUsedBytes": 83685136,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 147.22000000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 1990.0410000000193,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.422000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 348.19599999999997,
"heapDeltaBytes": -5322748,
"heapUsedBytes": 64657764,
"domNodes": -276,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 6.843999999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1990.2150000000347,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.628,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 439.55699999999996,
"heapDeltaBytes": 9103488,
"heapUsedBytes": 79126940,
"domNodes": -274,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.057999999999998,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1719.6500000000015,
"styleRecalcs": 47,
"styleRecalcDurationMs": 15.038999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 716.252,
"heapDeltaBytes": 4255108,
"heapUsedBytes": 73867604,
"domNodes": -273,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 102.988,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.8219999999274,
"styleRecalcs": 46,
"styleRecalcDurationMs": 15.309999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 731.1019999999999,
"heapDeltaBytes": 6227688,
"heapUsedBytes": 75931420,
"domNodes": -276,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 106.131,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.1380000000072,
"styleRecalcs": 17,
"styleRecalcDurationMs": 28.809,
"layouts": 5,
"layoutDurationMs": 13.010000000000002,
"taskDurationMs": 859.2979999999999,
"heapDeltaBytes": -6327824,
"heapUsedBytes": 87416440,
"domNodes": 13667,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 28.229999999999997,
"eventListeners": 2383,
"totalBlockingTimeMs": 144,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8492.196000000036,
"styleRecalcs": 251,
"styleRecalcDurationMs": 37.437,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5840.704,
"heapDeltaBytes": -19941984,
"heapUsedBytes": 66615604,
"domNodes": -213,
"jsHeapTotalBytes": 3174400,
"scriptDurationMs": 2817.04,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8558.831000000055,
"styleRecalcs": 250,
"styleRecalcDurationMs": 40.96900000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6046.367,
"heapDeltaBytes": -2646252,
"heapUsedBytes": 84309108,
"domNodes": -243,
"jsHeapTotalBytes": 778240,
"scriptDurationMs": 2854.81,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16731.967000000055,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16161.168,
"heapDeltaBytes": -56412660,
"heapUsedBytes": 163301444,
"domNodes": -8061,
"jsHeapTotalBytes": -17543168,
"scriptDurationMs": 265.189,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.33666666666662,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16615.628000000015,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15988.174,
"heapDeltaBytes": -35269164,
"heapUsedBytes": 190633108,
"domNodes": -8061,
"jsHeapTotalBytes": -15998976,
"scriptDurationMs": 262.813,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20166.26199999996,
"styleRecalcs": 169,
"styleRecalcDurationMs": 16.03500000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19762.214,
"heapDeltaBytes": -28053288,
"heapUsedBytes": 191947736,
"domNodes": -8061,
"jsHeapTotalBytes": -18100224,
"scriptDurationMs": 864.358,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15607.213000000002,
"styleRecalcs": 77,
"styleRecalcDurationMs": 11.748999999999981,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15107.125,
"heapDeltaBytes": -43477404,
"heapUsedBytes": 183753296,
"domNodes": -8061,
"jsHeapTotalBytes": -13959168,
"scriptDurationMs": 811.4060000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 1,
"frameDurationMs": 17.22666666666664,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6021.862999999939,
"styleRecalcs": 20,
"styleRecalcDurationMs": 76.07600000000001,
"layouts": 20,
"layoutDurationMs": 21.486000000000004,
"taskDurationMs": 5914.753999999999,
"heapDeltaBytes": -44182832,
"heapUsedBytes": 176661072,
"domNodes": -8061,
"jsHeapTotalBytes": 3731456,
"scriptDurationMs": 108.064,
"eventListeners": -14928,
"totalBlockingTimeMs": 395,
"frameDurationMs": 18.886666666666738,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6084.4600000000355,
"styleRecalcs": 20,
"styleRecalcDurationMs": 76.624,
"layouts": 20,
"layoutDurationMs": 21.875000000000007,
"taskDurationMs": 5962.371000000001,
"heapDeltaBytes": -42803348,
"heapUsedBytes": 182903656,
"domNodes": -8061,
"jsHeapTotalBytes": 14147584,
"scriptDurationMs": 105.984,
"eventListeners": -14928,
"totalBlockingTimeMs": 384,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6354.862999999909,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5948.607999999998,
"heapDeltaBytes": -12421084,
"heapUsedBytes": 174641820,
"domNodes": 0,
"jsHeapTotalBytes": -30146560,
"scriptDurationMs": 99.87000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6359.624999999824,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6039.155999999998,
"heapDeltaBytes": 84368,
"heapUsedBytes": 179114580,
"domNodes": 0,
"jsHeapTotalBytes": -33030144,
"scriptDurationMs": 122.61800000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 107.66200000000481,
"styleRecalcs": 7,
"styleRecalcDurationMs": 15.109,
"layouts": 3,
"layoutDurationMs": 1.6660000000000001,
"taskDurationMs": 81.91400000000002,
"heapDeltaBytes": 3090600,
"heapUsedBytes": 67925840,
"domNodes": 125,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.877000000000001,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 111.61399999991772,
"styleRecalcs": 9,
"styleRecalcDurationMs": 14.439000000000002,
"layouts": 4,
"layoutDurationMs": 1.71,
"taskDurationMs": 77.272,
"heapDeltaBytes": 3051336,
"heapUsedBytes": 69071156,
"domNodes": 128,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 6.675999999999999,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.55 #19607 +/- ##
=============================================
Coverage ? 83.77%
=============================================
Files ? 3072
Lines ? 150570
Branches ? 40847
=============================================
Hits ? 126137
Misses ? 23026
Partials ? 1407
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
|
CI triage for
I compared the PR head with its base: Suggested unblock: backport #19499 and #19574 to |
<!-- ccr-slack-attribution --> _Requested by **Robert Paige** · [Slack thread](https://comfy-organization.slack.com/archives/C0B61J7QCJW/p1790743770365959?thread_ts=1790743770.365959&cid=C0B61J7QCJW)_ ## Summary `website-unit` / `website-unit-gate` is red on `main` and on every PR because the live docs catalog has drifted past the hardcoded model count. ## Changes - **What**: `router-providers.test.ts` › "counts the models the docs catalog lists" fetches `docs.comfy.org/development/comfy-router/models.md` and asserts the count of distinct model paths equals `ROUTER_CATALOG_MODEL_COUNT`. The live catalog now lists 213 models while the constant was still pinned at 212, so the assertion fails on every run. Bumped `ROUTER_CATALOG_MODEL_COUNT` 212 → 213 and refreshed `ROUTER_PROVIDER_COVERAGE_VERIFIED_AT` to today, matching the shape of #18843 (which did the same 209 → 212 bump for the same reason on Sep 25). Only the count assertion was failing in CI, not any per-provider row assertion, so the provider rows themselves were left untouched. ## Before / After - **Before**: `website-unit` fails with `expected 213 to be 212`; blocks unrelated PRs, including #19565. - **After**: count matches the live catalog; `website-unit` / `website-unit-gate` pass again. ## Review Focus Minimal, scoped change: only the two constants in `apps/website/src/config/router-providers.ts` were touched, following the same pattern as #18843. --- _Generated by [Claude Code](https://claude.ai/code/session_01QByuWtiNix7Q4BY6kvhgPR)_
…19499) ## Summary Fixes the `full-page-promo.spec.ts` "a code that lapses before Pay" failure that has been red on main since #19126. The full-page checkout now re-quotes when a subscribe comes back as `QUOTE_STALE`. ## Changes - **What**: #19253 made `payVerdictOf` re-quote only when a raw `SUBSCRIPTION_QUOTE_STALE` `serverCode` came back. #19126 then changed account-core to turn a 4xx with that code into `{ code: 'QUOTE_STALE' }` with no `serverCode`. The two PRs were written in parallel and merged about 40 minutes apart. Since then, `payVerdictOf` falls through to `failure`. The page shows "Your quote changed…" instead of re-pricing and showing the expired-promo card. `payVerdictOf` now maps `QUOTE_STALE` to `requote`. - The `payVerdict` and `FullPageCheckoutView` unit tests built the pre-#19126 result shape by hand, so they missed this. They now use the shape account-core actually returns. ## Review Focus `SUBSCRIPTION_QUOTE_STALE` is gone from `STALE_QUOTE_SERVER_CODES`. Only `subscribe` emits it, and account-core now maps it for 4xx responses. A 5xx that echoes the code arrives as `REQUEST_FAILED`, which account-core treats as an upstream failure, not a stale quote. With this change, that 5xx no longer triggers a re-quote. Red/green: both updated unit tests fail without the `payVerdict.ts` change and pass with it. `pnpm test:e2e:local e2e/full-page-promo.spec.ts` passes 6/6.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🔴 Critical | 1 |
| 🟠 High | 1 |
| 🟡 Medium | 1 |
| 🟢 Low | 3 |
Panel: 8/8 reviewers contributed findings.
| tool_name: z.string(), | ||
| status: z.string().optional(), | ||
| duration_ms: z.unknown().optional() | ||
| tool_calls: z.array(zToolCallSummary).optional() |
There was a problem hiding this comment.
🔴 Critical — Validating tool_calls as a strict z.array(zToolCallSummary) at the message level makes history loading all-or-nothing: getMessages runs this through schema.parse, so one entry with a legacy status, a missing tool_call_id, or a fractional duration_ms rejects the entire GET /threads/{id}/messages response and blanks the thread (surfacing the raw Zod issue list through pushError) instead of dropping a single chip. It also makes parseToolCallEntry's per-entry safeParse unreachable for wire data, so the tolerance that function implements can never fire. Use z.array(z.unknown()) here (or a per-element .catch()) and leave the filtering to parseToolCallEntry. Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max edge-case).
| * and is dropped server-side rather than reaching this parser. | ||
| */ | ||
| export const zPersistedToolCallSummary = z | ||
| export const zPersistedToolCallSummary = zToolCallSummary |
There was a problem hiding this comment.
🟠 High — Aliasing zPersistedToolCallSummary to the generated zToolCallSummary makes status a closed success|error enum and tool_call_id required, with no tolerance for rows already persisted: the deleted comments recorded that the terminal vocabulary was "not yet settled" and that "rows recorded before tool_call_id existed have none", and this PR's own e2e mock had to be rewritten from status: 'ok' to 'success' with a tool_call_id added. Combined with the strict message-level array above, a frontend deploy ahead of Comfy-Org/cloud#10360 (or a backend rollback) makes old threads unloadable rather than degraded. Accept legacy terminal values as failure-mapped statuses and keep a fallback for a missing tool_call_id. Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case).
| * (`success`/`error`) row — the backend drops a row a dead turn left in | ||
| * `pending`/`running` before persisting it. `isLive` (the row is the one | ||
| * actively backed by a live transport — the run_approval mid-ask case) is | ||
| * kept only for a call that arrives through the live WebSocket path with a |
There was a problem hiding this comment.
🟡 Medium — Dropping pending/running rows means a reload during a live run_approval ask no longer restores the in-flight tool chip — the rewritten test asserts exactly that, with parts reduced to [{ type: 'runApproval' }] — and because the tool is blocked on the user's answer, no further agent_tool_call frame arrives to recreate it. As a consequence toolCallPartState's isLive/'streaming' branch and toolCallOk's state === 'streaming' guard are now dead code: live frames are built by handleToolCallEvent in agentEventTransport.ts and never reach this parser, so this comment's rationale describes an input that cannot occur. Either keep non-terminal statuses for the live row or delete the unreachable branches along with the comment. Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max edge-case).
| * already treat `undefined` as terminal-and-failed, matching the old | ||
| * parser's behavior for a status-less call). | ||
| * to the live WebSocket's `zAgentToolCallData` above. Sourced directly from | ||
| * the generated `ToolCallSummary` schema (Comfy-Org/cloud#10360) — the |
There was a problem hiding this comment.
🟢 Low — Adopting the whole generated ToolCallSummary also pulls in validation of started_at/finished_at, which this parser never reads; as z.string().datetime() on zod 3 they reject any timezone offset (only a trailing Z passes), while Go's RFC3339 marshaling emits +00:00-style offsets for non-UTC locations. Consider .pick()ing only the fields the transcript actually consumes so an unused timestamp cannot fail the entry. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
| }) | ||
| }) | ||
|
|
||
| it.for([NaN, Infinity, -Infinity])( |
There was a problem hiding this comment.
🟢 Low — These rewritten cases assert graceful per-entry dropping by calling normalizeAgentTranscript with hand-built objects that need as unknown as AgentMessages[number]['content'] to compile — the casts are the tell that the wire schema now rejects the whole payload. In the real reload path the same input fails zAgentMessages.parse and loses the entire thread, so add a case that feeds a deviating tool call through the schema to document the actual blast radius. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
…ry load `agentRestClient.ts`'s `getMessages()` calls `zAgentMessages.parse()` (throws, not safeParse). Since `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. - 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. Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
e39d6f6 to
30c177d
Compare
christian-byrne
left a comment
There was a problem hiding this comment.
Fresh exact-head review at 30c177d after the authorized message-only repair: compared all four rewritten commit objects to their predecessors, allowing only parent-hash propagation and deletion of prohibited Claude Co-authored-by trailer lines. Every corresponding commit tree is identical and the final tree remains 88f18f2af38563845a29af7b976e4f7083be6b56. The human Christian Byrne and github-actions[bot] trailers are preserved. Repository check-ai-co-authors passes locally and the fresh hosted Check for AI agent co-author trailers is green. No product content was changed; awaiting the remainder of fresh hosted checks before any landing decision.
Backport of #19585 to
cloud/1.55Automatically created by backport workflow.
Justification: Agent release-backport authority covers cloud/1.55. Exact head 30c177d is tree-equivalent to the reviewed carrier except prohibited co-author trailers, has 112 terminal success/neutral/skipped checks, no unresolved reviewer objection, and passed the target-aware gate against cloud/1.55@7e2d6c9a81dc295270e2a67bcbc2bb6d081f7044.