Repository navigation
test(telegram): remove redundant markdown chunking case - #137950
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 1:47 AM ET / 05:47 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherTelegram 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
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -13. Total -13 across 1 file. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
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
git diff --check, and every check selected bynode scripts/check-changed.mjs --dry-run -- extensions/telegram/src/send.test.tspassed. 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.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.