aw-server: re-importing an export duplicates events when a redact privacy rule is active
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
- 58/100
Direzione di ricerca
Trace the import endpoint through create_bucket and insert_events into the datastore and privacy engine, starting at the dedup/filter boundary. Reproduce the redact case described in the issue for both import paths. Done means re-importing the same export keeps one event, while filtering is applied exactly once and drop rules still behave correctly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
When a redact privacy rule is active, re-importing the same export is not idempotent — each import can append a duplicate event instead of matching the stored one.
Why
The datastore stores the filtered event (redacted data) under a new local id. The import endpoint's deduplication compares the incoming event's identity (timestamp, duration, raw data) against the stored events. For a redacted event the stored data never matches the raw source data, so the event is inserted again on every re-import, inflating counts.
This affects both import paths — a new bucket (events attached to create_bucket) and an existing bucket (insert_events) — because both run the privacy engine before storing.
Reproduction
- Set
privacy_filtersto aredactrule ontitle. - Import an export containing a matching event into a new bucket.
- Re-import the same export.
- The bucket holds 2 events instead of 1.
Fix direction
Dedup has to identity-match the filtered form of the incoming event against the stored one. A prefilter in the endpoint (apply the rules before dedup, then let the datastore apply them again) is not correct: applying the rules twice is not equivalent to once when a drop rule can match a value an earlier redact rule produced. The fix belongs at the dedup/filter boundary so filtering happens exactly once — e.g. compute the filtered identity inside the datastore.
Found while reviewing #766 (the redact-re-import case, raised by Greptile on that PR).
- Lingua principale
- Rust
- Stelle
- 317
- Fork
- 99
- Merge medio
- 1g 13h
- PR unite (30g)
- 66
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ActivityWatch/aw-server-rust
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
ActivityWatch/aw-server-rust#763 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
ActivityWatch/aw-server-rust#724 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
ActivityWatch/aw-server-rust#717 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
ActivityWatch/aw-server-rust#714 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
aw-sync: no stored cursor — resume-from-destination silently never syncs late-arriving eventsApertabug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
ActivityWatch/aw-server-rust#696 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ActivityWatch/aw-server-rust
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 3 giorni
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Automattic/harper#4503 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 2 giorni