Skip to content

fix: record Telegram identities in open mode - #172

Merged
QueryPlanner merged 1 commit into
mainfrom
codex/fix-telegram-identity-labels
Aug 20, 2026
Merged

fix: record Telegram identities in open mode#172
QueryPlanner merged 1 commit into
mainfrom
codex/fix-telegram-identity-labels

Conversation

@QueryPlanner

Copy link
Copy Markdown
Owner

What

Record direct private Telegram identity labels even when TELEGRAM_ACCESS_CODE is unset, so legacy open-mode messages populate dashboard labels.

Why

TelegramBot._authorize_update returned before recording identity whenever access control was disabled. This left telegram_identities empty when production did not expose the optional secret.

How

  • Inspect the private message sender before auth-mode branching.
  • Persist matching private-chat identities in open mode.
  • Keep updates flowing if optional local identity storage is unavailable.
  • Preserve configured access-control fail-closed behavior.
  • Add identity-write and storage-error regression coverage.

Tests

  • UV_CACHE_DIR=/private/tmp/blacki-uv-cache uv run ruff format
  • UV_CACHE_DIR=/private/tmp/blacki-uv-cache uv run ruff check
  • UV_CACHE_DIR=/private/tmp/blacki-uv-cache uv run mypy .
  • UV_CACHE_DIR=/private/tmp/blacki-uv-cache uv run pytest --cov=src (1610 passed, 1 skipped, 100% coverage)

Related Issues

None.

- Record private-chat identities when access control is unset
- Keep open-mode updates flowing when local label storage fails
- Cover identity writes and storage error paths
@QueryPlanner
QueryPlanner merged commit 4efcb8a into main Aug 20, 2026
3 checks passed
@QueryPlanner
QueryPlanner deleted the codex/fix-telegram-identity-labels branch August 20, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant