Skip to content

[codex] fix(telegram): drop unused rich markdown parameter#93185

Closed
yu-xin-c wants to merge 1 commit into
openclaw:mainfrom
yu-xin-c:codex/telegram-rich-unused-param
Closed

[codex] fix(telegram): drop unused rich markdown parameter#93185
yu-xin-c wants to merge 1 commit into
openclaw:mainfrom
yu-xin-c:codex/telegram-rich-unused-param

Conversation

@yu-xin-c

Copy link
Copy Markdown
Contributor

Summary

  • Remove the unused markdown parameter from findRichMarkdownTableLineIndexes.
  • Keep the table line detection behavior unchanged while restoring tsgo:extensions cleanliness.

Verification

  • node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions.tsbuildinfo
  • git diff --check

Real behavior proof

Behavior or issue addressed:
Current main trips production type checking with extensions/telegram/src/rich-message.ts(300,3): error TS6133: 'markdown' is declared but its value is never read.

Real environment tested:
Local OpenClaw checkout on macOS, branch codex/telegram-rich-unused-param, Node v25.9.0, using the repository run-tsgo.mjs wrapper against tsconfig.extensions.json.

Exact steps or command run after this patch:

node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions.tsbuildinfo
git diff --check

Evidence before fix:
GitHub Actions check-prod-types on a PR rebased to current main reported:

extensions/telegram/src/rich-message.ts(300,3): error TS6133: 'markdown' is declared but its value is never read.

Evidence after fix:
Terminal output copied from the local checkout:

$ node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions.tsbuildinfo
(exit 0; no TypeScript diagnostics)

$ git diff --check
(exit 0)

Observed result after fix:
The extensions TypeScript project now accepts extensions/telegram/src/rich-message.ts; the unused markdown parameter is gone and the call site passes only the values used by the helper.

What was not tested:
Live Telegram message sending; this patch only removes an unused helper parameter and does not alter rich-message parsing logic.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XS proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 15, 2026
@yu-xin-c
yu-xin-c marked this pull request as ready for review June 15, 2026 06:07
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Current main already contains the exact unused-parameter cleanup from this PR, and a later Telegram rich-message refactor keeps the dead helper argument absent. The branch is now a duplicate/conflicting landing candidate rather than useful remaining work.

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review details

Best possible solution:

Keep the current-main Telegram rich-message implementation and close this duplicate PR rather than rebase or merge a branch whose only change already landed.

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

Yes. The PR base had an unused private markdown parameter under tsconfig.extensions.json with noUnusedParameters: true, and the PR body included matching TS6133 evidence; this read-only review verified the source path but did not rerun typecheck.

Is this the best way to solve the issue?

Yes, but it is already solved on current main. Commit 42759a1b799b807749a60f672847af2e34d1fa8e applied the exact private-signature cleanup, and later Telegram rich-HTML work preserved the fixed state.

Security review:

Security review cleared: The PR diff only removes an unused private helper argument and does not touch secrets, dependencies, CI, package resolution, or privileged runtime paths.

AGENTS.md: found and applied where relevant.

What I checked:

  • base source had the typecheck problem: The PR base bcb016a528b14cfad70d68c3db3019fbe6632c99 still had markdown: string in findRichMarkdownTableLineIndexes while the call passed markdown, lines, fenceSpans; tsconfig.extensions.json enables noUnusedParameters. (extensions/telegram/src/rich-message.ts:299, bcb016a528b1)
  • exact fix commit on main: Commit 42759a1b799b807749a60f672847af2e34d1fa8e removes the unused markdown parameter and updates the only call site to pass lines and fenceSpans, matching this PR's diff exactly. (extensions/telegram/src/rich-message.ts:299, 42759a1b799b)
  • current main still has the fixed state: Current main b3128ba93def28cd16b40f71cfba72127cb39a23 no longer contains findRichMarkdownTableLineIndexes or preserveTelegramRichMarkdownLineBreaks; the remaining rich markdown path starts at parseRichMarkdownFenceSpans and splitTelegramRichMarkdownBlocks. (extensions/telegram/src/rich-message.ts:190, b3128ba93def)
  • main containment provenance: GitHub compare reports current main is ahead of 42759a1b799b807749a60f672847af2e34d1fa8e with zero commits behind, so the exact fix commit is contained in main. (42759a1b799b)
  • later refactor preserved the fix: Merged Telegram PR feat(telegram): send rich messages as rich html #93286 changed extensions/telegram/src/rich-message.ts again and removed the old helper path entirely, which is why current main no longer has the exact function this PR edits. (extensions/telegram/src/rich-message.ts:190, da92615816b6)
  • release provenance: Latest release v2026.6.6 was published on 2026-06-12 before the 2026-06-15 fix commit, git tag --contains 42759a1b799b807749a60f672847af2e34d1fa8e returned no tags, and the compare against the release tag is not a release containment path; this is current-main-only provenance. (42759a1b799b)

Likely related people:

  • vincentkoc: Authored the exact current-main commit fix(telegram): repair rich message typecheck and opened the prior Telegram rich-markdown line-break PR on the same file. (role: current-main fix author and recent area contributor; confidence: high; commits: 42759a1b799b, b3f315461ba7; files: extensions/telegram/src/rich-message.ts)
  • obviyus: Merged the Telegram rich-markdown line-break work that introduced the helper surface and authored/merged the later rich-HTML refactor that removed the old helper path. (role: prior feature author and merger; confidence: high; commits: b3f315461ba7, da92615816b6; files: extensions/telegram/src/rich-message.ts, extensions/telegram/src/send.test.ts, extensions/telegram/src/telegram-outbound.test.ts)

Codex review notes: model internal, reasoning high; reviewed against b3128ba93def; fix evidence: commit 42759a1b799b, main fix timestamp 2026-06-15T14:23:57+08:00.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 15, 2026
@yu-xin-c

Copy link
Copy Markdown
Contributor Author

Follow-up on the current checks:

  • The code-relevant checks are green, including check-prod-types, build-artifacts, and Real behavior proof.
  • ClawSweeper marked this ready for maintainer review with proof: sufficient and rating: diamond lobster.
  • The only current failure is ci-timings-summary, which failed while calling the GitHub API with HTTP 403: API rate limit exceeded for installation; it is an infra/timing-summary failure, not a TypeScript or Telegram behavior failure.
  • I tried gh run rerun 27527380445 --failed, but this account cannot rerun it because repository admin rights are required.

@clawsweeper clawsweeper Bot added the P2 Normal backlog priority with limited blast radius. label Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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