  Designing dynamic algorithms against an adaptive adversary whose performance
match the ones assuming an oblivious adversary is a major research program in
the field of dynamic graph algorithms. One of the prominent examples whose
oblivious-vs-adaptive gap remains maximally large is the \emph{fully dynamic
spanner} problem; there exist algorithms assuming an oblivious adversary with
near-optimal size-stretch trade-off using only $\operatorname{polylog}(n)$
update time [Baswana, Khurana, and Sarkar TALG'12; Forster and Goranci STOC'19;
Bernstein, Forster, and Henzinger SODA'20], while against an adaptive
adversary, even when we allow infinite time and only count recourse (i.e. the
number of edge changes per update in the maintained spanner), all previous
algorithms with stretch at most $\log^{5}(n)$ require at least $\Omega(n)$
amortized recourse [Ausiello, Franciosa, and Italiano ESA'05].
  In this paper, we completely close this gap with respect to recourse by
showing algorithms against an adaptive adversary with near-optimal size-stretch
trade-off and recourse. More precisely, for any $k\ge1$, our algorithm
maintains a $(2k-1)$-spanner of size $O(n^{1+1/k}\log n)$ with $O(\log n)$
amortized recourse, which is optimal in all parameters up to a $O(\log n)$
factor. As a step toward algorithms with small update time (not just recourse),
we show another algorithm that maintains a $3$-spanner of size $\tilde
O(n^{1.5})$ with $\operatorname{polylog}(n)$ amortized recourse \emph{and}
simultaneously $\tilde O(\sqrt{n})$ worst-case update time.
