experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(test): terminate iOS app before Phase 3 DB modifications

Phase 3 dedup test was failing because the iOS app was still
running with a WAL-mode SQLite connection when we seeded
duplicates and cleared the dedup flag externally. The app
never saw those changes.

Fix: terminate iOS app in Step 19 (matching Phase 4's pattern),
add WAL checkpoint after clearing the dedup flag.

+6 -2
+6 -2
scripts/e2e-full-sync-test.sh
··· 1037 1037 1038 1038 # --- Step 19: Stop server and desktop --- 1039 1039 1040 - echo "Step 19: Stopping server and desktop for dedup seeding..." 1040 + echo "Step 19: Stopping all platforms for dedup seeding..." 1041 + xcrun simctl terminate booted "$IOS_BUNDLE_ID" 2>/dev/null || true 1041 1042 kill "$DESKTOP_PID" 2>/dev/null || true 1042 1043 wait "$DESKTOP_PID" 2>/dev/null || true 1043 1044 DESKTOP_PID="" 1044 1045 kill "$SERVER_PID" 2>/dev/null || true 1045 1046 wait "$SERVER_PID" 2>/dev/null || true 1046 1047 SERVER_PID="" 1047 - echo " Stopped." 1048 + sleep 2 1049 + echo " Stopped all platforms (iOS, desktop, server)." 1048 1050 1049 1051 # --- Step 20: Record counts and seed duplicates --- 1050 1052 ··· 1120 1122 sqlite3 "$SERVER_DB" "DELETE FROM settings WHERE key = 'dedup_cleanup_v1';" 1121 1123 sqlite3 "$DESKTOP_DB" "DELETE FROM settings WHERE key = 'dedup_cleanup_v1';" 1122 1124 sqlite3 "$IOS_DB" "DELETE FROM settings WHERE key = 'dedup_cleanup_v1';" 1125 + # Checkpoint WAL to ensure external writes are in main DB file for next app launch 1126 + sqlite3 "$IOS_DB" "PRAGMA wal_checkpoint(TRUNCATE);" 2>/dev/null || true 1123 1127 echo " Cleared all dedup flags" 1124 1128 1125 1129 # --- Step 22: Restart server (triggers deduplicateAllUsers at startup) ---