"Cancel doesn't mean 'undo the world.' It means 'stop cleanly, and clean up only what I know for certain is mine.'"
Pause and Cancel Are Cooperative
A long copy has to be interruptible — a user should be able to pause it or cancel it. But interruption can't happen at a random instant, or you'd leave the operation in an unknown state. Waygate makes pause and cancel cooperative: the engine checks for a pause/cancel request only at safe checkpoints — between files in a multi-item copy, between chunks in a large transfer. At those points the state is known and the journal is consistent, so stopping is clean.
The Partial Stage Is Never Promoted
Here's the core rule this lesson defends: a partial stage is never presented as the destination. If you cancel a copy midway, the half-written staging item does not get published to the real name — publishing only ever happens after full verification, which a canceled copy never reaches. The user sees the operation stop; they never see a truncated file wearing the destination's name. Cancel stops the road before the reveal, so the costume never comes off.
Cleanup Cleans Only What It Owns
When an operation cancels, it may clean up — but only artifacts it positively owns (its own staging items), and only when there's no uncertainty. It will delete .waygate-stage-op_7a3f because the journal proves that item belongs to this operation and the operation didn't finish. It will not touch anything it can't prove it created. Ambiguity means leave it and flag it, never a speculative delete. Directory copies build a bounded, lazy work graph off the main thread, and progress honestly separates bytes, items, current item, and indeterminate work — so a pause always lands somewhere the engine understands.