Why This Matters
current local-LLM tests cover model recommendation heavily, but not the platform-specific hardware-detection helpers directly.
Read First
app/cli/local_llm/hardware.py
Scope
- Add direct tests for
_get_total_ram_gb(), _get_available_ram_gb(), and detect_hardware().
- Cover both Linux and macOS branches by patching
sys.platform.
- Test the conservative fallback behavior on command/file-read failure.
Tests / Coverage
tests/cli/test_local_llm_hardware.py
- cover Linux
/proc/meminfo parsing
- cover macOS
sysctl parsing
- cover fallback RAM values
- cover NVIDIA detection via
shutil.which
Acceptance Criteria
- hardware detection is directly covered
- tests do not depend on the real host OS
- fallback behavior is protected
Why This Matters
current local-LLM tests cover model recommendation heavily, but not the platform-specific hardware-detection helpers directly.
Read First
app/cli/local_llm/hardware.pyScope
_get_total_ram_gb(),_get_available_ram_gb(), anddetect_hardware().sys.platform.Tests / Coverage
tests/cli/test_local_llm_hardware.py/proc/meminfoparsingsysctlparsingshutil.whichAcceptance Criteria