Kaizen Audit Findings
1. --gpu flag silently ignored in apr run and apr chat (dispatch.rs:45, dispatch_analysis.rs:905)
The gpu parameter was pattern-matched as _ and never used. Only no_gpu was forwarded to dispatch functions. Users passing --gpu to force GPU acceleration got no effect.
Fix: --gpu now overrides --no-gpu when both specified.
2. Silent streaming error discards in handler_apr_cpu_completion.rs (lines 121, 141, 146)
Three let _ = patterns silently discarding channel send errors and generation failures. Clients could hang indefinitely with no error message when transformer wasn't loaded, lock was poisoned, or generation failed.
Fix: Log errors to stderr instead of discarding.
3. Silent GPU profiling failures in kernel.rs (lines 107, 137)
Warmup and prefill GPU generation errors silently discarded while timing metrics still recorded. Produces invalid profiling data with no indication of failures.
Fix: Log per-pass failures to stderr.
Labels
Kaizen Audit Findings
1.
--gpuflag silently ignored inapr runandapr chat(dispatch.rs:45, dispatch_analysis.rs:905)The
gpuparameter was pattern-matched as_and never used. Onlyno_gpuwas forwarded to dispatch functions. Users passing--gputo force GPU acceleration got no effect.Fix:
--gpunow overrides--no-gpuwhen both specified.2. Silent streaming error discards in handler_apr_cpu_completion.rs (lines 121, 141, 146)
Three
let _ =patterns silently discarding channel send errors and generation failures. Clients could hang indefinitely with no error message when transformer wasn't loaded, lock was poisoned, or generation failed.Fix: Log errors to stderr instead of discarding.
3. Silent GPU profiling failures in kernel.rs (lines 107, 137)
Warmup and prefill GPU generation errors silently discarded while timing metrics still recorded. Produces invalid profiling data with no indication of failures.
Fix: Log per-pass failures to stderr.
Labels