mirror of
https://github.com/kuhyx/signal-bot.git
synced 2026-11-10 19:27:20 +01:00
Two gaps kuhy pointed at, both about not losing messages the bot was not awake for. Missed *counts* already worked and now have a test saying so: an event is keyed by Signal's own send timestamp, signal-cli keeps receiving in json-rpc mode while the bot is down, and the replay on reconnect is absorbed by the primary key. Messages sent during an outage come back filed under the day they were actually sent. Missed *reports* did not. A bot that was down at 21:37 never posted that day and never went back for it. The last day reported is now written down per group, so returning from an outage posts every day it owes, oldest first, bounded at a week. A day nobody spoke on is marked settled rather than reconsidered forever; a day whose send *failed* is deliberately left unmarked so the next run retries it. The pre-0.1.0 counter is carried over rather than discarded: 342 messages across four groups, 319 of them in the real group. What the counter cannot say is when, so before assuming, four places were checked for a real inbound timestamp -- journald (commands only), signal-cli's account.db (19 tables, none inbound; message_send_log is the bot's own outgoing resend buffer), Signal Desktop (unlinked, empty, and it does not backfill on link), and signal-api/attachments (the one dated artifact). The attachment mtimes put 12 files on 29 Aug against 79 on 30 Aug inside the counter's window, which is why the whole counter is filed under 30 Aug rather than split. That day is marked in group_meta, and a marked day claims no average message length -- those messages have a count but no lengths, so "średnio 0 znaków" would be a measurement nobody took. The mark is also what will keep the day out of personal records: a merged 22-hour day would otherwise hand somebody a record they never set. render_day's options move into a DayView value object; the keyword list had reached eight and this renderer is about to be shared by several commands that each want a different subset. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d48t4qsQLBJnDwDeo2Nom |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_allowlist.py | ||
| test_animals.py | ||
| test_announce.py | ||
| test_app.py | ||
| test_bot.py | ||
| test_changelog.py | ||
| test_cli.py | ||
| test_config.py | ||
| test_counting.py | ||
| test_decorators.py | ||
| test_discovery.py | ||
| test_dispatcher.py | ||
| test_fake_account.py | ||
| test_fake_groups.py | ||
| test_fake_server.py | ||
| test_folding.py | ||
| test_healthz.py | ||
| test_http_client.py | ||
| test_liveness.py | ||
| test_main.py | ||
| test_membership.py | ||
| test_models.py | ||
| test_popes_command.py | ||
| test_portcheck.py | ||
| test_portraits.py | ||
| test_quoting.py | ||
| test_registry.py | ||
| test_scenario.py | ||
| test_scheduler.py | ||
| test_selftest.py | ||
| test_startup.py | ||
| test_stats_backfill.py | ||
| test_stats_events.py | ||
| test_stats_nightly.py | ||
| test_stats_periods.py | ||
| test_stats_render_day.py | ||
| test_stats_text.py | ||
| test_store.py | ||
| test_transport_base.py | ||
| test_transport_fake.py | ||
| test_transport_rest.py | ||
| test_trust.py | ||
| test_versioning.py | ||