drop legacy secret code
assign id a priori and callback after publish