Repository navigation
Conversation
c780884 to
8067c3f
Compare
|
Codex review: needs real behavior proof before merge. Reviewed August 23, 2026, 10:22 AM ET / 14:22 UTC. ClawSweeper reviewWhat this changesThis PR replaces model-name Telegram callbacks with provider/index/list-fingerprint callbacks so long model IDs remain selectable from the Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readiness⛔ Blocked until stronger real behavior proof is added - 9 items remain Keep this PR open only as a repair/replacement candidate: the reported Telegram omission is real, but the current branch still emits callbacks its own parser rejects and can exceed Telegram’s byte ceiling for a long provider ID. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Telegram plugin renders configured provider models as inline buttons, then resolves a tapped callback before writing a session-scoped model override. Its callback encoding must remain within Telegram’s payload limit and map to the same model list that produced the button. flowchart LR
A[Configured provider models] --> B[Telegram model picker]
B --> C[Inline callback payload]
C --> D[Callback parser]
D --> E[Stale-list selection resolver]
E --> F[Session model override]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +79, Tests +58. Total +137 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use a fresh current-main branch to encode a parser-compatible fixed-width snapshot and a bounded provider reference, validate every emitted payload with the shared 64-byte helper, preserve stale-button rejection, and prove a long-model tap changes the selected session model. Do we have a high-confidence way to reproduce the issue? Yes — source reproduction is high confidence: a one-model list containing "a" produces the three-character fingerprint c3b, while the current parser accepts only four-character fingerprints. Is this the best way to solve the issue? No — index-based selection is the right direction, but the branch must make its emitted wire format self-consistent and byte-bounded before it is a safe fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bbdf7abcff42. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review — fixed stale button issue (totalCount guard), TS4104 type error, CI |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review — fixed stale fingerprint guard + backward compat for old callback formats |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing the long model button appears in the model picker.
Motion-trimmed clips: |
|
@clawsweeper re-review — fingerprint uses rolling hash over ALL model names, catches any list change |
|
🦞🧹 I asked ClawSweeper to review this item again. |
4cac9c6 to
9f0c25e
Compare
|
@clawsweeper re-review — fingerprint delimiter fixes concatenation ambiguity, test type fixed |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…ed model callback Rebase onto latest origin/main and resolve conflicts in: - model-buttons.ts: update ParsedModelCallback type, rewrite resolveModelSelection to handle both legacy model-based and new index-based callbacks with stale-button guards - model-buttons.test.ts: remove obsolete compact-callback test
e37e53e to
b654d74
Compare
|
Thanks @zw-xysk — I ran live Telegram red/green proof against current main at 40feadb. The pre-#114472 baseline reported 2 models but rendered only 1; current main rendered and selected the long model with a 50-byte opaque callback, then rejected that callback after the model left the authorized catalog. #114472 is the canonical fix, so this branch is superseded. Closing as already fixed; happy to revisit with a current-main repro. |




What Problem This Solves
Fixes #98221.
When a model ID is long enough that even the compact callback encoding exceeds Telegram's 64-byte limit,
buildModelSelectionCallbackDatareturnsnulland the model is silently skipped from the button list. The header says "7 available" but only 6 buttons render, with no indication a model was dropped.Changes Made
extensions/telegram/src/model-buttons.ts: Replaced embed-model-name callback format with a fixed-length index-based format (mdl_sel_{provider}_{page}_{index}) that never embeds model names. The resolver looks up the actual model from the sorted provider model list by 1-based index.extensions/telegram/src/model-buttons.test.ts: Updated tests for the new format, including a regression test for the exact long-model-name scenario from the bug report.Evidence
Production code test output
Before vs After
Before: A model named
xentriom/gemma-4-12B-agentic-fable5-composer2.5-v2:latestwas silently dropped because both standard (72 bytes) and compact (65 bytes) encodings exceed Telegram's 64-byte limit.After: All callback_data values are under 64 bytes regardless of model name length. Even a very long model name never blocks selection.
Tests (25/25 passed)
AI Assistance 🤖