Skip to content

feat(v0.11): Track B+C — sentinel uninstall + docs reorder + ADR Accepted - #48

Merged
Raunplaymore merged 1 commit into
mainfrom
feat/v0.11-track-bc-uninstall-and-docs
May 5, 2026
Merged

feat(v0.11): Track B+C — sentinel uninstall + docs reorder + ADR Accepted#48
Raunplaymore merged 1 commit into
mainfrom
feat/v0.11-track-bc-uninstall-and-docs

Conversation

@Raunplaymore

Copy link
Copy Markdown
Owner

Summary

v0.11 사이클 마무리. ADR 0011 §D6 (uninstall 대칭) 구현 + Track C 문서 정리 합본.

ADR 0011 Status: Proposed → Accepted (Track A+B 머지로 인터페이스 contract 완성).

# v0.11 사이클 완성 후 사용자 경험
pipx install sentinel-mac
sentinel install              # 설치 (Track A)
# ... 운영 ...
sentinel uninstall            # 제거 (Track B, 이 PR)

Track B — sentinel uninstall

ADR 0011 §D6 contract 그대로:

모드 동작
기본 plist unload + 삭제. config / events 보존
--purge 위 + config + events/*.jsonl + updater/skipped_versions.txt 삭제
--keep-launchagent plist 보존, 다른 데이터만 정리 (purge 지정 시)
--yes confirmation prompt skip
--json ADR 0004 §D2 envelope kind="uninstall"

exit codes: 0 / 1 (error) / 2 (not_installed)

Confirmation 메시지 (purge 모드): "THIS WILL DELETE YOUR EVENT LOG. Proceed? [y/N]" — 강한 경고. non-TTY + no --yes 면 auto-cancel + WARNING (ADR 0009 패턴).

신규 파일:

  • sentinel_mac/installer/uninstall.py (~135 LOC) — pure helpers: unload_launchagent (modern bootout + unload fallback), remove_plist, collect_purge_targets, remove_paths
  • sentinel_mac/commands/uninstall.py (~253 LOC) — orchestration + prompts + envelope
  • tests/test_installer_uninstall.py (16 tests) — bootout/unload fallback / plist 삭제 / purge target enumeration / batch removal
  • tests/test_cmd_uninstall.py (9 tests) — not-installed / confirmation / standard vs purge / JSON / dispatch

수정:

  • sentinel_mac/core.py — argparse uninstall subcommand dispatch (5줄)

Track C — 문서 정리

  • docs/decisions/0011-first-install-flow.md: Status: Proposed → Accepted, "Accepted: 2026-05-05" 한 줄 추가
  • README.md Quick Start 재정렬:
    • Option 1: pipx + sentinel install (recommended) ← 사실상의 표준 경로 등극
    • Option 2: pip install + manual setup
    • Option 3: install.sh (development only) ← 강등
  • install.sh 헤더 갱신: "for SOURCE-TREE DEVELOPMENT only" 명시 + 운영 사용자에게 pipx + sentinel install 명확히 안내
  • CHANGELOG.md [Unreleased]에 Track B/C 항목 + ADR 승급

Verification

  • mypy clean (32 source files — +2 신규: installer/uninstall.py + commands/uninstall.py)
  • ruff clean (sentinel_mac + tests)
  • pytest 975 passed (950 + 25 신규)

Next steps (이 PR 머지 후)

  • v0.11.0 release ceremony — 0.10.3 → 0.11.0 (minor bump because new public CLI commands)

Test plan

  • mypy / ruff / pytest local
  • ADR Status: Accepted 확인
  • README Quick Start 재정렬 / install.sh 헤더 갱신 확인
  • CI green 확인 후 머지

🤖 Generated with Claude Code

Track B implements `sentinel uninstall` (ADR 0011 §D6):
- New command with --purge, --yes, --json flags following ADR 0009/0004 patterns
- Standard mode: removes plist, preserves config/data
- Purge mode: also deletes config + event history (with stronger confirmation)
- Exit codes: 0 success, 1 error, 2 not installed
- JSON envelope output: kind="uninstall" / kind="uninstall_error"
- Helpers: unload_launchagent (bootout→unload fallback), remove_plist, collect_purge_targets

Track C updates documentation (ADR 0011 §D9):
- README Quick Start reordered: pipx+sentinel install is now Option 1 (Recommended)
- Old install.sh moved to Option 3 (development only)
- install.sh header refreshed: "for SOURCE-TREE DEVELOPMENT only"
- CHANGELOG entry consolidates v0.11 install+uninstall accomplishments

ADR 0011 Status: Proposed → Accepted (Track A+B complete the contract)

Includes 25 new unit tests covering:
- unload_launchagent (bootout success, unload fallback, errors, timeouts)
- remove_plist (exists/not exists idempotency)
- collect_purge_targets (config, events, skipped_versions)
- cmd_uninstall (not-installed, confirmation, standard/purge modes, JSON output)
- dispatch (argument parsing)

All tests pass (975 total). Ruff/mypy clean for new files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Raunplaymore
Raunplaymore merged commit f7f68bb into main May 5, 2026
5 checks passed
@Raunplaymore Raunplaymore mentioned this pull request May 5, 2026
9 tasks
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