Skip to content

hailo: lint cleanup + bridge test gates + doc refresh (iter 251-255)#419

Merged
ruvnet merged 5 commits intomainfrom
hailo-allow-cleanup
May 4, 2026
Merged

hailo: lint cleanup + bridge test gates + doc refresh (iter 251-255)#419
ruvnet merged 5 commits intomainfrom
hailo-allow-cleanup

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented May 4, 2026

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

  • iter-251 — drop 5 stale module-level #![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.
  • iter-252 — 3 CLI regression-gate tests for ruvllm-bridge's iter-238 --cache, iter-243 --cache-ttl, iter-245 --health-check flags (help-text + ADR-172 §2a gate + end-to-end with-cache acceptance).
  • iter-253 — symmetric tests for ruview-csi-bridge + mmwave-bridge. All three bridges now have the same shape of CLI-level coverage.
  • iter-254 — refreshed cluster README status banner: 131→204 tests, 67.3→70.6 RPS, 3→8 CLI binaries, plus updated test-suite tree.
  • iter-255 — fixed 3 clippy regressions surfaced by the post-merge audit run: iter-247's 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

🤖 Generated with claude-flow

ruvnet and others added 5 commits May 4, 2026 09:58
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>
@ruvnet ruvnet merged commit c12d828 into main May 4, 2026
24 of 27 checks passed
@ruvnet ruvnet deleted the hailo-allow-cleanup branch May 4, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant