chore: backfill email-domain member organization dates (CM-1107)#4064
Open
skwowet wants to merge 1 commit intoimprove/CM-1105from
Open
chore: backfill email-domain member organization dates (CM-1107)#4064skwowet wants to merge 1 commit intoimprove/CM-1105from
skwowet wants to merge 1 commit intoimprove/CM-1105from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a one-off backfill script to infer and persist missing dateStart/dateEnd for existing email-domain memberOrganizations, using activity evidence and existing stint-inference logic, and queues affected members for affiliation recalculation.
Changes:
- Add DAL query helpers + types to find
email-domainmember orgs missing dates and derive per-org activity dates. - Add a backend script to run the backfill in batches and enqueue impacted members in Redis.
- Rename the Redis set key used by the script executor worker workflow that recalculates member affiliations.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| services/libs/data-access-layer/src/members/types.ts | Adds a typed result shape for email-domain org activity date rows. |
| services/libs/data-access-layer/src/members/organizations.ts | Adds queries for (1) memberIds with undated email-domain orgs and (2) org activity dates for stint inference. |
| services/apps/script_executor_worker/src/activities/block-project-organization-affiliations.ts | Renames the Redis set key used to queue/pop members for affiliation recalculation. |
| backend/src/bin/scripts/backfill-email-domain-member-organization-dates.ts | New one-off backfill script: batch processing, stint inference, DB updates/inserts, Redis enqueue. |
| backend/package.json | Adds an npm script entry to run the new backfill script. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4f9f391 to
68a79fc
Compare
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a one-off backfill script for existing
email-domainmember organization rows with missing dates.The script:
email-domainmember organizations wheredateStartanddateEndare null.activityRelations.memberId/platform/usernameto find activity-date evidence.Note
Cursor Bugbot is generating a summary for commit 62e75f9. Configure here.