SAN FRANCISCO — I hunched over the stove wearing protective eyewear and rubber gloves, boiling a pot of water laced with a toxic, corrosive chemical.

I wasn’t trying to dissolve a body like Walter White in “Breaking Bad.” I wanted to recreate the perfect East Coast bagel, the kind with a glossy brown, crunchy crust and pillowy crumb, the kind I’ve found to be elusive here in San Francisco, where airy buns with holes try to pass for the real thing.

The bubbling caldron was the final step in a three-month baking saga that was as maddening as it was gratifying. The good news is it only took me 300 bagels to nail it. The frustrating news is that the key to nailing it had been just across the Bay Bridge all along.