docs: record VK bot recovery rollout

This commit is contained in:
nyan404 committed 2026-10-08 14:10:42 +03:00
1 parent 2d9aa2126c
commit 5aa6209ebe
2 files changed
+2

No files matched your search

+1
View File
@@ -14,6 +14,7 @@
- Draft k3s manifests live under `deploy/k8s/` but have not been applied. No VK token, group ID, service IP, or cluster Secret is stored in the repository. - Draft k3s manifests live under `deploy/k8s/` but have not been applied. No VK token, group ID, service IP, or cluster Secret is stored in the repository.
- VK input is now conversational: `BelkiDialog` stores per-peer state, supports `/лу`/`/зу` step-by-step prompts, detects bulk messages, asks for missing skill/status or confirmation, and clears with `/отмена`. - VK input is now conversational: `BelkiDialog` stores per-peer state, supports `/лу`/`/зу` step-by-step prompts, detects bulk messages, asks for missing skill/status or confirmation, and clears with `/отмена`.
- 2026-10-08: VK Long Poll now catches transient SSL/socket/timeouts, logs and reacquires the Long Poll server instead of terminating `belki-bot`. Unfinished dialog state and queued photos are persisted in `vk_dialog_states` by `VkConversationStore`, so a process restart can resume before confirmation; completed/cancelled states are removed. - 2026-10-08: VK Long Poll now catches transient SSL/socket/timeouts, logs and reacquires the Long Poll server instead of terminating `belki-bot`. Unfinished dialog state and queued photos are persisted in `vk_dialog_states` by `VkConversationStore`, so a process restart can resume before confirmation; completed/cancelled states are removed.
- 2026-10-08 live: `belki-bot:2d9aa21` is deployed in k3s with amd64 digest `sha256:899fcb5a91618a0b2f657a96f7fdf2f1686423bba6a95f13e431d589e629d401`; the replacement Pod was Ready with `restartCount=0` after rollout. The retired Pod's 9 restarts were caused by an SSL handshake timeout in `BelkiBot.events()`.
- The preferred bulk input is a natural line without pipes, such as `15.08 11:00 11:20 Дикая Вишня 1604614 Серолап 1617140`; `/api/inspect-bulk` and the web form fill recognized fields and show only missing questions. - The preferred bulk input is a natural line without pipes, such as `15.08 11:00 11:20 Дикая Вишня 1604614 Серолап 1617140`; `/api/inspect-bulk` and the web form fill recognized fields and show only missing questions.
- `/урок` and `/осмотр` use the same dialog; character name/ID may be entered separately and resolved from the persistent SQLite directory at `BELKI_IDENTITIES_DB` (default `data/belki.sqlite3`), otherwise the dialog asks for the missing half and remembers the completed pair. - `/урок` and `/осмотр` use the same dialog; character name/ID may be entered separately and resolved from the persistent SQLite directory at `BELKI_IDENTITIES_DB` (default `data/belki.sqlite3`), otherwise the dialog asks for the missing half and remembers the completed pair.
- `.gitignore` now excludes Python bytecode/cache and local test/editor artifacts; generated `__pycache__` directories were removed from the working tree. - `.gitignore` now excludes Python bytecode/cache and local test/editor artifacts; generated `__pycache__` directories were removed from the working tree.
+1
View File
@@ -22,6 +22,7 @@
## Runtime / Deployment ## Runtime / Deployment
- 2026-10-08: hardened `belki-bot` VK Long Poll against transient `OSError`/SSL/timeout failures. The poll loop logs the failure, waits, obtains a fresh `groups.getLongPollServer` lease, and continues without exiting the process. - 2026-10-08: hardened `belki-bot` VK Long Poll against transient `OSError`/SSL/timeout failures. The poll loop logs the failure, waits, obtains a fresh `groups.getLongPollServer` lease, and continues without exiting the process.
- 2026-10-08: `BelkiDialog` now persists unfinished per-actor state and queued VK photos in `vk_dialog_states` through the existing `BELKI_DATABASE_URL`/`BELKI_HISTORY_DB` store. State is written after each text/photo event and restored lazily after a bot restart; completed/cancelled dialogs are deleted. - 2026-10-08: `BelkiDialog` now persists unfinished per-actor state and queued VK photos in `vk_dialog_states` through the existing `BELKI_DATABASE_URL`/`BELKI_HISTORY_DB` store. State is written after each text/photo event and restored lazily after a bot restart; completed/cancelled dialogs are deleted.
- 2026-10-08: deployed only `belki-bot` image `reg.nyan404.ru/cwshed-clone/belki:2d9aa21` (amd64 digest `sha256:899fcb5a91618a0b2f657a96f7fdf2f1686423bba6a95f13e431d589e629d401`). The previous Pod had 9 restarts and exited with an SSL handshake timeout in VK Long Poll; the replacement Pod reached Ready with restart count 0 during the follow-up check.
- 2026-09-08: report screenshots and VK attachment mirrors use private distributed MinIO through the `minio==7.2.20` SDK. `belki-image-store` is a separate, out-of-band Kubernetes Secret containing the internal S3 endpoint, a bucket-scoped `GetObject`/`PutObject` account plus required `GetBucketLocation`, and `belki-images`; it is deliberately separate from CI-managed `belki-runtime` so normal deploys cannot remove it. `belki-web` and `belki-bot` return/retain `https://cat.nyan404.ru/api/images/<128-bit-random-id>.<extension>` while `Handler` proxies reads from MinIO. MinIO has no public exposure. - 2026-09-08: report screenshots and VK attachment mirrors use private distributed MinIO through the `minio==7.2.20` SDK. `belki-image-store` is a separate, out-of-band Kubernetes Secret containing the internal S3 endpoint, a bucket-scoped `GetObject`/`PutObject` account plus required `GetBucketLocation`, and `belki-images`; it is deliberately separate from CI-managed `belki-runtime` so normal deploys cannot remove it. `belki-web` and `belki-bot` return/retain `https://cat.nyan404.ru/api/images/<128-bit-random-id>.<extension>` while `Handler` proxies reads from MinIO. MinIO has no public exposure.
- 2026-09-24: switched the live Belki S3 endpoint from the five direct MinIO nodes to the in-cluster HAProxy front door `10.43.30.146:9000` (`minio-haproxy` in namespace `minio-proxy`). The cluster Secret was updated out-of-band and `belki-web`/`belki-bot` were restarted; the repository example mirrors this endpoint. HAProxy remains responsible for balancing the healthy MinIO nodes. - 2026-09-24: switched the live Belki S3 endpoint from the five direct MinIO nodes to the in-cluster HAProxy front door `10.43.30.146:9000` (`minio-haproxy` in namespace `minio-proxy`). The cluster Secret was updated out-of-band and `belki-web`/`belki-bot` were restarted; the repository example mirrors this endpoint. HAProxy remains responsible for balancing the healthy MinIO nodes.
- `Dockerfile.base` is rebuilt and pushed with the immutable `py312-<commit>` tag before the final Belki image; `Dockerfile` accepts that base through `BELKI_BASE_IMAGE`, leaving only application sources in the final layer. - `Dockerfile.base` is rebuilt and pushed with the immutable `py312-<commit>` tag before the final Belki image; `Dockerfile` accepts that base through `BELKI_BASE_IMAGE`, leaving only application sources in the final layer.