Skip to content

Publish AdaScript runtime, multiplayer, and editor updates - #124

Merged
SpectralDragon merged 1 commit into
mainfrom
codex/publish-all-runtime-editor
Sep 22, 2026
Merged

SpectralDragon merged 1 commit into
mainfrom
codex/publish-all-runtime-editor

Conversation

@SpectralDragon

Copy link
Copy Markdown
Contributor

Publishes the accumulated runtime and editor work: generated component reflection and @AdaScriptInit constructors, native typed AdaScript spawn backed by gravity-lang 0.9.9, shared runtime/LSP constructor catalog, AdaMultiplayer, MedievalArena AdaScript demo, editor source tooling and project UX, plus UI/render/tilemap fixes and coverage.\n\nValidation:\n- gravity-lang 0.9.9 CI: Linux gcc/clang, macOS gcc/clang, ASan+UBSan all passed\n- root swift test --parallel: 933 tests in 158 suites passed\n- AdaECSTests: 89 passed\n- MedievalArena source/runtime suite: 4 passed\n- AdaEditor target build passed\n- GravityLanguageSemanticTests: 3 passed\n- GravityLanguageServerTests: 12 passed\n\nThe full AdaEditor parallel suite still has unrelated runtime/UI test failures in package configuration, image tooling, keyframe UI, and style logging, plus a parallel index crash; focused production and LSP gates pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026

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 Completed 2026-09-22T13:03:28.764454Z 5880248 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 588024882a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

frame: NetworkFrame(kind: .protocolError, payload: try runtime.codec.encode(failure)),
to: runtime.configuration.role == .host ? .peer(peer) : .host
)
await session.end(.incompatiblePeer(peer))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject only the incompatible joining peer

When a host receives a handshake with a mismatched game, build, schema, or role, this call marks the entire MultiplayerSession as ended. Since MultiplayerSession.send subsequently rejects every snapshot and RPC, one incompatible or stale client can stop networking for all already-compatible peers even though their transports remain connected; the host should reject/disconnect only the offending peer.

Useful? React with 👍 / 👎.

try await send(snapshot, to: .peer(peer))
runtime.peersNeedingBaseline.remove(peer)
}
let delta = makeDelta(previous: runtime.hostEntities, current: current)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Track replication visibility separately for each peer

When ReplicationPolicy.shouldReplicate changes for an existing entity, computing one global delta against runtime.hostEntities loses that visibility transition. A peer newly granted visibility receives no spawn unless the entity changes again, while a peer whose visibility is revoked receives no despawn and retains the last replicated state; maintain per-peer visible state and generate peer-specific spawn/despawn deltas.

Useful? React with 👍 / 👎.

guard configuration.role == .peer else {
throw MultiplayerError.peerOnly
}
let payload = try JSONNetworkCodec().encode(command)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Encode RPC payloads with the configured codec

When MultiplayerPlugin is initialized with any non-JSON NetworkCodec, sendCommand still encodes with a fresh JSONNetworkCodec, while receiveRPC decodes with the configured runtime codec, so otherwise-valid commands fail to decode. The same hard-coded JSON path is used by events and requests/responses; the session's typed APIs need to use the plugin-provided codec consistently.

Useful? React with 👍 / 👎.

)

private static func peerID(role: NetworkRole, index: Int) -> PeerID {
let suffix = UInt8(clamping: role == .host ? 1 : max(1, index))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Give the host and first peer distinct identifiers

With the default peerIndex == 1, both .host and .peer select suffix 1, producing exactly the same UUID. Thus changing the shipped/default project configuration from host to peer creates a remote participant with the host's identity; the session and AdaScript bridge cannot distinguish them, and Medieval Arena's peer-keyed player state collapses both participants into one.

Useful? React with 👍 / 👎.

@SpectralDragon
SpectralDragon merged commit c7f0de3 into main Sep 22, 2026
4 of 5 checks passed
@SpectralDragon
SpectralDragon deleted the codex/publish-all-runtime-editor branch September 22, 2026 14:14
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