GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(web): collab codec cannot decode its own CursorRemove frames — CollabMessage::decode has no tag-6 branch · Issue #1783 · developing-today/code

id(web): collab codec cannot decode its own CursorRemove frames — CollabMessage::decode has no tag-6 branch #1783

New issue
Copy link
New issue
Copy link
Closed
#1785
Closed
id(web): collab codec cannot decode its own CursorRemove frames — CollabMessage::decode has no tag-6 branch#1783
#1785
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemwork/self-assignedAn agent grabbed this item directly, outside the queue

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Problem

pkgs/id's collaborative-editing codec cannot decode one of its own message types. CollabMessage::CursorRemove (tag 6, "a client's cursor is gone") encodes fine, but CollabMessage::decode has no branch for tag 6, so every CursorRemove frame decodes to None — the same result as corrupt input.

Evidence (verified this run, main 35726e8)

  • pkgs/id/src/web/collab.rs:80 — pub const CURSOR_REMOVE: u8 = 6;
  • pkgs/id/src/web/collab.rs:497-498 — encode() serializes CursorRemove as (msg::CURSOR_REMOVE, client_id).
  • pkgs/id/src/web/collab.rs:513-615 — decode() tries, in order: Init (0), Steps (1), Update (2), Ack (3), Cursor (4, two forms), Error (5), NewVersion (7), Auth (8), AuthOk (9, two forms). Tag 6 is never tried.
  • The server broadcasts CursorRemove on every client disconnect (collab.rs:1175), so this is a live wire type, not a dead variant. The TypeScript client decodes tag 6 itself (pkgs/id/web/src/collab.ts protocol table), which is why the gap is invisible in the browser today — but the Rust codec is the canonical definition, and any Rust-side consumer (tests, future Rust client, protocol tooling) silently drops these frames as undecodable.
  • Test gap that let it survive: roundtrip tests exist for Init/Steps/Update/Ack/Cursor/Error/NewVersion (collab.rs:1240-1460) but none for CursorRemove (nor Auth/AuthOk); test_message_type_constants (collab.rs:1479-1487) asserts only tags 0–5.

Probe (laptop, verbatim codec)

Probe crate ~/git/fleet/probe-2026-10-28-laneA-collab-decode on the laptop (collab.rs sha256 55e04270… identical in the laptop clone and sandbox main 35726e8; msg + Step + CollabMessage encode/decode extracted verbatim, lines 73–84 / 162–168 / 417–615), cargo run --release:

  • Init, Steps, Update, Ack, Cursor (both forms), Error, NewVersion, Auth, AuthOk (both forms): all decode(encode(x)) == Some(x).
  • CursorRemove { client_id: 54321 }: encodes to 5 bytes [92, 06, cd, d4, 31], decode returns None — the only failure in the set.

Why it matters

An asymmetric codec is a trap: the one message that tells every client "this cursor is gone" is indistinguishable from garbage to the crate's own decoder. Today the TS client masks it; any Rust consumer inherits silent message loss, and the missing test coverage means the next added variant can regress the same way unnoticed.

Acceptance criteria

  • CollabMessage::decode handles tag 6 and returns CursorRemove { client_id } for a well-formed frame.
  • Roundtrip tests cover every CollabMessage variant and form (including CursorRemove, Auth, and AuthOk with and without token), so encode/decode asymmetry fails CI.
  • test_message_type_constants (or equivalent) asserts all tags 0–9.
  • Existing collab tests still pass (laptop or CI).

Related but distinct: #1618 (collab steps are broadcast without validation).

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-725

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-10-28 14:05 CDT
    • Found via: filed this run
    • Task: Filed — collab codec decode() has no tag-6 (CursorRemove) branch; verified by verbatim-codec probe on the laptop (all 11 other variant forms roundtrip, CursorRemove returns None).
    • Expectation: effort/xs — add the decode branch plus roundtrip tests for every variant; done when decode(encode(CursorRemove)) roundtrips and collab tests pass.
    • Links: probe ~/git/fleet/probe-2026-10-28-laneA-collab-decode (laptop); body evidence in the issue.
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-10-28 14:05 CDT; queue task 2641 (cancelled, self-assigned)
    • Found via: self-assigned during new-issue-creator-code-a run (filed this run; guarded trivial self-solve, lifecycle protocol §4)
    • Task: Add the tag-6 (CursorRemove) branch to CollabMessage::decode plus roundtrip tests for every variant/form and tag constants 0–9, on branch creator-a/1783-collab-cursorremove-decode, in a laptop worktree.
    • Expectation: effort/xs — done when the new tests pass on the laptop/CI and the PR merges.
    • Links: branch creator-a/1783-collab-cursorremove-decode (PR to follow)
  5. dezren39
    added
    work/self-assignedAn agent grabbed this item directly, outside the queue
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  6. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  7. developing-today
    added
    status:in-review
    on Oct 28, 2026
  8. dezren39
    added
    status/needs-reviewReady for review
    and removed
    status/in-progressQueue worker lifecycle state
    on Oct 28, 2026
  9. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-10-28 14:05 CDT
    • Found via: self-assigned during new-issue-creator-code-a run (guarded trivial self-solve, lifecycle protocol §4)
    • Task: Fix implemented on branch creator-a/1783-collab-cursorremove-decode @5599d394c — tag-6 decode branch + roundtrip tests for CursorRemove/Auth/AuthOk + tag constants 0–9. PR fix(id/web): decode CursorRemove frames in the collab codec (#1783) #1785 OPEN.
    • Expectation: Merge fix(id/web): decode CursorRemove frames in the collab codec (#1783) #1785 when its checks are green, then strip work/self-assigned + status/needs-review and post the done note. Verification so far: verbatim-codec probe on the laptop — all 12 variant forms roundtrip post-fix (CursorRemove was the only failure pre-fix); rustfmt clean. Full cargo test did not complete on the saturated laptop; CI is the gate.
    • Links: PR fix(id/web): decode CursorRemove frames in the collab codec (#1783) #1785 · probe ~/git/fleet/probe-2026-10-28-laneA-collab-decode (out.log pre-fix, out-patched.log post-fix)
  10. dezren39
    closed this as completedin #1785on Oct 30, 2026
  11. dezren39
    added
    status:done
    and removed
    status:in-review
    status/needs-reviewReady for review
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemwork/self-assignedAn agent grabbed this item directly, outside the queue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.