Skip to content

Comments

feat: add entity verification and migrate audit logs to actor model (CM-966)#3863

Merged
skwowet merged 11 commits intomainfrom
feat/CM-966-schema
Feb 23, 2026
Merged

feat: add entity verification and migrate audit logs to actor model (CM-966)#3863
skwowet merged 11 commits intomainfrom
feat/CM-966-schema

Conversation

@skwowet
Copy link
Member

@skwowet skwowet commented Feb 20, 2026

Summary

This PR introduces entity verification metadata and migrates audit logging to a generic actor model. It prepares the platform for cross-product usage (e.g. LFX One) and clearer provenance of data.

What changed

  • Migrated audit logging from userId to actorId/actorType in auditLogAction, including backfill and index updates.
  • Removed legacy audit log implementation and dead paths (auditLogs table usage, old repository/model/API hooks, and old cleanup job path).
  • Added verification metadata where needed:
    • memberIdentities: source, verifiedBy
    • organizationIdentities: source
    • memberOrganizations: verified, verifiedBy
  • Standardized identity creation flow so source is passed from callers (ui, integration, enrichment) and carried through backend/services/workers.
  • Refactored DAL identity modules and imports to remove duplicate/old implementations and use the consolidated paths.
  • Preserved source behavior during merge/unmerge flows, including legacy-safe handling in backup/restore paths.

Note

High Risk
Includes a breaking DB migration (drops auditLogs, removes userId from auditLogAction) and broad cross-service type/contract changes (audit log shape and identity creation payloads), so mismatches can cause runtime errors or missing audit/provenance data.

Overview
Audit logs are migrated to an actor model. The DB migration adds actorId/actorType to auditLogAction (backfills from userId, enforces NOT NULL, indexes actorId), updates DAL query/insert paths to use actor fields and return an actor object, and updates the UI/filters from User to Actor (including service actors) while removing the legacy /audit-log endpoint and dropping the unused auditLogs table.

Identity provenance + verification metadata is standardized end-to-end. New source/verifiedBy (and work-experience verified/verifiedBy) columns are introduced, member/org identity creation flows now pass and persist source (e.g. ui, integration, enrichment) across backend services, workers, OpenSearch seed data, and types; the DAL member identity module is consolidated (removing member_identities), and a large set of repositories stop writing legacy audit-log records via the removed AuditLogRepository/model/cleanup job path.

Written by Cursor Bugbot for commit 8233574. This will update automatically on new commits. Configure here.

@skwowet skwowet self-assigned this Feb 20, 2026
@skwowet skwowet changed the title feat: add entity verification metadata and migrate audit logs to actor model feat: add entity verification metadata and migrate audit logs to actor model (CM-966) Feb 20, 2026
@skwowet skwowet changed the title feat: add entity verification metadata and migrate audit logs to actor model (CM-966) feat: add entity verification and migrate audit logs to actor model (CM-966) Feb 20, 2026
@skwowet skwowet marked this pull request as ready for review February 23, 2026 08:18
@skwowet skwowet requested review from mbani01 and themarolt February 23, 2026 08:19
@skwowet skwowet requested a review from gaspergrom February 23, 2026 09:59
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@skwowet skwowet merged commit 61d1a44 into main Feb 23, 2026
17 checks passed
@skwowet skwowet deleted the feat/CM-966-schema branch February 23, 2026 16:17
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