Pricing lives in one pure file
Every entitlement decision is a side-effect-free function. Swapping the whole storage layer for Postgres touched the service and left the logic untouched — and a complete pricing model change took one session.
Reserve before you spend
A render places a hold before the provider is called and commits only after it returns. A failed render costs the writer nothing, and two simultaneous renders cannot both claim the last take.
Previews are cut, not generated
You cannot generate a clip and extend it later — that is a different song. So the full master is always rendered and the 15-second preview is sliced out of it with byte math on the frame headers. No ffmpeg in the dependency tree.
The feature that got deleted
Per-song AI video shipped end to end, then came out: $0.13 per second against $0.95 of revenue per song. It worked. The arithmetic did not.