Saving only after discrete callback

Discrete callback is saving both before and after the callback even when save_positions = (false,true).
For example:

function dynamics(u,p,t) 
    du = [2.0,3.0,1.0]
    return du
end

prob = ODEProblem(dynamics, [0.0,0.0,0.0], (0,10))
cond_true(u,t,integrator) = true
affect!(integrator) = (integrator.u[1] = integrator.t)
cb = DiscreteCallback(cond_true, affect!, save_positions = (false, true))
testsol = solve(prob, Tsit5(); callback=cb)
plot(testsol)

plot1

Here, u[1] should have been equal to u[3]. I am seeing two saves at each time point.
If I manually scan for sol.t[i]==sol.t[i+1], I could separate out the saves after callback but is there some better way to do this?
My understanding is that solver is saving each successful step and then checking callback conditions, and then saving that. Is it possible to somehow tell the solver to update (not append) the solution if the new time point is equal to previous time point?

PS: I made this post in a thread about similar discussion without realizing it was a very old discussion. Sorry about that.

Can you open an issue on DifferentialEquations.jl? @Oscar_Smith can help look into it.

FWIW, we have an open issue on this in JumpProcesses too: `save_positions` not working with callbacks · Issue #327 · SciML/JumpProcesses.jl · GitHub

how are discrete callbacks supposed to work with saving? does a false as the 1st argument mean that they are supposed to suppress the normal step save?

It’s supposed to just save after the callback is applied in that case.