Skip to content

test(telegram): remove redundant markdown chunking case - #137950

Merged
steipete merged 1 commit into
mainfrom
codex/telegram-send-test-dedupe
Sep 4, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/telegram-send-test-dedupe

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Related: #137612

What Problem This Solves

Telegram's send suite repeats an expensive Markdown chunking scenario without protecting a distinct behavior. The case titled “sends medium markdown text as one HTML message” now expects multiple text messages, using the same input structure and default transport as the adjacent, stronger chunking test.

Why This Change Was Made

Remove that obsolete case and move its no-rich-API assertion into the retained long-message case. The retained test checks multiple sends, preserved content, the 4000-character chunk bound, and ordinary text transport. The rich-API assertion matters because the raw API mock forwards into the ordinary send mock.

Both cases moved onto the same default transport in #93279. Short messages, explicitly enabled rich messages, distinct Markdown structures, and delivery lifecycle tests remain covered. This changes one test file: production +0/-0, tests +1/-14, and 257 cases become 256. No sharding, production behavior, dependencies, or timeouts change.

User Impact

Developers avoid one redundant Markdown parse/render/send cycle on every full Telegram send-suite run. There is no user-visible behavior change.

Evidence

  • Native baseline: CI run 33821474677, Node bundle 28 passed all 257 send-file cases. The removed case took 6.669 seconds; the retained stronger case took 25.394 seconds. This is one native sample, not a guaranteed reduction in total CI time.
  • The original focused pair passed before the edit. The same filter passed afterward with one retained case and 255 filtered cases.
  • The complete send file passed: 256 tests, zero skipped or failed.
  • Independent Codex review: scoped-clean for P0–P2, no findings; all three removed assertions are retained by the stronger test.
  • Formatting, git diff --check, and every check selected by node scripts/check-changed.mjs --dry-run -- extensions/telegram/src/send.test.ts passed. The initial run stopped because this linked checkout lacked the browser package's existing type-dependency link. After linking that existing installation, extension-test typechecking and the remaining coercion, deprecated-API, unused-export, and targeted Oxlint checks passed. No dependencies or declarations were changed.
  • Native CI run 33841201448 succeeded on commit 91b4674039dea1a2365ff2805eb5274bbfe484d4: 57 successful jobs and 18 unselected/skipped jobs, with no failures or cancellations. The latest repository review also found no blocking issues.

Native CI's dependency audit received HTTP 503 responses and continued under main's explicit incomplete-audit warning policy; no advisory clearance was obtained. This selected-scope run took 9m36s, including 5m12s–5m44s ready-to-start delays for its 23 Telegram test envelopes. It does not prove the eight-minute target. Those envelopes took 1m24s–3m10s each once started, and their repeated setup is a separate grouping follow-up.

Validation uses Node 24 and node scripts/run-vitest.mjs extensions/telegram/src/send.test.ts. Local timing comparisons are not treated as CI performance proof because the host is shared and heavily loaded. Runtime code is unchanged, so no live Telegram operation is required for this test-only consolidation.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XS maintainer Maintainer-authored PR labels Sep 4, 2026
@steipete
steipete marked this pull request as ready for review September 4, 2026 05:37
@steipete steipete self-assigned this Sep 4, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 1:47 AM ET / 05:47 UTC.

ClawSweeper review

What this changes

The PR removes a duplicate Telegram Markdown chunking test and moves its ordinary-transport assertion into the stronger long-message case.

Merge readiness

✅ Ready for maintainer review

No blocking findings. This recent, assigned maintainer PR is still necessary: fetched current main retains the duplicate test, while the branch removes it without reducing the default text-path contract.

Priority: P3
Reviewed head: 91b4674039dea1a2365ff2805eb5274bbfe484d4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative test cleanup whose retained case preserves the removed scenario’s observable assertions.
Proof confidence 🌊 off-meta tidepool Not applicable: No production owner changes: this maintainer-authored PR only consolidates a test assertion, so real Telegram behavior proof is not applicable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: No production owner changes: this maintainer-authored PR only consolidates a test assertion, so real Telegram behavior proof is not applicable.
Evidence reviewed 6 items Introduced test-only change: The verified PR-introduced delta removes the 800-repeat default Markdown test and adds its no-rich-transport assertion to the adjacent 3000-repeat case; no runtime file is introduced.
Current main still needs the cleanup: Fetched main still contains both the redundant 800-repeat case and the adjacent 3000-repeat chunking case, so the requested cleanup is not already implemented.
Retained test covers the removed contract: The retained default-config case uses the same Markdown structure at a larger size and now asserts multi-send, heading/content retention, every chunk at most 4000 characters, and no rich send.
Findings None None.
Security None None.

How this fits together

Telegram sends Markdown through the standard text transport by default, splitting rendered HTML into bounded messages; rich transport is opt-in. This test suite verifies that routing and chunking before delivery reaches the Telegram Bot API.

flowchart LR
  A[Markdown reply] --> B[Telegram send entry]
  B --> C[Select default text transport]
  C --> D[Render and chunk HTML]
  D --> E[Telegram send API]
  F[Send tests] --> C
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -13. Total -13 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 14 -13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 14 -13

Review metrics

Metric Value Why it matters
Production vs test LOC production +0/-0; tests +1/-14 The only change consolidates test assertions; runtime, configuration, and delivery behavior are untouched.

Technical review

Best possible solution:

Keep the single stronger default-transport chunking case, including its explicit no-rich-send assertion, and remove the duplicate medium-size scenario.

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

Not applicable: the item consolidates redundant test coverage, and source inspection shows the same default-path scenario is retained at a larger input size.

Is this the best way to solve the issue?

Yes. Moving the transport-selection assertion to the stronger identical-shape chunking case preserves the relevant contract; deleting it outright would weaken default-path coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 93b873336d84.

Labels

Label changes:

  • add P3: This is a low-risk test-suite cleanup with no user-visible or production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: No production owner changes: this maintainer-authored PR only consolidates a test assertion, so real Telegram behavior proof is not applicable.

Label justifications:

  • P3: This is a low-risk test-suite cleanup with no user-visible or production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: No production owner changes: this maintainer-authored PR only consolidates a test assertion, so real Telegram behavior proof is not applicable.

Evidence

What I checked:

  • Introduced test-only change: The verified PR-introduced delta removes the 800-repeat default Markdown test and adds its no-rich-transport assertion to the adjacent 3000-repeat case; no runtime file is introduced. (extensions/telegram/src/send.test.ts:1816, 91b4674039de)
  • Current main still needs the cleanup: Fetched main still contains both the redundant 800-repeat case and the adjacent 3000-repeat chunking case, so the requested cleanup is not already implemented. (extensions/telegram/src/send.test.ts:1816, 93b873336d84)
  • Retained test covers the removed contract: The retained default-config case uses the same Markdown structure at a larger size and now asserts multi-send, heading/content retention, every chunk at most 4000 characters, and no rich send. (extensions/telegram/src/send.test.ts:1816, 91b4674039de)
  • Default transport owner: The send owner selects rich messages only for an explicitly enabled account; otherwise it builds 4000-character standard text pages and sends them through the text sender. (extensions/telegram/src/send-message.ts:151, 91b4674039de)
  • Independent chunking coverage: The planner renders Markdown into HTML pages, while focused formatter tests cover rendered-size bounds, content preservation, formatting, and word-boundary splitting independently of the removed scenario. (extensions/telegram/src/telegram-text-delivery.ts:142, 91b4674039de)
  • Recent send-path history: Recent merged work on the central text-delivery owner includes the physical-send consolidation, rich chunk-limit repair, and formatted-to-plain refactor; no historical origin claim is made for the deleted test because required promisor objects were unavailable locally. (extensions/telegram/src/send-message-text.ts:281, 6871fec3073e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • gaoanze888: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 28c2be4 into main Sep 4, 2026
196 checks passed
@steipete
steipete deleted the codex/telegram-send-test-dedupe branch September 4, 2026 06:14
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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