Conversation
WalkthroughThis PR updates the james-project submodule reference and ensures mailbox ACL information is consistently preserved across deletion event handling. Changes include: (1) adding Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tmail-backend/mailbox/plugin/tmail-deleted-message-vault/common/src/main/java/com/linagora/tmail/vault/TeamMailboxDeletedMessageVaultDeletionListener.java (1)
87-101: Consider adding a non-empty ACL remapping regression test.This path now preserves ACL, but current fixture updates mostly use
MailboxACL.EMPTY; a focused test with non-empty ACL would better protect this behavior.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tmail-backend/mailbox/plugin/tmail-deleted-message-vault/common/src/main/java/com/linagora/tmail/vault/TeamMailboxDeletedMessageVaultDeletionListener.java` around lines 87 - 101, The test suite lacks a regression test ensuring ACLs are preserved by TeamMailboxDeletedMessageVaultDeletionListener when building MessageContentDeletionEvent (via mailboxACL()), so add a focused unit test that supplies a non-empty MailboxACL (not MailboxACL.EMPTY) in the fixture, invokes the listener/mapping that returns a MessageContentDeletionEvent, and asserts the resulting MessageContentDeletionEvent.mailboxACL equals the original non-empty MailboxACL; update or add test helper(s) to construct a mailbox event with a populated ACL and ensure the mapping code path in TeamMailboxDeletedMessageVaultDeletionListener is exercised.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@tmail-backend/mailbox/plugin/tmail-deleted-message-vault/common/src/main/java/com/linagora/tmail/vault/TeamMailboxDeletedMessageVaultDeletionListener.java`:
- Around line 87-101: The test suite lacks a regression test ensuring ACLs are
preserved by TeamMailboxDeletedMessageVaultDeletionListener when building
MessageContentDeletionEvent (via mailboxACL()), so add a focused unit test that
supplies a non-empty MailboxACL (not MailboxACL.EMPTY) in the fixture, invokes
the listener/mapping that returns a MessageContentDeletionEvent, and asserts the
resulting MessageContentDeletionEvent.mailboxACL equals the original non-empty
MailboxACL; update or add test helper(s) to construct a mailbox event with a
populated ACL and ensure the mapping code path in
TeamMailboxDeletedMessageVaultDeletionListener is exercised.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e55e31a5-57b7-4501-831c-49868307a2f2
📒 Files selected for processing (4)
james-projecttmail-backend/jmap/extensions/src/test/java/com/linagora/tmail/james/jmap/event/KeywordEmailQueryViewListenerTest.javatmail-backend/mailbox/plugin/tmail-deleted-message-vault/common/src/main/java/com/linagora/tmail/vault/TeamMailboxDeletedMessageVaultDeletionListener.javatmail-backend/tmail-third-party/ai-bot/src/test/java/com/linagora/tmail/mailet/rag/RagDeletionListenerTest.java
Summary by CodeRabbit
Bug Fixes
Chores