The agreement was fulfilled when the referee completed his 6 months, no? At that point it became a debt that the company owed jzhwu, and he only quit a month after. I don't think debts immediately disappear when you quit a company (unless you sign some sort of agreement to that effect). So by default I'd guess that the debt cannot "vanish on resignation".
> Must the company compensate you? It's ambiguous.
It's probably a problem long settled by the courts and labor regulations, actually. Not ambiguous at all.