Skip to content

feat: diagnose data-plane drift separately from readiness - #47

Open
b-pm wants to merge 9 commits into
beeper:mainfrom
b-pm:feat/data-integrity-doctor-46
Open

b-pm wants to merge 9 commits into
beeper:mainfrom
b-pm:feat/data-integrity-doctor-46

Conversation

@b-pm

@b-pm b-pm commented Oct 5, 2026

Copy link
Copy Markdown

Summary

Add an opt-in deep integrity probe:

beeper doctor --data

The existing doctor answers whether the selected target is reachable and ready. This adds a separate, non-fatal data-plane diagnosis that reconciles independent API surfaces so "process ready" is not mistaken for "messaging data healthy."

What it checks

  • /v1/accounts
  • recent chats
  • message search
  • bridge inventory and bridge-reported accounts
  • bridge logins and their account IDs

It reports:

  • account IDs visible in chats/bridges/logins but missing from /v1/accounts
  • message-search data while chat listing is empty
  • connected accounts with no chats
  • bridge state claiming active accounts while neither bridge accounts nor login account IDs are exposed
  • probe errors separately as unknown rather than fabricating a healthy result

Behavior

  • Read-only. It sends no messages and mutates nothing.
  • checks.dataIntegrity.state is ok, degraded, or unknown.
  • Data-plane degradation does not change the existing process-readiness exit code. This keeps automation from treating a recoverable indexing/data-surface problem as "the server is down."
  • --json exposes the evidence counts, account-ID sets, signals, and probe errors for agents/monitoring.

Why

This generalizes a pattern now visible in several reports:

The underlying Desktop/Server bugs still need their own fixes. This PR makes the CLI honest and operationally useful while those defects are investigated.

Tests

Adds unit coverage for:

  • healthy agreement across all surfaces
  • account-discovery drift
  • chat-index drift
  • bridge active-account drift
  • partial probe failure producing unknown

Fixes #46.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

doctor: detect data-plane drift when readiness is green but chats/accounts are missing

1 participant