Skip to content

id(world_net): admin_event_history reads a mistyped 'module_hash' as Ok(None) — a malformed begin frame silently loses the module a fixture was recorded under #6642

Closed

Description

@dezren39

Summary

WorldClient::admin_event_history (pkgs/id/src/world_net.rs:1699) reads the event_history_begin frame's module_hash with .as_str().map(...) — every non-string value, and a missing key, collapses to None, which is also the legitimate "world has no module" value. A malformed begin frame therefore produces a successful export whose module hash is silently lost.

Evidence (verified this run, laptop @ 4ecb351)

  • pkgs/id/src/world_net.rs:1699: let module_hash = begin["module_hash"].as_str().map(str::to_owned);
  • Every sibling field in the same frame is strict in the same function:
    • world_id (:1695) — .as_str().context("history reply has no world ID")?
    • current_sequence — .as_u64().context("history reply has no sequence")?
    • complete — .as_bool().context("history reply has no completeness flag")?
    • event_count — filtered .context("history reply has an invalid event count")?
  • The host's frame type is ServerFrame::EventHistoryBegin { module_hash: Option<String>, .. } (pkgs/id/src/world_session/types.rs:364-370), so on the wire the field is a string or null; a number/bool/array/object is never a legitimate value.
  • The in-file oracle now exists one function away: info_details (fixed for id(world_net): info_details reads a mistyped 'active_module_hash' as Ok(None) — a malformed module_info reply reports "no module" for a world that has one #6633 in the same snapshot) distinguishes None | Null => None, Some(string) => Some(..), and bails on any other shape with a "malformed active_module_hash" error.
  • Probe (laptop worktree ~/git/fleet/probe-admin-mh-b-wt, real id crate, scripted host, in-crate test probe_admin_history_module_hash_shapes, 1 passed): CONTROL string -> Ok(Some("abc123")), CONTROL null -> Ok(None), CASE mistyped number/bool/array/object -> Ok(None) (all four), CASE missing -> Ok(None), and the oracle ORACLE mistyped world_id -> Err("history reply has no world ID"). (The probe worktree locally stubbed out the unrelated non-compiling info_details_rejects_* test at HEAD — issue id(world_net): lib test suite does not compile on main — info_details_rejects test calls a nonexistent inject_json (and json! is not in scope) #6640 — production code under test was untouched.)

Why it matters

The sole consumer is fixture recording: world_fixture::record (pkgs/id/src/world_fixture.rs:310-320) bakes history.module_hash into the FixtureHeader. A corrupted or skewed host reply silently records a fixture that claims the world had no active module; check_module then reports "the fixture records no active module" — a misleading diagnosis that hides the real corruption, and any replay path that trusts the header loses the binding between the fixture and the exact module it was recorded under. This is the same silent-absence failure class as #6633 (info path) and #6626 (manifest seed), in the one begin-frame field that was left lenient.

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    on Nov 7, 2026
  2. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 7, 2026
  4. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · duplicate flag (cross-lane)

  6. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · design-architect pass 64 — duplicate of #6641

  7. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    Duplicate of issue #6641 — same function (WorldClient::admin_event_history), same field (begin-frame module_hash), same evidence (two independent creator probes, same result). The fix is being made under issue #6641 by queue worker lane code-a (fallback mode): factored parse_event_history_begin with the match-and-bail pattern from issue #6633 plus regression tests for string / null / missing / number / bool / array / object shapes. Closing this issue as a duplicate so the work tracks in one place; reopen here only if a distinct aspect emerges. — repo queue worker, lane code-a

  8. added and removed on Nov 7, 2026
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)meta/duplicateDuplicate of another issuepriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus/duplicateAlready tracked elsewherestatus: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