mirror of
https://github.com/kuhyx/signal-bot.git
synced 2026-11-20 23:42:19 +01:00
Per-person photo commands, where the mechanism is public and the album is not. Nothing identifying is in this repository: who the people are, what fires their photos and which file shows whom all live in one directory outside it, and the tests, the docs and the offline e2e run use three invented people instead. Several names in one message intersect -- "!alfa beta" is a photo with both -- and where an entry offers a choice the bot picks among the readings that actually have a photo, so a question the album could answer is not refused. A combination nobody photographed gets one line rather than silence, which from the group's side is indistinguishable from a broken bot. Scoping is enforced in the dispatcher, not in the handler: a command the group is not allowed resolves to nothing, so it is not answered, not counted as a command, and never named in a log line outside its own groups. A handler that quietly returned would leak all three. Commands are named by pseudonym (pack:p1), so the journal and command_uses say somebody asked for a photo and nothing about whose. Video works: the attachment goes out as data:video/mp4;filename=...;base64, which is the container's own spelling, read off its /swagger/doc.json. Told it is a photo, Signal renders a clip as an unplayable file. tool/tagger.py serves one page on loopback to fill the album in -- names are typed into the page, never as arguments, and it prints how many photos each command would have when it stops, because a command with zero is dead on arrival. Also renames the real people who were still sitting in the stats test fixtures. They remain in the history; the point is that nothing new is added to it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017w1HZ3cZ7neL3rFdQ6VMBA
223 lines
9.1 KiB
Markdown
223 lines
9.1 KiB
Markdown
# Changelog
|
|
|
|
Releases are named after the popes, in order: release *n* is pope *n*. The
|
|
version number is a pure function of that ordinal — see `signal_bot/versioning.py`
|
|
for the two constants and why they are what they are. The short version is that
|
|
Jan Paweł II has to land on 2.13.7, and everything else follows.
|
|
|
|
**The name is Latin, and it is derived, not typed.** `latin_name()` in
|
|
`signal_bot/versioning.py` builds it from `popes.json`: the Latin stem plus the
|
|
Roman numeral off the Polish name. So 0.0.3 is «Clemens I», not «Klemens I» and
|
|
not the raw `latin` field's «Clemens Romanus»; 3.0.4 will be «Leo XIV», not «Leo
|
|
Decimus Quartus». Ask the code rather than guessing:
|
|
|
|
```
|
|
python -c 'from signal_bot.versioning import *; print(latin_name(pope_for(14)))'
|
|
```
|
|
|
|
The same string goes in the release commit subject, in `/healthz`, and in the
|
|
heading below.
|
|
|
|
The bot reads this file. The heading format is load-bearing:
|
|
|
|
```
|
|
## <version> — <pope name>
|
|
- <one change, in Polish, as the group will read it>
|
|
```
|
|
|
|
Add the new section at the top when you bump `RELEASE_ORDINAL`. Anything that
|
|
is not a `##` heading or a `-` bullet under one is ignored, so prose between
|
|
releases is free. The heading *name* is checked rather than trusted —
|
|
`tests/test_changelog.py` asserts it equals `latin_name()` for that version —
|
|
and the announcement reads `popes.json` regardless, so a typo here fails the
|
|
suite instead of reaching a group.
|
|
|
|
**Preview the announcement before you bump.** Because a bump is a publish,
|
|
the announcement was the one feature that could never be exercised first.
|
|
`tool/preview_release.py testbot` posts exactly what the next release would
|
|
say, into one test group, touching neither `RELEASE_ORDINAL` nor any
|
|
`announced_version` row; `--print-only` renders it without sending. It is
|
|
fail-closed on `SELFTEST_GROUPS`, so it cannot post a release that does not
|
|
exist into the group that would believe it. Write the `##` section below
|
|
first -- the preview reads it, so what you see is what ships.
|
|
|
|
**A release announcement is a photo now.** It carries the pope's portrait, his
|
|
Latin name and his pl.wikipedia article, the same three things `!papież` posts.
|
|
Only for the pope in the header: a backlog announcement lists up to ten
|
|
releases, and ten attachments is the wall the cap exists to avoid. If Commons
|
|
will not serve the portrait the announcement still goes out, as text — the
|
|
`announced_version` marker is written before the send, so a failure there would
|
|
otherwise cost that group its release notes permanently.
|
|
|
|
**Every release takes the next pope, however small.** A one-line fix consumes
|
|
an ordinal exactly like a feature does; the ladder tracks releases, not
|
|
importance. 0.0.4 and 0.0.5 were both bug fixes. Do not try to squeeze a fix
|
|
out at the current version to "save" a pope -- there are 267 of them.
|
|
|
|
**A version bump is a publish, not a checkpoint.** Restarting the service after
|
|
one posts these bullets into every watched group, including the real one. So
|
|
exercise the feature in a test group — `testbot`, `catbot`, `finaltestbot`,
|
|
each just you and the bot — *before* bumping `RELEASE_ORDINAL`, tagging or
|
|
restarting. To try something at the current version without announcing, leave
|
|
`RELEASE_ORDINAL` alone and restart. Green unit tests and a green
|
|
`scripts/e2e.sh` are **not** sufficient evidence: `e2e.sh` runs against the
|
|
local fake, so it proves the wiring and nothing about how Signal renders the
|
|
result or how the real upstream API behaves. 0.0.3 shipped a `!gekon` that
|
|
passed every gate and posted the same photo every time, because the one thing
|
|
nobody had done was call the real endpoint twice.
|
|
|
|
**Write bullets the group can notice.** The audience is people in a chat, not
|
|
this repo: describe what changes for them. 0.0.1 shipped a bullet about
|
|
`/healthz`, an endpoint bound to 127.0.0.1 that nobody in a Signal group can
|
|
reach, and it was rightly called out.
|
|
|
|
## 0.2.0 — Urbanus I
|
|
|
|
papież nr 17 z 267, pontyfikat 222-230
|
|
|
|
- nowe komendy ze zdjęciami: każda osoba ma swoją, a kilka naraz
|
|
(`!ktos !ktos2`) daje zdjęcie, na którym są wszyscy naraz
|
|
- jak takiego zdjęcia nie ma, bot mówi to jednym zdaniem zamiast milczeć
|
|
- filmiki też działają — lecą jako filmiki, a nie jako plik, którego nie da
|
|
się odtworzyć
|
|
- te komendy istnieją tylko w tej jednej grupie: w każdej innej nie ma ich
|
|
wcale, `!pomoc` ich tam nie pokazuje i bot na nie nie odpowiada
|
|
- zdjęcia i imiona nie są w kodzie bota ani nigdzie w internecie — leżą w
|
|
jednym katalogu na komputerze i nigdy go nie opuszczają
|
|
|
|
## 0.1.7 — Callistus I
|
|
|
|
papież nr 16 z 267, pontyfikat 217-222
|
|
|
|
- każda wersja mówi teraz, którym z kolei papieżem jest jej patron i w jakich
|
|
latach panował — w ogłoszeniu nowej wersji, w changelogu i przy `!papież`
|
|
- `!papież` pisze to samo zdaniem, którym opisuje każdego innego papieża, więc
|
|
nie trzeba już zgadywać, czy «Callistus I» to ten piętnasty, czy szesnasty
|
|
|
|
## 0.1.6 — Zephyrinus
|
|
|
|
papież nr 15 z 267, pontyfikat 199-217
|
|
|
|
- statystyki o 21:37 są od teraz o **dzisiejszym** dniu, a nie o wczorajszym —
|
|
wieczorny post pokazuje wreszcie ten dzień, który właśnie mijał
|
|
- licznik zamyka się o 21:37, więc to, co napiszecie później, wpada do jutra;
|
|
post sam to mówi, żeby liczba nie udawała całej doby
|
|
- dzień, którego bot przegapił (bo go nie było o 21:37), nadal zostanie
|
|
wysłany później — nic nie ginie
|
|
|
|
## 0.1.5 — Victor I
|
|
|
|
papież nr 14 z 267, pontyfikat 189-199
|
|
|
|
- ogłoszenie nowej wersji przychodzi teraz ze zdjęciem papieża, po którym ta
|
|
wersja się nazywa, i z linkiem do jego strony na polskiej Wikipedii —
|
|
dokładnie tak, jak robi to `!papież`
|
|
- wersje nazywają się od teraz po łacinie: ta jest «Victor I», a nie
|
|
«Wiktor I», a poprzednia była «Eleutherius», nie «Eleuteriusz»
|
|
|
|
## 0.1.4 — Eleutherius
|
|
|
|
papież nr 13 z 267, pontyfikat 175-189
|
|
|
|
- `!pomoc` (albo `!help`) wypisuje wszystkie komendy i mówi jednym zdaniem,
|
|
co każda robi — do tej pory nigdzie na czacie nie było ich listy
|
|
|
|
## 0.1.3 — Soterius
|
|
|
|
papież nr 12 z 267, pontyfikat 166-175
|
|
|
|
- "POCZEKAJ 1 SEKUND" odmienia się wreszcie po polsku — teraz jest
|
|
1 SEKUNDĘ, 2 SEKUNDY, 5 SEKUND
|
|
- odczekanie tego, co bot każe, wreszcie działa: dotąd każda nieudana próba
|
|
po cichu przedłużała blokadę, więc kto grzecznie czekał, ten dostawał
|
|
odmowę w kółko
|
|
|
|
## 0.1.2 — Anicetus
|
|
|
|
papież nr 11 z 267, pontyfikat 155-166
|
|
|
|
- `!ja` pokazywał wszystkim tę samą godzinę (12:00) — to był artefakt
|
|
danych sprzed przebudowy licznika, a nie wasze zwyczaje. Teraz pokazuje
|
|
prawdziwe godziny, a komu ich nie znamy, temu nie zmyśla
|
|
|
|
## 0.1.1 — Pius I
|
|
|
|
papież nr 10 z 267, pontyfikat 140-155
|
|
|
|
- komendy mówią teraz, co pokazują — `!korona` na pustych danych tłumaczy,
|
|
co się w niej pojawi, zamiast samego "za mało danych"
|
|
- `!ja` pisze "między 12:00 a 13:00" zamiast "o 12:00" — bo to godzina, a
|
|
nie moment
|
|
|
|
## 0.1.0 — Hyginus
|
|
|
|
papież nr 9 z 267, pontyfikat 136-140
|
|
|
|
- podsumowanie liczy teraz zdjęcia i filmy — zdjęcie bez podpisu było
|
|
wcześniej warte zero, więc liczby wszystkim podskoczyły
|
|
- kto nic nie napisał, pojawia się z zerem
|
|
- nowe komendy: !staty, !wczoraj, !tydzień, !miesiąc, !rok, !rekordy,
|
|
!korona, !dni, !ja
|
|
- bot pamięta historię: rekordy życiowe, serie z koroną, średnie dni
|
|
tygodnia. Liczymy od 30 sierpnia 2026
|
|
|
|
## 0.0.7 — Telesphorus
|
|
|
|
papież nr 8 z 267, pontyfikat 125-136
|
|
|
|
- nowa komenda `!papież` (działa też jako `!papiez`, `!papa`, `!pope`) — bot
|
|
wrzuca losowego papieża: zdjęcie, imię po łacinie, lata pontyfikatu i link
|
|
do polskiej Wikipedii. Do wyboru jest cała lista, 267 papieży od Świętego
|
|
Piotra do Leona XIV — czyli ci sami, po których nazywają się wersje bota
|
|
|
|
## 0.0.6 — Xystus I
|
|
|
|
papież nr 7 z 267, pontyfikat 115-125
|
|
|
|
- po restarcie komputera bot wraca sam — wcześniej, jeśli włączył się zanim
|
|
Signal był gotowy, poddawał się po 25 sekundach i milczał do końca dnia;
|
|
30 sierpnia stało się to na osiem godzin
|
|
|
|
## 0.0.5 — Alexander I
|
|
|
|
papież nr 6 z 267, pontyfikat 105-115
|
|
|
|
- komendy działają teraz niezależnie od tego, na jakiej klawiaturze je piszesz
|
|
— `!gekon` napisany rosyjskimi literami (albo jako `!g3ck0`) wreszcie
|
|
odpowiada, wcześniej bot go po prostu ignorował
|
|
|
|
## 0.0.4 — Evaristus
|
|
|
|
papież nr 5 z 267, pontyfikat 97-105
|
|
|
|
- `!gekon` pokazuje teraz za każdym razem innego gekona — wcześniej wrzucał
|
|
w kółko to samo zdjęcie
|
|
|
|
## 0.0.3 — Clemens I
|
|
|
|
papież nr 4 z 267, pontyfikat 88-97
|
|
|
|
- nowa komenda `!gekon` — bot wrzuca losowe zdjęcie gekona; działa też
|
|
`!gecko`, `!geckon`, `!geko`, `!gekony` i `!geckos`
|
|
|
|
## 0.0.2 — Anacletus
|
|
|
|
papież nr 3 z 267, pontyfikat 76-88
|
|
|
|
- bot odpowiada teraz na konkretną wiadomość, cytując ją — w ruchliwej
|
|
rozmowie widać, czyje `!cat` to jest
|
|
|
|
## 0.0.1 — Linus
|
|
|
|
papież nr 2 z 267, pontyfikat 64-76
|
|
|
|
- wersje bota nazywają się teraz imionami kolejnych papieży
|
|
- po aktualizacji bot ogłasza w grupie nową wersję i listę zmian
|
|
- `/healthz` pokazuje wersję i papieża, więc widać co naprawdę działa
|
|
|
|
## 0.0.0 — Petrus
|
|
|
|
papież nr 1 z 267, pontyfikat 33-64
|
|
|
|
- bot taki, jaki był przed drabinką papieską: `!cat`, `!dog` i dzienne podsumowanie
|