mirror of
https://github.com/kuhyx/signal-bot.git
synced 2026-11-10 19:27:20 +01:00
Around twenty things could be said about a day. Saying all of them is a wall nobody reads; saying whichever three are computed first is arbitrary. So each candidate declares a priority and a magnitude and the picker takes the top few, with two rules that make the result readable: one line per family, so "set a record", "had 60% of the day" and "kept the crown" do not become three sentences about the same person; and fully deterministic ordering, so a day renders identically twice. Nine candidates so far: personal records with what they beat, the group's busiest day ever, a photo record, crown streaks (naming everyone when it is shared), a silence broken, a monologue, one person dominating the day, an unusual showing for that weekday, and a night owl. Every candidate is (DayFacts) -> Highlight | None with the same signature. On day one of this release almost all of them return None, and a shape where "not yet" is the ordinary case is much easier to get right than one where every guard is bespoke. Two off-by-ones fixed by writing the sentence out and checking it: - "odezwał się po 3 dniach ciszy" was counting four. The day somebody last spoke is not silent, and neither is the day they came back on, so the gap excludes both ends. The function is now named for that. - A personal record on somebody's first ever day was being announced as a record. It is, trivially, and saying so every time is noise. Verified against the live database, read-only on a copy: the real group renders correctly at 324 messages, claims no average length for the backfilled day, and fires no highlights at all -- which is right, since there is one day of history for them to stand against. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d48t4qsQLBJnDwDeo2Nom |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| stats_seed.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_envelope_shape.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_logging_setup.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_curiosities.py | ||
| test_stats_events.py | ||
| test_stats_nightly.py | ||
| test_stats_periods.py | ||
| test_stats_queries_period.py | ||
| test_stats_records.py | ||
| test_stats_render_day.py | ||
| test_stats_streaks.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 | ||