mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 14:17:52 +00:00
Both lanes were red on the same two gates: ci.yml's Rustfmt and Clippy jobs, and cicd.yml's `test fmt`, which is the same rustfmt run reached through hanzo.yml. Most of it is mechanical — a `format!` with nothing to format, two `chunks_exact` with constant sizes (`as_chunks` gives a fixed-size array back, so the infallible `try_into().unwrap()` goes with them), and a `Vec<Tensor>` declared then assigned in both arms of an `if`. The seven `SendError<Response>` results are boxed to match the two in the same file that already were: the enum is large, each has exactly one caller, and those callers pass through `map_err(Error::msg)`, which a `Box` satisfies as well as the bare error. One is not mechanical. The oracle asked `!(y_rel < 1e-5)`, and clippy is right that a negated comparison on a partially ordered type reads badly — but the obvious rewrite, `y_rel >= 1e-5`, is WRONG here: both compare false against NaN, so the negated form fails a NaN and the direct form passes it. A kernel emitting NaN is the loudest thing this gate exists to catch, so the NaN case is now spelled out rather than left to rest on which way the operator faces. Verified with the exact CI commands: `cargo fmt --all --check` reports no diff, `cargo clippy --workspace --tests --examples -- -D warnings` finishes clean. The clippy one matters — a narrower `-p` run missed the oracle entirely, because that test lives in hanzo-cli. Co-authored-by: Hanzo Dev <[email protected]>