Investigate how a draft note can be published then NoteDiffFile will fail to create

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

These are getting created after draft notes are published. Example of some draft notes:

Screenshot_2025-05-22_at_10.30.59_PM

And how they look like in the "Submit your review" drawer:

Screenshot_2025-05-23_at_9.21.01_AM

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

!191915 (merged)

!190266 (closed)

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.

Edited by François Rosé