Just tried to review, but the changes in single commits are soo huge that they literaly crashed my browser.
Could you please create smaller commits that are self contained (ie. first introduce the actual metadata object, with tests but without using it and then commit by commit introduce it in the models that require it).
That way it would be much easier to review and reason about. There is a lot of good information in the PR description, but this information is missing in the commits. Writing smaller atomic commits helps also writing better commit messages, because the context is smaller and better explained that way.
This is a great resource I share often. Especially #7 is very important. We also linked some more notes about good git commit messages and why they matter in our
CONTRIBUTION.md
file.
https://cbea.ms/git-commit/