fix(guard): serialize gateway actor keys correctly#4655
fix(guard): serialize gateway actor keys correctly#4655NathanFlurry wants to merge 1 commit intobreak-up/subscribe-before-namespace-dispatchfrom
Conversation
|
Code Review for PR 4655 - fix(guard): serialize gateway actor keys correctly Overview This PR fixes a semantic bug in serialize_actor_key. The original code used EMPTY_KEY in the join() call instead of KEY_SEPARATOR. Both constants share the same string value so there is no observable behavioral change, but the intent was wrong and the naming misleading. What Changed The root cause: KEY_SEPARATOR was typed as char, which cannot be passed to slice::join() (requires &str). The workaround was to use EMPTY_KEY (same value) for the join. The fix properly types KEY_SEPARATOR as &str and adds KEY_SEPARATOR_CHAR: char for the replace() call.
Assessment Correct fix. Resolves the semantic confusion without any behavior change. Minor suggestions:
Verdict The fix is correct and clean. The only meaningful follow-up is adding unit tests for serialize_actor_key to guard against future regressions. |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: