  We provide an elegant homological construction of the extended phase space
for linear Yang-Mills theory on an oriented and time-oriented Lorentzian
manifold $M$ with a time-like boundary $\partial M$ that was proposed by
Donnelly and Freidel [JHEP 1609, 102 (2016)]. This explains and formalizes many
of the rather ad hoc constructions for edge modes appearing in the theoretical
physics literature. Our construction also applies to linear Chern-Simons
theory, in which case we obtain the extended phase space introduced by Geiller
[Nucl. Phys. B 924, 312 (2017)].
