Brief description of the bug
With package option largestsep, titlesec does not use the larger skip, but instead use the sum of <after-sep> from the first heading and <before-sep> from the second heading.
MWE demonstrating the issue
MWE adapted from https://tex.stackexchange.com/q/269484 with more exaggerated spacing:
\documentclass{article}
\usepackage{lipsum}
\usepackage[largestsep]{titlesec}
\titlespacing{\section} {0pt}{20pt}{20pt}
\titlespacing{\subsection}{0pt}{20pt}{10pt}
\begin{document}
Expected:
\vskip20pt
\Large Section
\vskip20pt
\large Subsection
\vskip10pt
\normalsize \lipsum[1][1-5]
\noindent
\hrulefill
Actual:
\section{Section}
\subsection{Subsection}
\lipsum[1][1-5]
\end{document}

Possible fixes
titlesec uses \vspace to add <after-sep>, and this is the bug.
In the LaTeX2e kernel \vspace{#1} expands to ... \vskip #1 \vskip\z@skip ..., so when the next <before-sep> appears in \ttl@titlespace{<before-sep>} (since \let\ttl@titlespace\addvspace in this case), the \addvspace acts on \z@skip and not the intended <after-sep>.
Brief description of the bug
With package option
largestsep,titlesecdoes not use the larger skip, but instead use the sum of<after-sep>from the first heading and<before-sep>from the second heading.MWE demonstrating the issue
MWE adapted from https://tex.stackexchange.com/q/269484 with more exaggerated spacing:
Possible fixes
titlesecuses\vspaceto add<after-sep>, and this is the bug.In the LaTeX2e kernel
\vspace{#1}expands to... \vskip #1 \vskip\z@skip ..., so when the next<before-sep>appears in\ttl@titlespace{<before-sep>}(since\let\ttl@titlespace\addvspacein this case), the\addvspaceacts on\z@skipand not the intended<after-sep>.