  Driven diffusive systems may undergo phase transitions to sustain atypical
values of the current. This leads in some cases to symmetry-broken space-time
trajectories which enhance the probability of such fluctuations. Here we shed
light on both the macroscopic large deviation properties and the microscopic
origin of such spontaneous symmetry breaking in the open weakly asymmetric
exclusion process. By studying the joint fluctuations of the current and a
collective order parameter, we uncover the full dynamical phase diagram for
arbitrary boundary driving, which is reminiscent of a $\mathbb{Z}_2$
symmetry-breaking transition. The associated joint large deviation function
becomes non-convex below the critical point, where a Maxwell-like violation of
the additivity principle is observed. At the microscopic level, the dynamical
phase transition is linked to an emerging degeneracy of the ground state of the
microscopic generator, from which the optimal trajectories in the
symmetry-broken phase follow. In addition, we observe this new
symmetry-breaking phenomenon in extensive rare-event simulations, confirming
our macroscopic and microscopic results.
