Repository navigation
test(agent): prove workflow-scoped sender reset - #19876
christian-byrne wants to merge 5 commits into
Conversation
The human write leg lost work in two ways when an admission raced a workflow change or an unbound window. A single mint cursor was shared by every workflow, so an admission that was never addressed to a document — one taken while unbound, or on a detached sender — reset it. The next bound admission then re-minted a counter the previous one had already used, and two ops with the same creator-owned Lamport stamp fall through to the op_id tiebreak, so which of the two human edits survives is arbitrary. The cursor is now kept per workflow and advanced only once an admission has a target. An admission whose open group was closed by a reentrant serialization callback was settled `undeliverable` even though the sender was live, unaborted and still bound: a human edit the user had already made was silently dropped. It is now sealed into the queue at the position it was admitted at, keeping its original op ids, and delivery is held for the whole admission so the ops a reentrant callback enqueues cannot reach the wire ahead of the earlier-minted ops still being placed. Two merged assertions contradicted the production intent they shipped with and were red on main: the recovery-probe count (#19860 deliberately stopped probing once an abort invalidates the seal, and #19866 depends on that early return for abort telemetry attribution) and the workflow-change pump case, which asserted an unbound batch would be sent and encoded the dropped admission above. Both now pin the delivered behaviour, with the abort attribution and the full drain asserted.
Review finding on #19871: the 64-entry LRU on the per-workflow Lamport cursor reintroduces the defect the cursor was added to remove, only rarer. No eviction policy is safe here, and the reason is sharper than the memory bound it bought. `reconcile()` clears `lastSeq`/`ackSeq` when it sends a `subscribe`, so `LayoutFollowerBridge.lastSequence` — the sender's `baseVersion()` dep — reads 0 from the moment the subscribe leaves until `doc_subscribed` acks it, while `subscribedWorkflowId` already names the new doc. A human edit landing in that window mints against 0, and this doc's own cursor is the only thing carrying it past this actor's last stamp for that doc. So dropping a cursor does not "fall back to the follower's observed sequence" as the removed comment claimed: it hands a re-bound workflow a counter it has already used, and two ops with the same creator-owned stamp fall through to the `op_id` tiebreak — arbitrary which human edit survives (KEEP-ALIVE #2). A retained cursor can only raise a stamp through `Math.max`, never lower one, so retention is the safe direction and the eviction is removed rather than retuned. The cost is one number per edited workflow per page session. Mutation-backed: restoring the eviction with a bound of 1 turns both cursor pins red. The new pin drives `baseVersion()` to 0 across a switch away and back, which is the window above; the existing per-workflow pin covers the constant-sequence case. Also drops the `perWorkflow` loops from the switch-away-and-back pin per docs/guidance/testing-principles.md — the `toEqual` on the whole minted collection already asserts the distinct counters they recomputed.
cursor-review finding, 4 of 8 reviewers: `abortAll()` cleared EVERY workflow's mint cursor, but a `doc_reset` replaces only one document. `useAgentCrdtFollower.onDocReset` dispatches it under `if (!isCurrentWorkflow(detail?.workflowId)) return`, so the comment's premise — "every cursor is against a document that no longer exists" — was false for every other doc visited this session, whose lineage was untouched. The consequence is the defect this map was added to remove. A reset in workflow B discarded workflow A's high-water mark; returning to A and editing before A's observed sequence catches up — which includes the whole window between a `subscribe` and its `doc_subscribed` ack, where `lastSequence` reads 0 — re-mints a `base_version` this actor already used for A. Two ops then share `(actor, base_version)` and the `op_id` tiebreak arbitrarily picks which human edit survives (KEEP-ALIVE #2). Now only `deps.workflowId()`'s entry is cleared, which is the reset doc by the caller's own guard. An unbound sender has no broken lineage and clears nothing. Mutation-backed: restoring `lastMintedVersions.clear()` turns the new pin `a document reset restarts only the reset document, not every workflow visited` red. It asserts both halves — the reset doc restarts at the new document's sequence, the untouched doc mints past its own last stamp. Also corrects the `admit` contract doc, which claimed mint order reaches the wire globally intact (cursor-review, 3 of 8 reviewers). It is intact per document, which is the order the stamp contract is defined over; the group an admission seals is by construction another workflow's, and it queues behind these later-minted ops because the insertion index is taken before the seal. Two documents' ops have no causal relation, so only cross-document transport order is affected, and the comment now says so rather than overclaiming.
|
Warning Review paused — included plan limit reachedKeep your review moving with free on-demand reviews.
On-demand reviews are free for the next 3 days.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Promotion and pricing detailsOn-demand reviews are free for the next 3 days. After that, they cost $0.25 per reviewed file. Review limit detailsOr wait 26 minutes for your next included review. Limit details: You’ve used all 8 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
Comment |
🌾 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 ec6e0b1d5047c772bffbe865e44be9dc2c4c5fe9
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2183 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-10-02T06:34:18.253Z",
"gitSha": "90dc96e3c003182a1075ad2b5fdd3f7f1f69e658",
"branch": "op274-fe19871-harness-proof",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2023.6269999999763,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.9109999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 435.95500000000004,
"heapDeltaBytes": 335640,
"heapUsedBytes": 67729600,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.575999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2023.3140000000276,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.3110000000000013,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 474.24999999999994,
"heapDeltaBytes": 430680,
"heapUsedBytes": 66978288,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 13.258,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1777.4060000000418,
"styleRecalcs": 73,
"styleRecalcDurationMs": 19.915000000000003,
"layouts": 12,
"layoutDurationMs": 5.057,
"taskDurationMs": 731.069,
"heapDeltaBytes": -2925368,
"heapUsedBytes": 63776540,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 165.369,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66635514018692,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1833.880000000022,
"styleRecalcs": 77,
"styleRecalcDurationMs": 19.651000000000003,
"layouts": 12,
"layoutDurationMs": 4.952,
"taskDurationMs": 887.608,
"heapDeltaBytes": -2984852,
"heapUsedBytes": 64099164,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 169.738,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66636363636363,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1699.5370000000207,
"styleRecalcs": 30,
"styleRecalcDurationMs": 11.368,
"layouts": 6,
"layoutDurationMs": 1.3529999999999998,
"taskDurationMs": 369.4069999999999,
"heapDeltaBytes": 3466860,
"heapUsedBytes": 71299936,
"domNodes": 53,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 14.442999999999998,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6656862745098,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1699.7290000000476,
"styleRecalcs": 32,
"styleRecalcDurationMs": 10.809000000000001,
"layouts": 6,
"layoutDurationMs": 1.411,
"taskDurationMs": 330.229,
"heapDeltaBytes": 3474004,
"heapUsedBytes": 70485136,
"domNodes": 53,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 11.776999999999996,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6656862745098,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 717.6390000000197,
"styleRecalcs": 12,
"styleRecalcDurationMs": 3.750999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.093,
"heapDeltaBytes": -8016992,
"heapUsedBytes": 58839316,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 171.032,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665116279069775,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 723.2320000000527,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.8670000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 476.325,
"heapDeltaBytes": -7943036,
"heapUsedBytes": 59130824,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 166.562,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665116279069753,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1187.9920000000084,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 841.772,
"heapDeltaBytes": 14670224,
"heapUsedBytes": 92973536,
"domNodes": 0,
"jsHeapTotalBytes": 6979584,
"scriptDurationMs": 60.159000000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 546,
"frameDurationMs": 34.8029411764706,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1182.884999999942,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 843.8639999999999,
"heapDeltaBytes": 38569468,
"heapUsedBytes": 106749608,
"domNodes": 0,
"jsHeapTotalBytes": 7241728,
"scriptDurationMs": 67.42800000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 549,
"frameDurationMs": 34.80000000000002,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 863.110000000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 504.7549999999998,
"heapDeltaBytes": 17712760,
"heapUsedBytes": 104456624,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 157.169,
"eventListeners": 0,
"totalBlockingTimeMs": 233,
"frameDurationMs": 25.488235294117658,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 841.9299999999339,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 478.1700000000004,
"heapDeltaBytes": 16816172,
"heapUsedBytes": 98596020,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 154.73400000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 226,
"frameDurationMs": 24.9970588235294,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10064.955999999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9064.388,
"heapDeltaBytes": 12930948,
"heapUsedBytes": 80497156,
"domNodes": -142,
"jsHeapTotalBytes": -6688768,
"scriptDurationMs": 7232.66,
"eventListeners": -74,
"totalBlockingTimeMs": 495,
"frameDurationMs": 30.82668711656442,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9286.274000000049,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.058000000000002494,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8424.207,
"heapDeltaBytes": -975052,
"heapUsedBytes": 83130024,
"domNodes": -143,
"jsHeapTotalBytes": -2232320,
"scriptDurationMs": 6730.519,
"eventListeners": -82,
"totalBlockingTimeMs": 371,
"frameDurationMs": 31.151006711409394,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9128.409000000032,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8266.816,
"heapDeltaBytes": 4145244,
"heapUsedBytes": 85152504,
"domNodes": 0,
"jsHeapTotalBytes": -12058624,
"scriptDurationMs": 6575.553,
"eventListeners": 0,
"totalBlockingTimeMs": 220,
"frameDurationMs": 31.170307167235492,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9138.015999999992,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.06499999999999909,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8337.439,
"heapDeltaBytes": 3911940,
"heapUsedBytes": 80892184,
"domNodes": -142,
"jsHeapTotalBytes": -8785920,
"scriptDurationMs": 6709.882,
"eventListeners": -78,
"totalBlockingTimeMs": 328,
"frameDurationMs": 30.75084175084175,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-graph-idle",
"durationMs": 2067.619000000036,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.024000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 625.852,
"heapDeltaBytes": -40012224,
"heapUsedBytes": 83216884,
"domNodes": -328,
"jsHeapTotalBytes": -3506176,
"scriptDurationMs": 37.21400000000001,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66612903225806,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2050.08399999997,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.376999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 672.996,
"heapDeltaBytes": -40908744,
"heapUsedBytes": 82601908,
"domNodes": -328,
"jsHeapTotalBytes": -2981888,
"scriptDurationMs": 39.952,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2686.0580000000027,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.161,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1714.13,
"heapDeltaBytes": 4150064,
"heapUsedBytes": 91347688,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 873.752,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665838509316774,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2351.797000000033,
"styleRecalcs": 68,
"styleRecalcDurationMs": 11.685999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1602.02,
"heapDeltaBytes": -4215572,
"heapUsedBytes": 69124304,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 814.674,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666428571428565,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3842.250999999976,
"styleRecalcs": 63,
"styleRecalcDurationMs": 13.744999999999997,
"layouts": 60,
"layoutDurationMs": 16.415,
"taskDurationMs": 1785.202,
"heapDeltaBytes": 8283100,
"heapUsedBytes": 73084852,
"domNodes": -334,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 805.433,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666521739130438,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3870.620000000031,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.324000000000002,
"layouts": 60,
"layoutDurationMs": 17.735,
"taskDurationMs": 1866.145,
"heapDeltaBytes": -10787792,
"heapUsedBytes": 76841872,
"domNodes": 0,
"jsHeapTotalBytes": 561152,
"scriptDurationMs": 845.8879999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.73809523809524,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3198.104999999998,
"styleRecalcs": 46,
"styleRecalcDurationMs": 8.168000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2068.796,
"heapDeltaBytes": 26113968,
"heapUsedBytes": 93463952,
"domNodes": 0,
"jsHeapTotalBytes": 1466368,
"scriptDurationMs": 1062.5090000000002,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.930687830687834,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3156.8240000000287,
"styleRecalcs": 41,
"styleRecalcDurationMs": 6.739000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2159.557,
"heapDeltaBytes": 27752616,
"heapUsedBytes": 91943484,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 1073.4899999999998,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.75454545454545,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2037.0329999999512,
"styleRecalcs": 7,
"styleRecalcDurationMs": 3.244,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 667.2049999999999,
"heapDeltaBytes": -2217276,
"heapUsedBytes": 72069316,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 44.377,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2024.569999999926,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.234000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 580.4,
"heapDeltaBytes": -513860,
"heapUsedBytes": 87046628,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 38.083999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 626.1480000000006,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.648000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.11899999999997,
"heapDeltaBytes": -11744540,
"heapUsedBytes": 57305088,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 150.65200000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667567567567563,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 635.8299999999417,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.252000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 399.76900000000006,
"heapDeltaBytes": -11747148,
"heapUsedBytes": 57106456,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 144.697,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66842105263157,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2010.8490000000074,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.423,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 416.037,
"heapDeltaBytes": 805908,
"heapUsedBytes": 70691424,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.352000000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2010.424999999941,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.4919999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 439.959,
"heapDeltaBytes": 859528,
"heapUsedBytes": 69959344,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.443000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1703.4140000000093,
"styleRecalcs": 76,
"styleRecalcDurationMs": 18.469,
"layouts": 16,
"layoutDurationMs": 6.122999999999999,
"taskDurationMs": 749.798,
"heapDeltaBytes": -6139784,
"heapUsedBytes": 62689544,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 112.23300000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1742.3679999999422,
"styleRecalcs": 78,
"styleRecalcDurationMs": 21.161,
"layouts": 16,
"layoutDurationMs": 6.354,
"taskDurationMs": 811.2020000000001,
"heapDeltaBytes": -37352436,
"heapUsedBytes": 67853428,
"domNodes": -270,
"jsHeapTotalBytes": -1310720,
"scriptDurationMs": 120.77399999999999,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66571428571429,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1352.4290000000292,
"styleRecalcs": 17,
"styleRecalcDurationMs": 28.080000000000002,
"layouts": 5,
"layoutDurationMs": 11.708,
"taskDurationMs": 883.2160000000002,
"heapDeltaBytes": 22133520,
"heapUsedBytes": 108713456,
"domNodes": 13747,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 29.280000000000015,
"eventListeners": 2383,
"totalBlockingTimeMs": 119,
"frameDurationMs": 19.247887323943655,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8698.622999999998,
"styleRecalcs": 249,
"styleRecalcDurationMs": 41.224999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5898.312,
"heapDeltaBytes": -40078064,
"heapUsedBytes": 83031848,
"domNodes": -328,
"jsHeapTotalBytes": -3051520,
"scriptDurationMs": 2703.2719999999995,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66602687140115,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9749.193999999989,
"styleRecalcs": 250,
"styleRecalcDurationMs": 42.873999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6229.9619999999995,
"heapDeltaBytes": -35618888,
"heapUsedBytes": 87455384,
"domNodes": -328,
"jsHeapTotalBytes": -3575808,
"scriptDurationMs": 2790.1259999999997,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665924657534244,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17845.15700000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17144.122000000003,
"heapDeltaBytes": -8196392,
"heapUsedBytes": 189613904,
"domNodes": -3045,
"jsHeapTotalBytes": 8728576,
"scriptDurationMs": 295.208,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 31.285438596491222,
"p95FrameDurationMs": 66.60000000000218
},
{
"name": "vue-large-graph-idle",
"durationMs": 18069.533999999978,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17362.927999999996,
"heapDeltaBytes": -18246276,
"heapUsedBytes": 190177416,
"domNodes": -3045,
"jsHeapTotalBytes": 8409088,
"scriptDurationMs": 296.45500000000004,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 31.25588235294118,
"p95FrameDurationMs": 66.60000000000218
},
{
"name": "vue-large-graph-pan",
"durationMs": 22732.711999999992,
"styleRecalcs": 176,
"styleRecalcDurationMs": 23.924000000000028,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22337.642,
"heapDeltaBytes": -44392092,
"heapUsedBytes": 180699140,
"domNodes": -3045,
"jsHeapTotalBytes": 4857856,
"scriptDurationMs": 894.082,
"eventListeners": -14915,
"totalBlockingTimeMs": 20,
"frameDurationMs": 43.33161904761904,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-large-graph-pan",
"durationMs": 22461.128999999914,
"styleRecalcs": 174,
"styleRecalcDurationMs": 23.84700000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22123.057,
"heapDeltaBytes": -16787548,
"heapUsedBytes": 192038416,
"domNodes": -3045,
"jsHeapTotalBytes": 6242304,
"scriptDurationMs": 912.2090000000001,
"eventListeners": -14915,
"totalBlockingTimeMs": 108,
"frameDurationMs": 41.882649253731344,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-node-resize-workload",
"durationMs": 6576.41000000001,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.02800000000002,
"layouts": 20,
"layoutDurationMs": 28.028000000000013,
"taskDurationMs": 6499.961000000001,
"heapDeltaBytes": 8447280,
"heapUsedBytes": 208652432,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 124.90700000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.273837209302336,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-node-resize-workload",
"durationMs": 6420.1269999999795,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.05799999999999,
"layouts": 20,
"layoutDurationMs": 26.374999999999996,
"taskDurationMs": 6321.685,
"heapDeltaBytes": 20165876,
"heapUsedBytes": 225246884,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 121.222,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.12378048780487,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9068.844999999954,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8756.731,
"heapDeltaBytes": -38593560,
"heapUsedBytes": 173788840,
"domNodes": -3045,
"jsHeapTotalBytes": 9437184,
"scriptDurationMs": 149.22299999999998,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 31.589547038327517,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9314.899999999965,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8802.986999999997,
"heapDeltaBytes": -23395160,
"heapUsedBytes": 180325600,
"domNodes": -3045,
"jsHeapTotalBytes": 11096064,
"scriptDurationMs": 153.76000000000002,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 31.580677966101693,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "workflow-execution",
"durationMs": 489.7969999999532,
"styleRecalcs": 17,
"styleRecalcDurationMs": 18.974000000000004,
"layouts": 5,
"layoutDurationMs": 2.476,
"taskDurationMs": 137.626,
"heapDeltaBytes": 5998340,
"heapUsedBytes": 70516616,
"domNodes": 131,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 14.109999999999998,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665517241379316,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 489.1850000000204,
"styleRecalcs": 17,
"styleRecalcDurationMs": 14.986,
"layouts": 4,
"layoutDurationMs": 2.7279999999999993,
"taskDurationMs": 112.313,
"heapDeltaBytes": 5719948,
"heapUsedBytes": 59328500,
"domNodes": 124,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.654999999999998,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668965517241368,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 1070.4700000000003,
"styleRecalcs": 78,
"styleRecalcDurationMs": 119.811,
"layouts": 76,
"layoutDurationMs": 30.433999999999997,
"taskDurationMs": 1037.125,
"heapDeltaBytes": 19596408,
"heapUsedBytes": 90494168,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 419.735,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665625000000006,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 1093.9300000000003,
"styleRecalcs": 78,
"styleRecalcDurationMs": 127.48499999999999,
"layouts": 76,
"layoutDurationMs": 32.294000000000004,
"taskDurationMs": 1051.4029999999998,
"heapDeltaBytes": 19002732,
"heapUsedBytes": 89435656,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 409.345,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.196825396825393,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1610.4599999999891,
"styleRecalcs": 78,
"styleRecalcDurationMs": 319.453,
"layouts": 76,
"layoutDurationMs": 34.123,
"taskDurationMs": 1580.328,
"heapDeltaBytes": 8801272,
"heapUsedBytes": 113676096,
"domNodes": 76,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 512.681,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.751851851851846,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1496.7169999999896,
"styleRecalcs": 78,
"styleRecalcDurationMs": 292.759,
"layouts": 76,
"layoutDurationMs": 31.919000000000004,
"taskDurationMs": 1472.54,
"heapDeltaBytes": 8496352,
"heapUsedBytes": 113490144,
"domNodes": 76,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 470.41099999999994,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.748749999999994,
"p95FrameDurationMs": 33.399999999999636
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #19876 +/- ##
==========================================
+ Coverage 84.76% 85.49% +0.72%
==========================================
Files 3422 2401 -1021
Lines 164001 137222 -26779
Branches 42797 37049 -5748
==========================================
- Hits 139015 117315 -21700
+ Misses 23039 19539 -3500
+ Partials 1947 368 -1579
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1029 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 9 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 2 |
| 🟡 Medium | 1 |
| 🟢 Low | 5 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| ops: ops.map((op) => opLabel(op)), | ||
| opIds: ops.map((op) => op.op_id) | ||
| opIds: ops.map((op) => op.op_id), | ||
| baseVersions: ops.map(baseVersion) |
There was a problem hiding this comment.
🟠 High — baseVersion() throws when a wire op has no numeric base_version, and it runs inside recordClientFrame — before the frame is pushed to clientFrames and before routeClientDocFrame/judgeHumanOps. Since the wire parser deliberately validates only op/op_id and leaves base_version for the applier's envelope verdict, such a frame now throws out of the socket.onMessage handler: nothing is recorded, no doc_ops_result is sent, and the page hangs instead of receiving the rejection the test is checking for. Map a missing value to undefined/NaN (or record it as nullable) rather than throwing in the record path. Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max edge-case).
| const batch = this.heldBatches.shift() | ||
| if (!batch) return [] | ||
| this.judgeHumanOps({ ok: true, ops: batch }) | ||
| this.judgeHumanOps(this.workflowId, { ok: true, ops: batch }) |
There was a problem hiding this comment.
🟠 High — heldBatches now collects doc_ops from every workflow in hosts but stores no workflow identity, while releaseHeldClientOps hardcodes this.workflowId. Under the default hold mode with a second document added via addWorkflow, a released batch is applied to the primary HostDoc and its doc_ops_result/doc_update carry the wrong workflow_id, so the wrong document mutates and the sender's real in-flight batch never settles. Record the workflow id alongside each held batch. Raised by 7 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max adversarial, kimi-k3-max edge-case).
| async activateRecordedWorkflowBeforeSubscribeAck(): Promise<void> { | ||
| const { id, name } = this.conversation.workflow | ||
| this.pauseWorkflowSubscribe(id) | ||
| const sent = this.clientDocFrames().filter( |
There was a problem hiding this comment.
🟡 Medium — This doc_subscribe count is not filtered by workflow id even though the helper exists to prove the recorded workflow subscribed, and the same holds for the subscribeCount() waits in activateEmptyWorkflow (line 756) and in the new spec. Now that the session serves two documents, a subscribe for the reset workflow (switch-away resubscribe, retry ladder, stale probe) satisfies sent + 1 and the helper returns before the recorded workflow has subscribed at all, after which addNodeOfType mints its op against whichever graph is still active. Add frame.workflowId === id to both the snapshot and the poll, and count subscribes per workflow. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case, claude-opus-5-thinking-max adversarial).
| if (frame.type === 'doc_subscribe' && frame.stateVector !== null) { | ||
| this.answerSubscribe(frame.stateVector) | ||
| if (this.pausedSubscribes.has(frame.workflowId!)) { | ||
| this.pendingSubscribes.set(frame.workflowId!, frame.stateVector) |
There was a problem hiding this comment.
🟢 Low — pendingSubscribes keeps a single state vector per workflow, so while a workflow is paused each additional doc_subscribe (the follower re-sends on its ack-timeout ladder) overwrites the previous one and resumeSubscribe answers only the last. Earlier held vectors are discarded silently, so subscribeCount() under-reports what the page actually sent and the resumed ack may answer a vector other than the one the client awaits; the "Holds the next subscribe response" comment also does not match the hold-everything-while-paused behavior. Queue an array of held vectors per workflow. Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case).
| } | ||
| const { result, update, outcomes } = this.host.applyWire(opsResult.ops) | ||
| const host = this.hosts.get(workflowId) | ||
| if (!host) return |
There was a problem hiding this comment.
🟢 Low — A host-lookup miss returns without sending any doc_ops_result, contradicting the invariant rejectForeignOps documents just below (answer so the sender settles instead of waiting forever): the page's batch rides out its result timeout, resends, and settles unacknowledged, turning a fixture wiring mistake into a slow, misleading failure. answerSubscribe (line 301) has the same silent-drop shape, where a caller blocked in waitForSubscribe() fails with the misleading "the follower never subscribed". Send the failure result or throw so misconfiguration surfaces immediately. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).
| agentConversation.sendDocumentReset(RESET_WORKFLOW_ID) | ||
| await expect | ||
| .poll(() => agentConversation.subscribeCount()) | ||
| .toBe(beforeReset + 1) |
There was a problem hiding this comment.
🟢 Low — toBe(beforeReset + 1) pins a monotonically increasing, session-global counter to an exact value, so if two subscribes land before the poll samples (the recorded workflow's unacked retry ladder or its stale probe) the count is already beforeReset + 2 and the poll can never match, failing with an opaque timeout instead of the real condition. Use toBeGreaterThanOrEqual, ideally against a reset-workflow-specific subscribe count; the same applies to toBe(subscribes + 1) in activateEmptyWorkflow. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| private answerSubscribe(workflowId: string, stateVector: string): void { | ||
| const host = this.hosts.get(workflowId) | ||
| if (!host) return | ||
| if (this.refuseReason !== null && this.refusalsLeft > 0) { |
There was a problem hiding this comment.
🟢 Low — refuseReason/refusalsLeft stayed single-valued while subscribes became per-workflow, so refusal state now leaks across documents: a bounded refuseSubscribes(reason, 1) aimed at one workflow can be consumed by the other document's subscribe (for example the empty document registered by activateEmptyWorkflow), and the intended workflow is then acknowledged normally. Key the refusal state by workflow id, or document that refusals are session-wide. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
| this.hostSocket.send({ | ||
| type: 'doc_reset', | ||
| data: { | ||
| v: 1, |
There was a problem hiding this comment.
🟢 Low — v: 1 is hardcoded where the rest of these fixtures use DOC_PROTOCOL_VERSION. parseServerDocFrame rejects any frame whose v differs from that constant and send() throws on rejection, so a protocol bump turns sendDocumentReset into a hard throw at call time. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
|
|
||
| /** Adds another semantic document served by this routed socket. */ | ||
| addWorkflow(workflowId: string, host: HostDoc): void { | ||
| this.hosts.set(workflowId, host) |
There was a problem hiding this comment.
⚪ Nit — addWorkflow overwrites an existing entry silently, so calling it with the primary workflow id swaps the HostDoc the socket serves while AgentConversationHarness keeps its own host reference — hostNodeIds(), hostWidgetValue(), pushHostOps() and expectCanvasReplayed() would then assert against a document the socket no longer applies client ops to. Throw on a duplicate id instead of replacing. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
…#19871) ## Summary Fixes three related `OpSender` admission issues: duplicate creator-owned Lamport counters after workflow transitions, displaced admissions being dropped during reentrant sealing, and delivery starting before an admission is fully placed. ## What - Keep one mint cursor per workflow and advance it only after an admission has a target. - Preserve a displaced admission at its original queue position with its original `op_id`s. - Defer the delivery pump for the full admission so earlier-minted operations are placed before work enqueued by reentrant serialization. - Relative to `main`, change `resumes a pump requested during workflow-change sealing` from "node 3 delivered first" — the dropped-admission outcome — to "node 2 first, displaced admission kept", and add the abort-slug `reportError` assertions to `does not rechunk a prefix after serialization aborts and throws`. Comfy-Org#19874 had already moved both tests off their older values. - Add regressions for unbound admission, switching away and back, re-subscribing before acknowledgement, and resetting one workflow without resetting another workflow's cursor. - Pin the cursor against two mutants that left the suite fully green (`2b89b579f6`). These two pass on base production code: they do not pin new behavior, they stop the new cursor from silently losing behavior the old single-cursor code also had. - `lastMintedVersions.set(target, baseVersion)` in place of `baseVersion + minted.length - 1`. Every other cursor test admits one operation at a time, so the cursor's dependence on the admission's length was unasserted. Under the mutant a three-operation admission followed by another admission in the same tick re-mints `base_version` 42 and duplicates `(actor, 42)` on one document. Reachable: an undo/redo restore makes `restoreOpMinter` admit a whole multi-operation diff synchronously from `onAfterGraphConfigure`, while `docOpMinter`'s already-queued microtask admits again before the coalescer's deferred flush — two admissions, one flush, the first multi-operation. - `Math.max(observed, lastMinted + 1)` reduced to `lastMinted + 1`. No test advanced the observed sequence past the cursor, so the floor keeping a stamp at or above the sequence this follower has observed was unasserted. ## Breaking None. No exported signatures change. ## Ordering and cursor rationale Mint order is preserved within each document. A reentrant seal can change transport order across documents, but those operations have no shared document ordering relation. Workflow cursors have no capacity- or age-based eviction. During re-subscription, the observed sequence is `0` until acknowledgement, so the retained cursor is the only safe floor above stamps this actor previously minted for that workflow. A document reset clears only that document's cursor because only its lineage has been replaced. The `opSender.test.ts` conflict with Comfy-Org#19874 was resolved by merging `main` at `0a0595747b`: this branch's pump expectation and both `reportError` assertions were kept, main's `summarizeSettlement` and `nodeIdsOf` helpers were adopted, and `opSender.ts` was left byte-identical to the pre-merge head. ## Verification At head `2b89b579f6`: - `src/workbench/extensions/agent/crdt/opSender.test.ts`: 93 passed. - The same tests against base production `opSender.ts` (`b365e2a847`): 5 failed, 88 passed. The failures are the four cursor regressions plus `resumes a pump requested during workflow-change sealing`. - Mutation results, each run as the only change to `opSender.ts`: - `abortAll` clearing every cursor → 1 failed (reset isolation). - Restoring an LRU cursor bound of 1 → 3 failed (reset isolation, switch-away-and-back, unacknowledged re-subscribe). - Displaced admission settled `undeliverable` again → 1 failed (the pump test). - Removing `admit`'s pump deferral → 1 failed (the pump test). - Placing the displaced admission at the current queue tail instead of its admitted index → 1 failed (the pump test). - Appending the displaced admission after the nested group instead of prepending → 1 failed (same-workflow reentrant order). - Cursor set to `baseVersion` → 1 failed (the new multi-operation pin); `Math.max` floor dropped → 1 failed (the new observed-sequence pin). Both were green before this commit. - Agent extension suite: 136 files, 2,616 passed, 1 pre-existing expected-fail in `semanticLayoutSeparation.guard.test.ts`. - `pnpm typecheck`, oxfmt, ESLint, type-aware oxlint, and the vitest-cleanup oxlint config all clean on the changed file. - `fallow audit --changed-since origin/main`: verdict `pass`, 0 introduced findings (1 inherited complexity finding on `opSender.ts`). - Trial merge of current `main` (`cb92c2272`) is clean, and Comfy-Org#19865's new `opSender.test.ts` cases pass against this head's `opSender.ts`: 94 passed. - The black-box carrier is Comfy-Org#19876 (`agentHumanEditAfterOtherWorkflowReset.spec.ts`), stacked so this PR stays production plus unit tests. It proves the cursor half; there is no black-box case yet for a displaced admission still reaching the wire.
|
Superseded by #21964. Production half already on Full context for agent readers
|
…rs (Comfy-Org#21964) ## Summary Black-box proof for Comfy-Org#19871: resetting one workflow's document must not reset the human op sender's mint cursor for another workflow. The case edits workflow B, visits and resets workflow A, returns to B, and edits again before B's resubscribe is acknowledged; the second B edit must carry a higher `base_version` than the first. Test and harness only — no production change. Supersedes Comfy-Org#19876, whose three production commits already merged in Comfy-Org#19871 and whose harness no longer applied to the redesigned `AgentFollowerHostSocket` on `main`. ## Changes - `AgentFollowerHostSocket` can serve several documents on one routed socket (`addWorkflow`), hold one workflow's subscribe answer (`pauseSubscribes` / `resumeSubscribe`), record each op's wire `base_version`, count subscribes per workflow, and judge or release a human batch against the document that sent it. Existing single-document behaviour is unchanged. - `AgentConversationHarness` gains `activateEmptyWorkflow`, `sendDocumentReset`, and `activateRecordedWorkflowBeforeSubscribeAck`. - New spec `browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts`. ## Verification - `pnpm exec playwright test browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts --project=cloud --repeat-each=3`: 3/3 pass on this head. - Mutation check: replacing the per-workflow `lastMintedVersions.delete(resetWorkflowId)` in `opSender.abortAll` with `lastMintedVersions.clear()` fails the spec (`Expected: > 1, Received: 0`). - The 25 `@cloud` agent specs that use the routed host's subscribe, hold/release, or refusal controls: 46/46 tests pass; two failed once on a cold dev server with two workers and passed on rerun. - `vitest run browser_tests/fixtures/agentFollowerHostSocket.test.ts`: 17/17. `pnpm typecheck` and `pnpm typecheck:browser` clean. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: mrseek-reviews[bot] <337131926+mrseek-reviews[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
…rs (#21964) ## Summary Black-box proof for #19871: resetting one workflow's document must not reset the human op sender's mint cursor for another workflow. The case edits workflow B, visits and resets workflow A, returns to B, and edits again before B's resubscribe is acknowledged; the second B edit must carry a higher `base_version` than the first. Test and harness only — no production change. Supersedes #19876, whose three production commits already merged in #19871 and whose harness no longer applied to the redesigned `AgentFollowerHostSocket` on `main`. ## Changes - `AgentFollowerHostSocket` can serve several documents on one routed socket (`addWorkflow`), hold one workflow's subscribe answer (`pauseSubscribes` / `resumeSubscribe`), record each op's wire `base_version`, count subscribes per workflow, and judge or release a human batch against the document that sent it. Existing single-document behaviour is unchanged. - `AgentConversationHarness` gains `activateEmptyWorkflow`, `sendDocumentReset`, and `activateRecordedWorkflowBeforeSubscribeAck`. - New spec `browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts`. ## Verification - `pnpm exec playwright test browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts --project=cloud --repeat-each=3`: 3/3 pass on this head. - Mutation check: replacing the per-workflow `lastMintedVersions.delete(resetWorkflowId)` in `opSender.abortAll` with `lastMintedVersions.clear()` fails the spec (`Expected: > 1, Received: 0`). - The 25 `@cloud` agent specs that use the routed host's subscribe, hold/release, or refusal controls: 46/46 tests pass; two failed once on a cold dev server with two workers and passed on rerun. - `vitest run browser_tests/fixtures/agentFollowerHostSocket.test.ts`: 17/17. `pnpm typecheck` and `pnpm typecheck:browser` clean. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: mrseek-reviews[bot] <337131926+mrseek-reviews[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> (cherry picked from commit a421e90)
…rs (#21964) ## Summary Black-box proof for #19871: resetting one workflow's document must not reset the human op sender's mint cursor for another workflow. The case edits workflow B, visits and resets workflow A, returns to B, and edits again before B's resubscribe is acknowledged; the second B edit must carry a higher `base_version` than the first. Test and harness only — no production change. Supersedes #19876, whose three production commits already merged in #19871 and whose harness no longer applied to the redesigned `AgentFollowerHostSocket` on `main`. ## Changes - `AgentFollowerHostSocket` can serve several documents on one routed socket (`addWorkflow`), hold one workflow's subscribe answer (`pauseSubscribes` / `resumeSubscribe`), record each op's wire `base_version`, count subscribes per workflow, and judge or release a human batch against the document that sent it. Existing single-document behaviour is unchanged. - `AgentConversationHarness` gains `activateEmptyWorkflow`, `sendDocumentReset`, and `activateRecordedWorkflowBeforeSubscribeAck`. - New spec `browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts`. ## Verification - `pnpm exec playwright test browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts --project=cloud --repeat-each=3`: 3/3 pass on this head. - Mutation check: replacing the per-workflow `lastMintedVersions.delete(resetWorkflowId)` in `opSender.abortAll` with `lastMintedVersions.clear()` fails the spec (`Expected: > 1, Received: 0`). - The 25 `@cloud` agent specs that use the routed host's subscribe, hold/release, or refusal controls: 46/46 tests pass; two failed once on a cold dev server with two workers and passed on rerun. - `vitest run browser_tests/fixtures/agentFollowerHostSocket.test.ts`: 17/17. `pnpm typecheck` and `pnpm typecheck:browser` clean. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: mrseek-reviews[bot] <337131926+mrseek-reviews[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> (cherry picked from commit a421e90)
Summary
Adds a focused black-box proof for #19871: resetting one workflow does not discard another workflow’s creator-owned mint cursor when the user returns and edits before the subscribe acknowledgement. This is intentionally stacked on #19871 so the carrier contains harness/test changes only.
Changes
base_versionvalues; adds a Playwright case covering edit B → reset A → edit B in the pre-ack window.Review Focus
lastMintedVersions.clear()makes the case fail with first stamp1, resumed stamp0; repaired fix(agent): keep op sender stamps and displaced admissions #19871 passes.Verification
pnpm typecheckPLAYWRIGHT_LOCAL=1 PLAYWRIGHT_TEST_URL=http://127.0.0.1:6274 PLAYWRIGHT_SETUP_API_URL=http://127.0.0.1:8289 DISTRIBUTION=cloud pnpm exec playwright test browser_tests/tests/agent/agentHumanEditAfterOtherWorkflowReset.spec.ts --project=cloud --workers=1Depends on #19871.