Skip to content

fix: use real database query in Supabase health check #69

Description

@EmeditWeb

Problem

In health.service.ts (line 66), the database health check uses supabase.auth.getSession() which checks the Supabase auth service, not raw database connectivity. A healthy auth service but dead database would pass this check, giving a false positive.

Root Cause

The health check was implemented using the convenience method rather than a direct DB query.

What To Build

  1. Replace with a raw DB query: SELECT 1 from Supabase
  2. Keep the auth check as a separate metric
  3. Return both DB and auth health in the response

Files To Touch

  • src/modules/health/health.service.ts — line 66 fix DB check

Acceptance Criteria

  • DB health check uses SQL query, not auth check
  • Auth check remains as separate metric
  • Build passes

Mandatory Checks

  • context/ files read
  • npm run build passes
  • PR references this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions