When Can Software Honestly Say Done?
You press Delete. The thing disappears. That should be the boring end of the story.
At Teramot, a data source has a life in the product and another in the system that does the actual data work. We found a case where the product erased its copy after the other system failed to delete its own. The source was gone from the screen. Its scheduled job kept running.
That gap matters even if you never think about the machinery behind the button. The person who deleted the source had no reason to expect more work from it. And with its entry gone from the product, there was no obvious way to try the deletion again.
One button speaks for more than one system
The person sees one action. Behind it, Teramot must tell the data engine to remove its source, then remove the record that makes that source visible and manageable in the product.
The old path handled one awkward case badly: a source whose first setup had not finished. If the engine could not remove it, Aleph wrote a warning and carried on deleting its own record. The warning was useful to an engineer reading logs. It did nothing for the person looking at an empty source list.
I like to think of this as a receipt problem. Sending a request is the equivalent of asking a restaurant to cancel an order. Removing the order from your app before the kitchen acknowledges it does not stop dinner from arriving.
We changed what happens when the answer is missing
Aleph now keeps the source record when it cannot confirm that the engine removed its copy. If it cannot find the engine’s source, it tells the caller the source was not deleted and can be retried. If the engine refuses the deletion, the process stops and reports the failure. When the engine confirms deletion, Aleph can remove its own record.
We tested the paths where the engine fails or times out, and checked that the source remains available for another attempt. The successful path still removes it. This was a small change to the code, but a larger change to what the product is willing to claim.
Keep the handle until the work it controls is finished.
The meaning of done
“Done” is a statement about the world beyond the screen. A source disappearing from a list is something the product can do by itself. Stopping the work behind that source requires an answer from the system doing it.
Sometimes that answer is “try again.” That is useful information: the source is still visible, the next action is possible, and nobody has to discover a running job by accident. In our case, that honesty is what keeps a failed delete from turning into an invisible one.
— Valentín Torassa