If $f$ is Riemann integrable and $g$ is continuous, what is a condition on $g$ such that $g \circ f$ has the same discontinuity set as $f$? I know that if $f$ is Riemann integrable and $g$ is continuous, then the discontinuity set of $g \circ f$ is contained in the discontinuity set of $f$. How would I go about finding a sufficient condition for $g$ so that the discontinuity sets are equal? I've been playing around with the idea that $g$ has to be strictly continuous, but I haven't been able to design a proof that shows that this is in fact the case.

I don't know if Riemann integrability has much influence here. What you are aiming at is that where $f$ is discontinuous you would have to make $g$ map values taken by $f$ near the discontinuity to different values.
For example if we take $f$ to be the Heaviside step function and we see that $f$ takes values $0$ and $1$ near it's step, but if for example $g(x) = x(x-1)$ (that is taking the value $0$ for both $0$ and $1$) we would have $g\circ f=0$.
One way to achieve this requirement is for $g$ to be strictly monotone since that would mean that $g$ will map the various values taken by $f$ near it's discontinuity points to map to different values.
To get this reasoning more strict it would be useful to use an alternate definition of continuity and limit. I think the following definition would be equivalent to the standard (in metric spaces at least):

Given a function $f$, consider $\overline f(x)=\bigcap f(\Omega_x)$ where $\Omega_x$ are open neighbourhoods of $x$. $f$ is continuous if $\overline f(x) = \{f(x)\}$, and similar the limit $\lim_{x\to a}f$ is defined as the element of $\overline f(x)$ if it's unique.

The equvalent requirement of $g$ (given that it's continuous) is then that $g(\overline f(x))$ should contain at least two elements whenever $\overline f(x)$ contains at least two elements.
