GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(world): carry per-connection identity with input (#840) by dezren39 · Pull Request #3916 · developing-today/code

id(world): carry per-connection identity with input (#840) #3916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dezren39 merged 2 commits into main from queue/4860-840-world-input-session-id
Nov 3, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

id(world): carry per-connection identity with input (#840) #3916

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
ff73cd9
feat(id): track per-connection world input sessions (#840)
dezren39 Nov 1, 2026
a653cb9
Merge remote-tracking branch 'origin/main' into queue/4860-840-world-…
dezren39 Nov 3, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'origin/main' into queue/4860-840-world-…
…input-session-id

# Conflicts:
#	pkgs/id/src/world/actor.rs
#	pkgs/id/src/world/handle.rs
#	pkgs/id/src/world/tests.rs
#	pkgs/id/src/world_session/mod.rs
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 committed Nov 3, 2026
commit a653cb9eab32b345b315b247c4ccd38c80f10e4b

There are no files selected for viewing

5 changes: 5 additions & 0 deletions 5 pkgs/id/src/world/actor.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ pub(crate) enum WorldCommand {
token: JoinCapability,
input: Vec<u8>,
session_id: Option<SessionId>,
/// The player-signed move event bytes for this input (#2814), when
/// the participant plays signed. `None` is the unsigned path,
/// which refuses participants with a bound author key.
signed_move: Option<Vec<u8>>,
reply: oneshot::Sender<Result<WorldEvent>>,
},
/// Bind the calling participant's author key for signed play (#2814).
Expand Down Expand Up @@ -1297,6 +1301,7 @@ impl WorldActor {
token,
input,
session_id,
signed_move,
reply,
} => {
// Refuse before touching the program: a replica must not
Expand Down
47 changes: 47 additions & 0 deletions 47 pkgs/id/src/world/handle.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,53 @@ impl WorldHandle {
token,
input,
session_id,
signed_move: None,
reply,
})
.await
.map_err(|_| anyhow::anyhow!("world actor is closed"))?;
response
.await
.context("world actor dropped input response")?
}

/// Bind the calling participant's author key for signed play (#2814).
/// Once bound, the participant's inputs must be player-signed.
pub async fn bind_author_key(
&self,
token: JoinCapability,
author_key: [u8; 32],
) -> Result<u64> {
let (reply, response) = oneshot::channel();
self.commands
.send(WorldCommand::BindAuthorKey {
token,
author_key,
reply,
})
.await
.map_err(|_| anyhow::anyhow!("world actor is closed"))?;
response
.await
.context("world actor dropped bind response")?
}

/// Submit a player-signed game input (#2814): `signed_move` is the
/// chain event the player signed over exactly `input` (see
/// [`super::signed::sign_move`]).
pub async fn input_signed(
&self,
token: JoinCapability,
input: Vec<u8>,
signed_move: Vec<u8>,
) -> Result<WorldEvent> {
let (reply, response) = oneshot::channel();
self.commands
.send(WorldCommand::Input {
token,
input,
session_id: None,
signed_move: Some(signed_move),
reply,
})
.await
Expand Down
2 changes: 2 additions & 0 deletions 2 pkgs/id/src/world/tests.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5482,6 +5482,7 @@ mod schedule_tests {
token: token.clone(),
input: document.to_string().into_bytes(),
session_id: None,
signed_move: None,
reply,
})
.await;
Expand All @@ -5505,6 +5506,7 @@ mod schedule_tests {
token: token.clone(),
input: b"{}".to_vec(),
session_id: Some(session_id),
signed_move: None,
reply,
})
.await;
Expand Down
24 changes: 23 additions & 1 deletion 24 pkgs/id/src/world_session/mod.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ impl WorldService {
SessionId::new(self.next_session_id.fetch_add(1, Ordering::Relaxed))
}

/// Require module artifacts to carry a valid signature from one of these
/// Ed25519 public keys. An empty list preserves the legacy unsigned path.
#[must_use]
pub fn with_module_trust_keys(mut self, keys: Vec<[u8; 32]>) -> Self {
self.trusted_module_keys = keys;
self
}

/// Accept native (ELF) module installs. Wasm stays the default tier.
#[must_use]
pub const fn with_native_enabled(mut self) -> Self {
Expand Down Expand Up @@ -2223,7 +2231,18 @@ async fn joined<I: SessionIo>(
},
inbound = io.recv() => match inbound {
Inbound::Text(text) => {
if !handle_client_frame(service, io, &token, &text, &mut viewport, cursor, session_id).await {
if !handle_client_frame(
service,
io,
&token,
&text,
&mut viewport,
cursor,
session_id,
&mut view_state,
screen_patches,
&mut pending_view_deadline,
).await {
break;
}
}
Expand Down Expand Up @@ -2492,6 +2511,9 @@ async fn handle_client_frame<I: SessionIo>(
viewport: &mut Option<Viewport>,
sequence: u64,
session_id: SessionId,
view_state: &mut ViewRevisionState,
screen_patches: bool,
pending_view_deadline: &mut Option<tokio::time::Instant>,
) -> bool {
let world = service.world();
let Ok(value) = serde_json::from_str::<serde_json::Value>(text) else {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

You are viewing a condensed version of this merge commit. You can view the full changes here.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.