Use cases exist, and my fix makes sure the MIME type in the database is correctly set. But a webserver using the file extension to determine the MIME type is (still) fooled by this, leading to errors.
The main question probably is: Does changing the extension break the expectation of “keep the existing filename”?
It’s certainly nice to be able to replace images, but I would suggest a different process for this.
Instead of saying “this png is now a svg” (or even a pdf) we could provide a better “usages” view that allows for (batch) updating properties of affected nodes for example.
This way the node type validation would still be respected and you’d have more control over it.
Replacing the asset itself feels a bit like changing a user entity completely while keeping its id
One thing to remember: currently when the redirecthandler is installed it will also create a redirect if “keep the existing filename” is not set. When we still change the extension if it’s set, then we also have to adjust the redirect creation behaviour for that case.
IMO the most pragmatic thing is doing exactly that.
That we create a special view to replace assets sounds too far into the future