Skip to content

fix(id): reject world_created replies with a missing or mistyped created flag (#6632) - #6688

Merged
dezren39 merged 1 commit into
mainfrom
queue/fallback-6632-create-world-created-flag
Nov 7, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/fallback-6632-create-world-created-flag

Conversation

@dezren39

@dezren39 dezren39 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Fixes #6632.

WorldClient::create_world read the world_created reply's outcome flag with a silent default — reply["created"].as_bool().unwrap_or(false) — so a reply whose created field was missing or mistyped (host bug, version skew) read as "the world already existed": id world create printed exists and exited 0 for a world whose creation was never confirmed.

Change (pkgs/id/src/world_net.rs)

  • Factor the reply tail into parse_create_world_reply, following the parse_module_info_reply precedent (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): the refusal path still surfaces the host's message (or the existing default), a well-formed reply returns Ok(true)/Ok(false) unchanged, a missing created errors with "host sent no created flag in world_created reply", and a present-but-non-boolean created errors as a malformed world_created reply. Fail-closed is preserved — an unreadable flag never grants or confirms anything; the fix is visibility, not leniency.
  • Regression test create_world_reply_requires_created_flag drives the factored parser: both controls, missing flag, mistyped shapes (string / number / null / array), and both refusal shapes. Oracle: the sibling strictness of parse_module_info_reply — a present-but-wrong-shape field is corruption, not a default.

Verification

  • Laptop (worktree @ 62377a7): cargo test --manifest-path pkgs/id/Cargo.toml --lib create_world_reply — world_net::tests::create_world_reply_requires_created_flag ok (1 passed).
  • Laptop: sibling parser test info_details_rejects_malformed_active_module_hash ok, and the existing create-world-over-iroh test world_session::tests::tests::only_an_admin_creates_or_lists_worlds ok (EXIT:0).
  • rustfmt clean on pkgs/id/src/world_net.rs.

Filed from a fallback-mode queue shift (queue backend down, code#6619): the issue was claimed and released via fleet-claim markers on #6632 by repo-worker-code-l.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 7, 2026 02:26
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c0ac8c6-86e9-4668-8d95-242c652f2da6
Commits

Reviewing files that changed from the base of the PR and between 3a437f1 and 62377a7.

Files selected for processing: 1

  • pkgs/id/src/world_net.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T02:28:22.290190Z 62377a7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

None yet

Projects

None yet

1 participant