[LFXV2-2645] feat(users): publish user-deleted event for project settings username scrub - #137
Closed
andrest50 wants to merge 1 commit into
Closed
[LFXV2-2645] feat(users): publish user-deleted event for project settings username scrub#137andrest50 wants to merge 1 commit into
andrest50 wants to merge 1 commit into
Conversation
LFXV2-2645) When a merged user is soft-deleted, publish lfx.v1-sync-helper.user.deleted so committee and project services can clear the LFID from settings without blocking the KV delete handler. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Publishes user-deletion events so downstream project and committee services can scrub deleted LFIDs from settings.
Changes:
- Adds best-effort NATS event publishing for soft-deleted users.
- Adds tests for publish, missing-username, and hard-delete paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
cmd/lfx-v1-sync-helper/handlers_users.go |
Publishes the user-deleted event. |
cmd/lfx-v1-sync-helper/handlers_users_test.go |
Tests event-trigger conditions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
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
lfx.v1-sync-helper.user.deletedwhen a merged user is soft-deleted so downstream v2 services can scrub the LFID from settings.Context
Complements the committee-service work in lfx-v2-committee-service#161 and enables the matching project-service handler in lfx-v2-project-service.
Note: overlaps with lfx-v1-sync-helper#133; only one of these v1-sync-helper PRs needs to merge — this branch generalizes the event wording for both committee and project consumers.
Test plan
go test ./cmd/lfx-v1-sync-helper/ -run TestHandleMergedUserDeleteScrubMade with Cursor