Heat differential in irreversible process – what object is it mathematically? In Thermodynamics, when we talk about quasi-static reversible processes, we often formalize them this way: we identify the state space with a simply connected manifold. On it we have two 1-forms, $đQ$ and $đW$, from the 1st law they add up to an exact form: $\mathrm d U = đQ + đW$. The process is then represented by a curve $\gamma$ on the manifold. If we're interested in the total heat added to the system, we can easily just integrate $đQ$ along the curve:
$$
  Q = \int_\gamma đQ \: .
$$
A notable fact about $đQ$ is that it's holonomic with an itegrating factor $1/T$, therefore:
$$
  \oint_\varphi \frac{đQ}{T} = 0 \quad \text{ for all } \varphi \: .
$$
This formalism breaks down a little when we're talking about quasi-static irreversible processes (for example a slow expansion & contraction of a piston with friction, as opposed to a non-quasi-static process like shaking the system until it warms up). For example, the increase in the system's entropy over one cycle of a cyclic process $\gamma$ is calculated via: (source)
$$
  \Delta S = \oint_\gamma \frac{đQ}{T} \: .
$$
We see that $1/T$ is clearly not an integrating factor for $đQ$. In fact, $đQ$ is not a 1-form at all – imagine the process $\gamma$ goes from state $A$ to state $B$ and then back using the exact same trajectory in the state space. Physically, it's quite plausible that the system would get some $\Delta S > 0$ from friction, but mathematically it can't be:
$$
  \Delta S
  \;=\; \oint_\gamma \frac{đQ}{T}
  \;=\; \int_A^{\!B} \! \frac{đQ}{T} + \int_B^{\!A} \! \frac{đQ}{T}
  \;=\; \int_A^{\!B} \! \frac{đQ}{T} - \int_A^{\!B} \! \frac{đQ}{T}
  \;=\; 0
$$
This is because the integral of a 1-form cannot depend on the curve it is being integrated along. However, the friction does depend on the trajectory, therefore $đQ$ also has to depend on it somehow. Is there any object in differential geometry which has such properties? That is, one which can depend non-trivially on the path it is being integrated along? Or is the “state space = manifold” description just a bad fit for this scenario?

There is a great Q&A, which provides an alternative formalization for the Clausius theorem, so that it works even for non-quasi-static processes: In thermodynamics, how can $\oint \frac{dQ}{T}$ make sense for an irreversible process? However, it is constructed somewhat ad-hoc for the Clausius theorem. I would love to know if there's any object “$đQ$” (and other differentials in irreversible processes) that would make sense all by itself, not only as a handwavy notation for an actual integrand.
 A: I think that your doubts are the consequence of the historical sloppy introduction of the so-called inexact differentials in thermodynamics.
That is a very poor naming for something which, in general, is not a function of the thermodynamic point and has nothing to do with differentials in any of the possible mathematical definitions. The best way of understanding the status of $đQ$ and $đW$ is by recalling that heat ($q$) and work ($w$) are the integrals   over the time of measure of the corresponding fluxes (functions of time). Therefore, in general they are finite quantities, not related to the linear approximation of any function of the state. What the first principle of thermodynamic says is that $q + w$, for all the possible thermodynamic processes between equilibrium states is the difference of a function of state (the internal energy $U$).
$$
\Delta U = q + w
$$
Of course, there will be pairs of states close enough to allow a good description of such difference through the differential of $U$. But this fact does not transform the corresponding $q$ and $w$ into differentials themselves.
Then, the notation $đQ$ and $đW$  should be interpreted as a fancy way to mean that the corresponding process connects two thermodynamic states such that their difference of internal energy is well approximated by $dU$. But it is only when one substitutes the real non quasi-static and irreversible process with a quasi-static and reversible process joining the same two states that it is possible to represent $dU$ as a differential form.
Therefore, the proper interpretation of something like
$$
 \oint \frac{đQ}{T}
$$
is by looking at this formula as a conventional representation of
$$
 \int_{t_0}^{t_1} \frac{\dot q(t)}{T(t)}dt
$$
where $t_0$ and $t_1$ are the initial and final time of a cyclic process starting and ending at the same thermodinamic state. $\dot q(t)$ is the rate of heat exchanges between system and environment.
A final word of caution is in order about the best mathematical model for the space of the thermodynamic states. Although most of the current introduction to differential forms heavily hinges on calculus on differential manifolds, in the case of thermodynamics, calculus on differential manifolds looks like overkilling. The space of equilibrium thermodynamic states of a simple system described by internal energy, volume and number of moles is in general an open cone, i.e., the positive octant of $\mathbb R^3$, excluding the planes $U=0$, $V=0$ and $n=0$, which has a quite trivial structure (one chart is enough to describe it). Calculus on $\mathbb R^3$ is all we need.

Reference: it is not easy to find a description of thermodynamics along this line in introductory textbooks. One noteworthy exception is the Prigogine and Kondepudi book (Kondepudi, D., & Prigogine, I. (2014). Modern thermodynamics: from heat engines to dissipative structures. John Wiley & Sons)
A: Everything you have said here is correct. Entropy is a function of state (as you essentially prove in your question) so any path that brings the system back to its initial state must have $\Delta S = 0$. It is important to remember, however, the the entropy of the system is not the only entropy in play. You must also consider the entropy of the surroundings. In an irreversible process the entropy of the system can remain constant, or even decrease, provided the entropy of the surroundings increases to compensate. Even if the processes generating the entropy are decidedly inside the system (although exactly where entropy is being generated is often quite subtle) that entropy can be transferred out to the surroundings in heat transfer.
A: Other answers have pretty much covered it but I wanted to throw in a reference, as well as my take:
$T$ is dependent on the source of the infinitesimal heat in the integral, and as pointed out in the linked Phys SE post, it's really the temperature of the heat bath. What is considered the heat bath changes as a function of the "location" in the cycle.
This is well described in Reichl, A Modern Course in Stat. Physics.
The origin of Clausius' inequality stems from the fact that the ratio between absorption and expulsion in a Carnot cycle must be of the form:
$$f(T_h,T_c)=g(T_h)g^{-1}(T_c)$$
Considering step 1-2 heat absorption, and step 3-4 heat expulsion, we get the Kelvin scale,
$$\frac{\Delta Q_{43}}{\Delta Q_{12}}=\frac{T_c}{T_h} \rightarrow \frac{\Delta Q_{34}}{\Delta Q_{12}}=-\frac{T_c}{T_h}$$
This can be easily shown using $PV=nRT$ and $U=(3/2)nRT$ as the equations of state in a Carnot cycle.
For the entire cycle we then have,
$$\frac{\Delta Q_{12}}{T_h}+\frac{\Delta Q_{34}}{T_c}=0$$
You can do this an arbitrary number of times, so long as the system is returned to its original state:
$$\sum_{i=1}^n \frac{\Delta Q_{2i-1,2i}}{T(i)}=0 \tag{1}$$
In my opinion this is where something is lost in the calculus translation of (1). $T(i)$ is a function of which step you are currently in. More specifically, it is the temperature of the heat bath which you are either transferring heat into or out of ($T=T_{bath}$). To me, this is not entirely clear in the continuous definition:
$$\oint \frac{dQ}{T}=0$$
This definition is tempting because it indicates that the value of the integral should be independent of the path taken. Once again, from (1), and the dependence of $T$ on $i$ (as I have written it), it cannot be generally true that the value of the integral is independent of path.
Edit: I didn't really address the question in the title. I think the correct answer is that there's one physical reality (1), however, one mathematical object may not be able to describe its behavior as it is either path-independent (reversible) or path-dependent (irreversible).
