Page MenuHomePhabricator

[keyserver][lib] change thread info validators -> thin raw thread info validators
ClosedPublic

Authored by varun on Nov 15 2024, 12:35 PM.
Tags
None
Referenced Files
F3512584: D13949.id45854.diff
Sat, Dec 21, 8:28 PM
F3512583: D13949.id45852.diff
Sat, Dec 21, 8:28 PM
F3512544: D13949.id.diff
Sat, Dec 21, 8:27 PM
F3512528: D13949.diff
Sat, Dec 21, 8:26 PM
Unknown Object (File)
Mon, Dec 16, 11:16 AM
Unknown Object (File)
Sun, Dec 15, 12:59 PM
Unknown Object (File)
Sun, Dec 15, 3:23 AM
Unknown Object (File)
Wed, Nov 27, 11:27 PM
Subscribers

Details

Summary

all four of the updated validators here are only ever used to validate thin threads. therefore, they should be thin thread validators

Test Plan

https://linear.app/comm/issue/ENG-9937/narrow-raw-thread-info-validators this linear task enumerates all callsites for these validators. i checked that they're only ever used on the keyserver or to validate keyserver responses. it looks like we don't use these validators for E2EE DMs.

i also did some manual testing by sending messages through my keyserver and sending DMs to other test accounts

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun held this revision as a draft.
varun published this revision for review.Nov 15 2024, 12:52 PM
varun added inline comments.
lib/permissions/minimally-encoded-thread-permissions.test.js
516–524 ↗(On Diff #45852)

I decided not to change the types of the data in these tests because it didn't seem necessary

exampleMinimallyEncodedRawThreadInfoA is typed as a RawThreadInfo, but the validator tests that it's in fact a ThinRawThreadInfo

similarly, exampleRawThreadInfoA is type LegacyRawThreadInfo, but the validator tests that it's a LegacyThinRawThreadInfo

I went through each of these on my own and I think it's safe

This revision is now accepted and ready to land.Nov 15 2024, 2:05 PM