-
Notifications
You must be signed in to change notification settings - Fork 0
refactor to use stdio #5
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.
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
base: main
Are you sure you want to change the base?
Conversation
rjcorwin
commented
Sep 19, 2025
- Token ignore in test scenarios
- codex up to scenario 9
- codex on scenario 12
- All tests pass
There was a problem hiding this comment.
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 suggestions.
Reply with @codex fix comments to fix any unresolved comments.
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, or 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 fix this CI failure" or "@codex address that feedback".
cli/src/gateway/core.js
Outdated
| _handleIncomingEnvelope(participantId, envelope, channel) { | ||
| const connection = this.connections.get(participantId); | ||
|
|
||
| if (!connection) { | ||
| this._handleJoin(participantId, envelope, channel); | ||
| return; | ||
| } | ||
|
|
||
| // Subsequent messages: enforce space and from fields before routing | ||
| const enrichedEnvelope = { | ||
| ...envelope, | ||
| space: this.spaceId, | ||
| from: participantId, | ||
| protocol: envelope.protocol || 'mew/v0.3', | ||
| ts: envelope.ts || new Date().toISOString(), | ||
| }; | ||
|
|
||
| this._broadcast(enrichedEnvelope, { exclude: participantId }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Stop forwarding sender's messages to sender
The new gateway core calls _broadcast(enrichedEnvelope, { exclude: participantId }), which means the originator no longer receives its own envelopes. The previous implementation explicitly broadcast every message to all participants to satisfy protocol semantics (participants rely on seeing their own messages for correlation and state updates). With this exclusion, any agent that emits a message will never observe it locally, breaking existing behaviour and contradicting the documented requirement that messages are visible to everyone. Drop the exclusion or reintroduce a self-delivery for the sender.
Useful? React with 👍 / 👎.