signal-bot/scripts
Krzysztof kuhy Rudnicki faeb756cdd feat: block binaries from a public repo, and write down the real attachment frame
Two halves of the same ask: the message database is private and must
stay that way.

The database was already gitignored, and the event table is pinned by a
test that asserts its exact column set so no message body can be quietly
added. What was missing was any defence against a binary reaching this
*public* repo at all -- and the proof it was missing was sitting in the
tree: three `bottles/**/indexeddb.sqlite` files, committed in "register
the bot as its own Signal account". Their contents turned out to be
harmless (one row, 120 bytes, a userPreferences store from
developer.android.com), but the path into history was real.

So the shared gate from ~/utils is wired in, the three files are
untracked, and .gitignore now blocks *.sqlite3 along with its -wal and
-shm companions rather than only the one filename.

The second half is the attachment envelope, captured from the live API
rather than assumed -- which is what 0.0.3 taught. A caption-less PNG
posted in the real group confirmed `attachments[].contentType`, and
settled something that was not guessable: a photo with no caption sends
`message: null`. That is exactly the frame `should_count` used to value
at zero.

Verified end to end on production data, not a fixture: the frame at
19:31:16 was recorded as media_kind=image, media_count=1, char_len=0,
filed under 2026-08-30 hour 19.

The doc also records the fields nothing reads yet, and one open question
left deliberately open: `caption` is a field on the attachment and was
null here, so whether a captioned photo puts its text in `message` or in
`attachments[].caption` has not been observed. If it is the latter,
char_len is recording 0 for those. DEBUG stays on until a `caption: str`
settles it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015d48t4qsQLBJnDwDeo2Nom
2026-08-30 19:32:41 +02:00
..
check_coverage.sh feat: rewrite the bot so it runs, and gate it like the other repos 2026-08-29 13:05:42 +02:00
check_dependency_freshness.sh feat: rewrite the bot so it runs, and gate it like the other repos 2026-08-29 13:05:42 +02:00
check_file_length.sh feat: rewrite the bot so it runs, and gate it like the other repos 2026-08-29 13:05:42 +02:00
check_md_naming.sh feat: rewrite the bot so it runs, and gate it like the other repos 2026-08-29 13:05:42 +02:00
check_no_binaries.sh feat: block binaries from a public repo, and write down the real attachment frame 2026-08-30 19:32:41 +02:00
cold_start.sh fix: a signal-api that is not up yet no longer kills the bot at boot 2026-08-30 15:23:42 +02:00
e2e.sh release: 0.0.7 «Telesfor» — !papież, and the bot can test itself 2026-08-30 17:06:25 +02:00
install_service.sh feat: refuse to look healthy while deaf, and heal the container by itself 2026-08-29 19:01:55 +02:00
lib_signal.sh feat: discover groups from the account, so adding the bot is the whole setup 2026-08-29 15:30:08 +02:00
live_smoke.sh feat: discover groups from the account, so adding the bot is the whole setup 2026-08-29 15:30:08 +02:00
prime_profile.sh fix: make prime_profile.sh fail loudly instead of exiting 0 or dying silently 2026-08-29 15:09:21 +02:00
register_bot.sh feat: discover groups from the account, so adding the bot is the whole setup 2026-08-29 15:30:08 +02:00
selftest.sh release: 0.0.7 «Telesfor» — !papież, and the bot can test itself 2026-08-30 17:06:25 +02:00
signal_api_watchdog.sh feat: refuse to look healthy while deaf, and heal the container by itself 2026-08-29 19:01:55 +02:00
signal-api-watchdog.service feat: refuse to look healthy while deaf, and heal the container by itself 2026-08-29 19:01:55 +02:00
signal-api-watchdog.timer feat: refuse to look healthy while deaf, and heal the container by itself 2026-08-29 19:01:55 +02:00
signal-bot.service release: 0.0.7 «Telesfor» — !papież, and the bot can test itself 2026-08-30 17:06:25 +02:00
test_watchdog.sh feat: refuse to look healthy while deaf, and heal the container by itself 2026-08-29 19:01:55 +02:00