Skip to content

[Fix] Mock Telegram replays erase acknowledgement reactions - #3634

Open
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/mock-telegram-replay-reactions-0gumj5qbdydw6
Open

roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/mock-telegram-replay-reactions-0gumj5qbdydw6

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Telegram.

Related issue

Internal maintainer-requested developer reliability work; no issue was opened.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

The supported Telegram harness replaces its stored inbound message on duplicate delivery or edit. That reset already-recorded bot reactions, making a correctly deduplicated application update look like a lost acknowledgement when inspecting /mock/state.

What changed

Preserve the bot's existing reaction state when recording another delivery of the same chat/message pair. Incoming text still updates; new messages start without reactions, different chats remain isolated, and explicit Bot API reaction replacement/clearing still works. This is a two-line mock-recorder correction with protocol-level regression coverage; live Telegram behavior is unchanged.

How it was tested

  • Current-develop baseline c97173a7: real local API, isolated PostgreSQL/Redis and the checked-in Telegram harness received a follow-up for a factory-created active run. The first delivery queued one message and recorded 👀; the exact duplicate correctly returned duplicate:true but the harness erased 👀.
  • Exact head 6e32a383: restarted the mock provider and reset only the disposable Redis fixture, then replayed the same updates. Both observations retain 👀; PostgreSQL still has one task/run and Redis has exactly one queued follow-up.
  • The new regression failed on develop, then passed with the fix. It also verifies edited text, identical message IDs in different chats, and explicit Bot API reaction clearing.
  • All 607 communication-package tests, affected typecheck, fast workspace lint/types and Knip passed. An initial full-package attempt omitted the test environment and could not reach the default database port; the normal dotenv-wrapped rerun passed.
  • Browser proof is not applicable to this JSON/protocol harness. The provider is mocked; API, protocol and persistence are real. No real bot messages, model inference, actual worker task execution or hosted/live-provider parity is claimed.

Related PRs

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
    • Normal fast lint/type gates and changed-file formatting passed; full aliases were not rerun for this mock-only diff.
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

No changeset: mock-provider developer tooling only.

@roomote-community

roomote-community Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

No code issues found. Reviewed reaction preservation across replayed messages and edits, chat/message isolation, explicit reaction replacement/clearing, and regression coverage. Current-head CI tests, lint, typecheck, Knip, and CodeQL passed. See session

Reviewed 6e32a38

This branch has not been deployed

No deployments
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