Initial boilerplate scaffold for continuum-ai-worker

This commit is contained in:
2026-08-28 16:26:53 +00:00
commit 17f8e4b487
13 changed files with 489 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# continuum-ai-worker
Computer-vision failure detection worker for the Continuum print farm
platform. Consumes camera frame batches pushed onto the Redis Stream
`stream:camera_frames` (by `continuum-backend`'s `src/queue/`), runs them
through an ONNX Runtime model, and fast-paths high-confidence failure alerts
back to Redis and Postgres.
## Pipeline
```
continuum-proxy --(frames)--> continuum-backend --(XADD)--> stream:camera_frames
|
XREADGROUP (this worker)
v
src/inference (ort session)
v
src/reporter (Redis pub/sub + Postgres INSERT)
```
## Structure
```
src/
main.rs Consumer-group loop: XREADGROUP -> decode -> infer -> report -> XACK
inference/ Thread-safe ONNX Runtime session wrapper + pre/post-processing
reporter/ Alert fan-out: Redis pub/sub for realtime UI, Postgres for audit trail
```
## Getting started
```bash
cp .env.example .env
# place an ONNX failure-detection model at ./models/failure-detector.onnx
cargo run
```