diff --git a/Cargo.toml b/Cargo.toml index 5cdceb4..fe98fb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 print-failure detection" +description = "Continuum AI worker - consumes camera frame batches from Redis Streams and runs print-failure detection" license = "UNLICENSED" [[bin]] @@ -21,4 +21,4 @@ dotenvy = "0.15" # 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. +# their stubs - see those modules' doc comments. diff --git a/README.md b/README.md index 37f3e77..6816e1b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ failures. ## This is a learning-stage boilerplate Real ONNX Runtime inference (the `ort` crate) and the Postgres audit write -(`sqlx`) are **not** implemented yet — `src/inference/mod.rs` always +(`sqlx`) are **not** implemented yet - `src/inference/mod.rs` always "detects" one fixed example failure, and `src/reporter/mod.rs` only prints where the Postgres write would go. The Redis Streams consumer-group loop in `main.rs` and the Redis pub/sub alert in `reporter/` are real. This lets the @@ -24,7 +24,7 @@ continuum-proxy --(frames)--> continuum-backend --(XADD)--> stream:camera_frames v inference::detect (stub for now) v - reporter::report (Redis pub/sub — real) + reporter::report (Redis pub/sub - real) ``` ## Getting started @@ -40,6 +40,6 @@ cargo run src/ main.rs Consumer-group loop: XREADGROUP -> detect -> report -> XACK config.rs Loads settings from environment variables - inference/ Detection stub — real ONNX Runtime inference goes here later + inference/ Detection stub - real ONNX Runtime inference goes here later reporter/ Redis pub/sub alert (real) + a note for the Postgres write (later) ``` diff --git a/src/inference/mod.rs b/src/inference/mod.rs index f8a7913..9fa5b73 100644 --- a/src/inference/mod.rs +++ b/src/inference/mod.rs @@ -8,7 +8,7 @@ pub struct Detection { /// Stand-in for real ONNX Runtime inference (the `ort` crate, using a model /// trained on failure images). Always reports one fixed "failure" so the -/// rest of the pipeline — reporting, acking the stream entry — has +/// rest of the pipeline - reporting, acking the stream entry - has /// something to do and can be tested without a real model file. /// /// Swap this out once you're comfortable with the pipeline around it: diff --git a/src/main.rs b/src/main.rs index 8a43ffc..8f81533 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,7 +23,7 @@ async fn main() -> anyhow::Result<()> { let mut reporter = Reporter::connect(&config.redis_url).await?; // Consumer groups have to exist before you can read from them. This - // fails with "BUSYGROUP" if it already exists — that's fine, ignore it. + // fails with "BUSYGROUP" if it already exists - that's fine, ignore it. let _: redis::RedisResult = conn .xgroup_create_mkstream(&config.frame_stream, &config.consumer_group, "$") .await; diff --git a/src/reporter/mod.rs b/src/reporter/mod.rs index 8736e0a..02e1baa 100644 --- a/src/reporter/mod.rs +++ b/src/reporter/mod.rs @@ -17,11 +17,11 @@ impl Reporter { Ok(Self { redis }) } - /// Publishes to Redis (real — this is what `continuum-backend`'s + /// Publishes to Redis (real - this is what `continuum-backend`'s /// WebSocket fan-out subscribes to, for live operator-console alerts). /// /// A real version would also `INSERT` into Postgres here via `sqlx` for - /// the permanent audit trail — that's left as a `println!` for now; + /// the permanent audit trail - that's left as a `println!` for now; /// come back to it once async SQL feels comfortable. pub async fn report(&mut self, printer_id: &str, detections: &[Detection]) -> anyhow::Result<()> { let best = &detections[0];