Skip to content

id(web/collab): chunk oversized single-step insertions at dispatch time so >1MiB pastes sync #4119

Closed

Description

@dezren39

Follow-up to #1965 / PR #4051 (Codex P2 finding 4438238077, dispositioned in cea81a3).

A paste >1 MiB can be a single ProseMirror replace step. The client now withholds such a step (kept locally, error logged) instead of sending it to be refused by the server's 1 MiB frame cap and discarded by the reconnect re-init — but it never syncs, and later steps queue behind it.

Splitting the step on the wire is not safe: prosemirror-collab confirms unconfirmed steps by count from the server echo. The fix belongs at dispatch time in the editor layer: chunk a large text insertion into several transactions (each producing bounded steps) before the steps enter the collab unconfirmed queue.

Acceptance:

  • A >1 MiB text paste syncs to the server in bounded Steps messages and is visible to other joiners.
  • No step is lost or double-confirmed; version/history stay consistent under the chunked dispatch.
  • Tests cover a single oversized insertion end to end at the client layer.

Acceptance criteria

  • A single-step text insertion larger than the server's 1 MiB frame cap is chunked at dispatch time in the editor layer into several transactions, each producing bounded steps, before the steps enter the collab unconfirmed queue.
  • Chunked insertions sync to the server and to other clients in order; no step is withheld locally or discarded on reconnect re-init.
  • Insertions at or below the cap keep the existing single-step path unchanged.
  • A regression test covers a >1 MiB single-step paste syncing successfully (via CI on the fix PR).

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Intake review

    — Fleet monitor intake, 2026-11-01 20:12 CST run.

  3. added
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  4. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  5. added
    work/assignedQueue worker lifecycle state
    and removed on Nov 3, 2026
  6. 74 remaining items

  7. added
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 4, 2026
  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: parked
    task: 8757 (repo-health-code-pilot, worker repo-worker-code, lane ec118cad-0fd3-4652-91c4-27432f2f2efd)
    state: parked 30 minutes (until 2026-11-04T23:14:54Z)
    fresh evidence: #4119 OPEN and assigned to dezren39; PR #5189 OPEN/unmerged, authored by dezren39, head queue/8757-4119-chunk-oversized-insertions at a5a8efe. Active Drew-owned work remains untouched; no competing branch/PR created.
    resume: after PR #5189 merges/closes or Drew releases ownership, revalidate issue/PR fresh.
    labels: queue/parked + status/parked; work/assigned retained.

  9. added and removed
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  10. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 8757 (repo-fleet-monitor run 2026-11-05T15:45:48Z)
    • Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
    • Task: Claim evaporated: task 8757 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
    • Expectation: The next lane claim picks task 8757 up from the queued state and posts a fresh pickup note.
  11. added a commit that references this issue on Nov 6, 2026
  12. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  13. dezren39 commented on Nov 9, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: done
    task: 8757 (repo-health-code-pilot, worker repo-worker-code, lane code-j)
    state: complete — outcome already_done
    fresh evidence: PR #5189 "fix(id): chunk oversized collaborative text insertions (#4119)" MERGED 2026-11-06T16:42:41Z, merge sha 4277438, no hard-stop labels on PR or issue. Fix verified on origin/main: pkgs/id/web/src/editor.ts:536 exports splitOversizedTextInsertion, called at editor.ts:874 in dispatch. The earlier park premise (PR #5189 open/Drew-owned hard stop) is stale — the PR merged two days ago and authorship alone is not a hold (runbook 2026-11-07). Closing issue #4119 as completed by PR #5189; queue labels synced to terminal.

  14. removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 9, 2026
  15. added a commit that references this issue on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/enhancementmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions