Restoring Order

Restoring Order is a quest and achievement/trophy in the Fallout 4 add-on Automatron.

Detailed walkthrough
The Sole Survivor is tasked with finding and stopping the Mechanist once and for all, so head to the RobCo sales and service center where The Mechanist's lair is hidden.

Once inside, player character must use their robot, with an attached M-SAT, on several devices stuck to walls, to open the blast proof doors throughout the lair. After a lot of battling, the player character will finally make it into the Mechanist's war room. Inside, they will battle several waves of increasingly tough robots, the last one being a Dualbot.

Once it has been defeated, the power will fail and a speech check will allow the player to make the Mechanist stand down. Note that the dialog here is timed, so if you wait too long to speak with the Mechanist, she will turn hostile. After explaining herself, she will remove her helmet, revealing herself to be Isabel Cruz.

She will then thank the Sole Survivor, before giving them her costume and walking away. She will usually also give the side quest Rogue Robot. Ada will also thank the player character, at which point the main storyline of Automatron is complete.

Bugs

 * After the power fails, the Mechanist may not speak with you, making the quest impossible to complete. This may be due to shooting any of the robots on the assembly line after the first wave of the final battle.
 * Loading a save from before the start of the battle may fix the problem.
 * Wearing power armor with a Targeting HUD mod may make the Mechanist & Sparks become hostile towards you. Removing the mod or the entire helmet or exiting your power armor can fix this..