惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Vercel News
Vercel News
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
量子位
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
IT之家
IT之家
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
博客园 - 三生石上(FineUI控件)

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(telegram): reuse preview for long text finals (#77658...
vincentkoc · 2026-05-05 · via Recent Commits to openclaw:main

@@ -333,6 +333,8 @@ describe("telegram live qa runtime", () => {

333333

"telegram-context-command",

334334

"telegram-current-session-status-tool",

335335

"telegram-mentioned-message-reply",

336+

"telegram-long-final-reuses-preview",

337+

"telegram-long-final-three-chunks",

336338

"telegram-mention-gating",

337339

]);

338340

expect(scenarios.map((scenario) => scenario.id)).toEqual([

@@ -343,6 +345,8 @@ describe("telegram live qa runtime", () => {

343345

"telegram-context-command",

344346

"telegram-current-session-status-tool",

345347

"telegram-mentioned-message-reply",

348+

"telegram-long-final-reuses-preview",

349+

"telegram-long-final-three-chunks",

346350

"telegram-mention-gating",

347351

]);

348352

expect(

@@ -355,6 +359,25 @@ describe("telegram live qa runtime", () => {

355359

.find((scenario) => scenario.id === "telegram-mentioned-message-reply")

356360

?.buildRun("sut_bot").replyToLatestSutMessage,

357361

).toBe(true);

362+

expect(

363+

scenarios

364+

.find((scenario) => scenario.id === "telegram-long-final-reuses-preview")

365+

?.buildRun("sut_bot"),

366+

).toMatchObject({

367+

expectedJoinedSutTextIncludes: ["TELEGRAM-LONG-FINAL-BEGIN", "TELEGRAM-LONG-FINAL-END"],

368+

expectedSutMessageCount: 2,

369+

});

370+

expect(

371+

scenarios

372+

.find((scenario) => scenario.id === "telegram-long-final-three-chunks")

373+

?.buildRun("sut_bot"),

374+

).toMatchObject({

375+

expectedJoinedSutTextIncludes: [

376+

"TELEGRAM-LONG-FINAL-3CHUNK-BEGIN",

377+

"TELEGRAM-LONG-FINAL-3CHUNK-END",

378+

],

379+

expectedSutMessageCount: 3,

380+

});

358381

});

359382360383

it("keeps bot-to-bot plain mentions out of the default Telegram live set", () => {

@@ -382,6 +405,160 @@ describe("telegram live qa runtime", () => {

382405

).toEqual(["allowlist-block", "top-level-reply-shape", "restart-resume"]);

383406

});

384407408+

it("asserts long Telegram final replies reuse the streamed preview message", () => {

409+

expect(() =>

410+

__testing.assertTelegramScenarioMessageSet({

411+

expectedJoinedSutTextIncludes: ["TELEGRAM-LONG-FINAL-BEGIN", "TELEGRAM-LONG-FINAL-END"],

412+

expectedSutMessageCount: 2,

413+

groupId: "-100123",

414+

scenarioId: "telegram-long-final-reuses-preview",

415+

sutBotId: 99,

416+

observedMessages: [

417+

{

418+

updateId: 1,

419+

messageId: 10,

420+

chatId: -100123,

421+

senderId: 99,

422+

senderIsBot: true,

423+

scenarioId: "telegram-long-final-reuses-preview",

424+

scenarioTitle: "Telegram long final reuses the preview message",

425+

matchedScenario: true,

426+

text: "TELEGRAM-LONG-FINAL-BEGIN part one ",

427+

timestamp: 1_700_000_000_000,

428+

inlineButtons: [],

429+

mediaKinds: [],

430+

},

431+

{

432+

updateId: 2,

433+

messageId: 11,

434+

chatId: -100123,

435+

senderId: 99,

436+

senderIsBot: true,

437+

scenarioId: "telegram-long-final-reuses-preview",

438+

scenarioTitle: "Telegram long final reuses the preview message",

439+

matchedScenario: true,

440+

text: "part two TELEGRAM-LONG-FINAL-END",

441+

timestamp: 1_700_000_001_000,

442+

inlineButtons: [],

443+

mediaKinds: [],

444+

},

445+

],

446+

}),

447+

).not.toThrow();

448+449+

expect(() =>

450+

__testing.assertTelegramScenarioMessageSet({

451+

expectedSutMessageCount: 2,

452+

groupId: "-100123",

453+

scenarioId: "telegram-long-final-reuses-preview",

454+

sutBotId: 99,

455+

observedMessages: [

456+

{

457+

updateId: 1,

458+

messageId: 10,

459+

chatId: -100123,

460+

senderId: 99,

461+

senderIsBot: true,

462+

scenarioId: "telegram-long-final-reuses-preview",

463+

scenarioTitle: "Telegram long final reuses the preview message",

464+

matchedScenario: true,

465+

text: "preview",

466+

timestamp: 1_700_000_000_000,

467+

inlineButtons: [],

468+

mediaKinds: [],

469+

},

470+

{

471+

updateId: 2,

472+

messageId: 11,

473+

chatId: -100123,

474+

senderId: 99,

475+

senderIsBot: true,

476+

scenarioId: "telegram-long-final-reuses-preview",

477+

scenarioTitle: "Telegram long final reuses the preview message",

478+

matchedScenario: true,

479+

text: "final chunk one",

480+

timestamp: 1_700_000_001_000,

481+

inlineButtons: [],

482+

mediaKinds: [],

483+

},

484+

{

485+

updateId: 3,

486+

messageId: 12,

487+

chatId: -100123,

488+

senderId: 99,

489+

senderIsBot: true,

490+

scenarioId: "telegram-long-final-reuses-preview",

491+

scenarioTitle: "Telegram long final reuses the preview message",

492+

matchedScenario: true,

493+

text: "final chunk two",

494+

timestamp: 1_700_000_002_000,

495+

inlineButtons: [],

496+

mediaKinds: [],

497+

},

498+

],

499+

}),

500+

).toThrow("expected 2 SUT message(s), observed 3");

501+

});

502+503+

it("accepts legitimate three-chunk Telegram final replies", () => {

504+

expect(() =>

505+

__testing.assertTelegramScenarioMessageSet({

506+

expectedJoinedSutTextIncludes: [

507+

"TELEGRAM-LONG-FINAL-3CHUNK-BEGIN",

508+

"TELEGRAM-LONG-FINAL-3CHUNK-END",

509+

],

510+

expectedSutMessageCount: 3,

511+

groupId: "-100123",

512+

scenarioId: "telegram-long-final-three-chunks",

513+

sutBotId: 99,

514+

observedMessages: [

515+

{

516+

updateId: 1,

517+

messageId: 10,

518+

chatId: -100123,

519+

senderId: 99,

520+

senderIsBot: true,

521+

scenarioId: "telegram-long-final-three-chunks",

522+

scenarioTitle: "Telegram three-chunk final keeps only final chunks",

523+

matchedScenario: true,

524+

text: "TELEGRAM-LONG-FINAL-3CHUNK-BEGIN part one ",

525+

timestamp: 1_700_000_000_000,

526+

inlineButtons: [],

527+

mediaKinds: [],

528+

},

529+

{

530+

updateId: 2,

531+

messageId: 11,

532+

chatId: -100123,

533+

senderId: 99,

534+

senderIsBot: true,

535+

scenarioId: "telegram-long-final-three-chunks",

536+

scenarioTitle: "Telegram three-chunk final keeps only final chunks",

537+

matchedScenario: true,

538+

text: "part two ",

539+

timestamp: 1_700_000_001_000,

540+

inlineButtons: [],

541+

mediaKinds: [],

542+

},

543+

{

544+

updateId: 3,

545+

messageId: 12,

546+

chatId: -100123,

547+

senderId: 99,

548+

senderIsBot: true,

549+

scenarioId: "telegram-long-final-three-chunks",

550+

scenarioTitle: "Telegram three-chunk final keeps only final chunks",

551+

matchedScenario: true,

552+

text: "part three TELEGRAM-LONG-FINAL-3CHUNK-END",

553+

timestamp: 1_700_000_002_000,

554+

inlineButtons: [],

555+

mediaKinds: [],

556+

},

557+

],

558+

}),

559+

).not.toThrow();

560+

});

561+385562

it("matches scenario replies by thread or exact marker", () => {

386563

expect(

387564

__testing.matchesTelegramScenarioReply({