Skip to content

feat(analytics): add daily rollups and retention funnels #137

Description

@JSONbored

Background

Raw product events are useful only if they become stable adoption and retention metrics. Rollups should show whether users actually reach a valuable first action.

Goal

Aggregate product events into daily rollups and activation funnels.

Current Behavior

There is no daily product usage rollup or activation funnel model.

Desired Behavior

Operators can see activation and retention across MCP, GitHub App, API, and control-panel surfaces.

Implementation Requirements

  • Create daily rollups for users, repos, commands, tools, route classes, and outcomes.
  • Track login to doctor pass to first useful action.
  • Track GitHub install to first command to first useful maintainer action.
  • Make aggregation idempotent and resilient to late events.
  • Expose stale or incomplete rollup status.

Public/Private Output Boundaries

Public GitHub output must never include wallets, hotkeys, payout/reward estimates, raw trust scores, public score estimates, private reviewability, private scoreability context, or farming language. Private API/MCP/control-panel surfaces may show authenticated scoreability, blockers, projections, and evidence, but must not claim guaranteed payout outcomes.

Acceptance Criteria

  • Tracks activation: login -> doctor pass -> first useful action.
  • Tracks GitHub activation: install -> first command -> first useful maintainer action.
  • Worker-safe aggregation.
  • Tests cover idempotent rollups and late events.

Testing Requirements

  • npm run test:ci must pass.
  • Global coverage must remain at or above 97% for lines, statements, functions, and branches.
  • Aim for 98%+ branch coverage locally.
  • Add tests for every new branch, fallback path, sanitizer rule, and regression.
  • Add invariant/property-style tests when behavior depends on sorting, gating, scoring, source-upload safety, public/private boundaries, or telemetry privacy.
  • MCP/local tooling must prove source contents are not uploaded when local metadata is involved.
  • Public GitHub output must be tested against forbidden language: wallet, hotkey, raw trust score, payout, reward estimate, farming, private reviewability, and public score estimate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions