Skip to content

title: L2 Operations ​

title: L2 Operations description: Ingestion, synchronization from L1, migrations, and runbook for L2. priority: 0.7 lastmod: 2025-09-06 ​

Operations (L2) ​

Updates, archival, consistency and batch/stream sync from L1.

Ingestion & sync ​

  • Batch ingest via POST /api/v1/project-library/ingest.v0
  • Stream sync using cursors; idempotent upserts by (project_id, l1_document_id, fragment)
  • Deduplicate references; preserve provenance (repo/commit)

Migrations ​

  • Schema version in metadata; migrate forward with online backfill
  • Rebuild vector/sparse indexes out-of-band; throttle to respect budgets

Backup & restore ​

  • Daily snapshots of Reference and CurationIndex
  • Restore procedure: load snapshots β†’ rebuild indexes β†’ validate counts

Health & runbook ​

  • Health: check index freshness, hotset size, error rates
  • Alarms: time budget violations, ingestion lag, evict spikes
  • Rollback: disable vector stage, reduce top_k, pin last known golden set

Failure modes ​

  • L1 unavailable: serve from cache/hotset; mark freshness degraded
  • Index corruption: rebuild from snapshots; fail closed on writes
  • Budget pressure: apply degradation path (see Indexing & Ranking)