Repository navigation
feat(protocol): upgrade canonical schema to Layer 233 - #5
Merged
Merged
Conversation
Protocol compatibility line. Canonical Layer 233 comes from official Telegram Desktop ready@a6df181ac41763a9ff9edae264dad407fb1c35ec (the stable ready branch; dev@93624f698 carries byte-identical api.tl). The manifest locks Git blob 4e29f2d and normalized SHA-256 c2bbefcaec3285ba46c8af8f429c7012fe5aea253fd16d4be089f91c7c3fa71e; exact profiles 225-232 remain available. - channels.toggleForum gains the required sidebar:Bool and moves to #a2952b54. A historical request is rejected at admission instead of defaulting a layout decision the client never sent, matching the only prior required-request-field decisions (inputStorePaymentAuthCode and payments.getStarGiftWithdrawalUrl). The canonical-to-historical projection drops sidebar and emits the historical #3ff75734 body. - channel.forum_sidebar and user.bot_forum_sidebar drop for 225-232: unchanged wire IDs, layout metadata only, never leaked. - The six new updates (updateEditForumTopic, updateBotWidgetQuery, updateInlineBotWidgetQuery, updateBotWidgetCopyQuery, updateMessageWidgetData, updateTranscribedAudioFile) drop for 225-232, matching every non-wallet update added in Layers 225-229; only the Layer 230 wallet/TON-session updates reject. - tlprofile/layer233_test.go locks the canonical pair, the new-flag non-leakage, the toggleForum request policy and the six update drops. The Layer 232 legacy-withdrawal oracle no longer expects exact profile 232 to admit the promoted SRP wire (it defines the temporary-password method instead). - LAYER233_REVIEW.md records provenance, decisions and verification. No existing update's pts/pts_count field changes; the MTProto transport schema is unchanged.
Protocol compatibility line. Follow-up to the Layer 233 import. - channels.toggleForum from profiles 225-232 now defaults sidebar to false instead of being rejected at admission. Every client in use sends #3ff75734 (Telegram Desktop 7.3.1 and Telegram Android 13.0.3 at Layer 231, TDLib 1.8.69 at Layer 232), so rejecting it took forum toggling away from all of them, as the v1.6.0 withdrawal rejection did for gift export. sidebar is per-channel layout metadata and an old client only knows the list and tabs layouts, so false is the layout it chose. Precedent: keyboardButton.type (default adapter) and auth.sentCodePaymentRequired.premium_days (default). - Regenerate tg, tg/e2e and mt from an LF checkout. The import ran on a CRLF checkout of gen/_template: go/scanner strips the \r from line comments, so go/printer skipped doc-comment reformatting and 1121 files differed from an LF generation in comment layout only, which the check/gen job would revert. .gitattributes now pins *.tmpl to LF. - layer233_test.go asserts historical admission as sidebar=false and that the six new updates drop inside an updates container while the neighbouring update stays. - LAYER233_REVIEW.md and the layers README record the new decision, the pts gap that dropping updateMessageWidgetData leaves for historical sessions, the messageMediaWidget optional-field drop and the corrected counts (19 constructors and 8 functions). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the canonical schema to Layer 233, imported from official Telegram Desktop
ready@a6df181ac41763a9ff9edae264dad407fb1c35ec(the stablereadybranch;dev@93624f698has byte-identicalapi.tl). Exact profiles 225–232 remain generated.Manifest provenance:
a6df181ac41763a9ff9edae264dad407fb1c35ec4e29f2deb45a083196a8c7ac09cdedf2600c1a10c2bbefcaec3285ba46c8af8f429c7012fe5aea253fd16d4be089f91c7c3fa71eSchema changes
channels.toggleForumgains the requiredsidebar:Booland moves#3ff75734→#a2952b54.channeladdsforum_sidebar:flags2.23?true,useraddsbot_forum_sidebar:flags2.22?true(wire IDs unchanged).UserWallet/WidgetQueryType, transcription) and 8 newmessages.*methods.updateEditForumTopic,updateBotWidgetQuery,updateInlineBotWidgetQuery,updateBotWidgetCopyQuery,updateMessageWidgetData,updateTranscribedAudioFile.Review decisions (see
_schema/layers/LAYER233_REVIEW.md)channels.toggleForum.sidebar→ reject for 225–232 (profile→canonical). A historical request cannot express the new required layout decision; defaulting it tofalsewould let an old client silently overwrite the account's sidebar setting. This follows the only prior required-request-field decisions (inputStorePaymentAuthCode.premium_days,payments.getStarGiftWithdrawalUrl.tmp_password), which reject. The canonical→historical projection dropssidebarand emits the historical body.channel.forum_sidebar,user.bot_forum_sidebar→ drop for 225–232 (layout metadata only; wire IDs unchanged).Policy grows from 249 to 305 entries (8 request rejections + 48 update drops); 249 reviewed decisions retained unchanged, zero stale.
Verification
go generate .is deterministic (two runs byte-identical).go test ./... -count=1,go build ./...,go vet ./gen ./gen/semantic ./cmd/gotdgen ./tlprofile ./mtproto ./tgpass, including the newtlprofile/layer233_test.go.No client UI session or deployment is part of this verification.