circuitforge-core/tests/test_resources
pyr0ball cd9864b5e8 feat: hardware detection, cf-docuvision service, documents ingestion pipeline
Closes #5, #7, #8, #13

## hardware module (closes #5)
- HardwareSpec, LLMBackendConfig, LLMConfig dataclasses
- VramTier ladder (CPU / 2 / 4 / 6 / 8 / 16 / 24 GB) with select_tier()
- generate_profile() maps HardwareSpec → LLMConfig for llm.yaml generation
- detect_hardware() with nvidia-smi / rocm-smi / system_profiler / cpu fallback
- 31 tests across tiers, generator, and detect

## cf-docuvision service (closes #8)
- FastAPI service wrapping ByteDance/Dolphin-v2 (Qwen2.5-VL backbone)
- POST /extract: image_b64 or image_path + hint → ExtractResponse
- Lazy model loading; JSON-structured output with plain-text fallback
- ProcessSpec managed blocks added to all four GPU profiles (6/8/16/24 GB)
- 14 tests

## documents module (closes #7)
- StructuredDocument, Element, ParsedTable dataclasses (frozen, composable)
- DocuvisionClient: thin HTTP client for cf-docuvision POST /extract
- ingest(): primary cf-docuvision path → LLMRouter vision fallback → empty doc
- CF_DOCUVISION_URL env var for URL override
- 22 tests

## coordinator probe loop (closes #13)
- _run_instance_probe_loop: starting → running on 200; starting → stopped on timeout
- 4 async tests with CancelledError-based tick control
2026-04-02 18:53:25 -07:00
..
__init__.py feat(resources): add shared VRAMLease, GpuInfo, NodeInfo models 2026-03-30 20:21:37 -07:00
test_agent_app.py feat(resources): add cforch-agent FastAPI app with /health /gpu-info /evict 2026-03-30 20:51:08 -07:00
test_agent_supervisor.py feat: add idle sweep to AgentSupervisor 2026-04-02 12:30:28 -07:00
test_cli.py feat(resources): add cf-orch CLI with start, agent, status, install-service commands 2026-03-30 22:27:11 -07:00
test_client.py feat(core): add CFOrchClient sync+async context manager 2026-04-02 11:44:35 -07:00
test_coordinator_allocate.py feat: wire ServiceRegistry into coordinator allocate endpoints 2026-04-02 12:30:58 -07:00
test_coordinator_app.py fix(orch): tighten VRAM pre-flight to require full max_mb free (not half) 2026-04-02 16:44:36 -07:00
test_coordinator_probe.py feat: hardware detection, cf-docuvision service, documents ingestion pipeline 2026-04-02 18:53:25 -07:00
test_docuvision.py feat: hardware detection, cf-docuvision service, documents ingestion pipeline 2026-04-02 18:53:25 -07:00
test_eviction_engine.py feat(resources): add AgentSupervisor and EvictionEngine 2026-03-30 21:44:42 -07:00
test_eviction_executor.py feat(resources): add EvictionExecutor with SIGTERM/grace/SIGKILL sequence 2026-03-30 20:46:45 -07:00
test_gpu_monitor.py fix(resources): patch subprocess at import site in gpu_monitor tests 2026-03-30 20:45:01 -07:00
test_integration.py feat: wire ServiceRegistry into coordinator allocate endpoints 2026-04-02 12:30:58 -07:00
test_lease_manager.py fix(resources): rename lambda var; convert asyncio.run test to async 2026-03-30 20:41:03 -07:00
test_models.py fix(resources): add expires_at sentinel comment; move pytest import to module level 2026-03-30 20:25:58 -07:00
test_node_selector.py fix(orch): tighten VRAM pre-flight to require full max_mb free (not half) 2026-04-02 16:44:36 -07:00
test_profile_registry.py fix(resources): move MagicMock import to module level in profile registry tests 2026-03-30 20:36:40 -07:00
test_service_manager.py feat(orch): replace Ouro/vllm-Docker with generic HF inference server; add ProcessSpec 2026-04-02 15:33:08 -07:00
test_service_registry.py fix: TTL sweep, immutability, service-scoped release, logger in orch alloc 2026-04-02 12:55:38 -07:00