I created a 100% CE chameleon artifact and used it to wander around inside a daedric ruin with hostiles. I opened the console, clicked on a hostile and typed:
GetDetected "player"
Most of the time, it returned 1. On some occasions it did return a 0. However, when I went into sneak mode, it returned 0 on every attempt. So it would seem that the reason bandits don't give the "Who's there" comment is that they are somehow still detecting the chameleoned player even if they aren't responding in a hostile manner. I even used Larrius Varro's "present" to make myself temporarily 125% chameleoned. It seemed to make no difference. The response to getdetected player was still fairly arbitrarily 1 or 0 even when chameleon exceeded 100%.
To be thorough, I ran the same test in Balmora on non-hostile NPCs. The results were identical.
It seems more likely that the issue is associated with the GetDetected function itself than in the dialog system.
Maybe it's an issue with rounding up the displayed HUD value where it would be more consistent with behavior to round it down instead.
This has always been my assumption as well. It appears that both charges and magicka are rounded up in the HUD. Spellcasting suffers the same problem as enchantment casting in that regard. It's possible to have the same amount of magicka available as a spell requires, but be unable to cast the spell. However, if you have a magicka regen mod active, you can actually watch the percentage chance to cast jump from 0% to a normal value even when the magicka value doesn't change. I've always guessed this mean the rounded up value crossed the integer point and the spell was suddenly castable even though the indicated value was unchanged.
Oh, and I agree that rounding down in the GUI would be more intuitive under the circumstances.
[edit] I should point out with respect to your example, that the number of charges required to cast an enchantment is ALSO rounded. So when the ring starts off with 20 charges and it says it requires 5 charges to cast, that cast cost may actually be as high as 5.4999 charges to cast. This explains why you're not getting the 4th cast even though you should be able to. It also explains why you would need 6 charges on the ring to be able to cast: The difference in time between when you have the 5.4999 charges available to cast and the time when the ring's charge hits 5.5 and the value is rounded up is too short a time to even detect. For all intents and purposes, the ring would have to say 6 to cast a spell that says it requires 5 because one value is rounded up while the other is rounded down.
And as far as spell cast cost and enchantment cast cost, perhaps those values would be better off rounded to the next higher integer. (e.g. 4.2 charges available displays 4, while 4.2 charges required displays 5)