Skip to content

id: world directory feed — presence counts + public directory frame (#812) - #4954

Merged
dezren39 merged 1 commit into
mainfrom
queue/7685-812-presence-directory
Nov 3, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/7685-812-presence-directory

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Closes the queue task 7685 remainder of #812 (presence counts + public world directory feed on the shared directory_json serializer). Slice 1 (shared serializer, honest loaded field) landed as PR #1808.

What

  • Presence counts: WorldInfo gains presence — the hub's live session lease count for that world (0 for stored worlds). WorldHub::list() fills it from the slot lease counters (read-only, no world is opened). directory_json emits "presence" per world. Per Drew's 2026-10-29 shape ruling on id phase-10: the world directory feed was not built — id world list --json is admin-only, has no presence counts, and 'open' means loaded-in-memory #812, the directory carries a count only, never an identity — who is present is not directory data, and nothing here writes us into a corner on making more private later.
  • Public directory path: new ClientFrame::Directory (wire {"type":"directory"}) answers ServerFrame::Worlds with no admin token. The auth boundary is deliberate and documented on the frame: directory metadata only (names, loaded state, default, presence counts); the frame creates and opens nothing. The admin ListWorlds frame is unchanged.
  • Client/CLI: WorldClient::directory() added; list_worlds shares the reply parser and now also returns presence. id world list: --admin-token is now optional — without it the CLI reads the public directory, with it the admin listing. The plain row shape is byte-unchanged (the id(world): world list plain output renders host-supplied names raw — a newline in a world name forges extra rows, and a tab forges columns #3089 two-field contract); presence shows in --json and the web UI.
  • Web: the home world explorer now renders from directory_json (the shared serializer, same shape as id world list --json) and shows "N active" when a world's presence count is non-zero.

Auth-boundary decision (recorded per packet)

The directory is public read-only metadata on a mostly-public server (2026-10-29 ruling framing). Exposed: world names that the host serves, whether each is loaded, the default world's name, and live-session counts. Not exposed: user IDs, pseudonyms, true names, or which user is in which world — per-user visibility remains tracked on #812 (design, excluded from this packet).

Tests (laptop, pkgs/id)

  • cargo test --lib directory_ — 79 passed (incl. updated directory_json_shape_names_loaded_not_open asserting presence, and new directory_frame_lists_worlds_without_an_admin_token proving the public frame answers with no token).
  • cargo test --lib world_hub:: 15 passed; world_session:: 57 passed; web:: 128 passed; cli:: 11 passed; commands::world suite passed — 0 failures anywhere.

Remaining on #812 after this: per-user visibility toggles / true-name opt-in plumbing (design, explicitly excluded).


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

…812)

- WorldInfo gains presence (live session lease count per world, hub list());
  directory_json emits it — a count only, never an identity (#812 shape
  ruling 2026-10-29).
- New public ClientFrame::Directory: lists worlds with no admin token;
  the reply is directory metadata only (names, loaded, default, presence
  counts), creates/opens nothing. Admin ListWorlds unchanged.
- WorldClient::directory() + shared worlds-reply parser; list_worlds now
  also returns presence.
- id world list: --admin-token optional; without it the CLI reads the
  public directory. Plain row shape unchanged (#3089 contract).
- Web world explorer renders from directory_json (shared serializer),
  showing presence counts.
- Tests: directory_json shape asserts presence; new session test proves
  the directory frame answers without an admin token.
@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 14:28
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T14:28:31.874953Z
We couldn’t complete this review. Comment @codex review to try again.
4007821 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.

@coderabbitai

coderabbitai Bot commented Nov 3, 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 33 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: 4575f114-0cda-4a2b-8a7f-fc8a69411d75
Commits

Reviewing files that changed from the base of the PR and between 659a72e and 4007821.

Files selected for processing: 8
  • pkgs/id/src/cli.rs
  • pkgs/id/src/commands/world.rs
  • pkgs/id/src/web/home.rs
  • pkgs/id/src/world_hub.rs
  • pkgs/id/src/world_net.rs
  • pkgs/id/src/world_session/mod.rs
  • pkgs/id/src/world_session/tests.rs
  • pkgs/id/src/world_session/types.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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Codex findings gate — disposition (task 7685, lane code-e resume)

The Codex code review on this PR failed to run: the chatgpt-codex-connector[bot] summary records status failed for commit 4007821a8, and its follow-up comment states the Codex usage limits for code reviews have been reached. There are zero inline Codex findings and zero Codex review threads on this PR — nothing was raised, so there is nothing outstanding to fix or rebut. The has_unresolved_findings flag in the review-state marker reflects the failed run, not an actual finding.

Disposition: no findings to address. Merge proceeds under the standing criteria — the production line limit (2500) check is SUCCESS, the PR is mergeable/clean, and the laptop targeted tests recorded on task 7685 passed (211 passed, 0 failed across the world_hub / world_session / web::home / commands::world / cli filters, including the new public-directory tests).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant