When a clone gets reset (git reset --hard origin/main), the git-history-backfill logic was incorrectly marking ALL issues as deleted since they appeared in git history but not in the current JSONL. This caused the entire database to be purged. Fix: - Add 50% threshold check: abort if git-history-backfill would delete more than 50% of issues (likely a reset scenario, not deletions) - Add warning when >10 issues would be deleted via backfill - Print helpful message about manual deletion if needed Test: - Added TestMassDeletionSafetyGuard that simulates JSONL reset and verifies the safety guard prevents mass deletion 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 KiB
39 KiB