The bug
Villages can generate right below height limit, resulting incomplete houses. This is very rare in default worlds. But it can be created easily in customized superflat worlds.
How to reproduce
Create a customized superflat world.
253*minecraft:dirt;1;village
Find a village
Linked issues
is blocked by 1
Attachments
Comments 11
Does this affect 1.12.2? 18w03b?
Yes, it affects 18w03b.

This currently cannot be reproduced because of MC-136526.

Confirmed in 18w43b, with a world of height 255 only 1 layer of village generates. I think this also would still occur in 1.13.2 with MC-136526 being fixed for such heights, but I haven't tested.
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 1.17.1.

Cannot confirm in 1.21.1 on superflat, villages generate underground with this preset:
381*minecraft:dirt;1;village
Provide seed + coordinates.