fsharplang-ru/vahter-bot
65.0
Adequate · 15 November 2026
10.4k
lines of production code
F#
primary language
5
measurements over time
What this system is
Features
New BotInfra shared infrastructure library
Introduced the BotInfra library, providing shared capabilities for all bots: an append-only event store with optional snapshotting and transactional projections, live bot settings reload without restarts, distributed scheduled job locking, Azure AI Vision OCR integration, structured JSON logging, OpenTelemetry observability with Telegram token redaction, and health-check endpoints.
src/BotInfra · high confidence
Vahter bot database schema and event-sourcing migrations
The vahter-bot database schema has been significantly expanded and refactored to support advanced moderation features and an event-sourced architecture. The core change is the introduction of an append-only \event\ table (V23) that replaces legacy tables like \user\, \message\, and \banned\, with debug views (\v\_users\, \v\_recent\_bans\, etc.) provided for compatibility. New capabilities include LLM-based triage with shadow classification (\llm\_triage\), ML model storage (\ml\_trained\_model\), and a verdict cache (\llm\_verdict\_cache\) to handle rate limits. The schema also supports reaction spam triage (\user\_profile\_cache\), OCR caching (\ocr\_cache\), and distributed scheduled jobs (\scheduled\_job\). Read-model snapshots (\snapshot\_user\, \snapshot\_message\) are introduced for efficient querying, and message IDs are widened to BIGINT to support Telegram's 64-bit IDs. Also in this area: 4 commits (0 fixes) modifying src/VahterBanBot; 1 commit (0 fixes) modifying src/VahterBanBot, src/vahter-bot; Updated spam detection prompt and added triage history context.
src/vahter-bot · medium confidence · unverified
VahterBanBot moderation bot introduced with ML, LLM triage, and event sourcing
The VahterBanBot moderation bot is now available, providing automated spam detection and user management for Telegram chats. It features a machine learning model trained on message text and emoji usage, alongside an LLM-based triage system (Azure OpenAI) for complex spam classification. The bot supports manual and automatic bans, soft-bans, and admin commands for managing monitored chats and vahter permissions. It uses event sourcing for auditability and persists ML models in PostgreSQL for fast startup. Additional capabilities include OCR for image spam detection, distributed scheduled jobs for cleanup and stats, and comprehensive telemetry via OpenTelemetry.
src/VahterBanBot · high confidence
Behavioural changes
1 commit (0 fixes) modifying src
A change to existing behaviour in src — 1 commit, 1 file: “Sync from monorepo (82e6c0e) (\#265)” (refs \#265). Also in this area: Updated spam detection prompt and added triage history context; 186 commits (48 fixes) modifying src/VahterBanBot.
src · low confidence · unverified
Upgrade to .NET 10 and update project structure
The application has been upgraded from .NET 8 to .NET 10, requiring the .NET SDK version 10.0.103 as specified in global.json. This change updates the target framework to net10.0 in Directory.Build.props and includes a copyright update in the LICENSE file. The project structure now utilizes a .slnx solution file and includes specific build properties such as treating warnings as errors and disabling the implicit FSharp.Core reference to resolve Package Central Manifest (CPM) issues.
(repo-wide) · high confidence
Test coverage
New BotTestInfra test infrastructure for containerized bot integration tests
Added a comprehensive test infrastructure library (BotTestInfra) that orchestrates Docker containers for integration testing, including a shared base class for managing Postgres, Flyway migrations, and fake Telegram/Azure API services. The update introduces helper modules for building Docker images with log capture, creating test fixtures for Telegram message types, and mocking Azure OCR and OpenAI/Gemini LLM endpoints to support deterministic testing of bot behaviors like concurrency races and error handling. Also in this area: 3 commits adding/updating tests in tests; 1 commit adding/updating tests in tests; Updated test suite for LLM verdict caching and autoban logic; Updated test infrastructure and added LLM triage history tests.
(repo-wide) · high confidence · unverified
Dependencies
Centralized dependency management and security patching
The project now uses centralized package version management via Directory.Packages.props, defining specific versions for key libraries including Funogram 3.0.5, Azure.AI.OpenAI 2.9.0-beta.1, Microsoft.ML 5.0.0, and xunit.v3 3.2.2. This change also pins SSH.NET to version 2026.0.0 to address a security vulnerability ([CVE redacted]) in the transitive dependency chain from Testcontainers.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 65 → 65 (+0.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 79 → 74 (-5.0)
- Architecture 77 → 75 (-2.1)
- Maturity 64 → 65 (+0.4)
- Readiness 56 → 56 (-0.1)
- Security 95 → 93 (-1.8)
- Performance 80 → 100 (+20.0)
Resolved (7)
- AzureLlmTriage.VahterBanBot.LlmTriage.ILlmTriage.Classify (cognitive 29) (src/VahterBanBot/LlmTriage.fs)
- Duplicated block (12 lines × 2) (src/VahterBanBot/LlmTriage.fs)
- Hotspot: src/VahterBanBot/Types.fs (src/VahterBanBot/Types.fs)
- IL efficiency: 8 authored method(s) exceed the IL budget (src/VahterBanBot/Program.fs)
- Low coverage: src/BotInfra/TelegramApi.fs (src/BotInfra/TelegramApi.fs)
- Low coverage: src/VahterBanBot/Metrics.fs (src/VahterBanBot/Metrics.fs)
- No ADRs found
New (12)
- Duplicated block (7 lines × 2) (src/VahterBanBot/LlmTriage.fs)
- JoinHistorySweep.Run (cognitive 55) (src/VahterBanBot/JoinHistory.fs)
- JoinHistorySweep.Run (cyclomatic 19) (src/VahterBanBot/JoinHistory.fs)
- LayeredLlmTriage.VahterBanBot.LlmTriage.ILlmTriage.Classify (cognitive 28) (src/VahterBanBot/LlmTriage.fs)
- LlmTriagePipeline.runLayers (cognitive 16) (src/VahterBanBot/LlmTriagePipeline.fs)
- Low coverage: src/VahterBanBot/JoinDeletions.fs (src/VahterBanBot/JoinDeletions.fs)
- Low coverage: src/VahterBanBot/JoinHistory.fs (src/VahterBanBot/JoinHistory.fs)
- Low coverage: src/VahterBanBot/JoinHistoryTelemetry.fs (src/VahterBanBot/JoinHistoryTelemetry.fs)
- Low coverage: src/VahterBanBot/ModerationPolicy.fs (src/VahterBanBot/ModerationPolicy.fs)
- No ADRs found (src/VahterBanBot/VahterBanBot.fsproj)
- Outdated: WTelegramClient
- Projects may be oversized for their cohesion
Changes since last survey
- 12 commits — 12 feature/other, 0 fixes
By area
- src/VahterBanBot — 9 commits
- src/BotInfra — 1 commit
- tests/BotTestInfra — 1 commit
- tests/FakeTgApi — 1 commit
Notable commits
- change: Sync from monorepo (02d435a) (#271)
- change: Sync from monorepo (0fa67b1) (#277)
- change: Sync from monorepo (1c95ecb) (#270)
- change: Sync from monorepo (2a0c9d6) (#272)
- change: Sync from monorepo (437c968) (#275)
- change: Sync from monorepo (4928e5f) (#267)
- change: Sync from monorepo (61717d5) (#273)
- change: Sync from monorepo (c25d73a) (#269)
- change: Sync from monorepo (d404893) (#266)
- change: Sync from monorepo (dd01edc) (#268)
- change: Sync from monorepo (ea85fbf) (#274)
- change: Sync from monorepo (f797d31) (#276)
API surface
- Unchanged — 6 HTTP endpoints
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
fsharplang-ru/vahter-bot was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d113d43a1f1399d86c2627178c6181c3b6e508cd — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.