fix(bridge): disable the bridge Telegram poller by default
Root cause of intermittent '⚠️ Tiger timed out or is offline' replies: TWO consumers raced for getUpdates on one bot token. OpenClaw's native channel owns the conversation; the bridge poller lost with a 409 every ~40s, and when it occasionally WON it relayed the stolen message into a fresh context-less tg_* session with a 120s budget — slow turns produced the ⚠️ reply, and the message never reached the native transcript (so it was also missing from the dashboard mirror). Outbound notify (raw Bot API) is unaffected. Re-enable explicitly with TIGER_TELEGRAM_POLLER=on only if native telegram is disabled.
This commit is contained in:
parent
b250751888
commit
f5031fb683
1 changed files with 21 additions and 4 deletions
|
|
@ -151,6 +151,8 @@ app.use("/tiger/agents", agentsRouter);
|
||||||
app.use("/tiger/agents/activity", agentsActivityRouter);
|
app.use("/tiger/agents/activity", agentsActivityRouter);
|
||||||
// Complete audit trail (executions + tasks + outputs + cron runs, paginated)
|
// Complete audit trail (executions + tasks + outputs + cron runs, paginated)
|
||||||
app.use("/tiger/activity/audit", (await import("./routes/activity-audit.js")).default);
|
app.use("/tiger/activity/audit", (await import("./routes/activity-audit.js")).default);
|
||||||
|
// Layered self-diagnosis (memory / gateway / container / crons)
|
||||||
|
app.use("/tiger/health/system", (await import("./routes/health-system.js")).default);
|
||||||
app.use("/tiger/deploy-dashboard", deployRouter);
|
app.use("/tiger/deploy-dashboard", deployRouter);
|
||||||
app.use("/tiger/route-task", routeTaskRouter);
|
app.use("/tiger/route-task", routeTaskRouter);
|
||||||
app.use("/tiger/keys", keysRouter);
|
app.use("/tiger/keys", keysRouter);
|
||||||
|
|
@ -203,8 +205,23 @@ app.listen(PORT, HOST, () => {
|
||||||
// spawned specialist. See lib/inbox.ts for the contract.
|
// spawned specialist. See lib/inbox.ts for the contract.
|
||||||
startInboxScheduler();
|
startInboxScheduler();
|
||||||
|
|
||||||
// Start Telegram channel — bridge takes over from OpenClaw native handler.
|
// ── Bridge Telegram poller: DISABLED by default (2026-06-11) ──────────────
|
||||||
// Requires channels.telegram.enabled=false in openclaw.json.
|
// Reality check: OpenClaw's NATIVE telegram channel owns the bot (its
|
||||||
const tgChannel = new TelegramChannel();
|
// session agent:main:telegram:direct:* is the live conversation). Running
|
||||||
tgChannel.start();
|
// this poller alongside it made two consumers race for getUpdates —
|
||||||
|
// Telegram 409s the loser ~every 40s, and when the bridge occasionally
|
||||||
|
// WON, it relayed the stolen message into a fresh context-less tg_*
|
||||||
|
// session with a 120s budget, replied "⚠️ Tiger timed out or is offline"
|
||||||
|
// on slow turns, and the message never reached the native transcript
|
||||||
|
// (invisible to the dashboard mirror).
|
||||||
|
// Outbound sends (routes/notify.ts) use the raw Bot API and are unaffected.
|
||||||
|
// Re-enable ONLY if native telegram is turned off in openclaw.json:
|
||||||
|
// TIGER_TELEGRAM_POLLER=on
|
||||||
|
if (process.env.TIGER_TELEGRAM_POLLER === "on") {
|
||||||
|
const tgChannel = new TelegramChannel();
|
||||||
|
tgChannel.start();
|
||||||
|
console.log("[tiger-bridge] Telegram poller: ON (ensure OpenClaw native telegram is disabled!)");
|
||||||
|
} else {
|
||||||
|
console.log("[tiger-bridge] Telegram poller: off (OpenClaw native channel owns the bot)");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue