> My company has a huge problem where a junior engineer will complete tasks very quickly and appear to be extremely productive, but they're just hiding tech debt that has to be cleaned up later.
You're so right. Measuring wrong the impact, without taking into account incidents, tech debt, and so on. A classic.
For example: storing an API key in a plain text JSON preferences object that many different parts of the system read and return to users. Determining if there was a breach, figuring out who to talk to at the third-party company to get the key rotated, etc takes time. The person doing that work doesn't look very productive because they aren't shipping a lot of code that impacts customers. The developer who put the API in plain text looks like a 10x engineer because they shipped a customer-facing feature really quickly.