#5188·gbrain

doctor has no check for active facts without embeddings, so a silent facts-vector loss stays invisible

Author: armandovargashCreated Sep 17, 2026Updated Sep 17, 2026

Summary

When facts end up without embeddings (see the abort-commit path in the sweep, and #4812), nothing in gbrain doctor reports it. The brain looks healthy while dedup and auto-supersession are blind for those rows, because findCandidateDuplicates skips facts with a NULL vector.

The closest signal today is gbrain migrate embeddings --status, which an operator only runs if they already suspect the problem. doctor has checks for chunk embedding coverage and for pages withheld by search policy; facts have no equivalent.

Expected

A doctor check that counts active facts with no embedding per source and names the recovery command once one exists (#4812 / #4867).

Why it matters here

We lost the vectors of 452 facts in a routine maintenance window and every health surface stayed green for days.

Environment

0.50.5.0 / 0.51.0.0, Postgres.