Skip to content

tools: watched_chat_count bypasses the storage backend #64

Description

@brandwe

File: src/entrabot/tools/body_bootstrap.py
Location: _count_watched_chats (L163-L169)
Category: logic
Priority: low

Description

This module routes cursor and interaction reads through get_backend(); _count_watched_chats reads cfg.data_dir / "watched_chats" directly from the local FS. With BLOB_ENDPOINT/BLOB_CONTAINER configured (BlobBackend) the file isn't local, so bootstrap reports watched_chat_count: 0 even when many chats are watched. The top-level mirror at L206 carries the same wrong value.

Suggested fix

Read through get_backend().read_text("watched_chats") (or whichever key the backend stores it under).


Filed automatically by a thorough code-review pass over src/entrabot/ on 2026-06-13. Internal review id: #59.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions