Repository navigation
Description
Problem
WorldClient::info_details in pkgs/id/src/world_net.rs (reply handling at :1473 on main 075b2de904) reads the module_info reply's active module hash with a bare optional coercion:
let active_module_hash = reply["active_module_hash"].as_str().map(str::to_owned);as_str() returns None for every non-string value, so a present-but-mistyped active_module_hash (number, bool, array, object) is silently read as None — the exact value that legitimately means "this world has no installed module". The host's ServerFrame::ModuleInfo (pkgs/id/src/world_session/types.rs:330-336) always serializes this field as either a string or null, so a non-string, non-null value can only be corruption, a version-skewed host, or a hostile/buggy peer — and the client should say so instead of inventing "no module".
The same reply is otherwise strict, which is the in-function oracle:
world_idmissing/mistyped → error ("host omitted world id", :1469-1472)current_sequencemissing/mistyped → error ("host omitted sequence", :1474-1476)- a non-null
active_module_provenancethat fails to decode → error ("host sent invalid module provenance", :1477-1482)
Only the hash field collapses malformed → absent.
Why it matters
Consumers trust None as a factual statement about the world:
id world download(pkgs/id/src/commands/world.rs:214-216) turns the coercedNoneinto the operator-facing claim "world has no installed module to download" — wrong diagnosis for a world that does have a module, sending debugging in the wrong direction.capture_world_state(pkgs/id/src/commands/world.rs:1148) bakesmodule_hash: info.active_module_hashinto the capturedWorldStatemanifest — a mistyped reply is recorded as a manifest with no module, the same class of fabricated capture state as the manifest seed issue (id(world_net): manifest_state silently drops a mistyped seed — a present-but-malformed seed reads as the capability-only None and is captured as seed 0 #6626, different field/function).id world infoJSON output (commands/world.rs:665) prints"active_module_hash": null, indistinguishable from a genuinely module-less world.
Evidence (verified this run)
Probe on the laptop against main 075b2de904, real id crate with a scripted iroh host (~/git/fleet/probe-compile-wt/pkgs/id/tests/probe_info_reply.rs, test probe_info_reply_shapes):
- control, string hash
"abc123"→Ok(Some("abc123")) - control,
nullhash →Ok(None)(the legitimate no-module case) - mistyped hash
123/true/["abc"]/{"h":"abc"}→ allOk(None)— silently conflated with no-module - oracle in the same reply: mistyped non-null
active_module_provenance: 123→Err("host sent invalid module provenance")
Dedup: gh search issues for active_module_hash / info_details / module_info in this repo returns no issue covering info_details reply validation. Neighbours are distinct functions/fields: #6620 (compile() reply defaults), #6621 (read_worlds_reply entries), #6624 (caps() report), #6625 (policy_request reply), #6626 (manifest_state seed), #6632 (create_world flag).
Acceptance criteria
-
info_detailserrors whenactive_module_hashis present and neither a string nornull, with an error naming the malformed field. - A string hash still returns
Some(hash);null(and a genuinely absent field, for older hosts) still returnsNone. - Regression tests with a scripted host (or equivalent) covering: string, null, absent, and at least number/object mistyped shapes.
- No host-side change;
ServerFrame::ModuleInfoserialization is unchanged.
Activity
developing-today commentedon Nov 6, 2026
CODE-2039
dezren39 commentedon Nov 6, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 7, 2026
Picked up by
repo-worker-code-a— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-aposts progress markers; after 30 minutes of silence any other worker may pick this up.)1 remaining item
dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-code-a: verified + reproduced-by-inspection: production fix for #6633 already landed on main via repo-keeper snapshot 4ecb351 (world_net.rs parse match at :1481, verified fresh at origin/main 207e612), but its regression test does not compile (inject_json nonexistent, json! unimported — tracked also as #6640/#6643). Working it in laptop worktree ~/git/fleet/fb-6633 on branch queue/6633-info-details-active-module-hash: factor reply parsing into a testable helper, rewrite the test against it, no production behavior change.dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-code-a: implementation_complete: factored parse_module_info_reply out of info_details (no behavior change) and rewrote info_details_rejects_malformed_active_module_hash against it (string/null/missing controls + number/bool/array/object errors) in laptop worktree ~/git/fleet/fb-6633, branch queue/6633-info-details-active-module-hash. Targeted cargo test running on the laptop now. Note: first patch attempt via the laptop-agent daemon path appeared to apply but did not persist on the real filesystem (verified via LAPTOP_SSH_REAL=1); re-applied and verified via real SSH.dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-code-a: pr_opened stage: branch queue/6633-info-details-active-module-hash pushed at ff406ef; targeted test passes on laptop and full id lib-test target compiles again (cargo test --lib --no-run exit 0). Opening the PR now.dezren39 commentedon Nov 7, 2026
🤖 Agent note · design-architect pass 64 — cited as the embodiment in design #6669
dezren39 commentedon Nov 7, 2026
🤖 Agent note · done
repo-worker-code-a(issue 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 is the task in fallback mode)4ecb3510c9(verified fresh at origin/main207e61203b: strictactive_module_hashmatch inWorldClient::info_details,pkgs/id/src/world_net.rs), but its regression test never compiled (inject_jsonnonexistent,json!unimported — the wholeidlib-test target was broken, tracked as 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 / issue id(world_net): lib-test target does not compile on main — info_details_rejects_malformed_active_module_hash calls a nonexistent inject_json helper (14 errors, all id lib tests blocked) #6643). This shift: factored the reply parsing intoWorldClient::parse_module_info_reply(no behavior change) and rewrote the test against it.779336ffd66677d691101ee35012a8dafc1049dd), closing issue 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, 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, and issue id(world_net): lib-test target does not compile on main — info_details_rejects_malformed_active_module_hash calls a nonexistent inject_json helper (14 errors, all id lib tests blocked) #6643. Codex review on headff406efc83: completed, zero findings. PR CI checks stayed QUEUED (runner backlog, chronic) — merged under the standing merge criteria on laptop verification: targeted testinfo_details_rejects_malformed_active_module_hashPASSES (7 reply shapes: string/null/missing controls + number/bool/array/object errors) andcargo test -p id --lib --no-runcompiles the full lib-test target again (it did not on main).queue/6633-info-details-active-module-hash· commitff406efc83dezren39 commentedon Nov 7, 2026
Released by
repo-worker-code-a(outcome: done). Done: production fix for #6633 was already on main (repo-keeper snapshot 4ecb351); this shift repaired its non-compiling regression test by factoring WorldClient::parse_module_info_reply (no behavior change) and rewriting the test against it — PR #6675 merged (779336f), closing #6633, #6640 and #6643. Laptop verification: targeted test passes, full id lib-test target compiles; Codex zero findings; PR CI stayed QUEUED (runner backlog).fix(id): refuse a mistyped module_hash in the admin history begin fra…
dezren39 commentedon Nov 7, 2026
🤖 Agent note · closure evidence (from #6670 Phase 4, disposition (b))
81bdda48d2bfc0382241722fbd1eefaac13e5a8d: this issue's fix conforms to the Design: a reply is not its defaults — one validated-reply contract for the WorldClient #6669 validated-reply contract as built.WorldClient::parse_module_info_reply(pkgs/id/src/world_net.rs:1654-1672) dispositionsactive_module_hashin the rule-2 shape — absent/null→None, string →Some, anything else → bail "host sent malformed active_module_hash: expected string or null, got …" — beside required+typed sibling fields (world_id"host omitted world id",current_sequence"host omitted sequence") and a typed-or-error provenance decode.info_details_rejects_malformed_active_module_hash, driven through the factored parser.info_detailsas conforms. No further action on this issue.