Appearance
How do I trigger a discrepancy audit?
Who can do this
Platform Admin or Infra Ops
The discrepancy audit compares MongoDB and Postgres state for each tenant and surfaces dangling rows (ghosts and orphans). A scheduled worker runs it automatically; you can also trigger an ad-hoc scan.
Steps
- Open System → Discrepancies in the sidebar.
- Click Trigger Scan in the toolbar.
- (Optional) Limit the scope to a specific instance or kind (
ghost,orphan). - Confirm.
Result
The scan runs as a job — track it in Migrations (it's a system job type) or watch the Discrepancies inbox refresh. When the scan completes:
- Newly-detected discrepancies appear with status Open.
- Previously open discrepancies still detected get their
last_seen_atbumped. - Open discrepancies no longer detected auto-resolve with note no longer detected.

