Skip to content

feat: add openadapt doctor command and fix audit/wormhole bugs#8

Merged
abrichr merged 1 commit intomainfrom
feat/doctor-and-bugfixes
Mar 4, 2026
Merged

feat: add openadapt doctor command and fix audit/wormhole bugs#8
abrichr merged 1 commit intomainfrom
feat/doctor-and-bugfixes

Conversation

@abrichr
Copy link
Member

@abrichr abrichr commented Mar 4, 2026

Summary

  • Add openadapt doctor command — checks all dependencies, configuration, and connectivity in one place
  • Fix audit log directory not created before write (crashes if parent dir missing)
  • Fix wormhole backend using Popen without awaiting — now uses subprocess.run() with timeout

Example output

$ openadapt doctor
OpenAdapt Doctor
============================================================
  [OK] Engine version: v0.1.1
  [OK] Python: 3.12.7
  [OK] Data directory: /Users/user/.openadapt
  [OK] Database (SQLite): connected
  [OK] openadapt-capture: 0.1.0
  [OK] openadapt-privacy: 0.1.0
  [OK] psutil: 7.2.2
  [!!] boto3 (S3 backend): not installed (pip install openadapt-desktop[enterprise])
  [!!] huggingface_hub (HF backend): not installed (pip install openadapt-desktop[community])
  [OK] magic-wormhole (P2P backend): /usr/local/bin/wormhole
  [OK] Storage mode: air-gapped
============================================================
9/11 checks passed

Run 'pip install openadapt-desktop[full]' to install all optional dependencies.

Test plan

  • 109 tests pass (3 new doctor tests + 106 existing)
  • Lint clean (ruff)
  • Smoke tested openadapt doctor locally
  • Cross-platform CI (awaiting)

🤖 Generated with Claude Code

Add diagnostic command that checks all dependencies and configuration:
- Python version, data directory writability, database connectivity
- Core deps: openadapt-capture, openadapt-privacy, psutil
- Optional deps: boto3, huggingface_hub, magic-wormhole
- Backend credentials (S3 keys, HF token) when configured
- Shows actionable install instructions for missing dependencies

Bug fixes:
- audit.py: create parent directory before writing log entries
- wormhole.py: use subprocess.run() instead of Popen to await
  completion and capture exit code properly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abrichr abrichr merged commit f5cb841 into main Mar 4, 2026
10 checks passed
@abrichr abrichr deleted the feat/doctor-and-bugfixes branch March 4, 2026 05:31
abrichr added a commit that referenced this pull request Mar 13, 2026
Add diagnostic command that checks all dependencies and configuration:
- Python version, data directory writability, database connectivity
- Core deps: openadapt-capture, openadapt-privacy, psutil
- Optional deps: boto3, huggingface_hub, magic-wormhole
- Backend credentials (S3 keys, HF token) when configured
- Shows actionable install instructions for missing dependencies

Bug fixes:
- audit.py: create parent directory before writing log entries
- wormhole.py: use subprocess.run() instead of Popen to await
  completion and capture exit code properly

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant