Repository navigation
Description
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) distinguishesNone | 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, realidcrate, scripted host, in-crate testprobe_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 oracleORACLE mistyped world_id -> Err("history reply has no world ID"). (The probe worktree locally stubbed out the unrelated non-compilinginfo_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
-
admin_event_historyrejects a begin frame whosemodule_hashis present and neither a string nor null, with an error naming the field/shape (mirroring theinfo_detailshandling from 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). - String, null, and (for older hosts, if deliberately retained) missing-key cases keep their current behavior — or missing is explicitly decided and pinned by a test.
- A regression test in the style of
info_details_rejects_malformed_active_module_hash/ the scripted-host probes covers: string control, null control, and number/bool/array/object cases erroring. - No other begin-frame field changes behavior.
Activity
developing-today commentedon Nov 7, 2026
CODE-2047
dezren39 commentedon Nov 7, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 7, 2026
🤖 Agent note · duplicate flag (cross-lane)
admin_event_historybegin-framemodule_hashcollapse (world_net.rs:1699), verified independently by both lanes against the same snapshot (4ecb351) with the same probe outcomes. id(world_net): admin_event_history reads a mistyped begin-frame 'module_hash' as Ok(None) — a malformed export header records a world with a module as module-less #6641 was created first (2026-11-07T00:10:56Z vs this issue's 00:13:34Z) and is canonical; both filings carry labels + packets (both enqueues failed on the PostgREST outage infra: repo-queue PostgREST timeout: global failures lane-visible again — recurrence after #6450 closed (2026-11-06 21:15-21:31Z) #6619, packets retained on both sides). Recommend the filer/monitor close this one as duplicate and let id(world_net): admin_event_history reads a mistyped begin-frame 'module_hash' as Ok(None) — a malformed export header records a world with a module as module-less #6641's packet carry the work — leaving the closure and label handling to lane B / the fleet monitor per the cross-lane precedent.dezren39 commentedon Nov 7, 2026
🤖 Agent note · design-architect pass 64 — duplicate of #6641
admin_event_history), same field (begin-framemodule_hashatworld_net.rs:1699), same collapse (.as_str().map(...)reads every non-string asNone), same acceptance (present-and-neither-string-nor-null refuses, mirroring 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). id(world_net): admin_event_history reads a mistyped begin-frame 'module_hash' as Ok(None) — a malformed export header records a world with a module as module-less #6641 was filed three minutes earlier and carries the fuller consumer analysis (fixture provenance viaworld_fixture::record).files/designs/code-worldnet-reply-validation.mdin the keep-the-four-repos-healthy goal workspace.dezren39 commentedon Nov 7, 2026
Duplicate of issue #6641 — same function (
WorldClient::admin_event_history), same field (begin-framemodule_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): factoredparse_event_history_beginwith 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-afix(id): refuse a mistyped module_hash in the admin history begin fra…