Skip to content

fix(telegram): retain superseded draft previews - #85878

Closed
steipete wants to merge 1 commit into
mainfrom
codex/85825-telegram-preview-retain
Closed

steipete wants to merge 1 commit into
mainfrom
codex/85825-telegram-preview-retain

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary:

Behavior addressed:
Telegram could delete a successfully visible superseded preview after a generation mismatch race when forceNewMessage moved the active draft forward.

Real environment tested:
Focused local Vitest coverage for the Telegram draft-stream state machine.

Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/telegram/src/draft-stream.test.ts
.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --parallel-tests "node scripts/run-vitest.mjs extensions/telegram/src/draft-stream.test.ts"

Evidence after fix:
The regression assertion now checks that the superseded preview carries retain: true, matching the retained-preview path used when a message was already visible.

Observed result after fix:
32 draft-stream tests passed and autoreview reported no accepted/actionable findings.

What was not tested:
Live Telegram delivery; the changed behavior is the deterministic local preview-retention state transition.

Credit:
Thanks @NianJiuZst for the original report/fix in #85825.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XS maintainer Maintainer-authored PR labels May 24, 2026
@clawsweeper

clawsweeper Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Keep open only because the protected maintainer label requires explicit maintainer handling; current main and release v2026.6.9 already contain the same Telegram preview-retention fix via #85961, so this PR is no longer necessary as a landing branch.

Root-cause cluster
Relationship: superseded
Canonical: #85961
Summary: The current PR, #85825, #85907, and the closed bug report all target the same Telegram generation-race preview-retention defect; #85961 is the merged canonical fix.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Close this PR as superseded by #85961.

So I’m closing this here and keeping the remaining discussion on #85961.

Review details

Best possible solution:

Close this PR as superseded by #85961.

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

Yes for the original bug from source and related-PR history: pre-fix code emitted a generation-mismatched superseded preview without retain, and dispatch deleted non-retained previews. No current-main failing reproduction remains because the same retain path is now present on main and in v2026.6.9.

Is this the best way to solve the issue?

Yes for the code shape: adding retain: true at the producer is the narrow fix because dispatch already has a retained-preview contract. This PR is no longer the best landing path because #85961 already merged and shipped the same behavior with live proof.

Security review:

Security review cleared: The diff only changes Telegram TypeScript preview-retention logic and a colocated test expectation; it does not touch dependencies, workflows, secrets, install scripts, package metadata, or other supply-chain surfaces.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • zhangguiping-xydt: Authored the merged runtime fix commit in fix #85807: retain Telegram preview after generation race #85961 that added the retained generation-race preview behavior now on main. (role: canonical fix author; confidence: high; commits: 0e6dafec84c3; files: extensions/telegram/src/draft-stream.ts, extensions/telegram/src/draft-stream.test.ts)
  • obviyus: Authored the merged test-harness simplification on the canonical fix branch and posted the landing comment with test and live-proof commands. (role: related merger and recent adjacent contributor; confidence: high; commits: 93543aef3f01, b3b203bf67b9; files: extensions/telegram/src/draft-stream.test.ts)
  • NianJiuZst: Authored the predecessor fix commit carried by this PR and the closed predecessor Fix Telegram preview retention on generation mismatch #85825 for the same retained-preview race. (role: original related fix contributor; confidence: medium; commits: 06a890841071, b09077ede63d; files: extensions/telegram/src/draft-stream.ts, extensions/telegram/src/draft-stream.test.ts)

Codex review notes: model internal, reasoning high; reviewed against fce586538a50; fix evidence: release v2026.6.9, commit 0e6dafec84c3.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels May 24, 2026
@clawsweeper

clawsweeper Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@BingqingLyu

This comment was marked as spam.

@RomneyDa

Copy link
Copy Markdown
Member

Heads up: this PR needs to be updated against current main before the new required Dependency Guard check can pass.

@openclaw-clownfish

Copy link
Copy Markdown
Contributor

Thanks for carrying this forward. I am closing #85878 as covered by the merged fix in #85961 for the same Telegram generation-race preview retention path tracked from #85807.

Clownfish is keeping the landed path in #85961 as the source of truth because it was rebased onto main, validated with the focused draft-stream test and real Telegram proof, and merged on 2026-06-03. The contributor context from #85878 is preserved: this PR recreated source work from #85825, and the carried-forward commit credit remains visible in this branch history. Thanks @NianJiuZst, @steipete, and @zhangguiping-xydt for the overlapping fixes and validation.

If this still reproduces after #85961, or if #85878 covers a different Telegram delivery path, please reply and we can reopen or split out the remaining case.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 15, 2026
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded. The same Telegram generation-race preview-retention fix shipped through #85961 with focused regression coverage and live Telegram proof.

@steipete steipete closed this Jul 5, 2026
@shakkernerd
shakkernerd deleted the codex/85825-telegram-preview-retain branch October 19, 2026 23:33

This branch had an error being deployed

1 failed deployment
qa-live-shared — 06a89084 Deployed May 24, 2026 by clawsweeper[bot] via Run agentic native Telegram proof #54481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram maintainer Maintainer-authored PR mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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.

4 participants