No

needed, cause I am totally not gonna get sucked in, just going to make an observation.
As I always understood it: you punish a child for being disobedient or for doing something they know is wrong or that they have been told not to do.
You had not yet forbidden him to play on roofs. He was with another child who may, by your own admission, not have the best judgement. Your son is young, and "just getting the hang of playing outside". Honestly, though your son may have had a momentary fleeting thought of "hmmm, mom probably wouldn't be crazy about this", his "older" friend probably convinced him that it would be ok, and he really wanted to do it , and Hey! No one had told him not to!
IMHO, you had it right all the way up to the grounding. You got him down, got him to safety, gave him all the info, told him why he shouldn't do it, told him not to ever do it again, AND took care of his friend as well. You hit all your bases and did a great job!

He has promised to never do it again. My opinion would be that you punish the child AFTER he disobeys, which he hasn't done yet - no one had told him not to do it, and there was no one to tell him not to do it as he was doing it.
Of course, now that he IS grounded, don't go back on it LOL. Never go back on it, that sets a bad precedent as a wimpy mommy and once a kid gets THAT between their teeth you are toast.

I know my 7 year old, and I would be DONE if she saw me as an easy mark. Give him, and yourself, extra hugs tonight - mommy-ing is hard work!