Skip to content

fix(telegram): prevent duplicate sends after delivery observer failures - #130643

Merged
steipete merged 1 commit into
mainfrom
codex/architecture-cleanup-telegram-send
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/architecture-cleanup-telegram-send

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Telegram could receive a duplicate reply after accepting the original message if subsequent delivery bookkeeping threw an error that looked like a formatting rejection. Accepted message IDs must survive observer failures and later send failures, rather than being retried or reported as absent.

Why This Change Was Made

The direct-reply and durable-send paths independently assembled the same physical send, fallback, acceptance and continuation sequence. This consolidates that sequence in one Telegram-local prepared sender and deletes the obsolete bot/delivery.send.ts implementation. Transport recovery ends before fallible acceptance observers run; partial errors retain every accepted message ID.

Caller-owned behavior stays distinct: direct and durable keyboard placement, reply consumption, native quote facts, voice recovery, hooks and prompt projection retain their existing contracts. Core queue custody, preview lifecycle, public APIs, configuration and schemas are unchanged. This does not claim a new authorization check below dependency throttling or internal HTTP retries.

Production LOC: +596/-700, net -104. Tests: +391/-33, net +358. Changelog: +1.

Related existing acceptance repairs: #128181 and #129342. This retains their accepted-delivery protections while removing duplicate execution ownership.

User Impact

Already accepted Telegram messages are not resent because an observer throws a formatting-like error. Partial delivery continues to report what Telegram actually accepted. Existing direct replies, native quote handling, media-plus-text delivery, inline buttons and preview finalization are preserved.

Evidence

Current candidate: 2688c4eb1d844ec23aadb247a29ab39057fcb41c, rebased onto d9506ff26ef3f7d1db83109bf8507dcc8387bcff after the live workflow encountered a changelog-only conflict. All 11 Telegram production/test files remain byte-identical to the previously verified 0b533245d29c7a56dc1419a24378f1428464b863 and original candidate d107a381bbdca5ab0ddd155a85946241306aa7db. All main changelog entries were retained; this PR's note now sits beside an existing Telegram fix. Fresh complete-branch P1 and independent exact-commit binding passed on the new head.

The original local baseline was 86e208310ff2f7a66e4f0c5968e74b319234f6aa. The subsequent 0b533245 candidate on 064b0ddf separately passed 20 HTTP/rich-edit integration tests and a clean full build with exact source inventory and installed-lock verification. These are evidence for the unchanged implementation, not newly executed whole-tree tests on 2688c4eb. Broader main changes in Responses handling, model preparation and session-write lifecycle require the fresh integrated live run below.

  • Actual grammY HTTP characterization reproduced three observer/fallback failures on the untouched baseline; the corrected candidate passes the corresponding assertions. Additional review caught and fixed lost media receipts and rich-quote fallback buttons before this commit.

  • On the original frozen candidate, 629 local tests across 12 files and node scripts/check-changed.mjs passed. Its clean-machine full build passed in 5m34.7s; all 34,094 source paths, content/modes and the installed lock were verified. These receipts are not relabeled as execution on the refreshed main/dependency base.

  • A real isolated Gateway with a deterministic mock provider and Telegram-compatible HTTP server passed the transport proof in 50.974s: 10 actual HTTP calls, ordered text pages, photo plus follow-up pages, native selected-quote parameters, same-message preview edits and final overflow with exact ordered content. This is Gateway wire-behavior proof, not an authenticated Telegram account test.

  • Fresh complete-bundle isolated Codex P1 review on the refreshed candidate found no blocking defects. Separate independent review bound the original commit, preserved source hashes, local checks and observed transport proof. All original proof Gateway processes and the remote test environment were stopped.

  • Extended real Gateway proof retained actual terminal run/session, positive durable queue custody followed by acknowledgement/removal, accepted message IDs/content, stored history and final projections. All four candidate and four parent scenarios passed the identity-aware evaluation of those retained records. Earlier script exits remain failures: their universal one-history-row assertion was wrong for the existing direct-delivery model-row-plus-named-mirror contract. The corrected evaluation ran offline, not as a new Gateway run. Photo evidence establishes accepted media/cache identity; the decorated photo has no transcript projection on either version.

  • The refreshed 2688c4eb exact-head CI run passed. Independent review bound the unchanged source and the original generic-runtime evidence. All owned generic proof resources were stopped.

The fresh authenticated run completed and supplies a narrower real Telegram differential: the public physical sender on main accepted the HTML message, then sent duplicate plain text after a deterministic post-acceptance observer error. The candidate accepted one message and returned CHANNEL_PARTIAL_DELIVERY with its accepted ID. Real Bot API records and additional Desktop captures show the two baseline bubbles versus one candidate bubble. The run used the authorized test-user DM after the configured group rejected the bot with a membership-related 403. Its baseline was e2e030e2b0ae59580422ef8f20bdccc149862536; synthetic candidate ff2873d1b73387280a8583748051a6eb39dff4c8 has that baseline and PR head 2688c4eb as parents. Cleanup and account release succeeded.

The earlier run directly invoked the sender, not the complete Gateway matrix. Its direct-helper pivot preceded the separate group403 after incomplete instruction ingestion; it remains narrow defect proof. The first attempt failed before build/account use on a changelog conflict. Neither failure nor unlinked bot claims are counted as full live proof.

Recovery33043057550 completed all five actual Gateway/Desktop scenarios on each version: ordered pages/final-page buttons, a real callback-created turn, photo/follow-up text, user-selected native quote, and same-ID preview edits plus overflow. Selected baseline dd7e0ea97498862f679845b94234eaae3afb5d83; synthetic b0fb178a85718eec83d1951d48a54819b5b7aa32 has that baseline and published 2688c4eb as parents. Both built freshly. Real Bot API requests, native DM captures, all ten terminal run/session outcomes and canonical history/cache/applicable projections were personally and independently inspected. Cleanup and leased-account release passed. Published media and evidence.

Five durable pending-to-removal timelines are retained. Baseline pages watcher stdout was not retained, so its queue ID/pending row remain unknown. Its successful accepted-ID/session/full-content-hash receipt is instead source-validated post-ACK evidence: this ordinary marked model final is promoted to required queue durability, with no queue-less fallback and no success hook before acknowledgement. This is not a blanket claim about best-effort callers. Baseline photo tail cache has identity/length/start-end evidence, not a full cached-text hash; complete wire text and model history are retained. Decorated photos have no prompt projection by the unchanged contract; direct quote/preview retain the separate named mirror. Initial cache-selection mistakes and an oversized first preview read are preserved; later bounded exact-ID receipts are accepted.

The task fixture registers exact typed callback handlers for normal inbound submission; its old unclaimed-opaque-callback assumption was a fixture error, not a production change. The recovery loaded the complete thirteen-file guidance. Canonical provider requests include a topic-label call and quote seed; preview uses a separate controlled SSE producer. These corrections preserve actual provenance rather than treating the workflow judgment as raw evidence.

The latest ClawSweeper request and Rank-up move to complete/publish broader current-head recovery evidence are fulfilled. Maintainer-directed owner consolidation, independent source/live reviews, clean complete-branch P1 and exact-head CI are complete; normal native landing guards remain enforced.

Known scoped follow-up: authority revalidation after dependency throttle waits and internal transport retries needs a separate reproduction and producer-owned design; this PR preserves existing operation-level dispatch timing.

The existing direct-delivery transcript/mirror ownership is another named follow-up; this PR does not redesign history or persistence to suppress its intentionally separate rows.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XL maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete steipete self-assigned this Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 03:17
@steipete
steipete force-pushed the codex/architecture-cleanup-telegram-send branch from d107a38 to 0b53324 Compare August 27, 2026 03:21
@clawsweeper clawsweeper Bot added mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. 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. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 1:46 AM ET / 05:46 UTC.

ClawSweeper review

What this changes

This PR unifies Telegram’s direct-reply and durable-send physical delivery paths so an accepted message remains partial delivery rather than triggering fallback or continued sends when later observation fails.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness defect found. Keep this maintainer-owned Telegram delivery refactor open for the already-active owner review and recovery evidence covering the remaining Gateway-visible paths.

Priority: P2
Reviewed head: 2688c4eb1d844ec23aadb247a29ab39057fcb41c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The central duplicate-send defect has strong real Telegram evidence and focused cross-funnel coverage; owner review should resolve the remaining broader Gateway scenario evidence.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body supplies an authenticated Telegram before/after differential with Bot API records and Desktop captures: baseline sends two bubbles after the injected post-acceptance observer error, while the candidate sends one and returns partial delivery with the accepted ID.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body supplies an authenticated Telegram before/after differential with Bot API records and Desktop captures: baseline sends two bubbles after the injected post-acceptance observer error, while the candidate sends one and returns partial delivery with the accepted ID.
Evidence reviewed 7 items Acceptance owner: The new shared sender records the Telegram message ID before invoking any fallible observer, and converts observer failure into partial delivery without re-entering transport fallback.
Both delivery funnels: The public durable-send entry point and bot reply path each construct the same prepared sender, keeping physical send and fallback behavior aligned.
Fallback boundary: The text-page generator yields accepted results outside the formatted-to-plain fallback catch, so observer errors cannot be reclassified as a formatting rejection and retried.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run extensions/telegram/src/send.telegram-http.test.ts --configLoader runner

Result: PASS (completed)

[test] starting test/vitest/vitest.extension-telegram.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-130643-wkP8Ks/target

 ✓  extension-telegram  extensions/telegram/src/send.telegram-http.test.ts (15 tests) 224ms

 Test Files  1 passed (1)
      Tests  15 passed (15)
   Start at  05:47:44
   Duration  28.93s (transform 23.85s, setup 1.13s, import 27.42s, tests 224ms, environment 0ms)

[test] passed 1 Vitest shard in 35.43s

Assertions:

  • NOT OBSERVED expect_output: Telegram physical send acceptance over HTTP — command exited successfully; expected output was not observed in the captured pane

How this fits together

Telegram has two outbound paths: streaming replies from the bot and durable sends from public message APIs. Both now pass through one plugin-local sender that performs transport fallback, records accepted message IDs, and then runs fallible delivery observers.

flowchart LR
  A[Direct replies] --> C[Prepared Telegram sender]
  B[Durable sends] --> C
  C --> D[Telegram API request and fallback]
  D --> E[Accepted message ledger]
  E --> F[Delivery observers]
  F --> G[Receipt or partial-delivery result]
Loading

Decision needed

Question Recommendation
Should this maintainer-owned consolidation wait for the in-progress Telegram Desktop recovery run to cover the remaining Gateway-visible paths before landing? Complete recovery evidence: Wait for the active recovery run to show current-head Gateway delivery preserves media, quote/buttons, preview, and settlement behavior.

Why: The central duplicate-send regression has real Telegram differential proof, but the branch deliberately centralizes two broad delivery funnels and its own evidence identifies broader scenario coverage still in progress.

Before merge

  • Resolve merge risk (P2) - This refactor changes both Telegram delivery funnels and their fallback ordering; the PR body says the active Desktop recovery run has not yet demonstrated Gateway pages, media, native quote/buttons, preview, and settlement together on the current head.
  • Complete next step (P2) - No mechanical repair is indicated; a Telegram owner should decide whether the active recovery run must complete before merging this broad but source-clean delivery consolidation.
Agent review details

Security

None.

PR surface

Source -104, Tests +358, Docs +1. Total +255 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 8 596 700 -104
Tests 3 391 33 +358
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 988 733 +255

Review metrics

Metric Value Why it matters
Production vs test delta production −104; tests +358 The shared sender replaces duplicated production send logic while adding focused boundary coverage for both delivery funnels.

Mantis proof suggestion

Telegram Desktop proof would materially show that an injected observer failure changes a duplicate visible reply into one accepted bubble while preserving the follow-on delivery behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify and capture that an accepted reply followed by an observer failure produces one bubble and a partial-delivery outcome, including the Gateway media, quote/button, preview, and settlement scenarios.

Merge-risk options

Maintainer options:

  1. Complete the Gateway recovery proof (recommended)
    Use the active Telegram Desktop recovery run to verify the refactored shared sender across the remaining visible delivery scenarios before merge.
  2. Accept the remaining path coverage risk
    Merge using the authenticated duplicate-send differential and focused boundary tests while accepting that the wider Gateway scenario proof is still pending.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Require the completed current-head Telegram recovery evidence to cover Gateway pages, media, native quote/buttons, preview finalization, and settlement before merge.

Technical review

Best possible solution:

Retain the single plugin-local acceptance ledger and land only after the Telegram owner accepts the completed recovery evidence for the remaining Gateway-visible scenarios.

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

Yes. The supplied authenticated Telegram differential reproduces two baseline bubbles after a post-acceptance observer error versus one candidate bubble and a partial-delivery result; the relevant Telegram paths are unchanged on current main from that baseline.

Is this the best way to solve the issue?

Yes. A single Telegram-local sender places accepted-message recording before fallible observers for both existing funnels, rather than retaining two independently drifting fallback implementations.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2c3a54f9e4c1.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body supplies an authenticated Telegram before/after differential with Bot API records and Desktop captures: baseline sends two bubbles after the injected post-acceptance observer error, while the candidate sends one and returns partial delivery with the accepted ID.

Label justifications:

  • P2: A duplicate Telegram reply after an observer failure is a real message-delivery defect with limited, failure-dependent blast radius.
  • merge-risk: 🚨 message-delivery: The branch centralizes transport fallback and accepted-message handling for both direct and durable Telegram sends, so an unnoticed funnel distinction could alter visible delivery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body supplies an authenticated Telegram before/after differential with Bot API records and Desktop captures: baseline sends two bubbles after the injected post-acceptance observer error, while the candidate sends one and returns partial delivery with the accepted ID.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies an authenticated Telegram before/after differential with Bot API records and Desktop captures: baseline sends two bubbles after the injected post-acceptance observer error, while the candidate sends one and returns partial delivery with the accepted ID.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body supplies an authenticated Telegram before/after differential with Bot API records and Desktop captures: baseline sends two bubbles after the injected post-acceptance observer error, while the candidate sends one and returns partial delivery with the accepted ID.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The change directly affects visible Telegram bubble delivery and can be demonstrated as the difference between a duplicate and a single accepted reply.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current refactor and the two merged adjacent Telegram accepted-delivery repairs, establishing continuity over the shared partial-delivery invariant. (role: feature owner and recent area contributor; confidence: high; commits: 3b14c819e63a, 433cf95d71b2, 2688c4eb1d84; files: extensions/telegram/src/send-prepared.ts, extensions/telegram/src/send-message.ts, extensions/telegram/src/bot/delivery.replies.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Publish the completed current-head Telegram Desktop recovery result for the media, quote/buttons, preview, and settlement scenarios.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-27T03:29:03.156Z sha 0b533245d29c7a56dc1419a24378f1428464b863 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T04:31:06.040Z sha 0b533245d29c7a56dc1419a24378f1428464b863 :: needs maintainer review before merge. :: none

@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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 27, 2026
@steipete
steipete force-pushed the codex/architecture-cleanup-telegram-send branch from 0b53324 to 2688c4e Compare August 27, 2026 04:51
@openclaw-mantis

openclaw-mantis Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Mantis Telegram proof — PASS

Summary: Current main and the synthetic PR candidate each completed five real Gateway turns through the leased user's native Telegram Desktop DM: paged durable delivery with a last-page button, authenticated callback ingress, fixture photo plus ordered follow-up pages, a manually selected native quote, and controlled incremental preview with same-ID edits plus one overflow message. Every durable turn has a captured pending-to-acknowledged/removal queue transition and every turn has terminal, idle-session, transcript, cache, and applicable projection evidence. The candidate preserves all existing visible behavior. Combined with the already-recorded authenticated observer-failure differential from run 33040833542 (main accepted a duplicate; PR head accepted one message and retained its accepted ID), this closes the required integration-regression gate and supports that the pull request fixes the reported duplicate-send defect.

  • Scenario: Using only the authorized leased tester and @foremanclawbot DM, run identical deterministic Gateway replies on baseline and candidate across three supported config phases. In durable mode, send a two-page answer, click its real inline button, and send a generated checkerboard photo with two follow-up text pages while read-only queue watchers capture custody. In replyToMode=all, select only the word 'telescope' in Telegram Desktop and use Quote & Reply. In partial-streaming mode with the modifying fixture disabled, release three indexed SSE deltas only after visible/Bot API acceptance, proving initial send, same-message edit, final same-message edit, and one overflow. Bind each turn to host-observed run/session IDs and canonical settlement owners before restart or teardown.
  • Trigger: workflow_dispatch
  • Run: https://github.com/openclaw/openclaw/actions/runs/33043057550
  • Artifact: https://github.com/openclaw/openclaw/actions/runs/33043057550/artifacts/9635230628
  • Baseline: pass at dd7e0ea97498862f679845b94234eaae3afb5d83 — Baseline completed all five real Gateway/Desktop cases with expected IDs, keyboard placement, selected quote metadata, preview edits/overflow, and positive settlement. No normal-flow duplicate was invented. The earlier authorized run 33040833542 remains the actual current-main duplicate reproduction after a post-acceptance observer error.
  • Candidate (PR merged onto main): pass at b0fb178a85718eec83d1951d48a54819b5b7aa32 — Candidate completed the same five real Gateway/Desktop cases with the same visible behavior and all required terminal/queue/history/cache/projection owners. The selected quote retained exact native metadata, and preview reused one accepted message ID before one overflow. No extra completed answer or physical duplicate appeared.
  • Differential (trusted facts): Run 33040833542 already isolated the defect: baseline accepted the formatted send and then accepted a duplicate plain-text retry after the observer failure, whereas the PR candidate accepted one message and returned partial delivery with its accepted ID. This recovery run adds the mandatory integration proof that both exact revisions traverse the real Gateway and native Desktop successfully for every caller-specific sibling contract, with accepted IDs surviving through their canonical owners. Together, the evidence proves the PR fixes the reported duplicate retry without regressing the five required Telegram flows.
  • Overall: pass
Before — current main After — this PR
baseline previewGifCropped candidate previewGifCropped

Motion-trimmed clips:

Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-visible/pr-130643/run-33043057550-1/index.json

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 27, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

The current-head recovery proof is complete: run33043057550 exercised five real Gateway turns on both current main and the candidate through the authorized test-user Telegram Desktop DM. It covered ordered pages with the button on the final page, a real button click creating a new inbound turn, a photo with follow-up pages, a user-selected native quote, and incremental previews with two edits to the same message followed by one overflow message.

The selected baseline was dd7e0ea97498862f679845b94234eaae3afb5d83; the synthetic candidate b0fb178a85718eec83d1951d48a54819b5b7aa32 has that baseline and the unchanged published head 2688c4eb1d844ec23aadb247a29ab39057fcb41c as parents. Both built freshly. Actual Bot API requests, native DM captures and retained host-run/session, terminal, history, cache and applicable projection records were independently inspected. All ten scenario outcomes passed; both environments and the leased account were released successfully.

The settlement evidence is deliberately precise. Five durable pending-to-removal timelines were retained. The baseline pages watcher output was not retained, so its queue ID and pending row remain unknown. That case instead has a positive successful message_sent receipt with the accepted ID, exact session key and full content hash, together with final canonical records; source inspection verified that this ordinary marked model final is promoted to required queue durability and that its success receipt cannot emit before acknowledgement. This is not an inference from an empty queue or a claim about metadata-less best-effort callers. The baseline photo tail has identity/length/start-end cache evidence, not a full cached-text hash; complete wire text and model history remain available. Decorated photos intentionally have no prompt projection. Direct quote/preview history retains the existing model row plus its separately identified channel-final mirror.

The separate authenticated observer-failure run33040833542 supplies the actual bug differential: main accepted two messages, while the candidate accepted one and returned partial delivery with the accepted ID. Its earlier incomplete scenario coverage is not relabeled; the recovery above supplies the missing Gateway regression matrix. The first attempt's changelog conflict and the second attempt's incomplete instruction ingestion remain documented proof-harness failures, not product failures or passing full runs.

This addresses the latest ClawSweeper Rank-up moves and its request to finish the broader Gateway recovery evidence. The owner-level design and independent source/live reviews accept the single Telegram-local transport/acceptance owner; there is no new core queue, schema, configuration or authority contract. Exact-head CI33040709911 passed, and the complete-branch isolated P1 review is clean. Production is −104 lines; tests +358; one user-facing fix note. Native landing checks remain enforced.

Remaining scoped follow-ups: deeper authority revalidation after dependency throttling/internal retries; independent history/mirror ownership redesign; proof-harness whole-instruction delivery and complete raw queue-capture retention. No physical voice-privacy failure, universal retry fence, or missing raw record is claimed by this proof.

@steipete
steipete merged commit 6871fec into main Aug 27, 2026
188 checks passed
@steipete
steipete deleted the codex/architecture-cleanup-telegram-send branch August 27, 2026 06:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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