Fix intake purge command (service is 'intake') + note redaction rate-limiting

This commit is contained in:
Keysat
2026-06-20 12:52:10 -05:00
parent 92f97029ac
commit fb71e0d041
+8 -2
View File
@@ -87,8 +87,14 @@ Spark). See *Fuzzy matching* below. Tests green (27/27 backend + the offline bot
clears the room's pre-existing backlog. The intake room keeps **no durable pending state** (the clears the room's pre-existing backlog. The intake room keeps **no durable pending state** (the
proposal store is in-memory, lost on restart), so every message in it is stale after a restart and proposal store is in-memory, lost on restart), so every message in it is stale after a restart and
safe to redact — it clears **every** `m.room.message` (text + card images), bot's and humans' safe to redact — it clears **every** `m.room.message` (text + card images), bot's and humans'
alike. Run on the Spark: `docker compose run --rm matrix-intake python -u alike. Run on the Spark (the compose **service** is `intake`, not the container name
backend/matrix_intake/redact_intake.py [--apply]`. `matrix-intake`): `docker compose run --rm intake python -u
backend/matrix_intake/redact_intake.py [--apply]`. **Redaction is rate-limited** by the
homeserver (~4s `429` backoff each — matrix-nio sleeps through it), so a large room takes minutes
and a single SSH run can time out partway; the script is **idempotent** (already-redacted events
have empty content → skipped), so just re-run `--apply` until a dry-run reports `0`. First live
purge (2026-06-20) cleared a 104-message room over two passes; the bot already held the room's
redact/mod power (users' notes + a card image cleared with **0 failures**).
## Business-card capture (M3 — image intake) ## Business-card capture (M3 — image intake)