mirror of
https://github.com/kuhyx/signal-bot.git
synced 2026-11-11 12:47:48 +01:00
A Sunday closes a week, a month's last day closes the month, and 31 December closes the year. Keyed off the day being *reported* rather than off today, which is the only reading that stays right when the bot has been offline: catching up on a week-old Sunday now also posts that week's summary, and there is a test asserting the five messages a three-day outage produces. One scheduler, a date predicate. Three background tasks firing at the same wall-clock time into the same group is three independent ways for an evening to go wrong, for no gain over an if-statement. A failed period summary is deliberately best-effort and runs after the day has been marked, so it cannot make the bot re-post the daily one tomorrow. Also: the quote frame arrived while this was being written, and it carries a trap. `quote` has its own nested `attachments` array holding the *quoted* message's media -- so a text reply to somebody's photo has attachments in the payload that belong to somebody else. Reading them would credit the replier with a photo they did not post, in a group where people reply to photos constantly, inflating one number without ever looking wrong. The parser already read the top level only and is correct. It is now pinned by a test built from the exact captured frame, and written up in DOCS-signal-envelopes.md, because "it happens to be right" and "it cannot silently stop being right" are different things. This is the same wrong-nesting-level mistake that once made the bot ignore its own stickers. test_bot.py went past the 250-line cap on the way, so the report and catch-up tests move into files named for what they cover. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d48t4qsQLBJnDwDeo2Nom |
||
|---|---|---|
| .. | ||
| stats | ||
| __init__.py | ||
| __main__.py | ||
| aliases.json | ||
| animals.py | ||
| announce.py | ||
| app.py | ||
| bot.py | ||
| changelog.py | ||
| config_env.py | ||
| config.py | ||
| counting.py | ||
| decorators.py | ||
| discovery.py | ||
| dispatcher.py | ||
| endpoints.py | ||
| envelope_shape.py | ||
| folding.py | ||
| groups.py | ||
| http_client.py | ||
| liveness.py | ||
| logging_setup.py | ||
| membership.py | ||
| models.py | ||
| popes_command.py | ||
| popes.json | ||
| portcheck.py | ||
| portraits.py | ||
| quoting.py | ||
| registry.py | ||
| roster.py | ||
| scheduler.py | ||
| schema.py | ||
| selftest.py | ||
| startup_retry.py | ||
| startup.py | ||
| store.py | ||
| transport_base.py | ||
| transport_fake.py | ||
| transport_rest.py | ||
| trust.py | ||
| versioning.py | ||