The bug
In some rare cases, sky light can remain after breaking a block.
How to reproduce
All steps are also demonstrated in the
[media]video.
Get a flat surface at a sub chunk. A superflat world with only the first 16 blocks works great.
Make sure no blocks are in this subchunk or in the neighboring subchunks at the same level or higher.
Place a solid block with one air block between the surface. This is shown in "picture-1.png".
After removing this block, notice that the darker light level remains. See "picture-2.png". This is more clear with "Smooth Lighting: OFF", which you can see in "picture-3.png".
Now place a block directly on top of the surface, and place a solid block with an air block between the surface near it. This is the setup shown in "picture-4.png".
Removing this block, the light level updates correctly. See "picture-5.png"
The exact place that surrounding blocks affect whether or not the sky light is updated, is unclear to me. There is also a zone where having blocks won't update the skylight, but replacing blocks in that zone will update the skylight.
Related issues
Attachments
Comments

Confirmed. Easiest to see with lighting set to moody.

An analysis and solution is given in MC-170010.
This is simply a rendering issue: the bottom chunk is not marked for rerendering. Causing any block update in that chunk or reloadong the world will fix the issue.
The actual skylight as shown in F3 is correct.

Yep, can confirm as well!
Interesting rendering issue.

Can confirm in 1.17.1.
