hailo: lint cleanup + bridge test gates + doc refresh (iter 251-255)#419
Merged
hailo: lint cleanup + bridge test gates + doc refresh (iter 251-255)#419
Conversation
Five modules carried `#![allow(dead_code)]` from "EPIC scaffold" days when types and functions were declared ahead of their consumers landing: crates/ruvector-hailo/src/device.rs crates/ruvector-hailo/src/inference.rs crates/ruvector-hailo/src/hef_pipeline.rs (iter 158) crates/ruvector-hailo/src/tokenizer.rs crates/ruvector-hailo-cluster/src/lib.rs (iter 75-ish) Verified by removing each and rebuilding: zero new dead-code warnings fire across the feature matrix (--no-default-features | --features cpu-fallback). Every item once flagged dead is now genuinely live, used either by the NPU dispatch path (iter 161-200), the cluster's coordinator (iter 100+), or test fixtures that exercise the now-public constructors. Removing the allows means a future regression that adds a *genuinely* dead item will surface at build time instead of hiding behind the blanket suppression — which is the whole point of dead-code lints. Builds verified: cargo check -p ruvector-hailo --no-default-features cargo check -p ruvector-hailo --features cpu-fallback cargo check -p ruvector-hailo-cluster Tests: 22 (cluster) + 2 (cluster bench helpers) + 7 (hailo) all green. mmwave/sys aren't touched. Co-Authored-By: claude-flow <ruv@ruv.net>
iter-238/243/245 added --cache, --cache-ttl, --health-check to
ruvllm-bridge but only verified the wiring through one-off manual
runs against cognitum-v0. A future refactor that drops the §2a
gate or forgets to update the help text would slip past CI.
Three tests added:
ruvllm_bridge_help_prints_synopsis — locks --cache,
--cache-ttl, --health-check stay in --help output
ruvllm_bridge_cache_without_fingerprint_refused — locks the
ADR-172 §2a cache+fp gate fires
ruvllm_bridge_cache_with_fingerprint_accepted — locks that
--cache + --cache-ttl wire through end-to-end against a
fakeworker; bridge produces correct dim=4 vector responses
The cache+fp gate test is intentionally narrow — it only checks
the no-fingerprint path. The opt-out via --allow-empty-fingerprint
is ADR-approved and exercised by the workers-empty-fp test that
already exists.
A pre-existing port-race flake in ruvllm_bridge_multi_line_with_
request_id_propagates surfaces under parallel `cargo test` runs;
serial (`-- --test-threads=1`) is clean. The iter-252 additions
don't share fixtures with that test, so the flake is independent.
Co-Authored-By: claude-flow <ruv@ruv.net>
…er 253)
Symmetric with iter-252's ruvllm-bridge tests. Locks the iter-240/
iter-242 cache flag, iter-243 cache-ttl flag, and iter-245 health-
check flag in --help output for the other two bridges, and gates
the ADR-172 §2a cache+fp refusal path on each.
Tests added:
ruview-csi-bridge:
ruview_bridge_help_prints_synopsis (extended)
ruview_bridge_cache_without_fingerprint_refused (new)
mmwave-bridge:
bridge_help_prints_synopsis (extended)
bridge_cache_without_fingerprint_refused (new)
ruvllm-bridge already covered the with-fingerprint acceptance
path in iter-252. The csi+mmwave variants don't need that
re-tested — same code path under the hood
(`HailoClusterEmbedder::with_cache(N)` + the §2a guard) — so I'm
keeping the cross-bridge surface narrow at the gate-fires level.
All 8 mmwave + 7 csi tests pass; ruvllm-bridge's 10-test suite
unchanged from iter-252.
Co-Authored-By: claude-flow <ruv@ruv.net>
… (iter 254)
The status banner had drifted on three numbers:
131 tests → 204 (iter 253 measurement, +73)
3 CLI binaries → 8 (worker, embed, fakeworker, stats, bench
+ 3 sensor bridges)
67.3 RPS → 70.6 RPS (iter-227 reverified post-iter-237
deploy on cognitum-v0)
Test-suite tree refreshed too:
Lib unit 69 → 114
Cluster integ. 12 → ~30
CLI integ. 18 → ~53 (incl. iter-252/253 cache regression gates)
Same anti-staleness pattern as iter-217 (ADR-167 status block) and
iter-241 (4 stale "once iter N" doc references). Doc rot is bounded
by occasional explicit refreshes; banner is the single most-read
line so it gets first priority.
Co-Authored-By: claude-flow <ruv@ruv.net>
The iter-247 cluster CI run (post-merge) failed clippy --all-targets
on three findings, two of which are iter-251's "every dead item is
now live" claim being too generous, plus one genuine style finding:
1. crates/ruvector-hailo-cluster/src/bin/worker.rs:176
`out.push_str("…")` → `out.push('…')` per
clippy::single_char_add_str. Single-char string literal in
push_str is the textbook lint match.
2. crates/ruvector-hailo-cluster/src/health.rs:219 (test code)
`fn set_ready(&self, b: bool)` was scaffolding for a flip-mid-run
test path that never landed — deleted with a tombstone comment
so a future test that needs it can re-add cleanly.
3. crates/ruvector-hailo-cluster/src/lib.rs:1111 (test code)
`ValidationOutcome::NotReady { fingerprint }` was a placeholder
for a not-ready-but-reachable validate_fleet path. No current
test constructs it. Removed the variant + its match arm; the
Ready and catch-all (Unreachable / unknown) arms cover every
currently-tested case. Tombstone comment captures the intent
so the variant can be re-added when a test needs it.
iter-251 still stands — the 5 module-level allow(dead_code) blanket
suppressions were genuinely stale. These two specific items inside
the test-only mod were (a) under blanket `#[cfg(test)] mod tests`
which the iter-251 cleanup did walk through, and (b) in lib-test
target which `cargo check` doesn't compile by default — that's why
the iter-251 verification (cargo check for lib + lib_with_features)
missed them. Adding `cargo clippy --all-targets` to my local
verification scrub for future iters.
Local verification:
cargo clippy --all-targets -- -D warnings (clean)
cargo test (204 passed)
Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five iterations cleaning up the post-iter-250 surface — lint hygiene, bridge regression-gate tests, README freshness, and one CI clippy regression caught by the post-merge audit run.
What ships
#![allow(dead_code)]blanket suppressions (device.rs, inference.rs, hef_pipeline.rs, tokenizer.rs, cluster lib.rs). All "dead" items now genuinely live; future regressions surface at build time.--cache, iter-243--cache-ttl, iter-245--health-checkflags (help-text + ADR-172 §2a gate + end-to-end with-cache acceptance).push_str("…")→push('…'), plus 2 test-only dead items (set_ready,ValidationOutcome::NotReady) that the iter-251 lib-target check missed because they live in#[cfg(test)]mod.Test plan
cargo clippy --all-targets -- -D warningscleancargo test204 passedmulti_line_with_request_id_propagatesis pre-existing, unrelated)hailo-backend-audit.ymlshould now stay green (the iter-247 push_str regression that flipped main red after PR hailo: NPU pipeline pool exploration + bridge cache/health parity (iter 234-249) #418 merge is resolved)🤖 Generated with claude-flow