If the attachment is to meet legal min barrel length requirements, Fed law requires it to be "permanent".
Ask the ATF what that means (this week...

) Blind pins, pins welded over, and silver solder (the high temp solder previously mentioned) have been acceptable in the past, I don't know what they consider acceptable today (hence the "this week" comment - the ATF is known for changing their minds on things)
Get their ruling. If possible, get in it writing on ATF letterhead with an agent's NAME on it. That's about all you can do to CYA, if they later on change the rules.