Skip to main content

Monitoring Views

Monitoring views live in the public schema of the playroll_supa_new Supabase project. They exist so testers and investors can answer operational questions without joining raw upload tables.

For end-user descriptions (audience, columns, when to use which) see the dashboards pages:

This page documents the contract and conventions.

Implemented views

ViewAudienceGranularity
investor_daily_recording_kpis_vc_viewVCOne row per activity_day
support_player_upload_summaryTesterOne row per player
support_recording_sessionsTesterOne row per recording session
support_recording_filesTesterOne row per uploaded artifact
playroll_users_viewTester (identity lookup)One row per user

Operational helpers consumed by the above and used directly for ad-hoc queries:

ViewPurpose
daily_upload_statsDaily files/users/sessions/bytes per file type.
session_completion_statusPer session: expected_chunks vs uploaded_chunks, mp4/csv/ogg counts, is_complete.
complete_tripletsPer (user, session, chunk_dir): whether the mp4+csv+json triplet is fully present.
upload_summary_by_userOlder per-user rollup (string games field). Prefer support_player_upload_summary.

Naming conventions

  • _vc_view suffix — investor-facing. Daily granularity by default. Cumulative columns where useful.
  • support_* prefix — tester-facing. Player or session granularity. Includes identity columns (display_name, steam_id, discord_username) so testers can search by whatever identifier a player provides.

KPI principles

  • Investor KPIs use daily granularity by default.
  • Payment-relevant hours come from known_valid_current_recorded_*, not raw known_recorded_*. The "valid current" qualifier means the session satisfied the MP4+CSV upload contract.
  • The "current" required-artifact contract is MP4 + CSV. The "future" contract is MP4 + CSV + JSON. Both are tracked side-by-side in the views (has_current_required_pair, has_future_required_triplet) so the schema rollover can be staged.
  • size_bytes columns are bytes. Application code should mirror this name (e.g. size_bytes, not size).
  • A complete uploaded pure-v2 session has MP4, CSV, and JSON (triplet contract).
  • Raw upload counts and session counts are distinct — never sum them.

Open work

  • Confirm the final recording_sessions terminal status and failure-reason vocabulary so uploadability_status / block_reason are stable.
  • Decide whether views should be plain SQL or materialized with a refresh schedule once daily volumes grow.
  • Retire upload_summary_by_user in favor of support_player_upload_summary once consumers migrate.