Skip to content

fix(qa): wait for Telegram messages before checking their formatting - #208024

Merged
daniel-lxs merged 4 commits into
mainfrom
openclaw/work-for-roboclaw-cca857
Nov 30, 2026
Merged

daniel-lxs merged 4 commits into
mainfrom
openclaw/work-for-roboclaw-cca857

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #204372

What Problem This Solves

The Telegram live formatting check can report an empty inbox immediately after the Gateway accepts a send. In a basic group, it can also wait for a bot-side message ID that the independent observer never sees. Telegram assigns message IDs separately to each account in these groups. Failing main job · Telegram message ID sequences

User Impact

This is a QA change. The lane checks all six formatting fixtures against the messages received by its Telegram user, including their exact text, chunk count, media type and UTF-16 entity ranges.

Why This Change Was Made

Each fixture still requires a positive native Gateway receipt. The observer waits for the required number of chunks and advances only past messages it has checked. One run-specific closing message lets it detect an extra chunk delivered after the last fixture. The fixture text and 30-second observation budget stay the same.

Evidence

  • Main returned an empty batch on the first delayed read. The candidate verified all six fixtures and eight chunks with different bot and observer IDs. Separate controls rejected a missing chunk, a late duplicate and an incorrect UTF-16 offset.
  • The comparison ran the actual QA flow, payload planner and Telegram text formatter on an isolated Linux VM. TDLib parsed the emoji case with code at offset 3 and the link at offset 9. The comparison simulated message delivery and used recorded server-normalized observations for the fenced-code and task-list cases.
  • All eight channel catalog tests passed. Focused typechecking, lint and formatting passed. A fresh Telegram Test Server delivery still requires a credentialed QA broker lease.
  • An independent source review checked ordering and both message-ID sequences. The local autoreview CLI could not authenticate.

Contributor: @daniel-lxs

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 29, 2026 05:56
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5b17725e-ae4e-46a8-b400-65c7cc49867e
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR waits for complete Telegram observer batches, advances a persistent cursor, and checks a closing marker for extra chunks.

Example: The Gateway returns message ID 42 before the observer receives the emoji formatting fixture as message ID 9001.

  • Before: An empty first read can immediately reach the formatting assertion, and cross-account ID matching cannot reliably correlate delivery.
  • After: The scenario waits for the expected observer chunks and checks the exact text and UTF-16 entity offsets 3 and 9.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported QA repair with a useful regression and no identified defect; transport proof remains simulated and broad CI is unfinished.
Proof confidence 🦐 gold shrimp (3/6) The public body describes the real QA flow, planner, and formatter with simulated delivery and recorded observations; fresh TDLib delivery is unverified, and the applicable exemption makes that optional.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

The scores reflect the reviewer's assessment. Real behavior proof is not required for maintainer- or bot-authored pull requests.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Maintainers receive false Telegram formatting failures when native observations arrive after the send receipt or use a different account's message IDs.
Reason: The focused QA repair restores meaningful formatting validation; the broader linked report correctly remains outside this PR's closing scope, and collaborator authorship establishes direction.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a concrete Telegram QA false-failure path while preserving exact formatting checks, and no blocking defect was found.

Reviewed head: b901d102feb46158417c248da10623d666e9c57b

Before merge

None.

Findings

None.

Agent review details

How this fits together

The QA scenario sends Markdown through the Gateway and compares independently observed TDLib messages with fixed text, media-type, chunk-count, and entity expectations.

flowchart LR
  A[Formatting fixtures] --> B[Gateway send]
  B --> C[Telegram transport]
  C --> D[TDLib observer]
  D --> E[Observer batch and cursor]
  E --> F[Exact formatting assertions]
  E --> G[Closing marker check]
Loading

Technical review

Best possible solution:

Use the existing observer ledger and wait helper to validate complete batches without comparing identities across Telegram accounts.

Do we have a high-confidence way to reproduce the issue?

Source establishes that an empty observer read returns false to a helper that treats false as completion; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The repair fits the existing owners, keeps all exact formatting expectations, and adds only the cursor and closing marker needed to avoid skipping late chunks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 59b9268bbed7.

Provenance checked

  • Telegram native formatting observation changes intended behavior with a stated reason (a9469a2: The original scenario proved native whitespace, chunk boundaries, and formatting entities; the subsequent ordering repair retained receipt matching while allowing later observer events.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a9469a2 adds qa/scenarios/channels/telegram-semantic-formatting-boundaries.yaml:106 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a9469a2119a6; files: qa/scenarios/channels/telegram-semantic-formatting-boundaries.yaml)
  • Dallin Romney: Raw commit ac4a24d adds qa/scenarios/channels/telegram-semantic-formatting-boundaries.yaml:156 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ac4a24d420c4; files: qa/scenarios/channels/telegram-semantic-formatting-boundaries.yaml)

PR surface

Tests +25, Other +35. Total +60 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 25 0 +25
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 42 7 +35
Total 2 67 7 +60

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-29T06:18:15.159Z sha bb773e9 :: passed. :: none

Reviewed November 30, 2026, 2:06 AM ET / 07:06 UTC (Revision 2).

@daniel-lxs
daniel-lxs marked this pull request as ready for review November 30, 2026 07:02
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit 18fff57 into main Nov 30, 2026
187 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/work-for-roboclaw-cca857 branch November 30, 2026 07:15
vincentkoc added a commit that referenced this pull request Nov 30, 2026
…ogic

* commit 'f7ccd914102ab408606c45c0aa3adbd8427051eb': (1290 commits)
  refactor(ios): remove unreachable settings and automation controls (#208958)
  fix: verify deferred activation in package recovery acceptance (#208901)
  improve(ci): avoid unused adaptive scoring work (#208926)
  chore(ui): refresh control ui locales (#208959)
  test(agents): verify user recall and file state across OpenAI compactions (#208909)
  fix(ui): update the sidebar on startup and recovery screens (#207967)
  fix(whatsapp): quote the first queued swipe-reply answer (#208791)
  test(memory-wiki): generate metadata replacement transitions (#208932)
  fix(ui): hide Claude injected context from chat (#207234)
  fix(ui): count people instead of emoji in reaction badges (#207235)
  fix: keep Daybreak when another provider's model list fails (#208883)
  test(telegram): check the registered preload at polling worker startup (#208936)
  fix(qa): test Slack verbosity with one direct shell call (#208023)
  fix(qa): wait for Telegram messages before checking their formatting (#208024)
  feat(ios): show build details at the bottom of Settings (#208944)
  chore(ui): refresh control ui locales (#208937)
  fix: goals stop after native child-result handoffs (#193024)
  fix(ui): show current tool actions in collapsed chat activity (#208925)
  improve(ios): put About last in Settings (#208928)
  test(memory-wiki): generate human-note preservation regressions (#208921)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants