Direct quote from the darktable 4.0 manual:
When the CCT is followed by “(invalid)”, this means that the CCT figure is meaningless and wrong, because we are too far from either a daylight or a black body light spectrum. In this case, you are advised to use the custom illuminant. The chromatic adaptation will still perform as expected (see the note below), so the “(invalid)” tag only means that the current illuminant color is not accurately tied to the displayed CCT. This tag is nothing to be concerned about – it is merely there to tell you to stay away from the daylight and planckian illuminants because they will not behave as you might expect.
In other words: the coefficients provided don’t fit with either of the models behind the “colour temperature” definition. They still work to make sure a neutral patch is displayed as neutral.
This can happen for any CCT value, not just a particular range of values.
One example where you can get this: light reflected from a coloured surface, e.g. grass or leaves.
Note: even though I use a Sony camera, I rarely see that “(invalid)” tag on normal daylight images. If I get it, I either have a coloured (green) background taking up an important part of the image, or I have a “strange” lighting (reflected, or filtered).