core: drop support of chat versions older than 08/2024 - #7319
Conversation
There was a problem hiding this comment.
Mechanical, well-scoped removal of pre-08/2024 chat version support. initialChatVersion moves from 1 to 9 (the old batchSend2Version), the intermediate version constants (groupDirectInvVersion … batchSend2Version, plus agentToChatVersion) are deleted, and every supportsVersion/>= someVersion gate for versions ≤ 9 is dropped as now-always-true. I traced the removed symbols (getGroupLinkId, createNewContactMemberAsync, setNewContactMemberConnRequest, CEvtSentGroupInvitation, all removed version constants) and confirmed no remaining references. Removed constructors/functions that are still referenced elsewhere (CFCreateConnGrpInv kept as deprecated for stored-command decoding; viewSentGroupInvitation, getContactViaMember, sendAutoReply still used by non-legacy paths) are correctly retained. The lost legacy CON/SENT/JOINED auto-reply and group-link-join branches are all still covered by the current-version paths. Bindings default to chatInitialVRange (now 9-9) which is consistent with the new floor. No correctness, security, or concurrency issues found.
Minor cleanup left by the deletions (all non-fatal warnings, not build breaks — the library stanza uses -Weverything but only a specific -Werror= allowlist):
encodeConnInfoPQ(Internal.hs:2254) no longer uses itsVersionChatparameter after thev >= pqEncryptionCompressionVersionguard was removed. The param is now dead at all six call sites; worth removing the argument in a follow-up (interface fix rather than leaving a threaded-but-ignored version).memberSendAction(Internal.hs:2569) still bindsmemberRolein its field-pun pattern, but the only use (sendBatchedOrSeparate) was deleted. Drop it from the pun. (Signature line is outside the diff, so no inline suggestion.)mcvrunused after dropping thegroupDirectInvVersionguard — inline suggestion below.
Disabled tests: testGroupDelayedModeration / …FullDelete are xit-ed because they configure chatVRange = (1,3), now below the supported floor — dropping them follows from the support removal, and the corresponding chat_item_moderations query plans drop out of the generated plan file for the same reason. Consider deleting the now-unreachable test bodies rather than leaving them as xit. The testGroupLinkMemberRole threadDelay bump (100ms→250ms) is an unrelated flakiness tweak. ProtocolTests.hs changes are mechanical version-string updates to the encoded test vectors (1→9); no assertions were weakened or skipped.
No description provided.