Skip to content

bug(platform): Chat Health hides a failed guardrail metrics read as an empty section #3872

Closed

Description

@yannickmonney

Bug: Chat Health hides a failed guardrail metrics read as an empty section

  • Classification: P2 confirmed product defect (Analytics / Chat Health)
  • Source SHA: 9ea5972
  • Replay: /Users/yannick/.codex/notes/tale-1000-additional/chat-health-guardrail-read-error-probe.log
  • Scope: isolated local jsdom/Vitest component probe; no production network or writes.

Reproduction

Render ChatHealthMetricsPage with a valid chat-health response containing 25 turns and a guardrail query that settles with data: undefined, isLoading: false, and a 503 error. The actual page renders the healthy chat cards and title, but the Guardrail events card is zero and the guardrail breakdown has no entries. There is no alert, error copy, or Retry action. The replay probe passed one test against source SHA 9ea59724df24d62729a9360f3902d964dab39b3e and confirmed the guardrail rows Detected and PII disappear while the rest of the page remains normal.

Root cause and impact

ChatHealthMetricsPage consumes error for chat/messages:getOrgChatHealth but destructures only data and isLoading for chat_filter_events/queries:getGuardrailStats. The view intentionally defaults guardrails?.byKind, guardrails?.byFilter, and the event total to empty arrays/zero, so a rejected guardrail read is deliberately degraded into an empty section. The comment describes this as a graceful hiccup, but it makes missing security telemetry indistinguishable from no guardrail activity and gives operators no way to retry the failed read.

Expected behavior is an explicit partial-error state for the guardrail section with Retry, while retaining the successfully loaded chat-health metrics. This is distinct from a full chat-health query failure and from a successful period with zero guardrail events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions