Skip to content

feat(analytics): add daily activation rollups - #183

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:codex/analytics-daily-rollups
Jun 1, 2026
Merged

feat(analytics): add daily activation rollups#183
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:codex/analytics-daily-rollups

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Summary

  • Adds daily product usage rollups with activation funnels built from the sanitized usage-event spine.
  • Wires scheduled/internal rollup jobs plus private analytics API and operator-dashboard exposure.
  • Adds an analytics UI table and regression coverage for idempotency, stale/incomplete days, route classes, guards, and webhook telemetry.

What changed

  • Added product_usage_daily_rollups storage and typed rollup records/status.
  • Computes activation funnels for login, MCP doctor/useful actions, GitHub installation, command, and maintainer-useful activity.
  • Marks current days partial, capped days incomplete, and late raw events stale until rerun.
  • Adds /v1/app/analytics/daily-rollups and queued/immediate internal rollup job endpoints.
  • Records bounded GitHub installation telemetry through the existing sanitized usage-event path.
  • Shows daily activation rollups in the analytics UI.

Why

Closes #137.

This gives downstream adoption/reporting work a stable aggregate layer instead of forcing dashboards and reports to re-scan raw product events.

Validation

  • npm run test -- test/unit/product-usage.test.ts test/unit/queue.test.ts test/integration/api.test.ts test/integration/routes-errors.test.ts test/unit/index.test.ts
  • npm run typecheck
  • npm run test:coverage
  • npm run ui:lint
  • npm run test:ci
  • Codex Security diff scan: no findings

Notes

@oktofeesh1
oktofeesh1 marked this pull request as ready for review June 1, 2026 11:30
@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner June 1, 2026 11:30
@dosubot dosubot Bot added the size:XXL label Jun 1, 2026
@oktofeesh1
oktofeesh1 force-pushed the codex/analytics-daily-rollups branch 3 times, most recently from 6b111ad to fb1366d Compare June 1, 2026 18:28
@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 1, 2026

@superagent-security superagent-security Bot 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.

Superagent found 1 security concern(s).

Comment thread src/api/routes.ts
Adds UTC-day product usage rollups with activation funnels, incomplete/stale status tracking, scheduled and internal job entrypoints, and operator dashboard/API exposure.

Closes JSONbored#137.

Validation:

- npm run test:ci

- Codex Security diff scan: no findings
@oktofeesh1
oktofeesh1 force-pushed the codex/analytics-daily-rollups branch from fb1366d to 616973b Compare June 1, 2026 18:39
@dosubot dosubot Bot added size:XL and removed size:XXL labels Jun 1, 2026
@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 1, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@oktofeesh1 This is ready from my side. The daily activation rollup work is now green and merge-clean against current main.

A few notes:

  • The migration, repository methods, queue scheduling, API route coverage, and UI analytics wiring are included.
  • The rollup behavior has direct unit and integration coverage.
  • This should land before dependent analytics/reporting branches that build on daily usage aggregates.

@dosubot dosubot Bot added the lgtm label Jun 1, 2026
@JSONbored
JSONbored merged commit f63f125 into JSONbored:main Jun 1, 2026
3 checks passed
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(analytics): add daily rollups and retention funnels

2 participants