type: object
description: |
    Result of a multi-source ingestion run (GitHub, sync, cleanup-commits).
    Reports per-source counts plus any non-fatal errors surfaced during the run.
    Returned by `POST /admin/kb/ingest/github`, `POST /admin/kb/ingest/github/cleanup-commits`,
    and `GET /admin/kb/sync`.
required: [success]
properties:
    success: { type: boolean }
    autoDiscovered:
        type: boolean
        description: Whether the run discovered repos automatically vs using an explicit list.
    reposSynced: { type: integer }
    documentsSynced: { type: integer }
    documentsDeleted: { type: integer }
    commitsSynced: { type: integer }
    wikiPagesSynced: { type: integer }
    syncStatesCleared:
        type: integer
        description: Cleared rows from `kb_sync_state` (cleanup runs only).
    message:
        type: string
        description: Human-readable summary, especially after cleanup runs.
    errors:
        type: array
        items: { type: string }
        description: Per-source / per-document non-fatal errors.
example:
    success: true
    autoDiscovered: true
    reposSynced: 4
    documentsSynced: 102
    documentsDeleted: 3
    commitsSynced: 87
    wikiPagesSynced: 21
    errors: []
