From d117da3dc65b0996936a6df2b147c5e74d6410d8 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Fri, 13 Nov 2026 20:25:51 +0000 Subject: [PATCH] README: the sweep's webhook-failure report, and why the scraper is gone --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e688e1d..47040e7 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,23 @@ Four jobs run inside the container via `CloudronManifest.json` → `addons.sched of them that way, all false). `credit_pack_accounted()` matches the exact reference when one exists and otherwise requires a second signal — same member, same tip-free amount, within days — and counts a `held_credits` row as - accounted for. + accounted for. Each candidate also carries its `nearby_book_rows` (the member's + own ledger/held rows within a week) because a manual grant can be real and carry + no reference at all: the 2026-09-28 launch-day packs were credited as `+20.00` + then corrected by `-10.75`, netting exactly 3 × $5.00 with no reference on any + row. A reviewer sees that, instead of a phantom victim. + + **Webhook-failure report** — the portal records every delivery it does not + accept in `webhook_failures` (`record_webhook_failure()`, called from the + webhook wrapper, including the 401 that means the webhook URL and + `WEBHOOK_TOKEN` disagree) and the sweep emails `info@` **once per new batch** + via a marker in `portal_state`, so a wrong token does not mail every sweep while + the rows stay queryable. This replaces the log-scraping watcher that used to run + on the operator's machine: the portal handles every delivery, so the portal is + what must notice and report a failure. (It also removes the dependency on a log + buffer with only hours of memory — when the 2026-11-13 $10 purchase was + investigated, whole hours were missing from it.) Log-scraping jobs cannot be + the primary alert for a signal whose window they cannot see. **Service-invite triggers:** the sweep is the backstop, not the primary path. Two faster triggers exist, because a member who has just set up their account