Conversation
8f96ff1 to
d2a0e76
Compare
Strix Security ReviewWarning This pull request has 1 commit after the last Strix review ( 1 open security finding on this PR:
Review summaryReviewed PR #4155, which adds a client-side Fixed the findings? re-run the review, or tag Updated for Reviewed by Strix |
Greptile SummaryThis PR adds configurable history-length filtering and server capability negotiation intended to prevent oversized records from blocking synchronization.
Confidence Score: 4/5The PR is not safe to merge until upload decisions preserve the server’s actual size-limit semantics. The new clamp treats an unlimited server as having a 1 MiB limit and ignores legitimate limits below 1 MiB, causing either unnecessary empty replacements or recurring whole-batch rejection. The previous empty-payload-overhead finding is otherwise addressed. Files Needing Attention: crates/atuin-client/src/record/sync/mod.rs Important Files Changed
Reviews (2): Last reviewed commit: "Update crates/atuin-client/src/record/sy..." | Re-trigger Greptile |
4da57c2 to
73b6586
Compare
73b6586 to
0e1290e
Compare
50f3019 to
92ba6ac
Compare
Fixes #2887
follow-up to #4051(failed PR)
What's currently going on
when a user has a record that is larger than the max record size, the user CANNOT sync they are blocked. Firstly, is it even desirable to have very large records?
Solution
As the issue pointed out, most users wouldn't want to save records that exceptionally large, thus we introduce a config that lets users choose a max size for records (for now set to 1MB), in this way, large records wouldn't even make their way to the db to sync.
What about large records that are already in?
One solution would be to either truncate or delete the large records, but what if the user switches server? Their data would have been deleted to a server which they don't even use anymore. Thus, for those records, the users sends an empty Record, the sync would work and when other clients try to sync, they simply skip over it(a warning log is emitted in both cases).
Tests
tests have been added to verify this sync behavior and to verify that the max_record_length works as expected.
Checks