Skip to content

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

  1. Open System → Discrepancies in the sidebar.
  2. Click Trigger Scan in the toolbar.
  3. (Optional) Limit the scope to a specific instance or kind (ghost, orphan).
  4. 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_at bumped.
  • Open discrepancies no longer detected auto-resolve with note no longer detected.