Skip to content

Commit 967c3f6

Browse files
committed
docs: 3.2.0 changelog; README lookup_ttl command list + /pkgs not-found families
1 parent eeb0ce7 commit 967c3f6

3 files changed

Lines changed: 43 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,46 @@ All notable changes to this project are documented here. The format is based on
44
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
55
[Semantic Versioning](https://semver.org/).
66

7+
## [3.2.0] - 2026-06-20
8+
9+
Auto-delete consistency pass + a third multi-dimension audit (7 fresh dimensions, each
10+
finding adversarially verified): 23 raised, 13 confirmed (0 critical/high), all fixed below.
11+
12+
### Changed
13+
- **Auto-delete is now consistent across a lookup's whole interaction.** A lookup command's
14+
usage hint / "not found" / disambiguation reply previously used a path that left the command
15+
un-deleted and could fail to render; it now replies (reply-linked) and the command + reply
16+
are removed together after `lookup_ttl`, exactly like a successful answer. Control/admin
17+
commands keep deleting their trigger immediately; auto-delete still never runs in a DM.
18+
19+
### Fixed
20+
- **`/pkgs` no longer shows a bare-date snapshot instead of the real version.** A package a
21+
distro ships as a bare 8-digit `YYYYMMDD` (e.g. Debian's `gcc-snapshot`) was treated as a
22+
huge real version and beat the actual release; it's now recognised as a date and ranked
23+
below real releases (gcc Debian shows `16.1.0` / `14.2.0`, not the snapshot date).
24+
- **`/pkgs` Ubuntu line shows the current released release, not an in-development one.** An
25+
unreleased Ubuntu series (e.g. `26.10` before its release date) and `proposed`/`backports`
26+
pockets are now excluded from the stable line (derived live from distro-info-data release
27+
dates, mirroring Debian) — so it shows e.g. `26.04 LTS`, not `26.10`.
28+
- **`private_reply`** (admin-supplied DM auto-reply, sent in HTML mode) now falls back to
29+
plain text and logs the error if a stray `<`/`>`/`&` makes Telegram reject it — so a typo
30+
in the config can't leave DMs silently unanswered.
31+
32+
### Hardened
33+
- The private-chat query rate-limit map (`queryHits`) now has a hard upper bound (wholesale
34+
clear, like `dmLast`) instead of only soft eviction — flood-proof under a pathological burst.
35+
- `ensureReleaseInfo` has an in-flight guard so a burst of `/pkgs` on a cold/expired cache
36+
triggers one upstream distro-info fetch, not N.
37+
38+
### Internal
39+
- Factored the duplicated lookup send+reply+cleanup tail into `replyLookupHTML`/`replyLookupPlain`
40+
(used across all lookup handlers); factored `/autodel`'s argument parsing into a pure,
41+
unit-tested `parseAutoDelArg`. Added tests for the bare-date detection, the Ubuntu exclusion,
42+
and the `/autodel` parser. Fixed stale command lists (the `/autodel off` message, the
43+
`lookup_ttl_seconds` docs and the `/armpkgs` help/menu omitted `/arm`·`/armpkgs`·AUR) and a
44+
`/pkgs` "not found" message that under-listed distro families. Removed audit scratch files;
45+
`dm_test.go` uses `context.TODO()` (staticcheck-clean).
46+
747
## [3.1.3] - 2026-06-20
848

949
### Fixed
@@ -382,6 +422,7 @@ First stable release.
382422
long polling, no inbound port; ships a hardened `systemd` unit (`DynamicUser` +
383423
sandboxing) and reads its token from the environment.
384424

425+
[3.2.0]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v3.2.0
385426
[3.1.3]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v3.1.3
386427
[3.1.2]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v3.1.2
387428
[3.1.1]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v3.1.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Everything else lives in `config.json` (copy `config.example.json`):
8080
| `channel_invite_url` | **global default** explicit join link; required for a **private** channel (no `@handle`) |
8181
| `timeout_seconds` | time to finish verification (default 240, max 1800) |
8282
| `notify_ttl_seconds` | auto-delete the bot's group messages after N s (`0`→60, negative→never) |
83-
| `lookup_ttl_seconds` | auto-delete a lookup command (`/pkg` `/use` `/bug` `/news` `/wiki` `/bbs` `/distro`) and its answer after N s (unset→180 = 3 min, on; `0`/negative→off). Admins toggle/adjust at runtime with `/autodel` |
83+
| `lookup_ttl_seconds` | auto-delete a lookup command (`/pkg` `/use` `/bug` `/news` `/wiki` `/bbs` `/pkgs` `/arm` `/armpkgs`) and its answer after N s (unset→180 = 3 min, on; `0`/negative→off). Admins toggle/adjust at runtime with `/autodel` |
8484
| `warn_limit` | `/warn` strikes before a user is auto-kicked (default 3) |
8585
| `private_query_per_min` | lookup queries a user may run per minute in a **private chat** (default 3; guarded groups are unlimited) |
8686
| `admin_log_chat_id` | optional chat that receives a line per moderation / failed-approve event |

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ GITHUB_TOKEN=ghp_xxx
6565
| `channel_invite_url` | **全局默认**:频道邀请链接;**私有频道**(无 `@` 用户名)必填 |
6666
| `timeout_seconds` | 验证超时秒数(默认 240,上限 1800) |
6767
| `notify_ttl_seconds` | 机器人群消息 N 秒后自动删除(`0`→60,负数→不删) |
68-
| `lookup_ttl_seconds` | 查询命令(`/pkg` `/use` `/bug` `/news` `/wiki` `/bbs` `/distro`)及其回复 N 秒后自动删除(不设→180=3 分钟、开;`0`/负数→关)。管理员用 `/autodel` 运行时开关/调节 |
68+
| `lookup_ttl_seconds` | 查询命令(`/pkg` `/use` `/bug` `/news` `/wiki` `/bbs` `/pkgs` `/arm` `/armpkgs`)及其回复 N 秒后自动删除(不设→180=3 分钟、开;`0`/负数→关)。管理员用 `/autodel` 运行时开关/调节 |
6969
| `warn_limit` | `/warn` 多少次后自动踢出(默认 3) |
7070
| `private_query_per_min` | 私聊中每人每分钟可用的查询次数(默认 3;守护群不限次) |
7171
| `admin_log_chat_id` | 可选:接收每次管理操作 / 批准失败的日志 |

0 commit comments

Comments
 (0)