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(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes · Issue #6501 · developing-today/code

id(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes #6501

New issue
Copy link
New issue
Copy link
Closed
#6508
Closed
id(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes#6501
#6508
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/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/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

Problem

Two of the four world-session frame parsers in pkgs/id parse the raw frame text into a serde_json::Value first and only then convert to ClientFrame, so duplicate JSON keys collapse (last value wins) before any check sees the frame. The other two parsers in the same module parse the same frame type directly from text, where serde refuses duplicate fields — so the identical bytes are accepted in one session phase and refused in another.

Evidence (origin/main 4f29a12; pkgs/id/src/world_session/mod.rs is identical between the laptop primary HEAD and origin/main):

  • First frame — run_session_with, mod.rs:901: serde_json::from_str::<serde_json::Value>(&first), then the world routing field is removed from the collapsed map (mod.rs:909–921), then serde_json::from_value::<ClientFrame>(value) (mod.rs:922). Every later check — admin-token length/admin_ok, capability handling, the signed-request path — sees only the collapsed frame.
  • Joined frames — handle_client_frame, mod.rs:2536: same Value-first parse; the delegation uses guard delegation_names_uses (mod.rs:2545) tests value.get("type") on the collapsed map, then from_value::<ClientFrame> (mod.rs:2549).
  • Sibling strict paths in the same module: query_session parses serde_json::from_str::<ClientFrame>(&text) directly (mod.rs:1596), and the install path does the same for chunk/end frames (mod.rs:2062, mod.rs:2081). Serde's derived decoding refuses a duplicate field there.

Verified this run on the laptop with a probe driving the real id crate's public run_session_with (probe ~/git/fleet/probe-session-dup, fake WorldOpener/SessionIo, Directory needs no world):

  • Control {"type":"directory"} → worlds reply (accepted).
  • Control {"type":"bogus"} → refused at parse ("first frame must be a valid join or invite request").
  • {"type":"directory","type":"directory"} → accepted, worlds reply.
  • {"type":"bogus","type":"directory"} → accepted, worlds reply: the invalid first type is hidden behind the duplicate.
  • {"world":123,"world":null,"type":"directory"} → accepted: the non-string first world value is hidden. Reversed (null then 123) → refused with "world must be a string", proving last-value-wins routing.
  • {"type":"join","capability":123,"capability":"some-capability"} → passes the parse stage (fails later at world resolution, not with the parse refusal): the non-string first capability is hidden.

Why it matters

Session frames carry the credentials and routing of the world protocol: the world name that leases a world, admin tokens, capabilities, and signed moderator requests (signed objects nested inside frames collapse the same way). A parser that silently drops all but the last spelling of a field lets two readers of the same bytes disagree about what was sent — the strict sibling paths in this very module refuse such frames outright — and it hides forbidden first values (a wrong frame type, a non-string routing field, a mistyped capability) from every check that runs on the collapsed value. This is the same duplicate-key class as #6473 (parse_records), #6474 (world_fixture) and #6491 (parse_surface), in the session layer those fixes did not cover.

Acceptance criteria

  • The first-frame and joined-frame entry points refuse any frame containing duplicate keys — at minimum at the top level and inside nested objects such as signed — before routing, the uses guard, or ClientFrame conversion run; or they parse directly from the frame text like the query/install paths, with the world extraction and the delegation-uses guard re-implemented so their current semantics (including refusing uses at any depth) are preserved.
  • Tests pin the refusal of: duplicate type (identical and conflicting), duplicate world in both orders, duplicate capability, duplicate admin_token, and a duplicate field inside a nested signed object — in both the first-frame and joined phases.
  • Controls keep working: a plain directory frame lists worlds, a plain join/invite/chat/delegation flow is unchanged, a delegation frame carrying uses is still refused, and the query/install paths are unchanged.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 6, 2026
  2. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-1962

  3. dezren39
    added
    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)
    on Nov 6, 2026
  4. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b (new-issue-creator job, Lane B)
    • Session / ID: new-issue-creator-code-b run 2026-11-06 04:20 CST
    • Found via: filed this run
    • Task: Triage the world_session duplicate-key collapse: first-frame (mod.rs:901) and joined-frame (mod.rs:2536) parsers go through serde_json::Value before every check, while the query/install paths in the same module parse ClientFrame directly and refuse duplicate fields.
    • Expectation: effort/m — done when both entry points refuse duplicate keys (top level and nested, e.g. signed) with raw-string regression tests, and directory/join/delegation controls (including the uses refusal) are unchanged.
    • Links: evidence and probe details in the issue body; probe ~/git/fleet/probe-session-dup on the laptop (real id crate, foreground rerun EXIT:0, all 7 cases as described).
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  6. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-v
    • Session / ID: task 10991
    • Found via: queue claim
    • Task: Triage issue id(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes #6501 — verify the world_session duplicate-key collapse against fresh main, reproduce, and route the fix
    • Expectation: effort/s triage — done when the claim is verified (or refuted) with fresh evidence, a findings note is posted, and a fix task is enqueued if confirmed
    • Links: issue id(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes #6501
  7. 19 remaining items

  8. dezren39
    added a commit that references this issue on Nov 6, 2026

    fix(id): refuse duplicate JSON keys in query-session frames before jo…

    9e2a4de
  9. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 10998
    • Found via: queue claim (direct execution lane)
    • Task: Shepherding PR fix(id): refuse duplicate JSON keys in world_session first/joined frames (#6501) #6508 for issue id(world_session): first-frame and joined-frame parsers collapse duplicate JSON keys before their checks — a hidden first type/world/capability value is never seen, and the sibling session paths reject the same bytes #6501. Acted on the CodeRabbit finding (discussion 4492089683): verified query_session parsed subsequent frames straight into ClientFrame with no duplicate-key guard, fixed it in commit 9e2a4de via parse_json_without_duplicate_keys, added the red-green-verified regression test query_frame_rejects_duplicate_json_keys_before_join, and replied on the thread. Codex gate: no findings exist — the Codex review failed on usage limits and was already dispositioned on PR fix(id): refuse duplicate JSON keys in world_session first/joined frames (#6501) #6508 by lane code-q.
    • Expectation: task 10998 parked 20 minutes awaiting CI on 9e2a4de; on resume, read PR fix(id): refuse duplicate JSON keys in world_session first/joined frames (#6501) #6508 checks fresh and merge when green. Tests: cargo test -p id --lib world_session 62 passed on laptop; rustfmt edition-2024 clean.
    • Links: PR fix(id): refuse duplicate JSON keys in world_session first/joined frames (#6501) #6508 fix(id): refuse duplicate JSON keys in world_session first/joined frames (#6501) #6508 · branch queue/10998-6501-duplicate-json-keys
  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status:in-review
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 6, 2026
  11. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    agent-note:v1 — picked up (resume) by queue worker lane code-c, task 10998. Prior progress verified fresh: PR #6508 at 9e2a4de, branch queue/10998-6501-duplicate-json-keys, cargo test -p id --lib world_session 62 passed on laptop (prior lane), CodeRabbit finding 4492089683 fixed in 9e2a4de and acknowledged by the bot, Codex gate dispositioned on PR #6508 (review failed on Codex usage limits, no findings produced). scripts-test checks on PR #6508 have been QUEUED since 2026-11-06T12:16Z (fleet-wide GitHub-hosted runner stall; that Python workflow is unrelated to this Rust-only change). Merging under the standing merge authority.

  12. dezren39
    added a commit that references this issue on Nov 6, 2026

    Merge pull request #6508 from developing-today/queue/10998-6501-dupli…

    6046e1d
  13. dezren39
    closed this as completedin #6508on Nov 6, 2026
  14. developing-today
    added
    status:done
    on Nov 6, 2026
  15. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 6, 2026
  16. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    agent-note:v1 — done (task 10998, queue worker lane code-c). PR #6508 merged at 2026-11-06T13:28:03Z, merge commit 6046e1d; this issue auto-closed by the merge. Evidence: branch queue/10998-6501-duplicate-json-keys at 9e2a4de; cargo test -p id --lib world_session 62 passed on laptop (prior lane checkpoint, re-verified on resume); CodeRabbit finding fixed + bot-acknowledged; Codex gate dispositioned on the PR (usage-limit failure, no findings). Caveat: scripts-test checks sat QUEUED since 12:16Z (fleet-wide runner stall, unrelated Python workflow); merged under the standing merge authority — if main CI surfaces a regression, fix forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/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/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    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.