Skip to content

Commit 6041e18

Browse files
committed
chore(ci): run go test -race in CI + CONTRIBUTING; 2.6.0 changelog
1 parent c8a04e5 commit 6041e18

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ jobs:
2323
run: go vet ./...
2424
- name: build
2525
run: go build ./...
26+
- name: test
27+
run: go test -race ./...

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ 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+
## [2.6.0] - 2026-06-20
8+
9+
Hardening from a second full multi-dimension audit (each finding adversarially verified).
10+
11+
### Fixed
12+
- **Version comparator**: a Gentoo pre-release (`1.0_rc1`, `_alpha`, `_beta`, `_pre`) is now
13+
correctly older than the release, and a patch `_pN` / revision `-rN` newer — previously any
14+
extra suffix sorted as *newer*, so `/pkg`/`/distro` could show an rc as "latest".
15+
- **`commandArg`** splits on the first run of whitespace, so a tab/newline-separated argument
16+
(a pasted `/pkg<newline>vim`) works, not just a single space.
17+
- **Feed poll interval** now clamps a too-fast `interval_seconds` (1–59) to the 60 s floor
18+
instead of silently falling back to 5 minutes.
19+
20+
### Changed / Hardened
21+
- Lookup commands root their HTTP timeout on the request context, so in-flight work is
22+
cancelled on shutdown instead of lingering ~20 s.
23+
- Persistence writes now go through one atomic helper that **logs** marshal/write/rename
24+
failures; the bot `MkdirAll`s `STATE_DIRECTORY` on start; the warn/antispam/feed loaders
25+
log a corrupt-file parse error (matching `pending.json`) instead of silently dropping state.
26+
- Duplicate feed targets (same `chat_id`) are de-duplicated at config load (they would have
27+
shared one cursor and dropped each other's items).
28+
- **CI now runs `go test -race ./...`** (the test suite previously wasn't gating merges).
29+
- The build embeds a `version` (via `-ldflags -X main.version`), shown in `/ping` and the
30+
startup log.
31+
732
## [2.5.3] - 2026-06-20
833

934
### Changed
@@ -284,6 +309,7 @@ First stable release.
284309
long polling, no inbound port; ships a hardened `systemd` unit (`DynamicUser` +
285310
sandboxing) and reads its token from the environment.
286311

312+
[2.6.0]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v2.6.0
287313
[2.5.3]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v2.5.3
288314
[2.5.2]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v2.5.2
289315
[2.5.1]: https://github.com/Zakkaus/gentoo-zh-verify-bot/releases/tag/v2.5.1

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ go build ./...
1313

1414
## Before opening a PR
1515

16-
The CI runs these three checks — please make sure they pass locally:
16+
The CI runs these checks — please make sure they pass locally:
1717

1818
```sh
1919
gofmt -l . # must print nothing (run `gofmt -w .` to fix)
2020
go vet ./...
2121
go build ./...
22+
go test -race ./...
2223
```
2324

2425
## Code style

0 commit comments

Comments
 (0)