Investigate how a draft note can be published then `NoteDiffFile` will fail to create
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary We get reports from Slack wherein diff notes can be created without `NoteDiffFile` due to error . They show up as empty threads: ![Screenshot_2025-05-22_at_10.30.39_PM](/uploads/51ce5e479dac428e548bdff8b752dec2/Screenshot_2025-05-22_at_10.30.39_PM.png){width=400} These are getting created after draft notes are published. Example of some draft notes: ![Screenshot_2025-05-22_at_10.30.59_PM](/uploads/f7acdfaccc1538c758180c1caa46535b/Screenshot_2025-05-22_at_10.30.59_PM.png){width=400} And how they look like in the "Submit your review" drawer: ![Screenshot_2025-05-23_at_9.21.01_AM](/uploads/017b6c492de7c05f4c89c6e5c240a3b8/Screenshot_2025-05-23_at_9.21.01_AM.png){width=400} ### Steps to reproduce Not clear yet. But MR ended up in a state like this after publishing review and the publish request failed. ### Example Project https://gitlab.com/gitlab-org/gitlab/-/merge_requests/191915 https://gitlab.com/gitlab-org/gitlab/-/merge_requests/190266 ### What is the current *bug* behavior? Draft notes are published but broken state. ### What is the expected *correct* behavior? Draft notes get published with `NoteDiffFile` created.
issue