Skip to content

feat: consolidate analytics service with PII sanitization facade#45

Merged
MaryammAli merged 1 commit into
Proof-Stell:mainfrom
bellabuks:feat/consolidate-analytics-facade-21
Jun 21, 2026
Merged

feat: consolidate analytics service with PII sanitization facade#45
MaryammAli merged 1 commit into
Proof-Stell:mainfrom
bellabuks:feat/consolidate-analytics-facade-21

Conversation

@bellabuks

Copy link
Copy Markdown
Contributor

Summary

The repo had two separate analytics paths (src/analytics and src/analytics-system) with different privacy assumptions. Events could be stored or sent externally without a single redaction policy.

Changes

  • Added sanitizeMetadata() as a public facade method on AnalyticsService — strips known PII fields (�mail, password, ip, ipAddress, phone, �ddress, ssn, creditCard, oken, secret, �piKey) before any persistence or fan-out
  • rack() now sanitizes metadata before saving, ensuring both the DB record and any downstream consumers receive clean data
  • Updated �nalytics.service.spec.ts with tests covering: PII stripping, undefined metadata handling, persistence verification, and provider failure isolation

closes #21

@MaryammAli MaryammAli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM
Thank you for your contribution

@MaryammAli
MaryammAli merged commit 51ddee2 into Proof-Stell:main Jun 21, 2026
1 check passed
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.

Consolidate analytics modules and enforce privacy boundaries

2 participants