Pretty much agreed with here.Buttoned barrels are typically treated after rifling and before contouring. The big issue occurs when a manufacturer tries to button rifle and tapered blank. Mike Walker told of button rifling some Springfield barrels which were already contoured. The bore ended up bigger at the muzzle.
When I started gunsmithing, we bought most of our barrels as 1 1/4 inch blanks (mostly from Shilen). I contoured these to various contours from Winchester featherweight to Heavy Varmint, and everything in between. Of the hundreds I turned, I recall one which distorted. Shilen replaced the barrel and paid for my labor.
Surprisingly enough, the barrels I encountered which warped the worst were a couple of cut-rifled barrels. Plainly, the material used was not properly relieved and I had to straighten the first one halfway through every cut. Frustrated, I put both barrels in the kitchen oven and turned it as high as it would go and cooked them for a couple hours. I don't know what the temp was, but it was enough to settle those barrels down enough that I could finish them.
I have milled Shilen barrels, full octagon, half octagon, and half octagon with a rib. They worked out fine. WH
Also the material should start out heat treated and stress relieved. Actually double stress relieved. Then after buttoning you/they should restress relieve the blank again.
Some places take short cuts and use a poorer grade of material. That just makes things worse.
On a button barrel you can not have it precontoured before doing the button rifling... the different wall thickness will play hell with the bore sizes.