Before Obeya deletes a card's workspace, it runs the repository's stop command and then ends whatever still runs from the folder. Pull request #67 brought that in (its own demo, recorded on Windows: here). The tables show the same cases run on macOS against the pull request as it came and with the fixes on top. ✓ is what should happen.
A stop command whose script the card's older branch does not have yet is skipped: nothing of it can run there. Every other stop command runs. Shown with harmless stand-ins that read or name the same things.
| Stop command, in a workspace without those files | Pull request | With the fixes |
|---|---|---|
node .obeya/app.mjs stopthe script is not on this branch yet | skipped | skipped |
echo stopped $(cat .run/app.pid 2>/dev/null)reads a file of process IDs, like kill $(cat .run/app.pid) | skipped | runs |
echo stopped localhost:3000/stopnames an address, like curl localhost:3000/stop | skipped | runs |
./scripts/stop.shthe script is not on this branch yet | skipped | skipped |
A workspace with an app running in it, a helper the app started that works elsewhere, a terminal someone opened in it, and someone else's viewer of one of its files. The app and its helper should end. The terminal and the viewer belong to someone, not to the app, and should keep running.
/var/folders/…, which macOS reports as /private/var/folders/…| Pull request | With the fixes | |
|---|---|---|
| The app, started in the workspace | running | ended |
A helper the app started, working in /tmp | running | ended |
| A terminal opened in the workspace | running | running |
A viewer of one of its files (tail -f …/notes.txt), started elsewhere | running | running |
| Time to find and end them | 424 ms | 525 ms |
| Pull request | With the fixes | |
|---|---|---|
| The app, started in the workspace | ended | ended |
A helper the app started, working in /tmp | running | ended |
| A terminal opened in the workspace | ended | running |
A viewer of one of its files (tail -f …/notes.txt), started elsewhere | ended | running |
| Time to find and end them | 3383 ms | 345 ms |
A clone that leaves the pool is checked for files that would be lost after its app has ended, not before, so a snapshot the app saves as it ends keeps the clone on disk. On Windows the process listing has a time limit of 30 seconds, and processes that started before the workspace existed are read too, as long as time allows. The Windows part was only typechecked here, not run.