Skip to content

fix: --gpu flag silently discarded + streaming error discards in server/kernel #534

@noahgift

Description

@noahgift

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
  • quality
  • bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions