Skip to content

Conversation

@andrest50
Copy link
Contributor

@andrest50 andrest50 commented Oct 28, 2025

Summary

  • Add new MeetingRSVPEnricher to process meeting RSVP objects for indexing
  • RSVP permissions inherit from parent meeting via meeting_uid field
  • Enables search and querying of RSVP data in OpenSearch

Changes

  • Add constant: ObjectTypeMeetingRSVP in pkg/constants/messaging.go
  • Create enricher: internal/enrichers/meeting_rsvp_enricher.go
    • Inherits meeting-level permissions using meeting_uid field
    • Extracts sort name from email field
    • Extracts searchable aliases from username and email fields
    • Default access relation: auditor
    • Default history relation: writer
  • Register enricher: Added to enricher registry in indexer_service.go

Access Control

RSVP objects don't have their own permissions. Instead, they inherit permissions from their parent meeting:

  • accessCheckObject: meeting:{meeting_uid} (falls back to meeting_rsvp:{object_id})
  • accessCheckRelation: auditor
  • historyCheckObject: meeting:{meeting_uid} (falls back to meeting_rsvp:{object_id})
  • historyCheckRelation: writer

Ticket

LFXV2-684

🤖 Generated with Claude Code

- Add ObjectTypeMeetingRSVP constant to messaging.go
- Create MeetingRSVPEnricher with meeting-level permissions inheritance
- Register enricher in IndexerService for automatic RSVP indexing
- RSVP permissions inherit from parent meeting via meeting_uid field
- Extract sort name from email and aliases from username/email fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Andres Tobon <[email protected]>
Copilot AI review requested due to automatic review settings October 28, 2025 21:36
@andrest50 andrest50 requested a review from a team as a code owner October 28, 2025 21:36
@coderabbitai
Copy link

coderabbitai bot commented Oct 28, 2025

Walkthrough

This PR adds support for Meeting RSVP enrichment by introducing a new MeetingRSVPEnricher enricher type, registering it in the indexer service, and defining the corresponding object type constant. The enricher provides meeting-scoped access control, name extraction from email fields, and enrichment delegation.

Changes

Cohort / File(s) Summary
Enricher Implementation
internal/enrichers/meeting_rsvp_enricher.go
New file. Defines MeetingRSVPEnricher type with methods for ObjectType(), EnrichData(), setAccessControl() (derives meeting-scoped permissions), extractSortName() (derives sort name from email), and extractNameAndAliases() (collects deduplicated name-like fields). Wires enricher with hooks via NewMeetingRSVPEnricher() constructor.
Service Registration
internal/domain/services/indexer_service.go
Adds enrichers.NewMeetingRSVPEnricher() to the enricher registry initialization in NewIndexerService().
Constants
pkg/constants/messaging.go
Adds exported constant ObjectTypeMeetingRSVP = "meeting_rsvp" to object types block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

  • Access control logic: Verify that meeting-scoped permission derivation correctly handles fallback to meeting-level and object-level identifiers, and that AccessCheckQuery and HistoryCheckQuery are built appropriately.
  • Name and alias extraction: Confirm that email-to-sort-name derivation and deduplication of aliases is correct and handles edge cases (e.g., empty/whitespace fields).
  • Integration completeness: Ensure the enricher follows the established pattern and is correctly wired into the service.

Possibly related PRs

  • #14: Introduces a new enricher with corresponding ObjectType constant and registers it in NewIndexerService using the same pattern.
  • #18: Adds multiple new enrichers with ObjectType constants and registers them in the indexer service.
  • #8: Adds meeting-related enrichers and messaging constants, extending meeting-enricher support in the same codebase.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "LFXV2-684 Add meeting RSVP data enricher" is clear, specific, and directly aligned with the main changes in the changeset. It accurately describes the primary objective of adding a new MeetingRSVPEnricher to the system, and includes the associated ticket reference for traceability. The title is concise and would give a reviewer scanning the history a clear understanding of the change without additional context.
Linked Issues Check ✅ Passed The PR implements the indexing and enrichment portion of the LFXV2-684 requirements by adding a MeetingRSVPEnricher that processes RSVP objects, extracts relevant fields (email for sorting, username and email for search aliases), and enables RSVP data to be indexed and surfaced in OpenSearch. The code changes align with the linked issue's objective to ensure RSVP data can be stored, indexed, and surfaced. While the linked issue also mentions providing an endpoint to respond to meeting invites, that is a separate concern and this PR appropriately focuses on the data enrichment and indexing layer required for the RSVP functionality.
Out of Scope Changes Check ✅ Passed All changes in the PR are directly scoped to the implementation of the meeting RSVP enricher: the new ObjectTypeMeetingRSVP constant supports the enricher type, the MeetingRSVPEnricher implementation provides the core enrichment logic with access control and field extraction, and the registration in indexer_service.go integrates it into the indexing pipeline. There are no extraneous or unrelated changes present in the changeset.
Description Check ✅ Passed The PR description is well-organized and directly related to the changeset, providing a comprehensive summary of the changes, specific file modifications, access control behavior, and the linked ticket. It explains the purpose of the enricher (enabling RSVP data search and querying in OpenSearch), describes the permission inheritance mechanism, and details the field extraction logic. The description contains meaningful information that clarifies the intent and implementation details of the changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch andrest50/meeting-rsvp

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a0c29af and aebc296.

📒 Files selected for processing (3)
  • internal/domain/services/indexer_service.go (1 hunks)
  • internal/enrichers/meeting_rsvp_enricher.go (1 hunks)
  • pkg/constants/messaging.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
internal/domain/**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

Domain layer files must not import from infrastructure or presentation layers

Files:

  • internal/domain/services/indexer_service.go
internal/{domain,application}/**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

External dependencies must be accessed via repository interfaces defined in the domain (no direct concrete external calls)

Files:

  • internal/domain/services/indexer_service.go
internal/domain/services/**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

Keep business logic within domain services

Files:

  • internal/domain/services/indexer_service.go
internal/domain/services/indexer_service.go

📄 CodeRabbit inference engine (CLAUDE.md)

Register new enrichers in IndexerService.NewIndexerService()

Files:

  • internal/domain/services/indexer_service.go
pkg/constants/messaging.go

📄 CodeRabbit inference engine (CLAUDE.md)

When adding a new object type, define its subject/object constant in pkg/constants/messaging.go

Files:

  • pkg/constants/messaging.go
internal/enrichers/**/*.go

📄 CodeRabbit inference engine (CLAUDE.md)

Implement new object-type enrichers in internal/enrichers/ conforming to the Enricher interface

Files:

  • internal/enrichers/meeting_rsvp_enricher.go
🧠 Learnings (4)
📚 Learning: 2025-08-13T19:35:15.510Z
Learnt from: CR
PR: linuxfoundation/lfx-v2-indexer-service#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-13T19:35:15.510Z
Learning: Applies to internal/domain/services/indexer_service.go : Register new enrichers in IndexerService.NewIndexerService()

Applied to files:

  • internal/domain/services/indexer_service.go
  • internal/enrichers/meeting_rsvp_enricher.go
📚 Learning: 2025-08-14T17:25:01.677Z
Learnt from: andrest50
PR: linuxfoundation/lfx-v2-indexer-service#8
File: internal/enrichers/meeting_settings_enricher.go:62-70
Timestamp: 2025-08-14T17:25:01.677Z
Learning: For meeting-related enrichers in internal/enrichers/ (MeetingEnricher, MeetingSettingsEnricher, MeetingRegistrantEnricher), unit tests are not required since they mostly delegate to the default enricher which already has a full test suite.

Applied to files:

  • internal/domain/services/indexer_service.go
📚 Learning: 2025-08-13T19:35:15.510Z
Learnt from: CR
PR: linuxfoundation/lfx-v2-indexer-service#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-13T19:35:15.510Z
Learning: Applies to pkg/constants/messaging.go : When adding a new object type, define its subject/object constant in pkg/constants/messaging.go

Applied to files:

  • pkg/constants/messaging.go
📚 Learning: 2025-08-13T19:35:15.510Z
Learnt from: CR
PR: linuxfoundation/lfx-v2-indexer-service#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-13T19:35:15.510Z
Learning: Applies to internal/enrichers/**/*.go : Implement new object-type enrichers in internal/enrichers/ conforming to the Enricher interface

Applied to files:

  • internal/enrichers/meeting_rsvp_enricher.go
🧬 Code graph analysis (2)
internal/domain/services/indexer_service.go (1)
internal/enrichers/meeting_rsvp_enricher.go (1)
  • NewMeetingRSVPEnricher (126-135)
internal/enrichers/meeting_rsvp_enricher.go (4)
internal/enrichers/registry.go (1)
  • Enricher (12-18)
internal/domain/contracts/transaction.go (2)
  • TransactionBody (13-45)
  • LFXTransaction (48-87)
pkg/constants/messaging.go (2)
  • ObjectTypeMeeting (50-50)
  • ObjectTypeMeetingRSVP (53-53)
internal/enrichers/default_enricher.go (3)
  • WithAccessControl (33-37)
  • WithNameAndAliases (54-58)
  • WithSortName (61-65)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: MegaLinter
🔇 Additional comments (7)
internal/domain/services/indexer_service.go (1)

86-86: LGTM! Enricher registration follows the established pattern.

The MeetingRSVPEnricher is correctly registered in the enricher registry and is appropriately positioned among the other meeting-related enrichers.

Based on learnings

pkg/constants/messaging.go (1)

53-53: LGTM! Constant definition follows the established conventions.

The new object type constant is correctly named, uses consistent snake_case formatting, and is appropriately positioned among the other meeting-related constants.

As per coding guidelines

internal/enrichers/meeting_rsvp_enricher.go (5)

16-29: LGTM! Standard enricher delegation pattern.

The type definition and delegation methods follow the established pattern used by other meeting-related enrichers in the codebase.


31-89: LGTM! Access control logic correctly implements permission inheritance.

The access control logic properly inherits permissions from the parent meeting via the meeting_uid field, with appropriate fallback to meeting_rsvp:{object_id}. The default relations (auditor for access, writer for history) match the PR requirements.

The defensive handling of non-string field values (lines 49-74) is appropriate, preventing type errors while allowing explicit overrides from the data payload.


91-99: LGTM! Sort name extraction is straightforward and correct.

The method correctly extracts and trims the email field value for use as the sort name, with appropriate fallback to an empty string when the field is missing or invalid.


101-123: LGTM! Name and aliases extraction uses appropriate pattern matching.

The method correctly identifies and extracts username and email fields using case-insensitive regex matching, providing flexibility for field name variations. The deduplication logic ensures clean results.


125-135: LGTM! Constructor properly wires RSVP-specific enrichment logic.

The constructor correctly initializes the enricher with custom access control, name extraction, and sort name logic, following the established pattern for meeting-related enrichers.

Based on learnings


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a new "meeting_rsvp" object type to the indexer service. The implementation follows the established enricher pattern used for similar object types like meeting registrants and past meeting participants.

  • Adds ObjectTypeMeetingRSVP constant to support RSVP tracking for meetings
  • Implements MeetingRSVPEnricher with custom access control and field extraction logic
  • Registers the new enricher in the indexer service initialization

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pkg/constants/messaging.go Defines the new "meeting_rsvp" object type constant
internal/enrichers/meeting_rsvp_enricher.go Implements enrichment logic for meeting RSVP objects with custom access control, sort name, and aliases extraction
internal/domain/services/indexer_service.go Registers the new MeetingRSVPEnricher in the enricher registry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andrest50 andrest50 merged commit e9b06ef into main Oct 31, 2025
11 checks passed
@andrest50 andrest50 deleted the andrest50/meeting-rsvp branch October 31, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants