Skip to content

er doctor reports ok=false for a healthy account lake — it probes only the person relations #664

Done

Description

@athvin

er doctor reports "ok": false on a perfectly healthy account lake, because the relations it probes are the person ones.

Measured

A clean run-all over fixtures/static/acct_10 with an account config — every stage succeeded, 20 records in, 10 entities out — reports:

{
  "ok": false,
  "relations": [
    {"name": "int_std_records",  "present": false, "rows": 0},
    {"name": "golden_records",   "present": false, "rows": 0},
    {"name": "golden_lineage",   "present": false, "rows": 0}
  ]
}

Those three are absent because an account tenant never writes them. It writes acct_int_std_records, acct_golden_records and acct_golden_lineage — which doctor does not look at, so it also cannot report that they are fine.

Why it matters

doctor is the read-only health report an operator reaches for first, and for every account tenant it currently answers "not ok" with three false absences and no mention of the relations that actually hold the data. An operator checking an account tenant has to know to disbelieve it.

Fix

Select the probed relation set from config.entity_type, the way every pipeline branch already does. The entity-agnostic relations (raw_records, match_scores, entity_membership, entities, entity_events, runs, review_queue) stay in both sets; the standardized and golden triples swap.


Product context (2026-11-26)

Why this matters for the API product: Indirect, under "operate safely." er doctor is a CLI-only operator report. er-server exposes no doctor route (git grep doctor rust/crates/er-server/src returns nothing). It does not touch the customer API, but it misleads whoever supports an account-type dataset.

Current state: Still reproduces. DOCTOR_RELATIONS (rust/crates/er-cli/src/lib.rs:3779-3792) lists only int_std_records, golden_records and golden_lineage. ok is computed from int_std_records, entity_membership and golden_records (lib.rs:3816-3818). doctor(session, config) (lib.rs:3804) takes the config but never reads config.entity_type. The account relation names already exist as constants (ACCT_INT_STD_RECORDS, ACCT_GOLDEN_LINEAGE and ACCT_GOLDEN_RECORDS, lib.rs:53, :68-69), and lib.rs:1054-1056 already makes the same per-type choice elsewhere.

Definition of done: as above, plus a test: doctor over the acct_10 run-all lake reports ok: true and lists the three acct_* relations.

Dependencies / sequencing: None.

Size: about 0.25 engineer-weeks.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions