Note:  after writing this I realize that this question is perhaps philosophical, but I'm interested in how the industry handles this scenario regardless.I have recently been working with a code base that is not yet as testable as it should be.  I've seen some junior developers check in code that breaks use cases, which is usually identified by another developer a few days after the check-in.Assuming that we can't achieve code coverage yet, are there technical solutions for holding developers accountable for bad check-ins in addition to a non-technical approach; discussing the commit and having the dev address the issue in a new commit.
what is the best way to ensure accountability in code checkins?
code quality;management;teamwork;code reviews
Two simple measures:Code reviews (already mentioned by others) before each check in. You do not need to explain every detail of what you check in, but the reviewer should get an idea of the changes that are being checked in. You can program your RCS to reject check-ins whose check-in text does not contain a tag REVIEWED BY: ....Agree with the rest of the team that if a check-in breaks any unit tests, the developer who has performed the check-in must fix the code until those unit tests are green again (possible measure: write a bug and assign it to him / her). As an alternative: if a team member detects a check-in that breaks the unit tests, he or she can revert the changes. The author of the wrong check-in is not allowed to check-in again as long as the problem is not fixed locally (unit tests are green locally).NOTEPoint 2 has been edited taking into account gnat's comment.