fix(trogon_commanded): validate command and aggregate identity configuration in CommandHandlerCase#235
fix(trogon_commanded): validate command and aggregate identity configuration in CommandHandlerCase#235
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3362d9c to
1c9a719
Compare
b52f4ce to
aa8e503
Compare
44e2045 to
6473f23
Compare
PR SummaryLow Risk Overview The assertion helpers were refactored to share a Written by Cursor Bugbot for commit decfb1c. This will update automatically on new commits. Configure here. |
apps/trogon_commanded/lib/trogon/commanded/test_support/command_handler_case.ex
Outdated
Show resolved
Hide resolved
apps/trogon_commanded/lib/trogon/commanded/test_support/command_handler_case.ex
Outdated
Show resolved
Hide resolved
apps/trogon_commanded/lib/trogon/commanded/test_support/command_handler_case.ex
Show resolved
Hide resolved
d33ebf7 to
7c51b61
Compare
apps/trogon_commanded/lib/trogon/commanded/test_support/command_handler_case.ex
Show resolved
Hide resolved
…uration in CommandHandlerCase
7c51b61 to
decfb1c
Compare
| validate_aggregate_uuid_extraction(command, command_module) | ||
| else | ||
| :ok | ||
| end |
There was a problem hiding this comment.
One-sided identity config silently bypasses validation
Medium Severity
validate_identity_configuration/2 only validates when both command and aggregate expose identity functions. If only one side is configured, it returns :ok and proceeds. This leaves misconfigured tests passing silently, so CommandHandlerCase can still hide identity mismatches instead of surfacing them.


Summary
CommandHandlerCasenow validates that command and aggregate identity configuration match (field name and prefix) before running assertionsregister_transaction_script) skip validation, matching production behaviorTest plan
CommandHandlerCasetests pass unchanged (backward compatible)