Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Remove SanitizedHostnameMigration once device_id-keyed sync lands (follow-up to #273)

Aperta
#302 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
kotlin
Ambito
mobile

Direzione di ricerca

Wait for ActivityWatch/activitywatch#302 and aw-server-rust#683 to land, then inspect the migration and callsites in SanitizedHostnameMigration.kt, SanitizedHostnameMigrationTest.kt, BackgroundService.kt, SyncInterface.kt, and AWPreferences.kt. Remove the migration, its tests, callsites, and HOSTNAME_MIGRATION_DONE, then run CI; done means all listed files and references are gone and CI is green.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Background

ActivityWatch/aw-android#273 fixed the immediate hostname-fork issue by adding a one-shot migration (SanitizedHostnameMigration.kt, ~356 lines) that rewrites bucket hostname rows to the sanitized form before the datastore opens.

The root cause — sync identity is hostname-keyed, so any future sanitizer/casing change will fork again — is tracked in ActivityWatch/activitywatch#302 (device_id-keyed sync direction) and ActivityWatch/aw-server-rust#683 (aw-sync data-loss from duplicate folders).

Remaining work

When ActivityWatch/activitywatch#302 lands and aw-server-rust implements device_id-keyed sync, the migration machinery from #273 becomes obsolete and should be removed:

  • mobile/src/main/java/net/activitywatch/android/SanitizedHostnameMigration.kt (356 lines)
  • mobile/src/test/java/net/activitywatch/android/SanitizedHostnameMigrationTest.kt (327 lines)
  • Remove calls to SanitizedHostnameMigration in BackgroundService.kt and SyncInterface.kt
  • Remove HOSTNAME_MIGRATION_DONE preference key from AWPreferences.kt

Done when

  • SanitizedHostnameMigration.kt and its test deleted
  • All callsites removed
  • CI green

Depends on

  • ActivityWatch/activitywatch#302 — device_id-keyed sync direction (upstream gate)
  • ActivityWatch/aw-server-rust#683 — aw-sync duplicate folder data-loss (upstream gate)

Closes via: ActivityWatch/aw-android#272

Lingua principale
Kotlin
Stelle
270
Fork
57
Merge medio
20h 32m
PR unite (30g)
38

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ActivityWatch/aw-android

Tutte le issue di ActivityWatch/aw-android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.