Simplify boilerplate for learning: stub inference and Postgres write

Removed ort/ndarray/image (ONNX Runtime inference) and sqlx (Postgres audit
write). inference::detect() and the Postgres half of reporter::report() are
now stubs with a comment for what real code goes there. Redis Streams
XREADGROUP loop and the Redis pub/sub alert stay real.

Verified with a clean cargo check --all-targets (0 warnings).
This commit is contained in:
2026-08-28 18:23:55 +00:00
parent 94b827613d
commit db5adc9324
12 changed files with 101 additions and 361 deletions
+4 -12
View File
@@ -2,7 +2,7 @@
name = "continuum-ai-worker"
version = "0.1.0"
edition = "2021"
description = "Continuum AI worker — consumes camera frame batches from Redis Streams and runs ONNX Runtime print-failure detection"
description = "Continuum AI worker — consumes camera frame batches from Redis Streams and runs print-failure detection"
license = "UNLICENSED"
[[bin]]
@@ -12,21 +12,13 @@ path = "src/main.rs"
[dependencies]
tokio = { version = "1.40", features = ["full"] }
redis = { version = "0.27", features = ["tokio-comp", "streams"] }
ort = { version = "2.0.0-rc.9", features = ["ndarray", "download-binaries"] }
ndarray = "0.17"
image = "0.25"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
anyhow = "1"
thiserror = "1"
base64 = "0.22"
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "chrono", "uuid"] }
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
dotenvy = "0.15"
[profile.release]
opt-level = 3
lto = true
# Real inference (ONNX Runtime via the `ort` crate) and the Postgres audit
# write (via `sqlx`) go here once src/inference and src/reporter grow past
# their stubs — see those modules' doc comments.