Repository navigation
improve(telegram): avoid rescanning expired rich-text spans - #151965
Conversation
Punchcard-Session: ember-river-harbor-t4
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 18, 2026, 12:55 PM ET / 16:55 UTC. ClawSweeper reviewWhat this changesThe PR removes expired formatting spans from Telegram’s rich-text rendering sweep and adds Markdown and HTML regression coverage that checks output and processing work. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful, focused optimization: current main still rescans expired inner spans. No actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherTelegram’s rich-message planner converts outgoing Markdown and embedded HTML into formatted message blocks. The compositor combines formatting ranges before those blocks are split into delivery pages. flowchart LR
A[Outgoing Markdown and HTML] --> B[Parse text and formatting ranges]
B --> C[Admit started spans]
C --> D[Remove expired spans]
D --> E[Compose formatted blocks]
E --> F[Plan Telegram delivery pages]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -7, Tests +90. Total +83 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep span expiry inside the existing compositor while preserving formatting output and avoiding claims of deployment speedup without matched measurements. Do we have a high-confidence way to reproduce the issue? Yes, from source: a long outer formatting span prevents current main’s leading-span cursor from skipping expired inner spans. The supplied regression exercises that shape; no tests were executed in this read-only review. Is this the best way to solve the issue? Yes. Incremental admission and expiry address the redundant work within its existing owner while preserving ordering and containment semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ce7aa003112a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer disposition for the measurement risk in #151965 (comment): accept the review's first mitigation. Span expiry stays inside the existing compositor; complete formatting and delivery output are covered by the original-defect regression and 208 passing selected cases. The demonstrated result is reduced span-end reads. Wall-clock time, allocations and deployment latency are not established or claimed. The matched direct-VM stack comparisons remain a separate campaign deliverable. Their absence does not block this independently justified narrow fix under the campaign's approved scope. Required exact-head CI and the native prepare/merge gates still apply. No source or test change is needed for this disposition. |
|
Merged via squash.
|
…49090-prep * 'main' of https://github.com/openclaw/openclaw: (1719 commits) test: remove redundant catalog benchmark gate (#151892) improve(ai): speed up Unicode message preparation (#151950) improve(logging): reduce filesystem work when polling logs (#151961) fix(cron): preserve scheduled work after creator turns end (#151919) improve(telegram): avoid rescanning expired rich-text spans (#151965) refactor(testing): share plugin assertion file scanner (#151960) fix: publish acknowledged managed task receipts (#151590) fix(qa): preserve denial warnings during A2A finalization (#150556) fix(subagents): clear expired blocks after successful delivery (#151949) test: share fresh CLI output fixtures (#151954) refactor: reuse channel status preparation (#151906) fix(plugins): avoid duplicate initialization and mixed registrations (#151927) fix: updates fail for plugins selected from local load paths (#151851) fix(msteams): reactions target the current inbound message (#151382) fix(state): keep the meeting transcript migration result when stage cleanup fails (#151370) improve(gateway): reduce allocations when selecting sessions by store (#151940) fix: finish Crabbox wrapper cancellation cleanup (#151862) fix(discord): preserve text when replying to bot messages (#151821) perf(fleet): run registry operations in SQLite workers (#148290) fix: keep I/O responsive across busy agent databases (#151909) ...
…#151965) Punchcard-Session: ember-river-harbor-t4
What Problem This Solves
Telegram rich-text rendering repeatedly scans expired formatting spans when one long formatting span contains many short spans.
User Impact
Messages with many nested formatting spans require less compositor work while preserving their Markdown and HTML output, crossing-span ordering, and delivery-page contents.
Why This Change Was Made
The existing rich-text compositor now admits spans in start order and removes expired spans as it advances. A continuing outer span can no longer keep expired inner spans in every later scan. Existing atom handling and formatting precedence remain unchanged.
Evidence
Punchcard-Session: ember-river-harbor-t4