Commit Graph

2 Commits

Author SHA1 Message Date
Leopere 26a6209600
Add auto-update on restart, upgrade script, and camera-only tests
LaunchAgent now uses launch-wrapper.sh which does git pull + cargo build
before exec-ing the binary, so every restart picks up the latest code.
Eliminates the drift where a rebuilt binary doesn't take effect until
the old process is manually killed.

New scripts:
- launch-wrapper.sh: auto-pull, rebuild, exec (used by LaunchAgent)
- upgrade.sh: manual pull, rebuild, restart LaunchAgent

Tests (12 total, all passing):
- Pool camera-only invariants: empty pool returns error (no CSPRNG
  fallback), push/pull round-trip matches exactly, pool empty after
  drain (no synthetic fill), extract_entropy and fill_entropy fail
  without camera data, partial pull is all-or-nothing, stats track
  only camera bytes.
- Conditioning tests: deterministic output, varies with frame index,
  correct SHA-256 output size, 8:1 ratio, LSB masking to 0-3 range.

Refactored pool.rs into pool/mod.rs + pool/tests.rs to stay under
400-line file limit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 11:16:29 -05:00
Leopere 0314c598fb
Polish: camera-only entropy, cleaner output, complete docs
- Remove CSPRNG fallback: pool now returns errors when camera entropy
  is insufficient instead of silently falling back to ChaCha20.
  Random data is only from camera input or not at all.
- Fix throughput display: show Mbps/KB/s for smaller frame sizes,
  Gbps/MB/s for larger ones (actual frame size varies by pixel format).
- Add RESEARCH.md note about pixel format impact on throughput.
- Complete README API table with all endpoints (dice, password, coin,
  8ball, cameras, docs, MCP).
- Add docker-compose device mapping for Linux camera access with
  explanatory comments about macOS limitation.
- Add macOS LaunchAgent scripts (install/uninstall/plist template).
- Polish run-mac.sh with build step and clearer output.
- Fix dead code warnings on library utility functions.
- Add /logs/ to .gitignore for LaunchAgent log output.
- Fix skill.md: remove stale CSPRNG fallback references.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 11:08:13 -05:00