The worked schedule is deterministic because events control the critical moments. First the old worker reads generation 1 and pauses. Next the replacement obtains the write transaction, increments generation to 2, and stores fresh in the previously empty slot. Commit makes that state visible before replacement_done is signaled.
The old worker then resumes carrying its old token. Its update checks both token equality and absence of a result. The current token is 2 and the result is already fresh, so storage changes no row. The assertion checks zero rather than assuming that an old worker would voluntarily abandon its result. This matters because stale workers can be buggy, paused, or disconnected from the scheduler.
Final inspection confirms one row, current generation 2, accepted result fresh. Correctness here means conflict control, not correctness of a model-generated answer. Both result strings are fixed fixtures. A production system still needs input validation, result verification, durable ownership transitions, suitable lease durations, and receiver-side effect protection. The storage invariant is a valuable component because it remains effective when the old worker resumes unexpectedly, but it is not a complete orchestration platform by itself.