refactor: remove non-direct message routing #1530
refactor: remove non-direct message routing #1530LePremierHomme wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| if (!supplySourcesCompatible) { | ||
| return (false, InvalidXnetMessageReason.IncompatibleSupplySource, applyType); | ||
| if (!isDirect) { | ||
| return (false, InvalidXnetMessageReason.NonDirect, applyType); |
There was a problem hiding this comment.
Direct message validation allows cross-branch messages
Medium Severity
The isDirect validation in checkCrossMessage only checks that route lengths differ by exactly 1, but doesn't verify the subnets are actually in a parent-child relationship. A message from /root/A/B to /root/X (different branch, not the actual parent /root/A) would pass validation because both have route length difference of 1. For BottomUp messages, this would allow the message to be committed to the checkpoint. When the parent /root/A processes it, applyMsg sees destination /root/X doesn't equal current network and triggers a hard revert("Only direct messaging supported"), potentially failing the entire message batch execution.
Closes #1522
This is a simplified version of the task, where all non-direct message routing support is removed, including sibling-to-sibling.
Rationale
Removes untested complexity before refactoring the IPC contracts codebase. Multi-hop routing was complex, untested, and not currently used in production.
Note
Refactors cross-net messaging to support only direct parent–child hops; removes multi-hop routing and the postbox/propagation flow.
propagate*code; removesIGateway.propagateAlland related facet methods/selectorsLibGateway.checkCrossMessagerejects non-direct paths with newInvalidXnetMessageReason.NonDirect;applyMsgreverts on non-local destinationscommitValidatedCrossMessageNonDirecterror enum; cleans up unused errors and methodsWritten by Cursor Bugbot for commit 6ab7712. This will update automatically on new commits. Configure here.