Skip to content

Conversation

@eliykat
Copy link
Member

@eliykat eliykat commented Dec 4, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-28485

📔 Objective

Move code relating to organization events into DIRT code ownership.

Intentionally excluded:

  • Secrets Manager event code - owned by SM Team (this is a bit incongruous but I'll leave it to DIRT as to whether they want to follow this up)
  • the events integration infrastructure - this will be moved by the architecture team who developed this.

Namespaces have generally not been updated in order to minimize impact through the codebase.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@eliykat eliykat requested review from a team as code owners December 4, 2025 00:49
@eliykat eliykat requested a review from r-tome December 4, 2025 00:49
@claude
Copy link
Contributor

claude bot commented Dec 4, 2025

Claude finished @eliykat's task —— View job


Code Review Complete ✅

Tasks

  • Analyze PR structure and changes
  • Review code organization and file moves
  • Check for potential issues or concerns
  • Provide comprehensive feedback

Review Summary

Overall Assessment:APPROVE

This PR successfully moves organization events domain code to DIRT team ownership by relocating 52 files from AdminConsole to Dirt folder structures. The refactoring is well-scoped and maintains functional integrity.

Strengths

👍 Clean file organization: All event-related files (API controllers, models, entities, repositories, services, SQL objects, and tests) have been systematically moved to the appropriate Dirt folder structure.

👍 Appropriate scope boundaries:

  • Correctly excludes Secrets Manager event code (SM team ownership)
  • Correctly excludes EventIntegrations infrastructure (architecture team will handle)
  • Both exclusions are clearly documented in the PR description

👍 Consistent structure: The moves cover all layers:

  • API layer: src/Api/Dirt/ (with namespace updates to Bit.Api.Dirt.*)
  • Core layer: src/Core/Dirt/ (namespace preserved as Bit.Core.*)
  • Infrastructure: src/Infrastructure.{Dapper,EntityFramework}/Dirt/ (namespace preserved)
  • SQL: src/Sql/dbo/Dirt/ (stored procedures, tables, views)
  • Tests: test/{Project}.Test/Dirt/ (mirrors source structure)

👍 CODEOWNERS alignment: The existing **/Dirt @bitwarden/team-data-insights-and-reporting-dev rule covers these changes.

Design Decision Notes

ℹ️ Namespace preservation strategy: Per the PR description, namespaces have intentionally NOT been updated (except API layer) to minimize impact through the codebase. This is a pragmatic approach that:

  • Reduces the PR scope and risk
  • Avoids breaking changes across dependent code
  • Can be addressed in a future refactoring if desired

The only namespace changes are in the API layer (Bit.Api.Dirt.*), which is appropriate for the public interface boundary.

Minor Observations

📝 Interface location: IEventService remains in the AdminConsole folder while its implementation EventService has moved to Dirt. This is acceptable given the namespace preservation strategy, but worth noting for future organizational work.


@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.46%. Comparing base (acc2529) to head (d0879db).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6685      +/-   ##
==========================================
+ Coverage   53.63%   57.46%   +3.82%     
==========================================
  Files        1926     1926              
  Lines       85717    85717              
  Branches     7686     7686              
==========================================
+ Hits        45978    49254    +3276     
+ Misses      37966    34617    -3349     
- Partials     1773     1846      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eliykat eliykat requested a review from ttalty December 4, 2025 00:59
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Logo
Checkmarx One – Scan Summary & Detailsdf280a5b-8c1a-4188-9cb9-c9d43fff81bd

Fixed Issues (1)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 207

@withinfocus
Copy link
Contributor

We have some larger changes still coming in with our caching work so looking at this right now gives me some pause.

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