Current most likely theory: AssembleChunkedUpload Job depends on value in upload_stash.us_chunk_inx. Job's transaction might start prior to the APIs transaction being finished committing, resulting in us_chunk_inx being off by 1, causing the last chunk to be dropped.
-----
looks like T190988 and T266903 have a new edition. this time making errors at 10 Mb and leaving a grey area behind.
https://commons.wikimedia.org/w/index.php?sort=create_timestamp_desc&search=filesize%3A10239%2C10241 examples
https://commons.wikimedia.org/wiki/File:%D0%92%D0%B8%D0%B4_%D0%BD%D0%B0_%D0%BE%D0%BA%D1%80%D0%B5%D1%81%D1%82%D0%BD%D0%BE%D1%81%D1%82%D0%B8_%D0%95%D0%97%D0%A1%D0%9A_%D0%B8%D0%B7_%D0%B3%D0%B0%D1%80%D0%B0%D0%B6%D0%BD%D0%BE%D0%B3%D0%BE_%D0%BA%D0%BE%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%82%D0%B8%D0%B2%D0%B01.jpg
https://commons.wikimedia.org/wiki/File:Himalayan_Tibet_Museum_-_Darjeeling_-_Exhibits_(4).jpg
https://commons.wikimedia.org/wiki/File:Lille_6,_P%C3%A4rnu_2.jpg
https://commons.wikimedia.org/wiki/File:Pengantin_pria_melayu_sedang_duduk_tampak_depan_4.jpg
https://commons.wikimedia.org/wiki/File:Festung_W%C3%BClzburg_2023_-_028.jpg
https://commons.wikimedia.org/wiki/File:WIkiQuiz_2023._5-bosqich_18.jpg
can you plz fix thix asap so you dont create another backlog like https://commons.wikimedia.org/wiki/Category:Incomplete_JPG_files_(5_MB_interruption) ?
also plz identify all problematic files and create a tracking category like the old one, probably titled "Incomplete_JPG_files_(10_MB_interruption)".