Skip to content

Auto Dig backend API, fast v0.9 importer, Forgejo CI - #2306

Open
lost-rob0t wants to merge 5 commits into
mainfrom
agent/auto-dig-backend
Open

Auto Dig backend API, fast v0.9 importer, Forgejo CI#2306
lost-rob0t wants to merge 5 commits into
mainfrom
agent/auto-dig-backend

Conversation

@lost-rob0t

Copy link
Copy Markdown
Owner

backend/ — typed versioned API (/api/v1)

  • capabilities (schema version, dtypes, actions), runs (discover on-disk digs, durable restartable JSON state), lifecycle start/pause/resume/stop with fail-closed transition table + idempotency keys, progress, validated run documents, health/readiness
  • strict starintel_doc v0.9 validation gate: invalid documents are 422s and never reach the server
  • server_client.py: typed StarIntel server client; POST /documents/bulk supports both inline and 202 async-job modes with bounded polling
  • 10 FastAPI tests green

scripts/import_starintel.py — fast streaming importer

  • streams db/ + digs/ NDJSON without loading into RAM; bounded worker pool; per-batch submit with bounded retry/backoff
  • checkpoints (--checkpoint, --resume) make runs idempotent; per-document result categories: attempted/accepted/duplicate/invalid/failed/transient
  • --dry-run, --validate-only, --limit, --dtypes, machine-readable --summary
  • 9 unit tests green; benchmark artifacts in reports/import-benchmarks/: 5,671 docs @ 730.9 docs/s (inline) and 912.8 docs/s (async) against a real starintel-server compose stack, 0 invalid/failed/transient

.forgejo/workflows/ci.yml

Self-contained (no uses:, no GitHub Actions): backend tests, importer tests, changed-document detection + validation (fail-closed fallback to full-corpus validation when the base revision is unavailable), hygiene. Verified end-to-end green via act locally; the fallback path validated 1,271,092 documents, ok=true, schema=0.9.0.

Requires the starintel-server false-value fix (lost-rob0t/starintel-server#134) for corpus docs carrying false values.

- backend/: FastAPI /api/v1 surface (capabilities, runs lifecycle with
  durable restartable state, idempotent mutations, progress, validated
  document results, health/readiness), strict starintel_doc v0.9 gate
- backend/server_client.py: typed StarIntel server client; bulk submit
  handles both inline and 202 async-job modes with bounded polling
- scripts/import_starintel.py: streaming NDJSON importer with bounded
  concurrency, checkpoints/resume, per-document result categories,
  machine-readable summary
- tests: backend API (10) + importer unit (9), all green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant