The high-stakes brinkmanship between the state Labor government and powerful rail unions has been leading to this moment for months.