When I am done diffusing bombs for you. Segfaults, bugs, use cases and presets…
Overexposure has nothing to do with RGB spaces, it has to do with poor settings. Basecurve works in RGB indeed, but it’s mistake is to apply one single 1D transfer function on the 3 channels, which does not preserve chrominance.
This is exactly what we want to avoid. Working in full gamma-encoded pipelines breaks light-transport models and messes up colours. If one module needs perceptually-encoded data, it can encode at its input and decode at its output, but the pipe should stay linear and every kind of masking/blending will fail if this condition is not met (the reason is grounded into maths, see Parseval’s theorem).
No good algorithm should rely on the assumption that the middle grey is 18%, 50% or any fixed value, because those are assumptions from 1976 that are valid for low dynamic range imagery (< 8 EV) and assume 100% is diffuse white (so the shot was exposed for mid-tones). Your today’s average APS DSLR hits 10 EV of dynamic range, so please let these assumption for history where they belong, because we now expose for highlights and 100% luminance is likely to be specular highlights, so the middle grey can be anywhere between 0 and 18 %.
HDR blendings are mostly garbage anyway. All of them.