load_incremental() does not communicate partial success
Author: orionzCreated Apr 26, 2022Updated Aug 21, 2026
Labelsenhancementrust
If a load_incremental() has some valid changes and some corrupt data this is not surfaced to the user. While applying what changes are valid seems like the correct course we should communicate this information. The current return value of load_incremental() is the number of ops loaded - this isn't very useful information.
My proposal: if the data has zero valid changes - return an error otherwise return the number of valid bytes processed - if the data was totally valid this will equal the length of the buffer passed in
Source: automerge/automerge