mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-10-06 06:17:17 +00:00
The known-contact gate for DM delivery returns before anything is recorded, so a bot that keeps no contacts dropped every warning and wrote no rows: the page showed "No warnings decided yet" indefinitely beside a status card saying it was sending, and nothing distinguished a clean mesh from one where every warning was being discarded. Only a debug log said otherwise. Withheld warnings are now counted per local day in bot_metadata — a counter rather than event rows, because this fires ahead of the cooldowns that would rate-limit rows, so logging each one would bury the decisions worth reading. The status card shows it, and the empty log explains itself and points at channel delivery. Also from the verification pass: - The percent test built its value with config.set and a doubled %, which set() is the one input that cannot produce the bug. It now uses read_string with a bare %, and I checked it fails against raw=False by substituting DEFAULT_MESSAGE — the actual failure mode. - docs still said the bot identifies itself by public key, contradicting the section forty lines above. On this path it is name-only, and that means the self-exemption is spoofable; the doc says so. - delivered_today folded dry runs in with real sends, so a morning's preview read as afternoon transmissions. previewed_today is now separate and the figure follows the current mode. - TRIM(MIN(channel)) so a whitespace-padded historical row cannot become the display name for a merged channel.