Skip to content

fix(telegram): check the correct preload in the polling worker startup test - #208936

Merged
daniel-lxs merged 2 commits into
mainfrom
openclaw/doctor-skips-the-auth-profiles-08191e
Nov 30, 2026
Merged

daniel-lxs merged 2 commits into
mainfrom
openclaw/doctor-skips-the-auth-profiles-08191e

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #208789 and #154180. Failing hourly Telegram shard

What Problem This Solves

The hourly extension suite reports a Telegram polling startup failure even when the real source worker completes getUpdates. The test expects tsx in the Node launch arguments; the caller now passes OpenClaw’s loader URL instead.

User Impact

No change to Telegram polling. The test stops reporting a false failure while still rejecting a missing or incorrect preload, extra arguments, or a missing worker entry. No user action is needed.

Why This Change Was Made

I checked the original source-startup bug (#154180), its fix (#154286), and the loader change in #208789 (93f5177b9233d). The latter deliberately moved tsx resolution off the calling thread to avoid synchronous filesystem work and keep launches independent of the working directory. A worker thread loads tsx/esm through the registered preload. Restoring a direct tsx import would undo that decision.

The Telegram test now compares the complete Node argument list with --import and the exact URL of workerThreadLoader for the active generation. The existing worker-entry, Bun --no-install, message forwarding, and shutdown assertions are unchanged. One test file, +4/-1 lines; no production changes.

Evidence

I ran the comparison detached on the same AWS Crabbox with Node 24.22.1.

Check Hourly main 25bac1a Fix b758150ad93d
pnpm test extensions/telegram/src/telegram-ingress-worker.test.ts --maxWorkers=1 1 failed, 4 passed: expected tsx, got dist/infra/runtime-worker-loader.js 5 passed
Real source worker against a loopback Bot API, outside Vitest Posted getUpdates, acknowledged update 42, exited cleanly Same result, also with the prepared SDK inside Vitest

The scoped typecheck passed. The combined run stopped at the CI lint tool’s pinned Bun download; the separate exact-head run passed type-aware oxlint (0 warnings, 0 errors), formatting, and the complete affected file. I released the AWS lease and removed the temporary checkout and proof files. Not verified: Bun parity, live Telegram, the full hourly shard, or an automated local reviewer verdict.

Co-authored with @daniel-lxs.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 30, 2026 06:37
…p test

Check the full Node worker argument list against the registered loader URL. Keep the source entry, Bun arguments, and message lifecycle assertions intact.

Co-authored-by: daniel-lxs <[email protected]>
…p test

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 2f639dcc-5e83-44d0-beff-3daf24f2bd83
@clawsweeper

clawsweeper Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
Pull request received.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XS labels Nov 30, 2026
@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 30, 2026
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 30, 2026 07:08
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 30, 2026
@clawsweeper

clawsweeper Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Updates the Telegram worker startup test to expect the registered OpenClaw preload URL instead of a URL containing tsx.

Example: Run the Telegram ingress worker startup test under Node with prepared workers.

  • Before: The test rejects dist/infra/runtime-worker-loader.js because its URL does not contain tsx.
  • After: The test accepts the exact registered workerThreadLoader URL while rejecting missing, incorrect, or extra launch arguments.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-verified test repair with no findings; execution evidence is reported rather than independently verified, and exact-head CI remains in progress.
Proof confidence 🦐 gold shrimp (3/6) No production behavior changes, so shipped-entry-point proof is unnecessary; the reported red/green test comparison and loopback worker exercise support the repair, but their raw artifacts were not independently inspected.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers receive a false Telegram startup-test failure even though the source worker can poll successfully.
Reason: The maintainer-authored repair restores a useful regression check to the deliberately changed runtime contract without adding capability or configuration.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR repairs a stale assertion still present on main, preserves the intended runtime behavior, and introduces no actionable defects.

Reviewed head: f23a461bdee509afb49a07c938a61353909a471d

Before merge

None.

Findings

None.

Agent review details

How this fits together

Telegram's worker factory obtains its entry and preload arguments from the shared runtime owner; this test captures the Worker constructor arguments and checks startup and lifecycle contracts.

flowchart TD
A[Telegram worker factory] --> B[Shared runtime launch owner]
B --> C[Worker entry and preload URL]
C --> D[Worker constructor]
D --> E[Telegram polling worker]
F[Startup regression test] --> D
Loading

Technical review

Best possible solution:

Retain the existing startup regression and compare its Node arguments with the registered preload URL.

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

Main supplies an OpenClaw runtime-worker-loader URL to an assertion requiring tsx in that URL, establishing the mismatch directly from source; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete repair: it updates the existing consumer test without changing production loading or weakening runtime-specific argument checks.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Source worker startup coverage keeps the original intent (dd053f9: Catch missing source worker entries and absent TypeScript support while preserving polling lifecycle behavior.)
  • Runtime-specific launch arguments keeps the original intent (cbd5579: Require TypeScript loading under Node and preserve Bun's native TypeScript support and --no-install guard.)
  • Runtime-owned preload keeps the original intent (93f5177: Resolve tsx off the calling thread while preserving working-directory independence and worker-thread ESM loading.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • juyaohuidt: Raw commit dd053f9 adds extensions/telegram/src/telegram-ingress-worker.test.ts:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dd053f96aa30; files: extensions/telegram/src/telegram-ingress-worker.test.ts)

PR surface

Tests +3. Total +3 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 1 +3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 1 +3

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ 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 execution lanes are retired.

Reviewed November 30, 2026, 2:11 AM ET / 07:11 UTC.

@daniel-lxs
daniel-lxs merged commit c947da5 into main Nov 30, 2026
180 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/doctor-skips-the-auth-profiles-08191e branch November 30, 2026 07:17
vincentkoc added a commit that referenced this pull request Nov 30, 2026
…ogic

* commit 'f7ccd914102ab408606c45c0aa3adbd8427051eb': (1290 commits)
  refactor(ios): remove unreachable settings and automation controls (#208958)
  fix: verify deferred activation in package recovery acceptance (#208901)
  improve(ci): avoid unused adaptive scoring work (#208926)
  chore(ui): refresh control ui locales (#208959)
  test(agents): verify user recall and file state across OpenAI compactions (#208909)
  fix(ui): update the sidebar on startup and recovery screens (#207967)
  fix(whatsapp): quote the first queued swipe-reply answer (#208791)
  test(memory-wiki): generate metadata replacement transitions (#208932)
  fix(ui): hide Claude injected context from chat (#207234)
  fix(ui): count people instead of emoji in reaction badges (#207235)
  fix: keep Daybreak when another provider's model list fails (#208883)
  test(telegram): check the registered preload at polling worker startup (#208936)
  fix(qa): test Slack verbosity with one direct shell call (#208023)
  fix(qa): wait for Telegram messages before checking their formatting (#208024)
  feat(ios): show build details at the bottom of Settings (#208944)
  chore(ui): refresh control ui locales (#208937)
  fix: goals stop after native child-result handoffs (#193024)
  fix(ui): show current tool actions in collapsed chat activity (#208925)
  improve(ios): put About last in Settings (#208928)
  test(memory-wiki): generate human-note preservation regressions (#208921)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

2 participants