Skip to content

fix(telegram): preserve progress preambles with verbose logging - #168225

Merged
obviyus merged 1 commit into
mainfrom
fix/verbose-preamble
Oct 10, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/verbose-preamble

Conversation

@obviyus

@obviyus obviyus commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes missing model preambles in Telegram's default progress draft after /verbose on or /verbose full.

Related: #168016.

User Impact

Verbose tool diagnostics still arrive separately, but they no longer prevent the temporary preamble headline from appearing while tools run. The draft is deleted after the clean final answer. Turns without a preamble do not gain an empty Working draft. Partial/off modes and explicit diagnostic opt-outs retain their behavior.

Why This Change Was Made

Telegram suppressed the work event that opens the shared compositor's delayed start gate whenever durable verbose diagnostics were active. Preambles reached the compositor but could never become visible. The Telegram adapter now records meaningful work independently of tool-row delivery, while retaining lifecycle checks and the shared non-work-tool policy. No configuration, SDK, or stored-state changes.

The only related history overlap is #126480 documentation for Slack compact finalization; that section and Slack's runtime are unchanged.

Evidence

  • Current-main baseline 56e7dbab5bb261c9a04efbc1a6194713e99be388, Telegram Test Server, default progress with commentary unset: two settled repetitions delivered verbose tool messages and finals but no preamble draft. First: diagnostics 75164/75166/75167/75168, final 75169. Repeat: diagnostics 75337–75340, final 75341. Each run made ten scripted provider requests across its control and verbose turn.
  • Passing verbose-off controls on that baseline: preamble drafts 75152 and 75333 updated through all four tools, then were deleted after finals 75159 and 75335.
  • Candidate Test Server: verbose-off control draft 75582 was deleted after final 75584. With verbose on, draft 75589 showed all five authored preambles in order, alongside unchanged diagnostics 75588/75590/75591/75592, and was deleted after clean final 75593. No preamble was copied into the final.
  • Regression at the real Telegram dispatch/core-reply/HTTP boundary: three cases fail on main (on/full with omitted tool-progress setting, and full with tool progress enabled). The extended existing file passed all 25 cases before the final empty-draft guard; all eight affected table cases pass with that guard, including the new no-preamble control. Final focused invocation: 198.01 seconds wall time; Vitest 186.14 seconds. This existing transport fixture covers suppression and delivery ownership rather than just formatting.
  • Secretless Linux/Node build passed, including declaration generation. Scoped formatting and lint passed. The build printed the same unrelated Control UI gzip-budget advisory as the baseline; its command exited zero.
  • Real gpt-5-mini, low reasoning, through the built candidate and Test Server: four successful HTTP 200 responses, diagnostics 75600/75601, final 75602 containing REAL_PREAMBLE_OK. This model emitted narration only in its final answer, so the real-provider run proves delivery compatibility, not the streamed-preamble defect. The deterministic Responses commentary fixture proves that path.

Merge danger: two-way door; a revert fully restores the previous behavior. Blast radius is Telegram progress-mode preamble visibility with verbose diagnostics enabled; no persistent state or public contracts change.

@clawsweeper

clawsweeper Bot commented Oct 10, 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. The review result is being finalized.

View the workflow run.

@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: telegram Channel integration: telegram size: S labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Preserve temporary Telegram preamble headlines while verbose tool diagnostics are delivered separately.

Example: A Telegram user enables /verbose on and runs tools with the preamble “Inspecting the requested files”.

  • Before: Tool diagnostics and the final answer arrive, but the preamble draft never appears.
  • After: The preamble draft updates alongside diagnostics and is deleted after the final answer.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair with real Telegram behavior evidence and meaningful regression coverage; no actionable findings remain.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied paired Telegram Test Server observations exercise the candidate Gateway with deterministic Responses commentary: five preambles appear in draft 75589 beside separate diagnostics, and the draft is deleted after clean final 75593; baseline repetitions lack that draft and verbose-off controls retain it.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Enabling verbose diagnostics makes Telegram's temporary model-preamble progress disappear.
Reason: The change restores the established preamble contract without adding settings, persistent state, or another presentation owner.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current Telegram progress defect with a focused implementation and convincing paired Test Server evidence; no actionable patch defects were found.

Priority: P2
Reviewed head: d4a39f8edd5d4f3c1a1067bc8f4a3484833108e0

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Telegram dispatch adapter receives agent progress events, feeds the shared progress compositor, and sends temporary drafts, durable diagnostics, and final replies to Telegram.

flowchart LR
 A[Agent events] --> B[Telegram dispatch adapter]
 B --> C[Shared progress compositor]
 C --> D[Temporary Telegram draft]
 B --> E[Verbose diagnostic messages]
 B --> F[Final answer and draft cleanup]
Loading

Technical review

Best possible solution:

Keep work-gate activity independent from verbose diagnostic delivery within the existing Telegram adapter and shared compositor.

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

Current-main source exposes the blocked work gate, and the supplied paired Test Server observations demonstrate the failure; this review executed no target code.

Is this the best way to solve the issue?

The patch repairs the Telegram-specific coupling through existing SDK operations, preserves lifecycle checks and diagnostic opt-outs, and extends meaningful boundary coverage.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Telegram work-gate and verbose suppression changes intended behavior with a stated reason (c55f16f: The observer refactor made verbosity reads asynchronous while preserving lifecycle acceptance checks; earlier dispatch history already contained verbose tool-row suppression.)
  • Preamble headline presentation keeps the original intent (8d465d7: Model-authored preambles should supply the status headline after meaningful work passes the delayed gate, without creating drafts for fast turns.)
  • Verbose HTTP delivery regression table keeps the original intent (f3f9bf9: Protect separate verbose diagnostics in default progress mode while preserving explicit opt-outs and other streaming modes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 5c906f9 adds extensions/telegram/src/bot-message-dispatch-progress.ts:272 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5c906f9d7329; files: extensions/telegram/src/bot-message-dispatch-progress.ts)
  • Peter Steinberger: Raw commit c55f16f adds extensions/telegram/src/bot-message-dispatch-progress.ts:336 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c55f16f14211; files: extensions/telegram/src/bot-message-dispatch-progress.ts)

PR surface

Source +21, Tests +18, Docs +4. Total +43 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 28 7 +21
Tests 1 33 15 +18
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 65 22 +43

Labels

Label changes:

  • add P2: Verbose Telegram turns lose temporary progress headlines, while diagnostics and final answers remain functional.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • add proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Preamble visibility, updates, separate diagnostics, and post-final deletion are observable on Telegram's Test Server and are covered by the supplied observations.

Label justifications:

  • P2: Verbose Telegram turns lose temporary progress headlines, while diagnostics and final answers remain functional.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Preamble visibility, updates, separate diagnostics, and post-final deletion are observable on Telegram's Test Server and are covered by the supplied observations.

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 follows the weaker of proof and patch quality; ✨ 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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 10, 2026, 1:19 AM ET / 05:19 UTC.

@obviyus
obviyus marked this pull request as ready for review October 10, 2026 05:34
@obviyus
obviyus merged commit 13844a7 into main Oct 10, 2026
178 of 180 checks passed
@obviyus
obviyus deleted the fix/verbose-preamble branch October 10, 2026 05:44
@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 13844a7. /verbose no longer hides the live preamble headline in Telegram progress mode; Test Server before/after evidence is in the PR body.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…claw#168225)

In Telegram's default progress mode, /verbose on or full stopped model preambles from opening the documented live status headline, because tool events under verbose no longer counted as work for the draft. Tool rows still give way to durable verbose diagnostics, but work tools now keep the preamble headline's activity gate, and an empty draft is not opened. The preamble stays out of the final answer as before. Found by our Telegram Test Server bug hunt.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant