AI-powered hardware inventory management for homelab environments
- Manager with injectable enumerateFunc and serialOpener for test isolation - goroutine-per-device model: deviceLoop owns one serial port per device - context+done-channel teardown: inner read goroutine exits on ctx.Done() - Read buffer capped at 4096 bytes (T-04-01 threat mitigation) - Poll loop reconciles prev/current snapshots for connect/disconnect events - ErrDeviceNotConnected returned by Send() when device absent - All 5 manager tests pass with -race flag; goroutine count stable across 5 replug cycles - mockPort test helper blocks Read until Close() unblocks it (realistic behavior) |
||
|---|---|---|
| .planning | ||
| cmd/hwlab | ||
| internal | ||
| scripts | ||
| web | ||
| .env.example | ||
| .gitignore | ||
| ai_config.json | ||
| assets.go | ||
| CLAUDE.md | ||
| config.json | ||
| go.mod | ||
| go.sum | ||
| Makefile | ||