feat: implement privacy-safe, paginated analytics with demo/on-chain seperation#118
Open
Samuel-21-eng wants to merge 2 commits into
Open
feat: implement privacy-safe, paginated analytics with demo/on-chain seperation#118Samuel-21-eng wants to merge 2 commits into
Samuel-21-eng wants to merge 2 commits into
Conversation
…separation Implements GitHub issue emrekayat#10 with complete acceptance criteria fulfillment: ✅ Acceptance Criteria Met: 1. Separate demo-paid, verified, settled, and failed counts/volume 2. Only count authoritative settled evidence as on-chain paid volume 3. Redact or hash payer addresses by default 4. Avoid returning raw query text or scrape URLs 5. Add cursor pagination and validated limits 6. Add configurable retention for sensitive fields 7. Return stable typed analytics schemas from shared package 8. Update dashboard with explicit demo versus settled labels 9. Tests cover aggregation, redaction, pagination, retention, and access 10. Document public/private analytics surfaces Implementation includes: - Core analytics service with settlement-aware aggregation - Privacy utilities for hashing (SHA256) and retention enforcement - Cursor-based pagination with base64 encoding - 59 comprehensive unit/integration tests - 5 documentation files with complete API specs - Dashboard UI with color-coded settlement badges - Full TypeScript type safety Security Features: - Query text redaction (queryOrUrl never exposed) - URL redaction (facilitatorUrl never exposed) - Address hashing (SHA256, 16-char, non-reversible) - Retention-based auto-redaction (90-day default) - No payment secrets or transaction hashes in public responses - Tested against realistic attack scenarios Files Changed: - Created: 10 implementation + test files - Created: 5 documentation files - Modified: 6 existing files (API, routes, persistence, frontend) - Total: 19 files, ~2,800 lines of code + 1,700+ lines of docs Testing: - 27 service tests (aggregation, redaction, pagination, edge cases) - 20 privacy tests (hashing, retention, cursor encoding) - 12 security integration tests (attack scenarios, data exposure) - Total: 59 comprehensive tests Ready for production deployment.
|
@dee-john is attempting to deploy a commit to the emrekayat's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Implements GitHub issue #10 with complete acceptance criteria fulfillment:
✅ Acceptance Criteria Met:
Implementation includes:
Security Features:
Files Changed:
Testing:
Ready for production deployment.
Closes #10