Skip to content

feat(analytics): add privacy-safe product usage event table #249

Description

@JSONbored

Parent phase: #237
Parent roadmap: #127

Problem

Current code has AI usage events and analytics UI, but v1 adoption needs a durable product-usage event table for app/MCP/GitHub App/extension/Raycast/PWA activation without leaking private scoreability or identity-sensitive details.

Acceptance criteria

  • Schema/migration adds privacy-safe product usage events with role, surface, event name, outcome, coarse target, and created-at fields.
  • Event payloads avoid raw token, wallet/hotkey, local path, private scoreability, and raw prompt/source content leakage.
  • Repository layer exposes safe write/read helpers with redaction tests.

Validation expected

  • Migration and persistence tests cover event insertion and redaction.
  • API tests cover aggregate reads without exposing raw private payloads.

Public-output safety criteria

  • Public text is sanitized before reaching GitHub comments, issue bodies, PR bodies, extension-visible public panels, or copied public snippets.
  • Tests cover forbidden wallet/hotkey, reward-estimate, trust-score, public-score-prediction, private-reviewability, private-scoreability, and farming-language leakage.

Cross-cutting acceptance criteria

  • Preserve the repo quality gate: npm run test:ci, 97%+ global coverage, and the local branch coverage target for touched code.
  • Keep public/private boundaries explicit. Public GitHub output must not expose wallets, hotkeys, reward estimates, raw trust scores, public score predictions, private reviewability, private scoreability context, or farming language.
  • Add/update focused tests for the changed behavior instead of relying on green checks alone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions