The commit of #1818556: Convert nodes to the new Entity Field API broke Edit module's metadata callback. Note that there is test coverage. But the whole business of moving from EntityPG to EntityNG (#1346214: [meta] Unified Entity Field API) has caused some of the tests to test EntityPG instead of EntityNG, which was the case here. Hence this could go on undetected.
The fix is easy:
- $items = $entity->get($field_name);
- $items = $items[$langcode];
+ $items = $entity->getTranslation($langcode)->get($field_name)->getValue();
However, it's the tests that also require updating to EntityNG. For that, I copied a subset of #1822000-26: Clean up Drupal\field_test\Plugin\Entity\Type\TestEntity verbatim — it was Berdir who wrote the fixed tests and hence should be credited here.