Repository navigation
Closed
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientNice to have; do when convenientqueue/blockedQueue or user escalation stateQueue or user escalation statesource/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobstatus/blockedQueue or user escalation stateQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this itemuser/escalatedRequires a Drew decision or accessRequires a Drew decision or access
Description
Follow-up to #1833 / PR #4052 (Codex P2 thread 4437715494).
Context
PR #4052 caps server WebSocket messages at MAX_FRAME_BYTES (1 MiB). The client-side guard added in that PR (pkgs/id/web/src/collab.ts send()) never sends an over-cap message: the socket survives and local edits are preserved, but an edit whose packed STEPS message exceeds 1 MiB (e.g. a single paste over 1 MiB) cannot sync — the connection reports the error status and the unconfirmed steps stay local until the user shrinks them (e.g. undo).
Ask
Split oversized sendable step batches in handleEditorChange / the send path so large pastes sync in multiple in-cap messages:
- Chunk by packed size (measure with msgpackr as
send()does today), each chunk within MAX_FRAME_BYTES with margin. - Preserve the prosemirror-collab authority protocol: chunk N+1 must be based on the version advanced by chunk N (use the ACK [3, version] / UPDATE flow — do not fire chunks concurrently against the same base version, and do not resend steps already in flight on a later editor:change).
- A single step that alone exceeds the cap needs an explicit outcome (visible rejection that preserves local state is acceptable there).
Acceptance
- A paste over 1 MiB syncs to a second client intact, in order, with no disconnect.
- No message the client sends ever exceeds MAX_FRAME_BYTES.
- Existing collab tests pass; new tests cover multi-chunk ordering and the single-oversized-step outcome.
Acceptance criteria
- A paste over 1 MiB syncs to a second client intact, in order, with no disconnect.
- No message the client sends ever exceeds MAX_FRAME_BYTES (1 MiB).
- Chunking preserves the prosemirror-collab authority protocol: chunk N+1 is based on the version advanced by chunk N (ACK/UPDATE flow), chunks are not fired concurrently against the same base version, and steps already in flight are not resent on a later editor:change.
- A single step that alone exceeds the cap gets an explicit, visible outcome that preserves local state.
- Existing collab tests pass; new tests cover multi-chunk ordering and the single-oversized-step outcome.
Metadata
Metadata
Assignees
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)Package/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientNice to have; do when convenientqueue/blockedQueue or user escalation stateQueue or user escalation statesource/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobstatus/blockedQueue or user escalation stateQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this itemuser/escalatedRequires a Drew decision or accessRequires a Drew decision or access
Activity
fix(id): never send over-cap collab messages (Codex P2 on #4052)
dezren39 commentedon Nov 2, 2026
Intake review
Follow-up to #1833 / PR #4052 (Codex P2 thread 4437715494 on the merged frame-cap work). The issue body already carries a detailed Ask and Acceptance list; this section formalises it as acceptance criteria without changing the original text. Still live: PR #4052 capped the frame but deliberately did not chunk — the unsyncable-large-paste behaviour is the current shipped behaviour. Risks: the version-advance protocol is the subtle part — concurrent chunks against one base version would corrupt collab state, so the sequential ACK-driven design in the Ask is load-bearing. Suggested approach: chunk in the send path by packed msgpackr size with margin, driving chunk N+1 from the ACK of chunk N.
— fleet monitor intake enrichment (protocol §5), 2026-11-02 run. Original body preserved verbatim above the appended acceptance-criteria section.
47 remaining items
developing-today commentedon Nov 8, 2026
🤖 Agent note · handed off
opencode, so per §1b this lane does not work it directly; the laptop opencode claimant launches the bound session.dezren39 commentedon Nov 8, 2026
🤖 Agent note · triaged (real-and-current remainder) then blocked — escalated to user
What already landed (verified on current main
cfd7efd596, 2026-11-08)72a3897018("never send over-cap collab messages", in main):stepBatch()chunks by step count and encoded size, and a first step that alone exceedsMAX_STEPS_MESSAGE_BYTESis withheld rather than sent.a5a8efe190(id(web/collab): chunk oversized single-step insertions at dispatch time so >1MiB pastes sync #4119, in main):splitOversizedTextInsertion()inpkgs/id/web/src/editor.tsbounds a single oversized text insertion at dispatch —editor.test.tsproves a 500k-char paste splits into in-budget steps in one undoable transaction, andcollab.test.ts"sends and confirms all bounded steps from a single oversized paste" drives it over a live fake socket, asserting every message ≤ 1 MiB, all steps confirmed once and in order,getSendableSteps() === nullat the end.handleEditorChange()re-runsgetSendableSteps()after eachUPDATE, so batch N+1 carries the version advanced by batch N and no concurrent flush against one base version. Present on main.So these acceptance bullets are satisfied on main: no sent message exceeds MAX_FRAME_BYTES; chunk N+1 follows chunk N's ACK; a >1 MiB paste syncs intact and in order without disconnect (single-oversized-text-insertion form).
The one remaining bullet
"A single step that alone exceeds the cap gets an explicit, visible outcome that preserves local state." On main the withheld path still only writes to the console:
pkgs/id/web/src/collab.ts:263-272—console.error("[collab] Pending step exceeds the …")thenreturn;, with noupdateStatus("error"). The edit is kept locally, but the UI shows nothing while sync has silently stopped — reachable for a non-text single step (node/mark structural replace), whichsplitOversizedTextInsertiondeliberately leaves alone (editor.ts:536-541returns the transaction untouched unless it is a single closed all-textReplaceStep).pkgs/id/web/src/collab.test.tshas unit tests forstepBatch's withheld case (line 345) but no connection-level test that the withheld step produces no frame, keeps the edit, and reaches the status callback.Why this lane is not fixing it
The remainder is precisely, and only, the delta of PR #5022 — "fix(id/web): surface withheld-step sync wedge and test multi-chunk ACK flush (#4324)",
queue/8483-4324-collab-step-status, single commit08215ac608, two files, +115/−3: it addsupdateStatus("error")to the withheld path plus the two connection-level tests. The runbook forbids touching a Drew-owned PR and forbids opening a competing PR for work it already owns, and prior lanes parked this task on exactly that basis 2026-11-08 03:55 / 04:20 / 04:42 / 05:12 / 05:43 / 06:04.Current state of that PR (fresh
gh, 2026-11-08T06:22Z): OPEN, not draft, no labels, no review decision,mergeable: CONFLICTING(verified bygit merge-tree— a single content conflict inpkgs/id/web/src/collab.test.ts, because the file has since grown the #4119 block), last updated 2026-11-03T21:56Z, checks:basic: production line limitSUCCESS, CodeRabbit NEUTRAL. Itscollab.tshunk still applies to main cleanly.Decision needed (yours)
queue/8483-4324-collab-step-statusonto main (resolve the onecollab.test.tsconflict) and merge; this closes id collab: split oversized step batches instead of blocking sync at the 1 MiB frame cap #4324 and satisfies the last bullet. Queue workers must not do this to your PR.updateStatus("error")line plus the two tests) on a fresh branch and close the PR.No code was changed by this triage; no competing branch or PR was created. Task 12151 is blocked with reason class
escalated-to-userand carries this read.Merge pull request #5022 from developing-today/queue/8483-4324-collab…